zink: only do deferred image barriers if layout changes
otherwise these should be handled by apps using glMemoryBarrier Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11590>
This commit is contained in:
parent
d3b7b35584
commit
e8a188a86e
|
@ -377,7 +377,8 @@ update_barriers(struct zink_context *ctx, bool is_compute)
|
||||||
zink_resource_buffer_barrier(ctx, NULL, res, access, pipeline);
|
zink_resource_buffer_barrier(ctx, NULL, res, access, pipeline);
|
||||||
else {
|
else {
|
||||||
VkImageLayout layout = zink_descriptor_util_image_layout_eval(res, is_compute);
|
VkImageLayout layout = zink_descriptor_util_image_layout_eval(res, is_compute);
|
||||||
zink_resource_image_barrier(ctx, NULL, res, layout, access, pipeline);
|
if (layout != res->layout)
|
||||||
|
zink_resource_image_barrier(ctx, NULL, res, layout, access, pipeline);
|
||||||
}
|
}
|
||||||
/* always barrier on draw if this resource has either multiple image write binds or
|
/* always barrier on draw if this resource has either multiple image write binds or
|
||||||
* image write binds and image read binds
|
* image write binds and image read binds
|
||||||
|
|
Loading…
Reference in New Issue