From dad43d6c4aea0b8f456f7a747a767a438771252d Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Sat, 19 Jul 2025 14:31:17 +0200 Subject: [PATCH] rusticl/queue: clear shader images when destroying queues The pipe_context might never be reused or the new queue won't ever reuse all shader image slots leading to stale objects being referenced by the driver. Fixes: 50dbcb1d00d ("rusticl: stop clearing shader images after every dispatch") Part-of: --- src/gallium/frontends/rusticl/core/queue.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/frontends/rusticl/core/queue.rs b/src/gallium/frontends/rusticl/core/queue.rs index 3ec83bcf998..7c153431f14 100644 --- a/src/gallium/frontends/rusticl/core/queue.rs +++ b/src/gallium/frontends/rusticl/core/queue.rs @@ -133,6 +133,7 @@ impl Deref for QueueContext<'_> { impl Drop for QueueContext<'_> { fn drop(&mut self) { self.set_constant_buffer(0, &[]); + self.ctx.clear_shader_images(self.dev.caps.max_write_images); if self.kernel_state.get_mut().builds.is_some() { // SAFETY: We simply unbind here. The bound cso will only be dropped at the end of this // drop handler.