[glsl][ir] Add ShaderIO
This Cl adds ShaderIO support to the GLSL IR backend.
Bug: 42251044
Change-Id: I67e58caa611ff7a77ef318275215ec922c103147
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/205555
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
diff --git a/test/tint/builtins/gen/var/atan/d17fb2.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/atan/d17fb2.wgsl.expected.ir.glsl
index 4308d79..cfd1eb2 100644
--- a/test/tint/builtins/gen/var/atan/d17fb2.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/atan/d17fb2.wgsl.expected.ir.glsl
@@ -1,10 +1,25 @@
-SKIP: FAILED
-
#version 310 es
precision highp float;
precision highp int;
+void atan_d17fb2() {
+ vec4 res = vec4(0.78539818525314331055f);
+}
+void main() {
+ atan_d17fb2();
+}
+#version 310 es
+
+void atan_d17fb2() {
+ vec4 res = vec4(0.78539818525314331055f);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ atan_d17fb2();
+}
+#version 310 es
+
struct VertexOutput {
vec4 pos;
};
@@ -12,89 +27,15 @@
void atan_d17fb2() {
vec4 res = vec4(0.78539818525314331055f);
}
-void main() {
- atan_d17fb2();
-}
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
- atan_d17fb2();
-}
-VertexOutput main() {
+VertexOutput vertex_main_inner() {
VertexOutput tint_symbol = VertexOutput(vec4(0.0f));
tint_symbol.pos = vec4(0.0f);
atan_d17fb2();
return tint_symbol;
}
-error: Error parsing GLSL shader:
-ERROR: 0:16: 'local_size_x' : there is no such layout identifier for this stage taking an assigned value
-ERROR: 0:16: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-#version 310 es
-precision highp float;
-precision highp int;
-
-
-struct VertexOutput {
- vec4 pos;
-};
-
-void atan_d17fb2() {
- vec4 res = vec4(0.78539818525314331055f);
-}
void main() {
- atan_d17fb2();
+ gl_Position = vertex_main_inner().pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ gl_PointSize = 1.0f;
}
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
- atan_d17fb2();
-}
-VertexOutput main() {
- VertexOutput tint_symbol = VertexOutput(vec4(0.0f));
- tint_symbol.pos = vec4(0.0f);
- atan_d17fb2();
- return tint_symbol;
-}
-error: Error parsing GLSL shader:
-ERROR: 0:17: 'main' : function already has a body
-ERROR: 0:17: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-#version 310 es
-precision highp float;
-precision highp int;
-
-
-struct VertexOutput {
- vec4 pos;
-};
-
-void atan_d17fb2() {
- vec4 res = vec4(0.78539818525314331055f);
-}
-void main() {
- atan_d17fb2();
-}
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
- atan_d17fb2();
-}
-VertexOutput main() {
- VertexOutput tint_symbol = VertexOutput(vec4(0.0f));
- tint_symbol.pos = vec4(0.0f);
- atan_d17fb2();
- return tint_symbol;
-}
-error: Error parsing GLSL shader:
-ERROR: 0:16: 'local_size_x' : there is no such layout identifier for this stage taking an assigned value
-ERROR: 0:16: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1