Compat: Remove WGSL error for rg32xxx formats

This is effectively a bindGroupLayout creation error
which makes it pipeline creation error. There are already
tests for this. The spec changed so there is no error
error at shader module creation time.

Fixed: 357042304
Bug: 357042304
Change-Id: I8f5ee20b13dc80022268d32ec65b7882fe29c58a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/201337
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Gregg Tavares <gman@chromium.org>
diff --git a/src/tint/lang/wgsl/resolver/compatibility_mode_test.cc b/src/tint/lang/wgsl/resolver/compatibility_mode_test.cc
index c980334..d3644e8 100644
--- a/src/tint/lang/wgsl/resolver/compatibility_mode_test.cc
+++ b/src/tint/lang/wgsl/resolver/compatibility_mode_test.cc
@@ -63,38 +63,6 @@
     }
 };
 
-using ResolverCompatibilityModeTest_StorageTexture = ResolverCompatibilityModeTestWithParam<
-    std::tuple<core::type::TextureDimension, core::TexelFormat>>;
-
-TEST_P(ResolverCompatibilityModeTest_StorageTexture, RGStorageTextures) {
-    // @group(2) @binding(1) var tex: texture_storage_xxx<formatxxx, read_write>
-    auto dim = std::get<0>(GetParam());
-    auto fmt = std::get<1>(GetParam());
-    auto t = ty.storage_texture(Source{{12, 34}}, dim, fmt, core::Access::kReadWrite);
-    GlobalVar("tex", t,
-              Vector{
-                  Group(2_a),
-                  Binding(1_a),
-              });
-
-    StringStream err;
-    err << "12:34 error: format " << fmt
-        << " is not supported as a storage texture in compatibility mode";
-
-    EXPECT_FALSE(r()->Resolve());
-    EXPECT_EQ(r()->error(), err.str());
-}
-
-INSTANTIATE_TEST_SUITE_P(ResolverCompatibilityModeTest,
-                         ResolverCompatibilityModeTest_StorageTexture,
-                         testing::Combine(testing::Values(core::type::TextureDimension::k1d,
-                                                          core::type::TextureDimension::k2d,
-                                                          core::type::TextureDimension::k2dArray,
-                                                          core::type::TextureDimension::k3d),
-                                          testing::Values(core::TexelFormat::kRg32Float,
-                                                          core::TexelFormat::kRg32Sint,
-                                                          core::TexelFormat::kRg32Uint)));
-
 TEST_F(ResolverCompatibilityModeTest, LinearInterpolation_Parameter) {
     // @fragment
     // fn main(@location(1) @interpolate(linear) value : f32) {
diff --git a/src/tint/lang/wgsl/resolver/validator.cc b/src/tint/lang/wgsl/resolver/validator.cc
index 4159ea6..92004bb 100644
--- a/src/tint/lang/wgsl/resolver/validator.cc
+++ b/src/tint/lang/wgsl/resolver/validator.cc
@@ -143,17 +143,6 @@
     }
 }
 
-bool IsInvalidStorageTextureTexelFormatInCompatibilityMode(core::TexelFormat format) {
-    switch (format) {
-        case core::TexelFormat::kRg32Float:
-        case core::TexelFormat::kRg32Sint:
-        case core::TexelFormat::kRg32Uint:
-            return true;
-        default:
-            return false;
-    }
-}
-
 template <typename CALLBACK>
 void TraverseCallChain(const sem::Function* from, const sem::Function* to, CALLBACK&& callback) {
     for (auto* f : from->TransitivelyCalledFunctions()) {
@@ -448,13 +437,6 @@
         return false;
     }
 
-    if (mode_ == wgsl::ValidationMode::kCompat &&
-        IsInvalidStorageTextureTexelFormatInCompatibilityMode(t->TexelFormat())) {
-        AddError(source) << "format " << t->TexelFormat()
-                         << " is not supported as a storage texture in compatibility mode";
-        return false;
-    }
-
     return true;
 }