Vulkan: optimize image layout transitions
Removes dstAccessMask being redundantly set where
`GetBasicLayoutAccessFlags()` sets the same bits. Additionally, removes
setting HOST_WRITE_BIT and TRANSFER_WRITE_BIT as src access mask if new
layout is SHADER_READ_ONLY_OPTIMAL. The correct src access mask will be
set based on the previous layout.
Additionally, specializes `GetBasicLayoutAccessFlags()` in
`GetSrcLayoutAccessFlags()` and `GetDstLayoutAccessFlags()` where the
access mask is set correctly (and optimally) based on whether the layout
is the old or the new one. This removes a few unnecessary access masks
from src (for WAR hazards), and adds a few missing access masks to dst
(for RAW hazards), such as VK_ACCESS_COLOR_ATTACHMENT_READ_BIT necessary
for blending.
Bug: angleproject:2958
Change-Id: I5870bc99c755f0444332418f998032850825aca5
Reviewed-on: https://chromium-review.googlesource.com/c/1392397Reviewed-by:
Tobin Ehlis <tobine@google.com>
Reviewed-by:
Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Showing
Please
register
or
sign in
to comment