[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/literal/tan/244e2a.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.ir.glsl
index b9426ff..57a1e40 100644
--- a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.ir.glsl
@@ -1,109 +1,56 @@
-SKIP: FAILED
-
 #version 310 es
 precision highp float;
 precision highp int;
 
 
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  vec4 tint_symbol;
+} v;
+vec4 tan_244e2a() {
+  vec4 res = vec4(1.55740773677825927734f);
+  return res;
+}
+void main() {
+  v.tint_symbol = tan_244e2a();
+}
+#version 310 es
+
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  vec4 tint_symbol;
+} v;
+vec4 tan_244e2a() {
+  vec4 res = vec4(1.55740773677825927734f);
+  return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  v.tint_symbol = tan_244e2a();
+}
+#version 310 es
+
 struct VertexOutput {
   vec4 pos;
   vec4 prevent_dce;
 };
 
-vec4 prevent_dce;
+layout(location = 0) flat out vec4 vertex_main_loc0_Output;
 vec4 tan_244e2a() {
   vec4 res = vec4(1.55740773677825927734f);
   return res;
 }
-void main() {
-  prevent_dce = tan_244e2a();
-}
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  prevent_dce = tan_244e2a();
-}
-VertexOutput main() {
+VertexOutput vertex_main_inner() {
   VertexOutput tint_symbol = VertexOutput(vec4(0.0f), vec4(0.0f));
   tint_symbol.pos = vec4(0.0f);
   tint_symbol.prevent_dce = tan_244e2a();
   return tint_symbol;
 }
-error: Error parsing GLSL shader:
-ERROR: 0:19: 'local_size_x' : there is no such layout identifier for this stage taking an assigned value 
-ERROR: 0:19: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision highp float;
-precision highp int;
-
-
-struct VertexOutput {
-  vec4 pos;
-  vec4 prevent_dce;
-};
-
-vec4 prevent_dce;
-vec4 tan_244e2a() {
-  vec4 res = vec4(1.55740773677825927734f);
-  return res;
-}
 void main() {
-  prevent_dce = tan_244e2a();
+  VertexOutput v = vertex_main_inner();
+  gl_Position = v.pos;
+  gl_Position[1u] = -(gl_Position.y);
+  gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+  vertex_main_loc0_Output = v.prevent_dce;
+  gl_PointSize = 1.0f;
 }
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  prevent_dce = tan_244e2a();
-}
-VertexOutput main() {
-  VertexOutput tint_symbol = VertexOutput(vec4(0.0f), vec4(0.0f));
-  tint_symbol.pos = vec4(0.0f);
-  tint_symbol.prevent_dce = tan_244e2a();
-  return tint_symbol;
-}
-error: Error parsing GLSL shader:
-ERROR: 0:20: 'main' : function already has a body 
-ERROR: 0:20: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision highp float;
-precision highp int;
-
-
-struct VertexOutput {
-  vec4 pos;
-  vec4 prevent_dce;
-};
-
-vec4 prevent_dce;
-vec4 tan_244e2a() {
-  vec4 res = vec4(1.55740773677825927734f);
-  return res;
-}
-void main() {
-  prevent_dce = tan_244e2a();
-}
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  prevent_dce = tan_244e2a();
-}
-VertexOutput main() {
-  VertexOutput tint_symbol = VertexOutput(vec4(0.0f), vec4(0.0f));
-  tint_symbol.pos = vec4(0.0f);
-  tint_symbol.prevent_dce = tan_244e2a();
-  return tint_symbol;
-}
-error: Error parsing GLSL shader:
-ERROR: 0:19: 'local_size_x' : there is no such layout identifier for this stage taking an assigned value 
-ERROR: 0:19: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-
-tint executable returned error: exit status 1