OpenGL: Remove validation of storage texture layer subsets.
This validation is not correct since
1) We have a texture copy workaround.
2) If we decide to validate it out in Compat, it belongs in frontend
validation.
Bug: dawn:2080
Change-Id: I04ae7f9d6a78f8c9ab4385f1370a2899a5ca51a2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/159240
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
diff --git a/src/dawn/native/opengl/BindGroupGL.cpp b/src/dawn/native/opengl/BindGroupGL.cpp
index de4dca4..f50da3f 100644
--- a/src/dawn/native/opengl/BindGroupGL.cpp
+++ b/src/dawn/native/opengl/BindGroupGL.cpp
@@ -33,33 +33,6 @@
namespace dawn::native::opengl {
-MaybeError ValidateGLBindGroupDescriptor(const BindGroupDescriptor* descriptor) {
- BindGroupLayoutInternalBase* layout = descriptor->layout->GetInternalBindGroupLayout();
- const BindGroupLayoutInternalBase::BindingMap& bindingMap = layout->GetBindingMap();
- for (uint32_t i = 0; i < descriptor->entryCount; ++i) {
- const BindGroupEntry& entry = descriptor->entries[i];
-
- const auto& it = bindingMap.find(BindingNumber(entry.binding));
- BindingIndex bindingIndex = it->second;
- DAWN_ASSERT(bindingIndex < layout->GetBindingCount());
-
- const BindingInfo& bindingInfo = layout->GetBindingInfo(bindingIndex);
- if (bindingInfo.bindingType == BindingInfoType::StorageTexture) {
- DAWN_ASSERT(entry.textureView != nullptr);
- const uint32_t textureViewLayerCount = entry.textureView->GetLayerCount();
- DAWN_INVALID_IF(
- textureViewLayerCount != 1 &&
- textureViewLayerCount != entry.textureView->GetTexture()->GetArrayLayers(),
- "%s binds %u layers. Currently the OpenGL backend only supports either binding "
- "1 layer or the all layers (%u) for storage texture.",
- entry.textureView, textureViewLayerCount,
- entry.textureView->GetTexture()->GetArrayLayers());
- }
- }
-
- return {};
-}
-
BindGroup::BindGroup(Device* device, const BindGroupDescriptor* descriptor)
: BindGroupBase(this, device, descriptor) {}
diff --git a/src/dawn/native/opengl/BindGroupGL.h b/src/dawn/native/opengl/BindGroupGL.h
index 0eae677..a6cccf3 100644
--- a/src/dawn/native/opengl/BindGroupGL.h
+++ b/src/dawn/native/opengl/BindGroupGL.h
@@ -35,8 +35,6 @@
class Device;
-MaybeError ValidateGLBindGroupDescriptor(const BindGroupDescriptor* descriptor);
-
class BindGroup final : public BindGroupBase, public PlacementAllocated {
public:
static Ref<BindGroup> Create(Device* device, const BindGroupDescriptor* descriptor);
diff --git a/src/dawn/native/opengl/DeviceGL.cpp b/src/dawn/native/opengl/DeviceGL.cpp
index 06f895c..3d3189e 100644
--- a/src/dawn/native/opengl/DeviceGL.cpp
+++ b/src/dawn/native/opengl/DeviceGL.cpp
@@ -215,7 +215,6 @@
ResultOrError<Ref<BindGroupBase>> Device::CreateBindGroupImpl(
const BindGroupDescriptor* descriptor) {
- DAWN_TRY(ValidateGLBindGroupDescriptor(descriptor));
return BindGroup::Create(this, descriptor);
}
ResultOrError<Ref<BindGroupLayoutInternalBase>> Device::CreateBindGroupLayoutImpl(
diff --git a/webgpu-cts/compat-expectations.txt b/webgpu-cts/compat-expectations.txt
index 0f83011..4705426 100644
--- a/webgpu-cts/compat-expectations.txt
+++ b/webgpu-cts/compat-expectations.txt
@@ -96,12 +96,6 @@
crbug.com/dawn/2079 webgpu:util,texture,texel_data:ufloat_texel_data_in_shader:format="rg11b10ufloat" [ Failure ]
crbug.com/dawn/2079 webgpu:util,texture,texel_data:ufloat_texel_data_in_shader:format="rgb9e5ufloat" [ Failure ]
-# 2 incompatible texture views issue
-crbug.com/dawn/2080 webgpu:api,validation,resource_usages,texture,in_render_common:subresources,color_attachment_and_bind_group:* [ Failure ]
-crbug.com/dawn/2080 webgpu:api,validation,resource_usages,texture,in_render_common:subresources,multiple_bind_groups:* [ Failure ]
-crbug.com/dawn/2080 webgpu:api,validation,resource_usages,texture,in_render_misc:subresources,set_bind_group_on_same_index_color_texture:useDifferentTextureAsTexture2=false;baseLayer2=1;view2Binding="storage";hasConflict=false [ Failure ]
-crbug.com/dawn/2080 webgpu:api,validation,resource_usages,texture,in_render_misc:subresources,set_bind_group_on_same_index_color_texture:useDifferentTextureAsTexture2=false;baseLayer2=1;view2Binding="storage";hasConflict=true [ Failure ]
-
# Video test failing due to mismatched interstage variables
crbug.com/dawn/2196 webgpu:web_platform,copyToTexture,video:copy_from_video:* [ Failure ]