dawn-cmake/src
Corentin Wallez e10e6b0db8 Vulkan: Fix layout of Sampled+ROStorage texture.
Vulkan requires that storage images be in the GENERAL layout, and requires
that we choose a layout at VkDescriptorSet creation. This means that
since Sampled+ROStorage texture may sometimes be used as both usages in
the same pass, they must always be in the GENERAL layout even for
SampledTexture bindings.

Fix this by looking at the texture's creation usage in VulkanImageLayout
for wgpu::TextureUsage::Sampled.

Also add a regression test that triggers a Vulkan Validation Layer error
without this fix.

Bug: dawn:635

Change-Id: I4a5b94e1af20839b3b8cc080d36fca59d79f09bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38107
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-21 12:44:09 +00:00
..
common ityp_array: Allow using a T whose underlying type is signed. 2021-01-20 20:01:08 +00:00
dawn Reland "Add a per-thread proc table using thread local storage" 2020-10-06 16:13:42 +00:00
dawn_native Vulkan: Fix layout of Sampled+ROStorage texture. 2021-01-21 12:44:09 +00:00
dawn_platform Implement WaitableEvent and WorkerTaskPool for multi-threaded tasks 2021-01-20 08:56:07 +00:00
dawn_wire dawn_wire: Add Reserve/InjectDevice 2021-01-19 19:27:52 +00:00
fuzzers Remove HLSL & MSL SPIRV-Cross Fuzzers 2021-01-07 01:36:11 +00:00
include Implement WaitableEvent and WorkerTaskPool for multi-threaded tasks 2021-01-20 08:56:07 +00:00
tests Vulkan: Fix layout of Sampled+ROStorage texture. 2021-01-21 12:44:09 +00:00
utils Convert StorageTextureTests to WGSL 2021-01-14 17:07:06 +00:00
Dummy.cpp Add missed file for the CMake build. 2020-02-07 23:46:30 +00:00