[glsl][ir] Enable bgra8unorm polyfill
This CL adds the `bgra8unorm` polyfill to the GLSL IR backend. The TODOs
for the binary polyfills are removed as the binary polyfill is already
being used.
Bug: 42251044
Change-Id: I71d622b7a1ea6a7f2c2529453c2bff15e4d740d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/208017
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
diff --git a/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.ir.glsl
index 3910173..1180dfd 100644
--- a/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.ir.glsl
@@ -1,11 +1,59 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:994 internal compiler error: bgra8unorm should have been polyfilled to rgba8unorm
-********************************************************************
-* 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 {
+ vec4 tint_symbol;
+} v;
+layout(binding = 0, rgba8) uniform highp readonly image2D arg_0;
+vec4 textureLoad_26c4f8() {
+ vec4 res = imageLoad(arg_0, ivec2(ivec2(1))).zyxw;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_26c4f8();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
+layout(binding = 0, rgba8) uniform highp readonly image2D arg_0;
+vec4 textureLoad_26c4f8() {
+ vec4 res = imageLoad(arg_0, ivec2(ivec2(1))).zyxw;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_26c4f8();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ vec4 prevent_dce;
+};
+
+layout(binding = 0, rgba8) uniform highp readonly image2D arg_0;
+layout(location = 0) flat out vec4 vertex_main_loc0_Output;
+vec4 textureLoad_26c4f8() {
+ vec4 res = imageLoad(arg_0, ivec2(ivec2(1))).zyxw;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), vec4(0.0f));
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_26c4f8();
+ 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;
+}