Remove storage textures from vertex tests
The template change in test/tint/builtins/gen/gen.wgsl.tmpl removes the
remaining usages of storage textures in vertex shaders in Tint end2end
tests, replacing them instead with a VertexOutput object to prevent DCE.
The template is the only manually modified file in this change, the rest
were created with:
./tools/run gen
./tools/run tests --generate-expected
Binding numbers and entry point ordering had to be slightly shuffled to
work around: crbug.com/42250109
Bug: 344846829
Change-Id: I6c2c80b78168a13c6c545e7a0dc924d64997ff0e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/193260
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Natalie Chouinard <chouinard@google.com>
diff --git a/test/tint/builtins/gen/literal/floor/953774.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/floor/953774.wgsl.expected.dxc.hlsl
index 9b92779..28a7447 100644
--- a/test/tint/builtins/gen/literal/floor/953774.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/floor/953774.wgsl.expected.dxc.hlsl
@@ -2,22 +2,6 @@
float3 res = (1.0f).xxx;
}
-struct tint_symbol {
- float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
- floor_953774();
- return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
- float4 inner_result = vertex_main_inner();
- tint_symbol wrapper_result = (tint_symbol)0;
- wrapper_result.value = inner_result;
- return wrapper_result;
-}
-
void fragment_main() {
floor_953774();
return;
@@ -28,3 +12,24 @@
floor_953774();
return;
}
+
+struct VertexOutput {
+ float4 pos;
+};
+struct tint_symbol_1 {
+ float4 pos : SV_Position;
+};
+
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = (VertexOutput)0;
+ tint_symbol.pos = (0.0f).xxxx;
+ floor_953774();
+ return tint_symbol;
+}
+
+tint_symbol_1 vertex_main() {
+ VertexOutput inner_result = vertex_main_inner();
+ tint_symbol_1 wrapper_result = (tint_symbol_1)0;
+ wrapper_result.pos = inner_result.pos;
+ return wrapper_result;
+}