From 5bc19dd5f7d329b786d005e9166ca59544347ce9 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 27 Sep 2022 22:51:50 -0400 Subject: [PATCH] zink: add a draw barrier when unbinding a sampler-bound fb surface this is guaranteed to need some kind of layout change, so ensure the barrier actually happens cc: mesa-stable SoroushIMG Part-of: --- src/gallium/drivers/zink/zink_context.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 2b8d9f8da9c..45e7c8ad810 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -2839,8 +2839,10 @@ unbind_fb_surface(struct zink_context *ctx, struct pipe_surface *surf, unsigned res->fb_binds &= ~BITFIELD_BIT(idx); if (!res->fb_bind_count) { check_resource_for_batch_ref(ctx, res); - if (res->sampler_bind_count[0]) + if (res->sampler_bind_count[0]) { update_res_sampler_layouts(ctx, res); + _mesa_set_add(ctx->need_barriers[0], res); + } } }