mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 20:18:12 +02:00
zink: disable buffer reordering correctly on shader image binds
the unordered flags must be set after the barrier to avoid the
scenario where the barrier checks buffer usage and resets the flags
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28787>
(cherry picked from commit 974b3ab964)
This commit is contained in:
parent
28cd577dd3
commit
6ba5ef79df
2 changed files with 4 additions and 4 deletions
|
|
@ -1504,7 +1504,7 @@
|
|||
"description": "zink: disable buffer reordering correctly on shader image binds",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1947,9 +1947,6 @@ zink_set_shader_images(struct pipe_context *pctx,
|
|||
/* ref already added by create */
|
||||
a->buffer_view = bv;
|
||||
}
|
||||
if (zink_resource_access_is_write(access))
|
||||
res->obj->unordered_write = false;
|
||||
res->obj->unordered_read = false;
|
||||
} else {
|
||||
/* image rebind: get updated surface and unref old one */
|
||||
struct zink_surface *surface = create_image_surface(ctx, b, is_compute);
|
||||
|
|
@ -1969,6 +1966,9 @@ zink_set_shader_images(struct pipe_context *pctx,
|
|||
res->gfx_barrier);
|
||||
zink_batch_resource_usage_set(&ctx->batch, res,
|
||||
zink_resource_access_is_write(access), true);
|
||||
if (zink_resource_access_is_write(access))
|
||||
res->obj->unordered_write = false;
|
||||
res->obj->unordered_read = false;
|
||||
} else {
|
||||
finalize_image_bind(ctx, res, is_compute);
|
||||
zink_batch_resource_usage_set(&ctx->batch, res,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue