From a6f96a18d860bc58150eef9ae11861344824c8c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20de=20B=C3=BArca?= Date: Thu, 7 Aug 2025 15:20:01 -0700 Subject: [PATCH] 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 Part-of: --- src/gallium/frontends/rusticl/core/program.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/rusticl/core/program.rs b/src/gallium/frontends/rusticl/core/program.rs index 7dde54020a5..b9e6e251667 100644 --- a/src/gallium/frontends/rusticl/core/program.rs +++ b/src/gallium/frontends/rusticl/core/program.rs @@ -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);