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 <soroush.kashani@imgtec.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18855>
(cherry picked from commit 5bc19dd5f7)
This commit is contained in:
Mike Blumenkrantz
2022-09-27 22:51:50 -04:00
committed by Dylan Baker
parent 71b0b79e58
commit 62ed7e993c
2 changed files with 4 additions and 2 deletions

View File

@@ -76,7 +76,7 @@
"description": "zink: add a draw barrier when unbinding a sampler-bound fb surface",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View File

@@ -2775,8 +2775,10 @@ unbind_fb_surface(struct zink_context *ctx, struct pipe_surface *surf, unsigned
res->fb_binds--;
if (!res->fb_binds) {
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);
}
}
}