Vulkan: Fix texture barriers for readonly storage.

One of the helper methods to compute texture barriers didn't handle the
kReadOnlyStorage usage, which made barriers issued too small.

Issue was caught by running
StorageTextureZeroInitTests.ReadonlyStorageTextureClearsToZeroInRenderPass
with the Vulkan barrier validation enabled.

Also renames kReadonlyStorageTexture to kReadOnlyStorageTexture for
consistency.

Bug: dawn:635
Change-Id: I6e6027c380672dcdaea789c811665536b446003e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38101
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2021-01-20 19:39:28 +00:00
committed by Commit Bot service account
parent 40422659d4
commit 25dc10cee7
8 changed files with 13 additions and 10 deletions

View File

@@ -38,7 +38,7 @@ TEST_P(InternalResourceUsageTests, InternalTextureUsage) {
wgpu::TextureDescriptor descriptor;
descriptor.format = wgpu::TextureFormat::RGBA8Unorm;
descriptor.size = {1, 1, 1};
descriptor.usage = dawn_native::kReadonlyStorageTexture;
descriptor.usage = dawn_native::kReadOnlyStorageTexture;
ASSERT_DEVICE_ERROR(device.CreateTexture(&descriptor));
}