Remove chromium_experimental_read_write_storage_texture from Tint
Bug: dawn:1972
Change-Id: I82675b79f97701b4b1afe8c5df1d903b4ff22025
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/162581
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/src/tint/lang/wgsl/ast/transform/builtin_polyfill_test.cc b/src/tint/lang/wgsl/ast/transform/builtin_polyfill_test.cc
index 8bc328b..e2d0dde 100644
--- a/src/tint/lang/wgsl/ast/transform/builtin_polyfill_test.cc
+++ b/src/tint/lang/wgsl/ast/transform/builtin_polyfill_test.cc
@@ -456,8 +456,6 @@
TEST_F(BuiltinPolyfillTest, Bgra8unorm_TextureLoad) {
auto* src = R"(
-enable chromium_experimental_read_write_storage_texture;
-
@group(0) @binding(0) var tex : texture_storage_2d<bgra8unorm, read>;
fn f(coords : vec2<i32>) -> vec4<f32> {
@@ -466,8 +464,6 @@
)";
auto* expect = R"(
-enable chromium_experimental_read_write_storage_texture;
-
@group(0) @binding(0) var tex : texture_storage_2d<rgba8unorm, read>;
fn f(coords : vec2<i32>) -> vec4<f32> {
@@ -554,8 +550,6 @@
TEST_F(BuiltinPolyfillTest, Bgra8unorm_TextureLoadAndStore) {
auto* src = R"(
-enable chromium_experimental_read_write_storage_texture;
-
@group(0) @binding(0) var tex : texture_storage_2d<bgra8unorm, read_write>;
fn f(coords : vec2<i32>) {
@@ -564,8 +558,6 @@
)";
auto* expect = R"(
-enable chromium_experimental_read_write_storage_texture;
-
@group(0) @binding(0) var tex : texture_storage_2d<rgba8unorm, read_write>;
fn f(coords : vec2<i32>) {
diff --git a/src/tint/lang/wgsl/extension.cc b/src/tint/lang/wgsl/extension.cc
index e30d7b2..6b001ef 100644
--- a/src/tint/lang/wgsl/extension.cc
+++ b/src/tint/lang/wgsl/extension.cc
@@ -60,9 +60,6 @@
if (str == "chromium_experimental_push_constant") {
return Extension::kChromiumExperimentalPushConstant;
}
- if (str == "chromium_experimental_read_write_storage_texture") {
- return Extension::kChromiumExperimentalReadWriteStorageTexture;
- }
if (str == "chromium_experimental_subgroups") {
return Extension::kChromiumExperimentalSubgroups;
}
@@ -94,8 +91,6 @@
return "chromium_experimental_pixel_local";
case Extension::kChromiumExperimentalPushConstant:
return "chromium_experimental_push_constant";
- case Extension::kChromiumExperimentalReadWriteStorageTexture:
- return "chromium_experimental_read_write_storage_texture";
case Extension::kChromiumExperimentalSubgroups:
return "chromium_experimental_subgroups";
case Extension::kChromiumInternalDualSourceBlending:
diff --git a/src/tint/lang/wgsl/extension.h b/src/tint/lang/wgsl/extension.h
index 0e259f1..259c925 100644
--- a/src/tint/lang/wgsl/extension.h
+++ b/src/tint/lang/wgsl/extension.h
@@ -52,7 +52,6 @@
kChromiumExperimentalFullPtrParameters,
kChromiumExperimentalPixelLocal,
kChromiumExperimentalPushConstant,
- kChromiumExperimentalReadWriteStorageTexture,
kChromiumExperimentalSubgroups,
kChromiumInternalDualSourceBlending,
kChromiumInternalRelaxedUniformLayout,
@@ -77,17 +76,11 @@
Extension ParseExtension(std::string_view str);
constexpr std::string_view kExtensionStrings[] = {
- "chromium_disable_uniformity_analysis",
- "chromium_experimental_dp4a",
- "chromium_experimental_framebuffer_fetch",
- "chromium_experimental_full_ptr_parameters",
- "chromium_experimental_pixel_local",
- "chromium_experimental_push_constant",
- "chromium_experimental_read_write_storage_texture",
- "chromium_experimental_subgroups",
- "chromium_internal_dual_source_blending",
- "chromium_internal_relaxed_uniform_layout",
- "f16",
+ "chromium_disable_uniformity_analysis", "chromium_experimental_dp4a",
+ "chromium_experimental_framebuffer_fetch", "chromium_experimental_full_ptr_parameters",
+ "chromium_experimental_pixel_local", "chromium_experimental_push_constant",
+ "chromium_experimental_subgroups", "chromium_internal_dual_source_blending",
+ "chromium_internal_relaxed_uniform_layout", "f16",
};
/// All extensions
@@ -98,7 +91,6 @@
Extension::kChromiumExperimentalFullPtrParameters,
Extension::kChromiumExperimentalPixelLocal,
Extension::kChromiumExperimentalPushConstant,
- Extension::kChromiumExperimentalReadWriteStorageTexture,
Extension::kChromiumExperimentalSubgroups,
Extension::kChromiumInternalDualSourceBlending,
Extension::kChromiumInternalRelaxedUniformLayout,
diff --git a/src/tint/lang/wgsl/extension_bench.cc b/src/tint/lang/wgsl/extension_bench.cc
index 06b7f67..63c8636 100644
--- a/src/tint/lang/wgsl/extension_bench.cc
+++ b/src/tint/lang/wgsl/extension_bench.cc
@@ -87,41 +87,34 @@
"chromium_epHrimentkk_psh_constant",
"chromium_expegimenja_puRRh_costant",
"chromium_bxperimental_push_contan",
- "chromium_experimental_read_wjite_storage_texture",
- "chromium_expeimental_read_write_storage_texture",
- "chqomium_experimentl_rad_write_storage_texture",
- "chromium_experimental_read_write_storage_texture",
- "chromium_experimental_read_writNN_storage_texure",
- "chromiumexperimental_read_write_stovvage_texure",
- "chromium_xperimental_read_write_storage_textQQre",
- "cffromium_experimenralsubgrous",
- "chromium_experimentjl_subgroups",
- "chromiu2ww8NNperimental_subgoups",
+ "chromium_experimental_sjbgroups",
+ "chromium_experimental_sbgroups",
+ "cromum_experimentalqsubgroups",
"chromium_experimental_subgroups",
- "chromium_experimental_subgroup",
- "chromiurr_experimental_subgroups",
- "cGromium_experimental_subgroups",
- "chromium_internFFl_dual_source_blending",
- "cEromum_internl_dual_source_bleding",
- "chromium_internal_dual_source_brrendin",
+ "chromium_expNNrimental_subgoups",
+ "chromium_experimetal_svvbgrous",
+ "chromium_experiQental_subgroups",
+ "chrorum_internal_dal_source_bleffding",
+ "chromium_internal_dual_source_jlending",
+ "chromiNNm_internal_dua8_sourwwe_blening",
"chromium_internal_dual_source_blending",
- "chromium_internal_dual_surce_blendin",
- "chromium_iXterJJa_dual_souDce_blending",
- "chromi8m_ineral_dual_source_blendin",
- "chromu11_internal_relaed_uniform_kayou",
- "chromium_internal_relaxd_uniform_layout",
- "chromium_internal_elaxed_uJiform_layout",
+ "chromium_internal_dual_soure_blending",
+ "chromium_irrternal_dual_source_blending",
+ "chromium_internal_duaG_source_blending",
+ "chromium_internalFFrelaxed_uniform_layout",
+ "chromEum_internal_relaxed_unifrmlyout",
+ "chromium_internalrrrelaxd_uniform_layout",
"chromium_internal_relaxed_uniform_layout",
- "chromium_intcrnal_relaxed_uniform_layout",
- "chromiOm_internal_relaxed_uniform_layout",
- "chromiutt_intervva_KK_relaxed_uniform_layout",
- "xx8",
- "__F",
- "f1q",
+ "chromiuminternal_relaxed_uniform_layut",
+ "cXroDium_internal_rJJlaed_uniform_layout",
+ "chromium_int8nal_relaed_uniform_layut",
+ "k",
+ "16",
+ "J1",
"f16",
- "331O",
- "ftt6QQ",
- "666",
+ "c16",
+ "fO6",
+ "_KKttvv",
};
for (auto _ : state) {
for (auto* str : kStrings) {
diff --git a/src/tint/lang/wgsl/extension_test.cc b/src/tint/lang/wgsl/extension_test.cc
index 029deb2..ca3375c 100644
--- a/src/tint/lang/wgsl/extension_test.cc
+++ b/src/tint/lang/wgsl/extension_test.cc
@@ -64,8 +64,6 @@
Extension::kChromiumExperimentalFullPtrParameters},
{"chromium_experimental_pixel_local", Extension::kChromiumExperimentalPixelLocal},
{"chromium_experimental_push_constant", Extension::kChromiumExperimentalPushConstant},
- {"chromium_experimental_read_write_storage_texture",
- Extension::kChromiumExperimentalReadWriteStorageTexture},
{"chromium_experimental_subgroups", Extension::kChromiumExperimentalSubgroups},
{"chromium_internal_dual_source_blending", Extension::kChromiumInternalDualSourceBlending},
{"chromium_internal_relaxed_uniform_layout", Extension::kChromiumInternalRelaxedUniformLayout},
@@ -91,21 +89,18 @@
{"chromium_experEmental_push_constant", Extension::kUndefined},
{"chPPomiumexperimental_push_conTTtant", Extension::kUndefined},
{"chromixxm_experimentddl_push_constnt", Extension::kUndefined},
- {"44hromium_experimental_read_write_storage_texture", Extension::kUndefined},
- {"chromium_experimental_reaSS_wriVVe_storage_texture", Extension::kUndefined},
- {"chro22ium_eRperimental_read_Rrite_storag_texture", Extension::kUndefined},
- {"chromium_experimental_sbgroup9", Extension::kUndefined},
- {"cromium_experimental_subgroups", Extension::kUndefined},
- {"VhrHium_experimental_subOOrouRRs", Extension::kUndefined},
- {"chromium_internay_dual_sorce_blending", Extension::kUndefined},
- {"chrnnmium_internal_duGrr_source_bllend77ng", Extension::kUndefined},
- {"chromiu4_inter00al_dual_source_blending", Extension::kUndefined},
- {"chrmoom_internal_relaxed_uniform_lyout", Extension::kUndefined},
- {"chroium_internal_rlaxed_uniform_layzzut", Extension::kUndefined},
- {"chromium_internaii_r11axed_uppifor_layout", Extension::kUndefined},
- {"f1XX", Extension::kUndefined},
- {"55199II", Extension::kUndefined},
- {"frSSHHa", Extension::kUndefined},
+ {"chromium_experimental_44ubgroups", Extension::kUndefined},
+ {"cSSromVVum_experimental_subgroups", Extension::kUndefined},
+ {"chrmium_e22perimental_suRgrRups", Extension::kUndefined},
+ {"chroFium_internal_dual_source_bl9ndig", Extension::kUndefined},
+ {"chrmium_internal_dual_source_blending", Extension::kUndefined},
+ {"cVromium_interHal_dualOOsouRRce_blening", Extension::kUndefined},
+ {"chromium_internl_relaxyd_uniform_layout", Extension::kUndefined},
+ {"chromnnum_internrr77_Gelaxell_uniform_layout", Extension::kUndefined},
+ {"chromium_intern4l_relaxe00_uniform_layout", Extension::kUndefined},
+ {"5", Extension::kUndefined},
+ {"u16", Extension::kUndefined},
+ {"f", Extension::kUndefined},
};
using ExtensionParseTest = testing::TestWithParam<Case>;
diff --git a/src/tint/lang/wgsl/reader/parser/enable_directive_test.cc b/src/tint/lang/wgsl/reader/parser/enable_directive_test.cc
index 893573c..6536271 100644
--- a/src/tint/lang/wgsl/reader/parser/enable_directive_test.cc
+++ b/src/tint/lang/wgsl/reader/parser/enable_directive_test.cc
@@ -205,7 +205,7 @@
// Error when unknown extension found
EXPECT_TRUE(p->has_error());
EXPECT_EQ(p->error(), R"(1:8: expected extension
-Possible values: 'chromium_disable_uniformity_analysis', 'chromium_experimental_dp4a', 'chromium_experimental_framebuffer_fetch', 'chromium_experimental_full_ptr_parameters', 'chromium_experimental_pixel_local', 'chromium_experimental_push_constant', 'chromium_experimental_read_write_storage_texture', 'chromium_experimental_subgroups', 'chromium_internal_dual_source_blending', 'chromium_internal_relaxed_uniform_layout', 'f16')");
+Possible values: 'chromium_disable_uniformity_analysis', 'chromium_experimental_dp4a', 'chromium_experimental_framebuffer_fetch', 'chromium_experimental_full_ptr_parameters', 'chromium_experimental_pixel_local', 'chromium_experimental_push_constant', 'chromium_experimental_subgroups', 'chromium_internal_dual_source_blending', 'chromium_internal_relaxed_uniform_layout', 'f16')");
auto program = p->program();
auto& ast = program.AST();
EXPECT_EQ(ast.Enables().Length(), 0u);
diff --git a/src/tint/lang/wgsl/resolver/uniformity_test.cc b/src/tint/lang/wgsl/resolver/uniformity_test.cc
index 671d6f2..769ab82 100644
--- a/src/tint/lang/wgsl/resolver/uniformity_test.cc
+++ b/src/tint/lang/wgsl/resolver/uniformity_test.cc
@@ -305,8 +305,6 @@
auto condition = static_cast<Condition>(std::get<0>(GetParam()));
auto function = static_cast<Function>(std::get<1>(GetParam()));
std::string src = R"(
-enable chromium_experimental_read_write_storage_texture;
-
var<private> p : i32;
var<workgroup> w : i32;
@group(0) @binding(0) var<uniform> u : i32;
@@ -8247,8 +8245,6 @@
TEST_F(UniformityAnalysisTest, StorageTextureLoad_ReadOnly) {
std::string src = R"(
-enable chromium_experimental_read_write_storage_texture;
-
@group(0) @binding(0) var t : texture_storage_2d<r32sint, read>;
fn foo() {
@@ -8263,8 +8259,6 @@
TEST_F(UniformityAnalysisTest, StorageTextureLoad_ReadWrite) {
std::string src = R"(
-enable chromium_experimental_read_write_storage_texture;
-
@group(0) @binding(0) var t : texture_storage_2d<r32sint, read_write>;
fn foo() {
@@ -8276,15 +8270,15 @@
RunTest(src, false);
EXPECT_EQ(error_,
- R"(test:8:5 error: 'storageBarrier' must only be called from uniform control flow
+ R"(test:6:5 error: 'storageBarrier' must only be called from uniform control flow
storageBarrier();
^^^^^^^^^^^^^^
-test:7:3 note: control flow depends on possibly non-uniform value
+test:5:3 note: control flow depends on possibly non-uniform value
if (textureLoad(t, vec2()).r == 0) {
^^
-test:7:7 note: return value of 'textureLoad' may be non-uniform
+test:5:7 note: return value of 'textureLoad' may be non-uniform
if (textureLoad(t, vec2()).r == 0) {
^^^^^^^^^^^^^^^^^^^^^^
)");
diff --git a/src/tint/lang/wgsl/wgsl.def b/src/tint/lang/wgsl/wgsl.def
index 8c545c9..23ba104 100644
--- a/src/tint/lang/wgsl/wgsl.def
+++ b/src/tint/lang/wgsl/wgsl.def
@@ -78,8 +78,6 @@
// A Chromium-specific extension that enables passing of uniform, storage and workgroup
// address-spaced pointers as parameters, as well as pointers into sub-objects.
chromium_experimental_full_ptr_parameters
- // A Chromium-specific extension that adds support for read-write storage textures.
- chromium_experimental_read_write_storage_texture
// A Chromium-specific extension that adds basic subgroup functionality.
chromium_experimental_subgroups
// A Chromium-specific extension that relaxes memory layout requirements for uniform storage.