Commit 7870cf3f by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Fix RAW hazard with storage images

Semantic revert of 78304b47 and 7bce5194. 7bce5194 assumed that a read transition between same layouts is a noop, but that's not true if said layout is GENERAL. This is only possible if an image is simultaneously bound as storage and sampled image. This bug was discovered by the new syncval VVL warning. Bug: b/156661359 Change-Id: I05f94160ca1b05b715701564e27fccee31a8aa45 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404742 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCharlie Lao <cclao@google.com>
parent 2999ad4e
...@@ -1447,12 +1447,7 @@ class ImageHelper final : public Resource, public angle::Subject ...@@ -1447,12 +1447,7 @@ class ImageHelper final : public Resource, public angle::Subject
} }
// This function can be used to prevent issuing redundant layout transition commands. // This function can be used to prevent issuing redundant layout transition commands.
bool isReadBarrierNecessary(ImageLayout newLayout) const bool isReadBarrierNecessary(ImageLayout newLayout) const;
{
// If transitioning to a different layout, we always need a barrier. Otherwise RAR
// (read-after-read) is not a hazard and doesn't require a barrier.
return mCurrentLayout != newLayout;
}
void recordReadBarrier(VkImageAspectFlags aspectMask, void recordReadBarrier(VkImageAspectFlags aspectMask,
ImageLayout newLayout, ImageLayout newLayout,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment