From 1f53dfd849baea65517bee691c5338b10bf0914d 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: (cherry picked from commit dad43d6c4aea0b8f456f7a747a767a438771252d) --- .pick_status.json | 2 +- src/gallium/frontends/rusticl/core/queue.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 53487fc6968..06a95675f93 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4024,7 +4024,7 @@ "description": "rusticl/queue: clear shader images when destroying queues", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "50dbcb1d00d239cacc13c394543fddfdee121cac", "notes": null diff --git a/src/gallium/frontends/rusticl/core/queue.rs b/src/gallium/frontends/rusticl/core/queue.rs index b0b3b89edc2..2172e6e776b 100644 --- a/src/gallium/frontends/rusticl/core/queue.rs +++ b/src/gallium/frontends/rusticl/core/queue.rs @@ -131,6 +131,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.