[Compat] Remove storage binding restriction when validating texture wrapped
Bug: 42241025
Change-Id: I07fbcbdaf27a4b48430b4d98c4e8b58ef02f033c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/210775
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
diff --git a/src/dawn/native/opengl/DeviceGL.cpp b/src/dawn/native/opengl/DeviceGL.cpp
index 7f75211..6ee1ca1 100644
--- a/src/dawn/native/opengl/DeviceGL.cpp
+++ b/src/dawn/native/opengl/DeviceGL.cpp
@@ -295,10 +295,6 @@
DAWN_INVALID_IF(descriptor->sampleCount != 1, "Sample count (%u) is not 1.",
descriptor->sampleCount);
- DAWN_INVALID_IF(descriptor->usage & wgpu::TextureUsage::StorageBinding,
- "Texture usage (%s) cannot have %s.", descriptor->usage,
- wgpu::TextureUsage::StorageBinding);
-
return {};
}
diff --git a/src/dawn/tests/white_box/EGLImageWrappingTests.cpp b/src/dawn/tests/white_box/EGLImageWrappingTests.cpp
index 04eb449..e4c342d 100644
--- a/src/dawn/tests/white_box/EGLImageWrappingTests.cpp
+++ b/src/dawn/tests/white_box/EGLImageWrappingTests.cpp
@@ -245,16 +245,6 @@
ASSERT_EQ(texture.Get(), nullptr);
}
-// Test an error occurs if the texture usage is not RenderAttachment
-TEST_P(EGLImageValidationTests, InvalidTextureUsage) {
- DAWN_TEST_UNSUPPORTED_IF(UsesWire());
- descriptor.usage = wgpu::TextureUsage::StorageBinding;
-
- ScopedEGLImage image = CreateDefaultEGLImage();
- ASSERT_DEVICE_ERROR(wgpu::Texture texture = WrapEGLImage(&descriptor, image.getImage()));
- ASSERT_EQ(texture.Get(), nullptr);
-}
-
// Test an error occurs if the descriptor mip level count isn't 1
TEST_P(EGLImageValidationTests, InvalidMipLevelCount) {
DAWN_TEST_UNSUPPORTED_IF(UsesWire());
diff --git a/src/dawn/tests/white_box/GLTextureWrappingTests.cpp b/src/dawn/tests/white_box/GLTextureWrappingTests.cpp
index 39b317e..3154020 100644
--- a/src/dawn/tests/white_box/GLTextureWrappingTests.cpp
+++ b/src/dawn/tests/white_box/GLTextureWrappingTests.cpp
@@ -198,16 +198,6 @@
ASSERT_EQ(texture.Get(), nullptr);
}
-// Test an error occurs if the texture usage contains StorageBinding.
-TEST_P(GLTextureValidationTests, InvalidTextureUsage) {
- descriptor.usage = wgpu::TextureUsage::StorageBinding;
-
- ScopedGLTexture glTexture = CreateDefaultGLTexture();
- ASSERT_DEVICE_ERROR(wgpu::Texture texture = WrapGLTexture(&descriptor, glTexture.Get()));
-
- ASSERT_EQ(texture.Get(), nullptr);
-}
-
// Test an error occurs if the descriptor mip level count isn't 1
TEST_P(GLTextureValidationTests, InvalidMipLevelCount) {
descriptor.mipLevelCount = 2;
diff --git a/webgpu-cts/compat-expectations.txt b/webgpu-cts/compat-expectations.txt
index 51a1ec0..bb7b22d 100644
--- a/webgpu-cts/compat-expectations.txt
+++ b/webgpu-cts/compat-expectations.txt
@@ -224,7 +224,6 @@
### This section represents tests which may require CTS changes.
# ANGLETextureSharing is not supported
-crbug.com/dawn/2086 webgpu:web_platform,canvas,configure:usage:* [ Failure ]
crbug.com/dawn/2086 [ intel-0x9bc5 ] webgpu:web_platform,canvas,configure:viewFormats:* [ Failure ]
crbug.com/dawn/2086 [ nvidia-0x2184 ] webgpu:web_platform,canvas,configure:viewFormats:* [ Failure ]