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>
This commit is contained in:
Mike Blumenkrantz 2022-09-27 22:51:50 -04:00 committed by Marge Bot
parent 1b685dc350
commit 5bc19dd5f7

View file

@ -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);
}
}
}