mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
zink: no-op read access buffer barriers if existing access exists for earlier stage
only the earliest stage should be applied for these barriers, so we can skip ones where the existing access is earlier Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11131>
This commit is contained in:
parent
cbaba3f1b9
commit
ef2e29f3b5
1 changed files with 4 additions and 3 deletions
|
|
@ -2202,9 +2202,10 @@ zink_resource_buffer_needs_barrier(struct zink_resource *res, VkAccessFlags flag
|
|||
return true;
|
||||
if (!pipeline)
|
||||
pipeline = pipeline_access_stage(flags);
|
||||
return (res->access_stage & pipeline) != pipeline || (res->access & flags) != flags ||
|
||||
zink_resource_access_is_write(res->access) ||
|
||||
zink_resource_access_is_write(flags);
|
||||
return zink_resource_access_is_write(res->access) ||
|
||||
zink_resource_access_is_write(flags) ||
|
||||
((res->access_stage & pipeline) != pipeline && !(res->access_stage & (pipeline - 1))) ||
|
||||
(res->access & flags) != flags;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue