[glsl][ir] Polyfill the `textureLoad` call

This Cl polyfills the `textureLoad` WGSL call.

Bug: 42251044
Change-Id: I8f49a62d8cc495886ac85899224fcdde43361b0c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/207394
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
diff --git a/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.ir.glsl
index b475b2e..1665bf6 100644
--- a/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.ir.glsl
@@ -1,11 +1,62 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
 
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1451 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureLoad
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  uvec4 tint_symbol;
+} v;
+layout(binding = 0, rgba16ui) uniform highp readonly uimage3D arg_0;
+uvec4 textureLoad_374351() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = imageLoad(arg_0, ivec3(arg_1));
+  return res;
+}
+void main() {
+  v.tint_symbol = textureLoad_374351();
+}
+#version 310 es
 
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+  uvec4 tint_symbol;
+} v;
+layout(binding = 0, rgba16ui) uniform highp readonly uimage3D arg_0;
+uvec4 textureLoad_374351() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = imageLoad(arg_0, ivec3(arg_1));
+  return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  v.tint_symbol = textureLoad_374351();
+}
+#version 310 es
+
+
+struct VertexOutput {
+  vec4 pos;
+  uvec4 prevent_dce;
+};
+
+layout(binding = 0, rgba16ui) uniform highp readonly uimage3D arg_0;
+layout(location = 0) flat out uvec4 vertex_main_loc0_Output;
+uvec4 textureLoad_374351() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = imageLoad(arg_0, ivec3(arg_1));
+  return res;
+}
+VertexOutput vertex_main_inner() {
+  VertexOutput tint_symbol = VertexOutput(vec4(0.0f), uvec4(0u));
+  tint_symbol.pos = vec4(0.0f);
+  tint_symbol.prevent_dce = textureLoad_374351();
+  return tint_symbol;
+}
+void main() {
+  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;
+}