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: 50dbcb1d00 ("rusticl: stop clearing shader images after every dispatch")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36243>
(cherry picked from commit dad43d6c4a)
This commit is contained in:
Karol Herbst 2025-07-19 14:31:17 +02:00 committed by Eric Engestrom
parent 5649e8fcb7
commit 1f53dfd849
2 changed files with 2 additions and 1 deletions

View file

@ -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

View file

@ -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.