zink: check for layout updates when unbinding samplerviews
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 28 Feb 2023 19:00:34 +0000 (14:00 -0500)
committerMarge Bot <emma+marge@anholt.net>
Tue, 7 Mar 2023 01:57:41 +0000 (01:57 +0000)
not sure if it's a bug, but it should be consistent with shader image
unbinding, so here it is

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21739>

src/gallium/drivers/zink/zink_context.c

index 021fa0a..58efac9 100644 (file)
@@ -1928,6 +1928,8 @@ unbind_samplerview(struct zink_context *ctx, gl_shader_stage stage, unsigned slo
    } else {
       unbind_descriptor_stage(res, stage);
       unbind_descriptor_reads(res, stage == MESA_SHADER_COMPUTE);
+      if (!res->sampler_bind_count[stage == MESA_SHADER_COMPUTE])
+         check_for_layout_update(ctx, res, stage == MESA_SHADER_COMPUTE);
    }
 }