rusticl: release borrow on device build before linking

This allows for a later refactor to share linking code between
clBuildProgram and clLinkProgram in which the device build is borrowed
mutably.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36497>
This commit is contained in:
Seán de Búrca 2025-08-07 15:20:01 -07:00 committed by Marge Bot
parent 8f71f1527a
commit a6f96a18d8

View file

@ -583,7 +583,8 @@ impl Program {
}
}
let spirvs = [d.spirv.as_ref().unwrap()];
let spirv = d.spirv.take().unwrap();
let spirvs = [&spirv];
let (spirv, log) = spirv::SPIRVBin::link(&spirvs, lib);
d.log.push_str(&log);