test: Update E2E expected results
Several more tests are passing now that we have hex float parsing and
vector bitcasts in the HLSL backend.
Change-Id: I2809c83aa78afa7cfec187a2cb1671f79e06a876
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59822
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.hlsl
index 0fdd32b..134d1e5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.hlsl
@@ -1,6 +1,88 @@
-SKIP: FAILED
+static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
+cbuffer cbuffer_x_8 : register(b1, space0) {
+ uint4 x_8[2];
+};
+cbuffer cbuffer_x_10 : register(b0, space0) {
+ uint4 x_10[1];
+};
-graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl:28:19 error: expected ';' for assignment statement
- s1 = 0x1.b38fb8p-127;
- ^^^^
+void main_1() {
+ float f0 = 0.0f;
+ float s1 = 0.0f;
+ float f1 = 0.0f;
+ bool x_72 = false;
+ bool x_73_phi = false;
+ f0 = (10.0f % 0.000001f);
+ s1 = 9.99999935e-39f;
+ if ((s1 == 0.0f)) {
+ s1 = 1.0f;
+ }
+ bool x_62 = false;
+ bool x_71 = false;
+ bool x_63_phi = false;
+ bool x_72_phi = false;
+ f1 = (10.0f % s1);
+ bool tint_tmp = isinf(f1);
+ if (!tint_tmp) {
+ tint_tmp = (s1 == 1.0f);
+ }
+ const bool x_48 = (tint_tmp);
+ x_73_phi = x_48;
+ if (!(x_48)) {
+ const bool x_54 = (f0 == f1);
+ x_63_phi = x_54;
+ if (!(x_54)) {
+ bool tint_tmp_1 = (f0 > 0.99000001f);
+ if (tint_tmp_1) {
+ tint_tmp_1 = (f0 < 0.01f);
+ }
+ x_62 = (tint_tmp_1);
+ x_63_phi = x_62;
+ }
+ const bool x_63 = x_63_phi;
+ x_72_phi = x_63;
+ if (!(x_63)) {
+ bool tint_tmp_2 = (f1 > 0.99000001f);
+ if (tint_tmp_2) {
+ tint_tmp_2 = (f1 < 0.01f);
+ }
+ x_71 = (tint_tmp_2);
+ x_72_phi = x_71;
+ }
+ x_72 = x_72_phi;
+ x_73_phi = x_72;
+ }
+ bool tint_tmp_3 = x_73_phi;
+ if (!tint_tmp_3) {
+ tint_tmp_3 = (f1 == 10.0f);
+ }
+ if ((tint_tmp_3)) {
+ const int x_81 = asint(x_8[1].x);
+ const uint scalar_offset = ((16u * uint(0))) / 4;
+ const int x_84 = asint(x_8[scalar_offset / 4][scalar_offset % 4]);
+ const uint scalar_offset_1 = ((16u * uint(0))) / 4;
+ const int x_87 = asint(x_8[scalar_offset_1 / 4][scalar_offset_1 % 4]);
+ const int x_90 = asint(x_8[1].x);
+ x_GLF_color = float4(float(x_81), float(x_84), float(x_87), float(x_90));
+ } else {
+ const uint scalar_offset_2 = ((16u * uint(0))) / 4;
+ const int x_94 = asint(x_8[scalar_offset_2 / 4][scalar_offset_2 % 4]);
+ const float x_95 = float(x_94);
+ x_GLF_color = float4(x_95, x_95, x_95, x_95);
+ }
+ return;
+}
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol {
+ float4 x_GLF_color_1 : SV_Target0;
+};
+
+tint_symbol main() {
+ main_1();
+ const main_out tint_symbol_1 = {x_GLF_color};
+ const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
+ return tint_symbol_3;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl
index 0fdd32b..a8cf684 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.msl
@@ -1,6 +1,98 @@
-SKIP: FAILED
+#include <metal_stdlib>
-graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl:28:19 error: expected ';' for assignment statement
- s1 = 0x1.b38fb8p-127;
- ^^^^
+using namespace metal;
+struct tint_padded_array_element {
+ /* 0x0000 */ int el;
+ /* 0x0004 */ int8_t tint_pad[12];
+};
+struct tint_array_wrapper {
+ /* 0x0000 */ tint_padded_array_element arr[2];
+};
+struct buf1 {
+ /* 0x0000 */ tint_array_wrapper x_GLF_uniform_int_values;
+};
+struct tint_padded_array_element_1 {
+ /* 0x0000 */ float el;
+ /* 0x0004 */ int8_t tint_pad_1[12];
+};
+struct tint_array_wrapper_1 {
+ /* 0x0000 */ tint_padded_array_element_1 arr[1];
+};
+struct buf0 {
+ /* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_float_values;
+};
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol_1 {
+ float4 x_GLF_color_1 [[color(0)]];
+};
+
+void main_1(constant buf1& x_8, thread float4* const tint_symbol_4) {
+ float f0 = 0.0f;
+ float s1 = 0.0f;
+ float f1 = 0.0f;
+ bool x_72 = false;
+ bool x_73_phi = false;
+ f0 = fmod(10.0f, 0.000001f);
+ s1 = 9.99999935e-39f;
+ float const x_38 = s1;
+ if ((x_38 == 0.0f)) {
+ s1 = 1.0f;
+ }
+ bool x_62 = false;
+ bool x_71 = false;
+ bool x_63_phi = false;
+ bool x_72_phi = false;
+ float const x_42 = s1;
+ f1 = fmod(10.0f, x_42);
+ float const x_44 = f1;
+ float const x_46 = s1;
+ bool const x_48 = (isinf(x_44) || (x_46 == 1.0f));
+ x_73_phi = x_48;
+ if (!(x_48)) {
+ float const x_52 = f0;
+ float const x_53 = f1;
+ bool const x_54 = (x_52 == x_53);
+ x_63_phi = x_54;
+ if (!(x_54)) {
+ float const x_58 = f0;
+ float const x_60 = f0;
+ x_62 = ((x_58 > 0.99000001f) && (x_60 < 0.01f));
+ x_63_phi = x_62;
+ }
+ bool const x_63 = x_63_phi;
+ x_72_phi = x_63;
+ if (!(x_63)) {
+ float const x_67 = f1;
+ float const x_69 = f1;
+ x_71 = ((x_67 > 0.99000001f) && (x_69 < 0.01f));
+ x_72_phi = x_71;
+ }
+ x_72 = x_72_phi;
+ x_73_phi = x_72;
+ }
+ bool const x_73 = x_73_phi;
+ float const x_74 = f1;
+ if ((x_73 || (x_74 == 10.0f))) {
+ int const x_81 = x_8.x_GLF_uniform_int_values.arr[1].el;
+ int const x_84 = x_8.x_GLF_uniform_int_values.arr[0].el;
+ int const x_87 = x_8.x_GLF_uniform_int_values.arr[0].el;
+ int const x_90 = x_8.x_GLF_uniform_int_values.arr[1].el;
+ *(tint_symbol_4) = float4(float(x_81), float(x_84), float(x_87), float(x_90));
+ } else {
+ int const x_94 = x_8.x_GLF_uniform_int_values.arr[0].el;
+ float const x_95 = float(x_94);
+ *(tint_symbol_4) = float4(x_95, x_95, x_95, x_95);
+ }
+ return;
+}
+
+fragment tint_symbol_1 tint_symbol(constant buf1& x_8 [[buffer(1)]]) {
+ thread float4 tint_symbol_5 = 0.0f;
+ main_1(x_8, &(tint_symbol_5));
+ main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
+ tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
+ return tint_symbol_3;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.spvasm
index 0fdd32b..f346779 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.spvasm
@@ -1,6 +1,227 @@
-SKIP: FAILED
-
-graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl:28:19 error: expected ';' for assignment statement
- s1 = 0x1.b38fb8p-127;
- ^^^^
-
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 132
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %main "main" %tint_symbol_1
+ OpExecutionMode %main OriginUpperLeft
+ OpName %x_GLF_color "x_GLF_color"
+ OpName %buf1 "buf1"
+ OpMemberName %buf1 0 "x_GLF_uniform_int_values"
+ OpName %x_8 "x_8"
+ OpName %buf0 "buf0"
+ OpMemberName %buf0 0 "x_GLF_uniform_float_values"
+ OpName %x_10 "x_10"
+ OpName %tint_symbol_1 "tint_symbol_1"
+ OpName %main_1 "main_1"
+ OpName %f0 "f0"
+ OpName %s1 "s1"
+ OpName %f1 "f1"
+ OpName %x_72 "x_72"
+ OpName %x_73_phi "x_73_phi"
+ OpName %x_62 "x_62"
+ OpName %x_71 "x_71"
+ OpName %x_63_phi "x_63_phi"
+ OpName %x_72_phi "x_72_phi"
+ OpName %main_out "main_out"
+ OpMemberName %main_out 0 "x_GLF_color_1"
+ OpName %tint_symbol_2 "tint_symbol_2"
+ OpName %tint_symbol "tint_symbol"
+ OpName %main "main"
+ OpDecorate %buf1 Block
+ OpMemberDecorate %buf1 0 Offset 0
+ OpDecorate %_arr_int_uint_2 ArrayStride 16
+ OpDecorate %x_8 NonWritable
+ OpDecorate %x_8 DescriptorSet 0
+ OpDecorate %x_8 Binding 1
+ OpDecorate %buf0 Block
+ OpMemberDecorate %buf0 0 Offset 0
+ OpDecorate %_arr_float_uint_1 ArrayStride 16
+ OpDecorate %x_10 NonWritable
+ OpDecorate %x_10 DescriptorSet 0
+ OpDecorate %x_10 Binding 0
+ OpDecorate %tint_symbol_1 Location 0
+ OpMemberDecorate %main_out 0 Offset 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Private_v4float = OpTypePointer Private %v4float
+ %5 = OpConstantNull %v4float
+%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
+ %int = OpTypeInt 32 1
+ %uint = OpTypeInt 32 0
+ %uint_2 = OpConstant %uint 2
+%_arr_int_uint_2 = OpTypeArray %int %uint_2
+ %buf1 = OpTypeStruct %_arr_int_uint_2
+%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
+ %x_8 = OpVariable %_ptr_Uniform_buf1 Uniform
+ %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+ %buf0 = OpTypeStruct %_arr_float_uint_1
+%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
+ %x_10 = OpVariable %_ptr_Uniform_buf0 Uniform
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %5
+ %void = OpTypeVoid
+ %20 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
+ %26 = OpConstantNull %float
+ %bool = OpTypeBool
+%_ptr_Function_bool = OpTypePointer Function %bool
+ %32 = OpConstantNull %bool
+ %float_10 = OpConstant %float 10
+%float_9_99999997en07 = OpConstant %float 9.99999997e-07
+%float_0x1_b38fb8pn127 = OpConstant %float 0x1.b38fb8p-127
+ %float_0 = OpConstant %float 0
+ %float_1 = OpConstant %float 1
+%float_0_99000001 = OpConstant %float 0.99000001
+%float_0_00999999978 = OpConstant %float 0.00999999978
+ %uint_0 = OpConstant %uint 0
+ %int_1 = OpConstant %int 1
+%_ptr_Uniform_int = OpTypePointer Uniform %int
+ %int_0 = OpConstant %int 0
+ %main_out = OpTypeStruct %v4float
+ %120 = OpTypeFunction %void %main_out
+ %main_1 = OpFunction %void None %20
+ %23 = OpLabel
+ %f0 = OpVariable %_ptr_Function_float Function %26
+ %s1 = OpVariable %_ptr_Function_float Function %26
+ %f1 = OpVariable %_ptr_Function_float Function %26
+ %x_72 = OpVariable %_ptr_Function_bool Function %32
+ %x_73_phi = OpVariable %_ptr_Function_bool Function %32
+ %x_62 = OpVariable %_ptr_Function_bool Function %32
+ %x_71 = OpVariable %_ptr_Function_bool Function %32
+ %x_63_phi = OpVariable %_ptr_Function_bool Function %32
+ %x_72_phi = OpVariable %_ptr_Function_bool Function %32
+ %36 = OpFRem %float %float_10 %float_9_99999997en07
+ OpStore %f0 %36
+ OpStore %s1 %float_0x1_b38fb8pn127
+ %38 = OpLoad %float %s1
+ %40 = OpFOrdEqual %bool %38 %float_0
+ OpSelectionMerge %41 None
+ OpBranchConditional %40 %42 %41
+ %42 = OpLabel
+ OpStore %s1 %float_1
+ OpBranch %41
+ %41 = OpLabel
+ %48 = OpLoad %float %s1
+ %49 = OpFRem %float %float_10 %48
+ OpStore %f1 %49
+ %50 = OpLoad %float %f1
+ %51 = OpLoad %float %s1
+ %52 = OpIsInf %bool %50
+ OpSelectionMerge %53 None
+ OpBranchConditional %52 %53 %54
+ %54 = OpLabel
+ %55 = OpFOrdEqual %bool %51 %float_1
+ OpBranch %53
+ %53 = OpLabel
+ %56 = OpPhi %bool %52 %41 %55 %54
+ OpStore %x_73_phi %56
+ %57 = OpLogicalNot %bool %56
+ OpSelectionMerge %58 None
+ OpBranchConditional %57 %59 %58
+ %59 = OpLabel
+ %60 = OpLoad %float %f0
+ %61 = OpLoad %float %f1
+ %62 = OpFOrdEqual %bool %60 %61
+ OpStore %x_63_phi %62
+ %63 = OpLogicalNot %bool %62
+ OpSelectionMerge %64 None
+ OpBranchConditional %63 %65 %64
+ %65 = OpLabel
+ %66 = OpLoad %float %f0
+ %67 = OpLoad %float %f0
+ %69 = OpFOrdGreaterThan %bool %66 %float_0_99000001
+ OpSelectionMerge %70 None
+ OpBranchConditional %69 %71 %70
+ %71 = OpLabel
+ %73 = OpFOrdLessThan %bool %67 %float_0_00999999978
+ OpBranch %70
+ %70 = OpLabel
+ %74 = OpPhi %bool %69 %65 %73 %71
+ OpStore %x_62 %74
+ %75 = OpLoad %bool %x_62
+ OpStore %x_63_phi %75
+ OpBranch %64
+ %64 = OpLabel
+ %76 = OpLoad %bool %x_63_phi
+ OpStore %x_72_phi %76
+ %77 = OpLogicalNot %bool %76
+ OpSelectionMerge %78 None
+ OpBranchConditional %77 %79 %78
+ %79 = OpLabel
+ %80 = OpLoad %float %f1
+ %81 = OpLoad %float %f1
+ %82 = OpFOrdGreaterThan %bool %80 %float_0_99000001
+ OpSelectionMerge %83 None
+ OpBranchConditional %82 %84 %83
+ %84 = OpLabel
+ %85 = OpFOrdLessThan %bool %81 %float_0_00999999978
+ OpBranch %83
+ %83 = OpLabel
+ %86 = OpPhi %bool %82 %79 %85 %84
+ OpStore %x_71 %86
+ %87 = OpLoad %bool %x_71
+ OpStore %x_72_phi %87
+ OpBranch %78
+ %78 = OpLabel
+ %88 = OpLoad %bool %x_72_phi
+ OpStore %x_72 %88
+ %89 = OpLoad %bool %x_72
+ OpStore %x_73_phi %89
+ OpBranch %58
+ %58 = OpLabel
+ %90 = OpLoad %bool %x_73_phi
+ %91 = OpLoad %float %f1
+ OpSelectionMerge %92 None
+ OpBranchConditional %90 %92 %93
+ %93 = OpLabel
+ %94 = OpFOrdEqual %bool %91 %float_10
+ OpBranch %92
+ %92 = OpLabel
+ %95 = OpPhi %bool %90 %58 %94 %93
+ OpSelectionMerge %96 None
+ OpBranchConditional %95 %97 %98
+ %97 = OpLabel
+ %102 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
+ %103 = OpLoad %int %102
+ %105 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
+ %106 = OpLoad %int %105
+ %107 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
+ %108 = OpLoad %int %107
+ %109 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
+ %110 = OpLoad %int %109
+ %111 = OpConvertSToF %float %103
+ %112 = OpConvertSToF %float %106
+ %113 = OpConvertSToF %float %108
+ %114 = OpConvertSToF %float %110
+ %115 = OpCompositeConstruct %v4float %111 %112 %113 %114
+ OpStore %x_GLF_color %115
+ OpBranch %96
+ %98 = OpLabel
+ %116 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
+ %117 = OpLoad %int %116
+ %118 = OpConvertSToF %float %117
+ %119 = OpCompositeConstruct %v4float %118 %118 %118 %118
+ OpStore %x_GLF_color %119
+ OpBranch %96
+ %96 = OpLabel
+ OpReturn
+ OpFunctionEnd
+%tint_symbol_2 = OpFunction %void None %120
+%tint_symbol = OpFunctionParameter %main_out
+ %124 = OpLabel
+ %125 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %125
+ OpReturn
+ OpFunctionEnd
+ %main = OpFunction %void None %20
+ %127 = OpLabel
+ %128 = OpFunctionCall %void %main_1
+ %130 = OpLoad %v4float %x_GLF_color
+ %131 = OpCompositeConstruct %main_out %130
+ %129 = OpFunctionCall %void %tint_symbol_2 %131
+ OpReturn
+ OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.wgsl
index 0fdd32b..8b2ad19 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl.expected.wgsl
@@ -1,6 +1,90 @@
-SKIP: FAILED
+type Arr = [[stride(16)]] array<i32, 2>;
-graphicsfuzz/cov-apfloat-module-small-number/0-opt.wgsl:28:19 error: expected ';' for assignment statement
+[[block]]
+struct buf1 {
+ x_GLF_uniform_int_values : Arr;
+};
+
+type Arr_1 = [[stride(16)]] array<f32, 1>;
+
+[[block]]
+struct buf0 {
+ x_GLF_uniform_float_values : Arr_1;
+};
+
+var<private> x_GLF_color : vec4<f32>;
+
+[[group(0), binding(1)]] var<uniform> x_8 : buf1;
+
+[[group(0), binding(0)]] var<uniform> x_10 : buf0;
+
+fn main_1() {
+ var f0 : f32;
+ var s1 : f32;
+ var f1 : f32;
+ var x_72 : bool;
+ var x_73_phi : bool;
+ f0 = (10.0 % 0.000001);
s1 = 0x1.b38fb8p-127;
- ^^^^
+ let x_38 : f32 = s1;
+ if ((x_38 == 0.0)) {
+ s1 = 1.0;
+ }
+ var x_62 : bool;
+ var x_71 : bool;
+ var x_63_phi : bool;
+ var x_72_phi : bool;
+ let x_42 : f32 = s1;
+ f1 = (10.0 % x_42);
+ let x_44 : f32 = f1;
+ let x_46 : f32 = s1;
+ let x_48 : bool = (isInf(x_44) || (x_46 == 1.0));
+ x_73_phi = x_48;
+ if (!(x_48)) {
+ let x_52 : f32 = f0;
+ let x_53 : f32 = f1;
+ let x_54 : bool = (x_52 == x_53);
+ x_63_phi = x_54;
+ if (!(x_54)) {
+ let x_58 : f32 = f0;
+ let x_60 : f32 = f0;
+ x_62 = ((x_58 > 0.99000001) && (x_60 < 0.01));
+ x_63_phi = x_62;
+ }
+ let x_63 : bool = x_63_phi;
+ x_72_phi = x_63;
+ if (!(x_63)) {
+ let x_67 : f32 = f1;
+ let x_69 : f32 = f1;
+ x_71 = ((x_67 > 0.99000001) && (x_69 < 0.01));
+ x_72_phi = x_71;
+ }
+ x_72 = x_72_phi;
+ x_73_phi = x_72;
+ }
+ let x_73 : bool = x_73_phi;
+ let x_74 : f32 = f1;
+ if ((x_73 || (x_74 == 10.0))) {
+ let x_81 : i32 = x_8.x_GLF_uniform_int_values[1];
+ let x_84 : i32 = x_8.x_GLF_uniform_int_values[0];
+ let x_87 : i32 = x_8.x_GLF_uniform_int_values[0];
+ let x_90 : i32 = x_8.x_GLF_uniform_int_values[1];
+ x_GLF_color = vec4<f32>(f32(x_81), f32(x_84), f32(x_87), f32(x_90));
+ } else {
+ let x_94 : i32 = x_8.x_GLF_uniform_int_values[0];
+ let x_95 : f32 = f32(x_94);
+ x_GLF_color = vec4<f32>(x_95, x_95, x_95, x_95);
+ }
+ return;
+}
+struct main_out {
+ [[location(0)]]
+ x_GLF_color_1 : vec4<f32>;
+};
+
+[[stage(fragment)]]
+fn main() -> main_out {
+ main_1();
+ return main_out(x_GLF_color);
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.hlsl
index 9136c66..c006c3f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.spvasm.expected.hlsl
@@ -1,71 +1,56 @@
-SKIP: FAILED
-
-
-type Arr = [[stride(16)]] array<i32, 5>;
-
-[[block]]
-struct buf0 {
- x_GLF_uniform_int_values : Arr;
+cbuffer cbuffer_x_6 : register(b0, space0) {
+ uint4 x_6[5];
};
-
-type Arr_1 = [[stride(16)]] array<f32, 3>;
-
-[[block]]
-struct buf1 {
- x_GLF_uniform_float_values : Arr_1;
+cbuffer cbuffer_x_9 : register(b1, space0) {
+ uint4 x_9[3];
};
+static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
-[[group(0), binding(0)]] var<uniform> x_6 : buf0;
-
-[[group(0), binding(1)]] var<uniform> x_9 : buf1;
-
-var<private> x_GLF_color : vec4<f32>;
-
-fn main_1() {
- var I : vec4<f32>;
- var N : vec4<f32>;
- var R : vec4<f32>;
- var ref : vec4<f32>;
- let x_40 : i32 = x_6.x_GLF_uniform_int_values[2];
- let x_43 : i32 = x_6.x_GLF_uniform_int_values[3];
- let x_46 : i32 = x_6.x_GLF_uniform_int_values[4];
- I = bitcast<vec4<f32>>(vec4<u32>(bitcast<u32>(x_40), bitcast<u32>(x_43), bitcast<u32>(x_46), 92985u));
- let x_51 : f32 = x_9.x_GLF_uniform_float_values[1];
- N = vec4<f32>(x_51, x_51, x_51, x_51);
- let x_53 : vec4<f32> = I;
- R = reflect(x_53, vec4<f32>(0.5, 0.5, 0.5, 0.5));
- let x_55 : vec4<f32> = I;
- let x_57 : f32 = x_9.x_GLF_uniform_float_values[2];
- let x_58 : vec4<f32> = N;
- let x_59 : vec4<f32> = I;
- let x_62 : vec4<f32> = N;
- ref = (x_55 - (x_62 * (x_57 * dot(x_58, x_59))));
- let x_65 : vec4<f32> = R;
- let x_66 : vec4<f32> = ref;
- let x_69 : f32 = x_9.x_GLF_uniform_float_values[0];
+void main_1() {
+ float4 I = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ float4 N = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ float4 R = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ float4 ref = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ const int x_40 = asint(x_6[2].x);
+ const int x_43 = asint(x_6[3].x);
+ const int x_46 = asint(x_6[4].x);
+ I = asfloat(uint4(asuint(x_40), asuint(x_43), asuint(x_46), 92985u));
+ const float x_51 = asfloat(x_9[1].x);
+ N = float4(x_51, x_51, x_51, x_51);
+ R = reflect(I, float4(0.5f, 0.5f, 0.5f, 0.5f));
+ const float4 x_55 = I;
+ const float x_57 = asfloat(x_9[2].x);
+ ref = (x_55 - (N * (x_57 * dot(N, I))));
+ const float4 x_65 = R;
+ const float4 x_66 = ref;
+ const uint scalar_offset = ((16u * uint(0))) / 4;
+ const float x_69 = asfloat(x_9[scalar_offset / 4][scalar_offset % 4]);
if ((distance(x_65, x_66) < x_69)) {
- let x_75 : i32 = x_6.x_GLF_uniform_int_values[0];
- let x_78 : i32 = x_6.x_GLF_uniform_int_values[1];
- let x_81 : i32 = x_6.x_GLF_uniform_int_values[1];
- let x_84 : i32 = x_6.x_GLF_uniform_int_values[0];
- x_GLF_color = vec4<f32>(f32(x_75), f32(x_78), f32(x_81), f32(x_84));
+ const uint scalar_offset_1 = ((16u * uint(0))) / 4;
+ const int x_75 = asint(x_6[scalar_offset_1 / 4][scalar_offset_1 % 4]);
+ const int x_78 = asint(x_6[1].x);
+ const int x_81 = asint(x_6[1].x);
+ const uint scalar_offset_2 = ((16u * uint(0))) / 4;
+ const int x_84 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
+ x_GLF_color = float4(float(x_75), float(x_78), float(x_81), float(x_84));
} else {
- let x_88 : i32 = x_6.x_GLF_uniform_int_values[1];
- let x_89 : f32 = f32(x_88);
- x_GLF_color = vec4<f32>(x_89, x_89, x_89, x_89);
+ const int x_88 = asint(x_6[1].x);
+ const float x_89 = float(x_88);
+ x_GLF_color = float4(x_89, x_89, x_89, x_89);
}
return;
}
struct main_out {
- [[location(0)]]
- x_GLF_color_1 : vec4<f32>;
+ float4 x_GLF_color_1;
+};
+struct tint_symbol {
+ float4 x_GLF_color_1 : SV_Target0;
};
-[[stage(fragment)]]
-fn main() -> main_out {
+tint_symbol main() {
main_1();
- return main_out(x_GLF_color);
+ const main_out tint_symbol_1 = {x_GLF_color};
+ const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
+ return tint_symbol_4;
}
-
-Failed to generate: error: Unable to do bitcast to type __vec_4__f32
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.hlsl
index 9136c66..c006c3f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-reflect-denorm/0-opt.wgsl.expected.hlsl
@@ -1,71 +1,56 @@
-SKIP: FAILED
-
-
-type Arr = [[stride(16)]] array<i32, 5>;
-
-[[block]]
-struct buf0 {
- x_GLF_uniform_int_values : Arr;
+cbuffer cbuffer_x_6 : register(b0, space0) {
+ uint4 x_6[5];
};
-
-type Arr_1 = [[stride(16)]] array<f32, 3>;
-
-[[block]]
-struct buf1 {
- x_GLF_uniform_float_values : Arr_1;
+cbuffer cbuffer_x_9 : register(b1, space0) {
+ uint4 x_9[3];
};
+static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
-[[group(0), binding(0)]] var<uniform> x_6 : buf0;
-
-[[group(0), binding(1)]] var<uniform> x_9 : buf1;
-
-var<private> x_GLF_color : vec4<f32>;
-
-fn main_1() {
- var I : vec4<f32>;
- var N : vec4<f32>;
- var R : vec4<f32>;
- var ref : vec4<f32>;
- let x_40 : i32 = x_6.x_GLF_uniform_int_values[2];
- let x_43 : i32 = x_6.x_GLF_uniform_int_values[3];
- let x_46 : i32 = x_6.x_GLF_uniform_int_values[4];
- I = bitcast<vec4<f32>>(vec4<u32>(bitcast<u32>(x_40), bitcast<u32>(x_43), bitcast<u32>(x_46), 92985u));
- let x_51 : f32 = x_9.x_GLF_uniform_float_values[1];
- N = vec4<f32>(x_51, x_51, x_51, x_51);
- let x_53 : vec4<f32> = I;
- R = reflect(x_53, vec4<f32>(0.5, 0.5, 0.5, 0.5));
- let x_55 : vec4<f32> = I;
- let x_57 : f32 = x_9.x_GLF_uniform_float_values[2];
- let x_58 : vec4<f32> = N;
- let x_59 : vec4<f32> = I;
- let x_62 : vec4<f32> = N;
- ref = (x_55 - (x_62 * (x_57 * dot(x_58, x_59))));
- let x_65 : vec4<f32> = R;
- let x_66 : vec4<f32> = ref;
- let x_69 : f32 = x_9.x_GLF_uniform_float_values[0];
+void main_1() {
+ float4 I = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ float4 N = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ float4 R = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ float4 ref = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ const int x_40 = asint(x_6[2].x);
+ const int x_43 = asint(x_6[3].x);
+ const int x_46 = asint(x_6[4].x);
+ I = asfloat(uint4(asuint(x_40), asuint(x_43), asuint(x_46), 92985u));
+ const float x_51 = asfloat(x_9[1].x);
+ N = float4(x_51, x_51, x_51, x_51);
+ R = reflect(I, float4(0.5f, 0.5f, 0.5f, 0.5f));
+ const float4 x_55 = I;
+ const float x_57 = asfloat(x_9[2].x);
+ ref = (x_55 - (N * (x_57 * dot(N, I))));
+ const float4 x_65 = R;
+ const float4 x_66 = ref;
+ const uint scalar_offset = ((16u * uint(0))) / 4;
+ const float x_69 = asfloat(x_9[scalar_offset / 4][scalar_offset % 4]);
if ((distance(x_65, x_66) < x_69)) {
- let x_75 : i32 = x_6.x_GLF_uniform_int_values[0];
- let x_78 : i32 = x_6.x_GLF_uniform_int_values[1];
- let x_81 : i32 = x_6.x_GLF_uniform_int_values[1];
- let x_84 : i32 = x_6.x_GLF_uniform_int_values[0];
- x_GLF_color = vec4<f32>(f32(x_75), f32(x_78), f32(x_81), f32(x_84));
+ const uint scalar_offset_1 = ((16u * uint(0))) / 4;
+ const int x_75 = asint(x_6[scalar_offset_1 / 4][scalar_offset_1 % 4]);
+ const int x_78 = asint(x_6[1].x);
+ const int x_81 = asint(x_6[1].x);
+ const uint scalar_offset_2 = ((16u * uint(0))) / 4;
+ const int x_84 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
+ x_GLF_color = float4(float(x_75), float(x_78), float(x_81), float(x_84));
} else {
- let x_88 : i32 = x_6.x_GLF_uniform_int_values[1];
- let x_89 : f32 = f32(x_88);
- x_GLF_color = vec4<f32>(x_89, x_89, x_89, x_89);
+ const int x_88 = asint(x_6[1].x);
+ const float x_89 = float(x_88);
+ x_GLF_color = float4(x_89, x_89, x_89, x_89);
}
return;
}
struct main_out {
- [[location(0)]]
- x_GLF_color_1 : vec4<f32>;
+ float4 x_GLF_color_1;
+};
+struct tint_symbol {
+ float4 x_GLF_color_1 : SV_Target0;
};
-[[stage(fragment)]]
-fn main() -> main_out {
+tint_symbol main() {
main_1();
- return main_out(x_GLF_color);
+ const main_out tint_symbol_1 = {x_GLF_color};
+ const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
+ return tint_symbol_4;
}
-
-Failed to generate: error: Unable to do bitcast to type __vec_4__f32
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.hlsl
index 7b92bee..a6d9593 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.hlsl
@@ -1,6 +1,53 @@
-SKIP: FAILED
+cbuffer cbuffer_x_6 : register(b0, space0) {
+ uint4 x_6[2];
+};
+cbuffer cbuffer_x_8 : register(b1, space0) {
+ uint4 x_8[1];
+};
+static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
-graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl:25:23 error: expected ')' for function call
- undefined = sinh(0x1.8p+128);
- ^^
+void main_1() {
+ float undefined = 0.0f;
+ bool x_45 = false;
+ bool x_46_phi = false;
+ undefined = sinh(asfloat(0x7f800000u));
+ const uint scalar_offset = ((16u * uint(0))) / 4;
+ const int x_10 = asint(x_6[scalar_offset / 4][scalar_offset % 4]);
+ const bool x_38 = (1 == x_10);
+ x_46_phi = x_38;
+ if (!(x_38)) {
+ const float x_42 = undefined;
+ const uint scalar_offset_1 = ((16u * uint(0))) / 4;
+ const float x_44 = asfloat(x_8[scalar_offset_1 / 4][scalar_offset_1 % 4]);
+ x_45 = (x_42 > x_44);
+ x_46_phi = x_45;
+ }
+ if (x_46_phi) {
+ const uint scalar_offset_2 = ((16u * uint(0))) / 4;
+ const int x_12 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
+ const int x_13 = asint(x_6[1].x);
+ const int x_14 = asint(x_6[1].x);
+ const uint scalar_offset_3 = ((16u * uint(0))) / 4;
+ const int x_15 = asint(x_6[scalar_offset_3 / 4][scalar_offset_3 % 4]);
+ x_GLF_color = float4(float(x_12), float(x_13), float(x_14), float(x_15));
+ } else {
+ const int x_16 = asint(x_6[1].x);
+ const float x_60 = float(x_16);
+ x_GLF_color = float4(x_60, x_60, x_60, x_60);
+ }
+ return;
+}
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol {
+ float4 x_GLF_color_1 : SV_Target0;
+};
+
+tint_symbol main() {
+ main_1();
+ const main_out tint_symbol_1 = {x_GLF_color};
+ const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
+ return tint_symbol_4;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.msl
index 7b92bee..7a89ea8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.msl
@@ -1,6 +1,67 @@
-SKIP: FAILED
+#include <metal_stdlib>
-graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl:25:23 error: expected ')' for function call
- undefined = sinh(0x1.8p+128);
- ^^
+using namespace metal;
+struct tint_padded_array_element {
+ /* 0x0000 */ int el;
+ /* 0x0004 */ int8_t tint_pad[12];
+};
+struct tint_array_wrapper {
+ /* 0x0000 */ tint_padded_array_element arr[2];
+};
+struct buf0 {
+ /* 0x0000 */ tint_array_wrapper x_GLF_uniform_int_values;
+};
+struct tint_padded_array_element_1 {
+ /* 0x0000 */ float el;
+ /* 0x0004 */ int8_t tint_pad_1[12];
+};
+struct tint_array_wrapper_1 {
+ /* 0x0000 */ tint_padded_array_element_1 arr[1];
+};
+struct buf1 {
+ /* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_float_values;
+};
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol_1 {
+ float4 x_GLF_color_1 [[color(0)]];
+};
+
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+ float undefined = 0.0f;
+ bool x_45 = false;
+ bool x_46_phi = false;
+ undefined = sinh(INFINITY);
+ int const x_10 = x_6.x_GLF_uniform_int_values.arr[0].el;
+ bool const x_38 = (1 == x_10);
+ x_46_phi = x_38;
+ if (!(x_38)) {
+ float const x_42 = undefined;
+ float const x_44 = x_8.x_GLF_uniform_float_values.arr[0].el;
+ x_45 = (x_42 > x_44);
+ x_46_phi = x_45;
+ }
+ bool const x_46 = x_46_phi;
+ if (x_46) {
+ int const x_12 = x_6.x_GLF_uniform_int_values.arr[0].el;
+ int const x_13 = x_6.x_GLF_uniform_int_values.arr[1].el;
+ int const x_14 = x_6.x_GLF_uniform_int_values.arr[1].el;
+ int const x_15 = x_6.x_GLF_uniform_int_values.arr[0].el;
+ *(tint_symbol_4) = float4(float(x_12), float(x_13), float(x_14), float(x_15));
+ } else {
+ int const x_16 = x_6.x_GLF_uniform_int_values.arr[1].el;
+ float const x_60 = float(x_16);
+ *(tint_symbol_4) = float4(x_60, x_60, x_60, x_60);
+ }
+ return;
+}
+
+fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
+ thread float4 tint_symbol_5 = 0.0f;
+ main_1(x_6, x_8, &(tint_symbol_5));
+ main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
+ tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
+ return tint_symbol_3;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.spvasm
index 7b92bee..d03d7ff 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.spvasm
@@ -1,6 +1,143 @@
-SKIP: FAILED
-
-graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl:25:23 error: expected ')' for function call
- undefined = sinh(0x1.8p+128);
- ^^
-
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 84
+; Schema: 0
+ OpCapability Shader
+ %33 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %main "main" %tint_symbol_1
+ OpExecutionMode %main OriginUpperLeft
+ OpName %buf0 "buf0"
+ OpMemberName %buf0 0 "x_GLF_uniform_int_values"
+ OpName %x_6 "x_6"
+ OpName %buf1 "buf1"
+ OpMemberName %buf1 0 "x_GLF_uniform_float_values"
+ OpName %x_8 "x_8"
+ OpName %x_GLF_color "x_GLF_color"
+ OpName %tint_symbol_1 "tint_symbol_1"
+ OpName %main_1 "main_1"
+ OpName %undefined "undefined"
+ OpName %x_45 "x_45"
+ OpName %x_46_phi "x_46_phi"
+ OpName %main_out "main_out"
+ OpMemberName %main_out 0 "x_GLF_color_1"
+ OpName %tint_symbol_2 "tint_symbol_2"
+ OpName %tint_symbol "tint_symbol"
+ OpName %main "main"
+ OpDecorate %buf0 Block
+ OpMemberDecorate %buf0 0 Offset 0
+ OpDecorate %_arr_int_uint_2 ArrayStride 16
+ OpDecorate %x_6 NonWritable
+ OpDecorate %x_6 DescriptorSet 0
+ OpDecorate %x_6 Binding 0
+ OpDecorate %buf1 Block
+ OpMemberDecorate %buf1 0 Offset 0
+ OpDecorate %_arr_float_uint_1 ArrayStride 16
+ OpDecorate %x_8 NonWritable
+ OpDecorate %x_8 DescriptorSet 0
+ OpDecorate %x_8 Binding 1
+ OpDecorate %tint_symbol_1 Location 0
+ OpMemberDecorate %main_out 0 Offset 0
+ %int = OpTypeInt 32 1
+ %uint = OpTypeInt 32 0
+ %uint_2 = OpConstant %uint 2
+%_arr_int_uint_2 = OpTypeArray %int %uint_2
+ %buf0 = OpTypeStruct %_arr_int_uint_2
+%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
+ %x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
+ %float = OpTypeFloat 32
+ %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+ %buf1 = OpTypeStruct %_arr_float_uint_1
+%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
+ %x_8 = OpVariable %_ptr_Uniform_buf1 Uniform
+ %v4float = OpTypeVector %float 4
+%_ptr_Private_v4float = OpTypePointer Private %v4float
+ %17 = OpConstantNull %v4float
+%x_GLF_color = OpVariable %_ptr_Private_v4float Private %17
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %17
+ %void = OpTypeVoid
+ %20 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
+ %26 = OpConstantNull %float
+ %bool = OpTypeBool
+%_ptr_Function_bool = OpTypePointer Function %bool
+ %30 = OpConstantNull %bool
+%float_0x1p_128 = OpConstant %float 0x1p+128
+ %uint_0 = OpConstant %uint 0
+ %int_0 = OpConstant %int 0
+%_ptr_Uniform_int = OpTypePointer Uniform %int
+ %int_1 = OpConstant %int 1
+%_ptr_Uniform_float = OpTypePointer Uniform %float
+ %main_out = OpTypeStruct %v4float
+ %72 = OpTypeFunction %void %main_out
+ %main_1 = OpFunction %void None %20
+ %23 = OpLabel
+ %undefined = OpVariable %_ptr_Function_float Function %26
+ %x_45 = OpVariable %_ptr_Function_bool Function %30
+ %x_46_phi = OpVariable %_ptr_Function_bool Function %30
+ %32 = OpExtInst %float %33 Sinh %float_0x1p_128
+ OpStore %undefined %32
+ %38 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
+ %39 = OpLoad %int %38
+ %41 = OpIEqual %bool %int_1 %39
+ OpStore %x_46_phi %41
+ %42 = OpLogicalNot %bool %41
+ OpSelectionMerge %43 None
+ OpBranchConditional %42 %44 %43
+ %44 = OpLabel
+ %45 = OpLoad %float %undefined
+ %47 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
+ %48 = OpLoad %float %47
+ %49 = OpFOrdGreaterThan %bool %45 %48
+ OpStore %x_45 %49
+ %50 = OpLoad %bool %x_45
+ OpStore %x_46_phi %50
+ OpBranch %43
+ %43 = OpLabel
+ %51 = OpLoad %bool %x_46_phi
+ OpSelectionMerge %52 None
+ OpBranchConditional %51 %53 %54
+ %53 = OpLabel
+ %55 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
+ %56 = OpLoad %int %55
+ %57 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %58 = OpLoad %int %57
+ %59 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %60 = OpLoad %int %59
+ %61 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
+ %62 = OpLoad %int %61
+ %63 = OpConvertSToF %float %56
+ %64 = OpConvertSToF %float %58
+ %65 = OpConvertSToF %float %60
+ %66 = OpConvertSToF %float %62
+ %67 = OpCompositeConstruct %v4float %63 %64 %65 %66
+ OpStore %x_GLF_color %67
+ OpBranch %52
+ %54 = OpLabel
+ %68 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %69 = OpLoad %int %68
+ %70 = OpConvertSToF %float %69
+ %71 = OpCompositeConstruct %v4float %70 %70 %70 %70
+ OpStore %x_GLF_color %71
+ OpBranch %52
+ %52 = OpLabel
+ OpReturn
+ OpFunctionEnd
+%tint_symbol_2 = OpFunction %void None %72
+%tint_symbol = OpFunctionParameter %main_out
+ %76 = OpLabel
+ %77 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %77
+ OpReturn
+ OpFunctionEnd
+ %main = OpFunction %void None %20
+ %79 = OpLabel
+ %80 = OpFunctionCall %void %main_1
+ %82 = OpLoad %v4float %x_GLF_color
+ %83 = OpCompositeConstruct %main_out %82
+ %81 = OpFunctionCall %void %tint_symbol_2 %83
+ OpReturn
+ OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.wgsl
index 7b92bee..c6e4a57 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl.expected.wgsl
@@ -1,6 +1,59 @@
-SKIP: FAILED
+type Arr = [[stride(16)]] array<i32, 2>;
-graphicsfuzz/cov-apfloat-sinh-negative-log2/0-opt.wgsl:25:23 error: expected ')' for function call
- undefined = sinh(0x1.8p+128);
- ^^
+[[block]]
+struct buf0 {
+ x_GLF_uniform_int_values : Arr;
+};
+type Arr_1 = [[stride(16)]] array<f32, 1>;
+
+[[block]]
+struct buf1 {
+ x_GLF_uniform_float_values : Arr_1;
+};
+
+[[group(0), binding(0)]] var<uniform> x_6 : buf0;
+
+[[group(0), binding(1)]] var<uniform> x_8 : buf1;
+
+var<private> x_GLF_color : vec4<f32>;
+
+fn main_1() {
+ var undefined : f32;
+ var x_45 : bool;
+ var x_46_phi : bool;
+ undefined = sinh(0x1p+128);
+ let x_10 : i32 = x_6.x_GLF_uniform_int_values[0];
+ let x_38 : bool = (1 == x_10);
+ x_46_phi = x_38;
+ if (!(x_38)) {
+ let x_42 : f32 = undefined;
+ let x_44 : f32 = x_8.x_GLF_uniform_float_values[0];
+ x_45 = (x_42 > x_44);
+ x_46_phi = x_45;
+ }
+ let x_46 : bool = x_46_phi;
+ if (x_46) {
+ let x_12 : i32 = x_6.x_GLF_uniform_int_values[0];
+ let x_13 : i32 = x_6.x_GLF_uniform_int_values[1];
+ let x_14 : i32 = x_6.x_GLF_uniform_int_values[1];
+ let x_15 : i32 = x_6.x_GLF_uniform_int_values[0];
+ x_GLF_color = vec4<f32>(f32(x_12), f32(x_13), f32(x_14), f32(x_15));
+ } else {
+ let x_16 : i32 = x_6.x_GLF_uniform_int_values[1];
+ let x_60 : f32 = f32(x_16);
+ x_GLF_color = vec4<f32>(x_60, x_60, x_60, x_60);
+ }
+ return;
+}
+
+struct main_out {
+ [[location(0)]]
+ x_GLF_color_1 : vec4<f32>;
+};
+
+[[stage(fragment)]]
+fn main() -> main_out {
+ main_1();
+ return main_out(x_GLF_color);
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.hlsl
index 62792b6..2624127 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.hlsl
@@ -1,6 +1,94 @@
-SKIP: FAILED
+cbuffer cbuffer_x_6 : register(b0, space0) {
+ uint4 x_6[7];
+};
+static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
-graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl:30:47 error: expected ')' for type constructor
- v2 = vec4<f32>(1.570796371, 1.119769573, 0x1.8p+128, 0.927295208);
- ^^
+void main_1() {
+ float4 v1 = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ float4 v2 = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ float4 v3 = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ float4 v4 = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ bool x_69 = false;
+ bool x_77 = false;
+ bool x_85 = false;
+ bool x_93 = false;
+ bool x_70_phi = false;
+ bool x_78_phi = false;
+ bool x_86_phi = false;
+ bool x_94_phi = false;
+ const float x_41 = asfloat(x_6[2].x);
+ const float x_43 = asfloat(x_6[2].x);
+ const uint scalar_offset = ((16u * uint(0))) / 4;
+ const float x_45 = asfloat(x_6[scalar_offset / 4][scalar_offset % 4]);
+ const float x_47 = asfloat(x_6[2].x);
+ v1 = float4(x_41, x_43, x_45, x_47);
+ v2 = float4(1.570796371f, 1.119769573f, asfloat(0x7f800000u), 0.927295208f);
+ const uint scalar_offset_1 = ((16u * uint(0))) / 4;
+ const float x_50 = asfloat(x_6[scalar_offset_1 / 4][scalar_offset_1 % 4]);
+ v3 = float4(x_50, x_50, x_50, x_50);
+ v4 = smoothstep(v1, v2, v3);
+ const float4 x_56 = v4;
+ x_GLF_color = float4(x_56.x, x_56.y, x_56.w, x_56.x);
+ const float x_59 = v4.x;
+ const float x_61 = asfloat(x_6[4].x);
+ const bool x_62 = (x_59 > x_61);
+ x_70_phi = x_62;
+ if (x_62) {
+ const float x_66 = v4.x;
+ const float x_68 = asfloat(x_6[5].x);
+ x_69 = (x_66 < x_68);
+ x_70_phi = x_69;
+ }
+ const bool x_70 = x_70_phi;
+ x_78_phi = x_70;
+ if (x_70) {
+ const float x_74 = v4.y;
+ const float x_76 = asfloat(x_6[3].x);
+ x_77 = (x_74 > x_76);
+ x_78_phi = x_77;
+ }
+ const bool x_78 = x_78_phi;
+ x_86_phi = x_78;
+ if (x_78) {
+ const float x_82 = v4.y;
+ const float x_84 = asfloat(x_6[6].x);
+ x_85 = (x_82 < x_84);
+ x_86_phi = x_85;
+ }
+ const bool x_86 = x_86_phi;
+ x_94_phi = x_86;
+ if (x_86) {
+ const float x_90 = v4.w;
+ const uint scalar_offset_2 = ((16u * uint(0))) / 4;
+ const float x_92 = asfloat(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
+ x_93 = (x_90 == x_92);
+ x_94_phi = x_93;
+ }
+ if (x_94_phi) {
+ const uint scalar_offset_3 = ((16u * uint(0))) / 4;
+ const float x_99 = asfloat(x_6[scalar_offset_3 / 4][scalar_offset_3 % 4]);
+ const float x_101 = asfloat(x_6[1].x);
+ const float x_103 = asfloat(x_6[1].x);
+ const uint scalar_offset_4 = ((16u * uint(0))) / 4;
+ const float x_105 = asfloat(x_6[scalar_offset_4 / 4][scalar_offset_4 % 4]);
+ x_GLF_color = float4(x_99, x_101, x_103, x_105);
+ } else {
+ const float x_108 = asfloat(x_6[1].x);
+ x_GLF_color = float4(x_108, x_108, x_108, x_108);
+ }
+ return;
+}
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol {
+ float4 x_GLF_color_1 : SV_Target0;
+};
+
+tint_symbol main() {
+ main_1();
+ const main_out tint_symbol_1 = {x_GLF_color};
+ const tint_symbol tint_symbol_3 = {tint_symbol_1.x_GLF_color_1};
+ return tint_symbol_3;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.msl
index 62792b6..66032b1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.msl
@@ -1,6 +1,103 @@
-SKIP: FAILED
+#include <metal_stdlib>
-graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl:30:47 error: expected ')' for type constructor
- v2 = vec4<f32>(1.570796371, 1.119769573, 0x1.8p+128, 0.927295208);
- ^^
+using namespace metal;
+struct tint_padded_array_element {
+ /* 0x0000 */ float el;
+ /* 0x0004 */ int8_t tint_pad[12];
+};
+struct tint_array_wrapper {
+ /* 0x0000 */ tint_padded_array_element arr[7];
+};
+struct buf0 {
+ /* 0x0000 */ tint_array_wrapper x_GLF_uniform_float_values;
+};
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol_1 {
+ float4 x_GLF_color_1 [[color(0)]];
+};
+
+void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
+ float4 v1 = 0.0f;
+ float4 v2 = 0.0f;
+ float4 v3 = 0.0f;
+ float4 v4 = 0.0f;
+ bool x_69 = false;
+ bool x_77 = false;
+ bool x_85 = false;
+ bool x_93 = false;
+ bool x_70_phi = false;
+ bool x_78_phi = false;
+ bool x_86_phi = false;
+ bool x_94_phi = false;
+ float const x_41 = x_6.x_GLF_uniform_float_values.arr[2].el;
+ float const x_43 = x_6.x_GLF_uniform_float_values.arr[2].el;
+ float const x_45 = x_6.x_GLF_uniform_float_values.arr[0].el;
+ float const x_47 = x_6.x_GLF_uniform_float_values.arr[2].el;
+ v1 = float4(x_41, x_43, x_45, x_47);
+ v2 = float4(1.570796371f, 1.119769573f, INFINITY, 0.927295208f);
+ float const x_50 = x_6.x_GLF_uniform_float_values.arr[0].el;
+ v3 = float4(x_50, x_50, x_50, x_50);
+ float4 const x_52 = v1;
+ float4 const x_53 = v2;
+ float4 const x_54 = v3;
+ v4 = smoothstep(x_52, x_53, x_54);
+ float4 const x_56 = v4;
+ *(tint_symbol_4) = float4(x_56.x, x_56.y, x_56.w, x_56.x);
+ float const x_59 = v4.x;
+ float const x_61 = x_6.x_GLF_uniform_float_values.arr[4].el;
+ bool const x_62 = (x_59 > x_61);
+ x_70_phi = x_62;
+ if (x_62) {
+ float const x_66 = v4.x;
+ float const x_68 = x_6.x_GLF_uniform_float_values.arr[5].el;
+ x_69 = (x_66 < x_68);
+ x_70_phi = x_69;
+ }
+ bool const x_70 = x_70_phi;
+ x_78_phi = x_70;
+ if (x_70) {
+ float const x_74 = v4.y;
+ float const x_76 = x_6.x_GLF_uniform_float_values.arr[3].el;
+ x_77 = (x_74 > x_76);
+ x_78_phi = x_77;
+ }
+ bool const x_78 = x_78_phi;
+ x_86_phi = x_78;
+ if (x_78) {
+ float const x_82 = v4.y;
+ float const x_84 = x_6.x_GLF_uniform_float_values.arr[6].el;
+ x_85 = (x_82 < x_84);
+ x_86_phi = x_85;
+ }
+ bool const x_86 = x_86_phi;
+ x_94_phi = x_86;
+ if (x_86) {
+ float const x_90 = v4.w;
+ float const x_92 = x_6.x_GLF_uniform_float_values.arr[0].el;
+ x_93 = (x_90 == x_92);
+ x_94_phi = x_93;
+ }
+ bool const x_94 = x_94_phi;
+ if (x_94) {
+ float const x_99 = x_6.x_GLF_uniform_float_values.arr[0].el;
+ float const x_101 = x_6.x_GLF_uniform_float_values.arr[1].el;
+ float const x_103 = x_6.x_GLF_uniform_float_values.arr[1].el;
+ float const x_105 = x_6.x_GLF_uniform_float_values.arr[0].el;
+ *(tint_symbol_4) = float4(x_99, x_101, x_103, x_105);
+ } else {
+ float const x_108 = x_6.x_GLF_uniform_float_values.arr[1].el;
+ *(tint_symbol_4) = float4(x_108, x_108, x_108, x_108);
+ }
+ return;
+}
+
+fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
+ thread float4 tint_symbol_5 = 0.0f;
+ main_1(x_6, &(tint_symbol_5));
+ main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
+ tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
+ return tint_symbol_3;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.spvasm
index 62792b6..9c23d5b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.spvasm
@@ -1,6 +1,224 @@
-SKIP: FAILED
-
-graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl:30:47 error: expected ')' for type constructor
- v2 = vec4<f32>(1.570796371, 1.119769573, 0x1.8p+128, 0.927295208);
- ^^
-
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 143
+; Schema: 0
+ OpCapability Shader
+ %60 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %main "main" %tint_symbol_1
+ OpExecutionMode %main OriginUpperLeft
+ OpName %buf0 "buf0"
+ OpMemberName %buf0 0 "x_GLF_uniform_float_values"
+ OpName %x_6 "x_6"
+ OpName %x_GLF_color "x_GLF_color"
+ OpName %tint_symbol_1 "tint_symbol_1"
+ OpName %main_1 "main_1"
+ OpName %v1 "v1"
+ OpName %v2 "v2"
+ OpName %v3 "v3"
+ OpName %v4 "v4"
+ OpName %x_69 "x_69"
+ OpName %x_77 "x_77"
+ OpName %x_85 "x_85"
+ OpName %x_93 "x_93"
+ OpName %x_70_phi "x_70_phi"
+ OpName %x_78_phi "x_78_phi"
+ OpName %x_86_phi "x_86_phi"
+ OpName %x_94_phi "x_94_phi"
+ OpName %main_out "main_out"
+ OpMemberName %main_out 0 "x_GLF_color_1"
+ OpName %tint_symbol_2 "tint_symbol_2"
+ OpName %tint_symbol "tint_symbol"
+ OpName %main "main"
+ OpDecorate %buf0 Block
+ OpMemberDecorate %buf0 0 Offset 0
+ OpDecorate %_arr_float_uint_7 ArrayStride 16
+ OpDecorate %x_6 NonWritable
+ OpDecorate %x_6 DescriptorSet 0
+ OpDecorate %x_6 Binding 0
+ OpDecorate %tint_symbol_1 Location 0
+ OpMemberDecorate %main_out 0 Offset 0
+ %float = OpTypeFloat 32
+ %uint = OpTypeInt 32 0
+ %uint_7 = OpConstant %uint 7
+%_arr_float_uint_7 = OpTypeArray %float %uint_7
+ %buf0 = OpTypeStruct %_arr_float_uint_7
+%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
+ %x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
+ %v4float = OpTypeVector %float 4
+%_ptr_Private_v4float = OpTypePointer Private %v4float
+ %11 = OpConstantNull %v4float
+%x_GLF_color = OpVariable %_ptr_Private_v4float Private %11
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %11
+ %void = OpTypeVoid
+ %14 = OpTypeFunction %void
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %bool = OpTypeBool
+%_ptr_Function_bool = OpTypePointer Function %bool
+ %26 = OpConstantNull %bool
+ %uint_0 = OpConstant %uint 0
+ %int = OpTypeInt 32 1
+ %int_2 = OpConstant %int 2
+%_ptr_Uniform_float = OpTypePointer Uniform %float
+ %int_0 = OpConstant %int 0
+%float_1_57079637 = OpConstant %float 1.57079637
+%float_1_11976957 = OpConstant %float 1.11976957
+%float_0x1p_128 = OpConstant %float 0x1p+128
+%float_0_927295208 = OpConstant %float 0.927295208
+ %52 = OpConstantComposite %v4float %float_1_57079637 %float_1_11976957 %float_0x1p_128 %float_0_927295208
+%_ptr_Function_float = OpTypePointer Function %float
+ %int_4 = OpConstant %int 4
+ %int_5 = OpConstant %int 5
+ %uint_1 = OpConstant %uint 1
+ %int_3 = OpConstant %int 3
+ %int_6 = OpConstant %int 6
+ %uint_3 = OpConstant %uint 3
+ %int_1 = OpConstant %int 1
+ %main_out = OpTypeStruct %v4float
+ %131 = OpTypeFunction %void %main_out
+ %main_1 = OpFunction %void None %14
+ %17 = OpLabel
+ %v1 = OpVariable %_ptr_Function_v4float Function %11
+ %v2 = OpVariable %_ptr_Function_v4float Function %11
+ %v3 = OpVariable %_ptr_Function_v4float Function %11
+ %v4 = OpVariable %_ptr_Function_v4float Function %11
+ %x_69 = OpVariable %_ptr_Function_bool Function %26
+ %x_77 = OpVariable %_ptr_Function_bool Function %26
+ %x_85 = OpVariable %_ptr_Function_bool Function %26
+ %x_93 = OpVariable %_ptr_Function_bool Function %26
+ %x_70_phi = OpVariable %_ptr_Function_bool Function %26
+ %x_78_phi = OpVariable %_ptr_Function_bool Function %26
+ %x_86_phi = OpVariable %_ptr_Function_bool Function %26
+ %x_94_phi = OpVariable %_ptr_Function_bool Function %26
+ %38 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_2
+ %39 = OpLoad %float %38
+ %40 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_2
+ %41 = OpLoad %float %40
+ %43 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
+ %44 = OpLoad %float %43
+ %45 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_2
+ %46 = OpLoad %float %45
+ %47 = OpCompositeConstruct %v4float %39 %41 %44 %46
+ OpStore %v1 %47
+ OpStore %v2 %52
+ %53 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
+ %54 = OpLoad %float %53
+ %55 = OpCompositeConstruct %v4float %54 %54 %54 %54
+ OpStore %v3 %55
+ %56 = OpLoad %v4float %v1
+ %57 = OpLoad %v4float %v2
+ %58 = OpLoad %v4float %v3
+ %59 = OpExtInst %v4float %60 SmoothStep %56 %57 %58
+ OpStore %v4 %59
+ %61 = OpLoad %v4float %v4
+ %62 = OpCompositeExtract %float %61 0
+ %63 = OpCompositeExtract %float %61 1
+ %64 = OpCompositeExtract %float %61 3
+ %65 = OpCompositeExtract %float %61 0
+ %66 = OpCompositeConstruct %v4float %62 %63 %64 %65
+ OpStore %x_GLF_color %66
+ %68 = OpAccessChain %_ptr_Function_float %v4 %uint_0
+ %69 = OpLoad %float %68
+ %71 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_4
+ %72 = OpLoad %float %71
+ %73 = OpFOrdGreaterThan %bool %69 %72
+ OpStore %x_70_phi %73
+ OpSelectionMerge %74 None
+ OpBranchConditional %73 %75 %74
+ %75 = OpLabel
+ %76 = OpAccessChain %_ptr_Function_float %v4 %uint_0
+ %77 = OpLoad %float %76
+ %79 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_5
+ %80 = OpLoad %float %79
+ %81 = OpFOrdLessThan %bool %77 %80
+ OpStore %x_69 %81
+ %82 = OpLoad %bool %x_69
+ OpStore %x_70_phi %82
+ OpBranch %74
+ %74 = OpLabel
+ %83 = OpLoad %bool %x_70_phi
+ OpStore %x_78_phi %83
+ OpSelectionMerge %84 None
+ OpBranchConditional %83 %85 %84
+ %85 = OpLabel
+ %87 = OpAccessChain %_ptr_Function_float %v4 %uint_1
+ %88 = OpLoad %float %87
+ %90 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_3
+ %91 = OpLoad %float %90
+ %92 = OpFOrdGreaterThan %bool %88 %91
+ OpStore %x_77 %92
+ %93 = OpLoad %bool %x_77
+ OpStore %x_78_phi %93
+ OpBranch %84
+ %84 = OpLabel
+ %94 = OpLoad %bool %x_78_phi
+ OpStore %x_86_phi %94
+ OpSelectionMerge %95 None
+ OpBranchConditional %94 %96 %95
+ %96 = OpLabel
+ %97 = OpAccessChain %_ptr_Function_float %v4 %uint_1
+ %98 = OpLoad %float %97
+ %100 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_6
+ %101 = OpLoad %float %100
+ %102 = OpFOrdLessThan %bool %98 %101
+ OpStore %x_85 %102
+ %103 = OpLoad %bool %x_85
+ OpStore %x_86_phi %103
+ OpBranch %95
+ %95 = OpLabel
+ %104 = OpLoad %bool %x_86_phi
+ OpStore %x_94_phi %104
+ OpSelectionMerge %105 None
+ OpBranchConditional %104 %106 %105
+ %106 = OpLabel
+ %108 = OpAccessChain %_ptr_Function_float %v4 %uint_3
+ %109 = OpLoad %float %108
+ %110 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
+ %111 = OpLoad %float %110
+ %112 = OpFOrdEqual %bool %109 %111
+ OpStore %x_93 %112
+ %113 = OpLoad %bool %x_93
+ OpStore %x_94_phi %113
+ OpBranch %105
+ %105 = OpLabel
+ %114 = OpLoad %bool %x_94_phi
+ OpSelectionMerge %115 None
+ OpBranchConditional %114 %116 %117
+ %116 = OpLabel
+ %118 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
+ %119 = OpLoad %float %118
+ %121 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
+ %122 = OpLoad %float %121
+ %123 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
+ %124 = OpLoad %float %123
+ %125 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
+ %126 = OpLoad %float %125
+ %127 = OpCompositeConstruct %v4float %119 %122 %124 %126
+ OpStore %x_GLF_color %127
+ OpBranch %115
+ %117 = OpLabel
+ %128 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
+ %129 = OpLoad %float %128
+ %130 = OpCompositeConstruct %v4float %129 %129 %129 %129
+ OpStore %x_GLF_color %130
+ OpBranch %115
+ %115 = OpLabel
+ OpReturn
+ OpFunctionEnd
+%tint_symbol_2 = OpFunction %void None %131
+%tint_symbol = OpFunctionParameter %main_out
+ %135 = OpLabel
+ %136 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %136
+ OpReturn
+ OpFunctionEnd
+ %main = OpFunction %void None %14
+ %138 = OpLabel
+ %139 = OpFunctionCall %void %main_1
+ %141 = OpLoad %v4float %x_GLF_color
+ %142 = OpCompositeConstruct %main_out %141
+ %140 = OpFunctionCall %void %tint_symbol_2 %142
+ OpReturn
+ OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.wgsl
index 62792b6..a957299 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl.expected.wgsl
@@ -1,6 +1,96 @@
-SKIP: FAILED
+type Arr = [[stride(16)]] array<f32, 7>;
-graphicsfuzz/cov-asin-undefined-smoothstep/0-opt.wgsl:30:47 error: expected ')' for type constructor
- v2 = vec4<f32>(1.570796371, 1.119769573, 0x1.8p+128, 0.927295208);
- ^^
+[[block]]
+struct buf0 {
+ x_GLF_uniform_float_values : Arr;
+};
+[[group(0), binding(0)]] var<uniform> x_6 : buf0;
+
+var<private> x_GLF_color : vec4<f32>;
+
+fn main_1() {
+ var v1 : vec4<f32>;
+ var v2 : vec4<f32>;
+ var v3 : vec4<f32>;
+ var v4 : vec4<f32>;
+ var x_69 : bool;
+ var x_77 : bool;
+ var x_85 : bool;
+ var x_93 : bool;
+ var x_70_phi : bool;
+ var x_78_phi : bool;
+ var x_86_phi : bool;
+ var x_94_phi : bool;
+ let x_41 : f32 = x_6.x_GLF_uniform_float_values[2];
+ let x_43 : f32 = x_6.x_GLF_uniform_float_values[2];
+ let x_45 : f32 = x_6.x_GLF_uniform_float_values[0];
+ let x_47 : f32 = x_6.x_GLF_uniform_float_values[2];
+ v1 = vec4<f32>(x_41, x_43, x_45, x_47);
+ v2 = vec4<f32>(1.570796371, 1.119769573, 0x1p+128, 0.927295208);
+ let x_50 : f32 = x_6.x_GLF_uniform_float_values[0];
+ v3 = vec4<f32>(x_50, x_50, x_50, x_50);
+ let x_52 : vec4<f32> = v1;
+ let x_53 : vec4<f32> = v2;
+ let x_54 : vec4<f32> = v3;
+ v4 = smoothStep(x_52, x_53, x_54);
+ let x_56 : vec4<f32> = v4;
+ x_GLF_color = vec4<f32>(x_56.x, x_56.y, x_56.w, x_56.x);
+ let x_59 : f32 = v4.x;
+ let x_61 : f32 = x_6.x_GLF_uniform_float_values[4];
+ let x_62 : bool = (x_59 > x_61);
+ x_70_phi = x_62;
+ if (x_62) {
+ let x_66 : f32 = v4.x;
+ let x_68 : f32 = x_6.x_GLF_uniform_float_values[5];
+ x_69 = (x_66 < x_68);
+ x_70_phi = x_69;
+ }
+ let x_70 : bool = x_70_phi;
+ x_78_phi = x_70;
+ if (x_70) {
+ let x_74 : f32 = v4.y;
+ let x_76 : f32 = x_6.x_GLF_uniform_float_values[3];
+ x_77 = (x_74 > x_76);
+ x_78_phi = x_77;
+ }
+ let x_78 : bool = x_78_phi;
+ x_86_phi = x_78;
+ if (x_78) {
+ let x_82 : f32 = v4.y;
+ let x_84 : f32 = x_6.x_GLF_uniform_float_values[6];
+ x_85 = (x_82 < x_84);
+ x_86_phi = x_85;
+ }
+ let x_86 : bool = x_86_phi;
+ x_94_phi = x_86;
+ if (x_86) {
+ let x_90 : f32 = v4.w;
+ let x_92 : f32 = x_6.x_GLF_uniform_float_values[0];
+ x_93 = (x_90 == x_92);
+ x_94_phi = x_93;
+ }
+ let x_94 : bool = x_94_phi;
+ if (x_94) {
+ let x_99 : f32 = x_6.x_GLF_uniform_float_values[0];
+ let x_101 : f32 = x_6.x_GLF_uniform_float_values[1];
+ let x_103 : f32 = x_6.x_GLF_uniform_float_values[1];
+ let x_105 : f32 = x_6.x_GLF_uniform_float_values[0];
+ x_GLF_color = vec4<f32>(x_99, x_101, x_103, x_105);
+ } else {
+ let x_108 : f32 = x_6.x_GLF_uniform_float_values[1];
+ x_GLF_color = vec4<f32>(x_108, x_108, x_108, x_108);
+ }
+ return;
+}
+
+struct main_out {
+ [[location(0)]]
+ x_GLF_color_1 : vec4<f32>;
+};
+
+[[stage(fragment)]]
+fn main() -> main_out {
+ main_1();
+ return main_out(x_GLF_color);
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.hlsl
index 560771b..9cd37ec 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.hlsl
@@ -1,6 +1,50 @@
-SKIP: FAILED
+static float4 gl_FragCoord = float4(0.0f, 0.0f, 0.0f, 0.0f);
+cbuffer cbuffer_x_8 : register(b0, space0) {
+ uint4 x_8[1];
+};
+static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
+cbuffer cbuffer_x_10 : register(b1, space0) {
+ uint4 x_10[2];
+};
-graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl:26:11 error: expected ';' for assignment statement
- f0 = 0x1.8p+128;
- ^^
+void main_1() {
+ float f0 = 0.0f;
+ float f1 = 0.0f;
+ f0 = asfloat(0x7f800000u);
+ f1 = frac(f0);
+ const float x_38 = gl_FragCoord.x;
+ const uint scalar_offset = ((16u * uint(0))) / 4;
+ const float x_40 = asfloat(x_8[scalar_offset / 4][scalar_offset % 4]);
+ if ((x_38 > x_40)) {
+ const int x_46 = asint(x_10[1].x);
+ const uint scalar_offset_1 = ((16u * uint(0))) / 4;
+ const int x_49 = asint(x_10[scalar_offset_1 / 4][scalar_offset_1 % 4]);
+ const uint scalar_offset_2 = ((16u * uint(0))) / 4;
+ const int x_52 = asint(x_10[scalar_offset_2 / 4][scalar_offset_2 % 4]);
+ const int x_55 = asint(x_10[1].x);
+ x_GLF_color = float4(float(x_46), float(x_49), float(x_52), float(x_55));
+ } else {
+ const float x_58 = f1;
+ x_GLF_color = float4(x_58, x_58, x_58, x_58);
+ }
+ return;
+}
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol_1 {
+ float4 gl_FragCoord_param : SV_Position;
+};
+struct tint_symbol_2 {
+ float4 x_GLF_color_1 : SV_Target0;
+};
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+ const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+ gl_FragCoord = gl_FragCoord_param;
+ main_1();
+ const main_out tint_symbol_3 = {x_GLF_color};
+ const tint_symbol_2 tint_symbol_6 = {tint_symbol_3.x_GLF_color_1};
+ return tint_symbol_6;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.msl
index 560771b..33990e1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.msl
@@ -1,6 +1,61 @@
-SKIP: FAILED
+#include <metal_stdlib>
-graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl:26:11 error: expected ';' for assignment statement
- f0 = 0x1.8p+128;
- ^^
+using namespace metal;
+struct tint_padded_array_element {
+ /* 0x0000 */ float el;
+ /* 0x0004 */ int8_t tint_pad[12];
+};
+struct tint_array_wrapper {
+ /* 0x0000 */ tint_padded_array_element arr[1];
+};
+struct buf0 {
+ /* 0x0000 */ tint_array_wrapper x_GLF_uniform_float_values;
+};
+struct tint_padded_array_element_1 {
+ /* 0x0000 */ int el;
+ /* 0x0004 */ int8_t tint_pad_1[12];
+};
+struct tint_array_wrapper_1 {
+ /* 0x0000 */ tint_padded_array_element_1 arr[2];
+};
+struct buf1 {
+ /* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_int_values;
+};
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol_2 {
+ float4 x_GLF_color_1 [[color(0)]];
+};
+
+void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+ float f0 = 0.0f;
+ float f1 = 0.0f;
+ f0 = INFINITY;
+ float const x_35 = f0;
+ f1 = fract(x_35);
+ float const x_38 = (*(tint_symbol_5)).x;
+ float const x_40 = x_8.x_GLF_uniform_float_values.arr[0].el;
+ if ((x_38 > x_40)) {
+ int const x_46 = x_10.x_GLF_uniform_int_values.arr[1].el;
+ int const x_49 = x_10.x_GLF_uniform_int_values.arr[0].el;
+ int const x_52 = x_10.x_GLF_uniform_int_values.arr[0].el;
+ int const x_55 = x_10.x_GLF_uniform_int_values.arr[1].el;
+ *(tint_symbol_6) = float4(float(x_46), float(x_49), float(x_52), float(x_55));
+ } else {
+ float const x_58 = f1;
+ *(tint_symbol_6) = float4(x_58, x_58, x_58, x_58);
+ }
+ return;
+}
+
+fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
+ thread float4 tint_symbol_7 = 0.0f;
+ thread float4 tint_symbol_8 = 0.0f;
+ tint_symbol_7 = gl_FragCoord_param;
+ main_1(x_8, x_10, &(tint_symbol_7), &(tint_symbol_8));
+ main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
+ tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
+ return tint_symbol_4;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.spvasm
index 560771b..2fb16eb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.spvasm
@@ -1,6 +1,135 @@
-SKIP: FAILED
-
-graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl:26:11 error: expected ';' for assignment statement
- f0 = 0x1.8p+128;
- ^^
-
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 78
+; Schema: 0
+ OpCapability Shader
+ %34 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
+ OpExecutionMode %main OriginUpperLeft
+ OpName %gl_FragCoord "gl_FragCoord"
+ OpName %buf0 "buf0"
+ OpMemberName %buf0 0 "x_GLF_uniform_float_values"
+ OpName %x_8 "x_8"
+ OpName %x_GLF_color "x_GLF_color"
+ OpName %buf1 "buf1"
+ OpMemberName %buf1 0 "x_GLF_uniform_int_values"
+ OpName %x_10 "x_10"
+ OpName %tint_symbol "tint_symbol"
+ OpName %tint_symbol_2 "tint_symbol_2"
+ OpName %main_1 "main_1"
+ OpName %f0 "f0"
+ OpName %f1 "f1"
+ OpName %main_out "main_out"
+ OpMemberName %main_out 0 "x_GLF_color_1"
+ OpName %tint_symbol_3 "tint_symbol_3"
+ OpName %tint_symbol_1 "tint_symbol_1"
+ OpName %main "main"
+ OpDecorate %buf0 Block
+ OpMemberDecorate %buf0 0 Offset 0
+ OpDecorate %_arr_float_uint_1 ArrayStride 16
+ OpDecorate %x_8 NonWritable
+ OpDecorate %x_8 DescriptorSet 0
+ OpDecorate %x_8 Binding 0
+ OpDecorate %buf1 Block
+ OpMemberDecorate %buf1 0 Offset 0
+ OpDecorate %_arr_int_uint_2 ArrayStride 16
+ OpDecorate %x_10 NonWritable
+ OpDecorate %x_10 DescriptorSet 0
+ OpDecorate %x_10 Binding 1
+ OpDecorate %tint_symbol BuiltIn FragCoord
+ OpDecorate %tint_symbol_2 Location 0
+ OpMemberDecorate %main_out 0 Offset 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Private_v4float = OpTypePointer Private %v4float
+ %5 = OpConstantNull %v4float
+%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %5
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+ %buf0 = OpTypeStruct %_arr_float_uint_1
+%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
+ %x_8 = OpVariable %_ptr_Uniform_buf0 Uniform
+%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
+ %int = OpTypeInt 32 1
+ %uint_2 = OpConstant %uint 2
+%_arr_int_uint_2 = OpTypeArray %int %uint_2
+ %buf1 = OpTypeStruct %_arr_int_uint_2
+%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
+ %x_10 = OpVariable %_ptr_Uniform_buf1 Uniform
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%tint_symbol = OpVariable %_ptr_Input_v4float Input
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %5
+ %void = OpTypeVoid
+ %23 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
+ %29 = OpConstantNull %float
+%float_0x1p_128 = OpConstant %float 0x1p+128
+ %uint_0 = OpConstant %uint 0
+%_ptr_Private_float = OpTypePointer Private %float
+ %int_0 = OpConstant %int 0
+%_ptr_Uniform_float = OpTypePointer Uniform %float
+ %bool = OpTypeBool
+ %int_1 = OpConstant %int 1
+%_ptr_Uniform_int = OpTypePointer Uniform %int
+ %main_out = OpTypeStruct %v4float
+ %65 = OpTypeFunction %void %main_out
+ %main_1 = OpFunction %void None %23
+ %26 = OpLabel
+ %f0 = OpVariable %_ptr_Function_float Function %29
+ %f1 = OpVariable %_ptr_Function_float Function %29
+ OpStore %f0 %float_0x1p_128
+ %32 = OpLoad %float %f0
+ %33 = OpExtInst %float %34 Fract %32
+ OpStore %f1 %33
+ %37 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
+ %38 = OpLoad %float %37
+ %41 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
+ %42 = OpLoad %float %41
+ %43 = OpFOrdGreaterThan %bool %38 %42
+ OpSelectionMerge %45 None
+ OpBranchConditional %43 %46 %47
+ %46 = OpLabel
+ %50 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
+ %51 = OpLoad %int %50
+ %52 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
+ %53 = OpLoad %int %52
+ %54 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
+ %55 = OpLoad %int %54
+ %56 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
+ %57 = OpLoad %int %56
+ %58 = OpConvertSToF %float %51
+ %59 = OpConvertSToF %float %53
+ %60 = OpConvertSToF %float %55
+ %61 = OpConvertSToF %float %57
+ %62 = OpCompositeConstruct %v4float %58 %59 %60 %61
+ OpStore %x_GLF_color %62
+ OpBranch %45
+ %47 = OpLabel
+ %63 = OpLoad %float %f1
+ %64 = OpCompositeConstruct %v4float %63 %63 %63 %63
+ OpStore %x_GLF_color %64
+ OpBranch %45
+ %45 = OpLabel
+ OpReturn
+ OpFunctionEnd
+%tint_symbol_3 = OpFunction %void None %65
+%tint_symbol_1 = OpFunctionParameter %main_out
+ %69 = OpLabel
+ %70 = OpCompositeExtract %v4float %tint_symbol_1 0
+ OpStore %tint_symbol_2 %70
+ OpReturn
+ OpFunctionEnd
+ %main = OpFunction %void None %23
+ %72 = OpLabel
+ %73 = OpLoad %v4float %tint_symbol
+ OpStore %gl_FragCoord %73
+ %74 = OpFunctionCall %void %main_1
+ %76 = OpLoad %v4float %x_GLF_color
+ %77 = OpCompositeConstruct %main_out %76
+ %75 = OpFunctionCall %void %tint_symbol_3 %77
+ OpReturn
+ OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.wgsl
index 560771b..70239e2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl.expected.wgsl
@@ -1,6 +1,54 @@
-SKIP: FAILED
+type Arr = [[stride(16)]] array<f32, 1>;
-graphicsfuzz/cov-fract-asin-undefined-never-used/0-opt.wgsl:26:11 error: expected ';' for assignment statement
- f0 = 0x1.8p+128;
- ^^
+[[block]]
+struct buf0 {
+ x_GLF_uniform_float_values : Arr;
+};
+type Arr_1 = [[stride(16)]] array<i32, 2>;
+
+[[block]]
+struct buf1 {
+ x_GLF_uniform_int_values : Arr_1;
+};
+
+var<private> gl_FragCoord : vec4<f32>;
+
+[[group(0), binding(0)]] var<uniform> x_8 : buf0;
+
+var<private> x_GLF_color : vec4<f32>;
+
+[[group(0), binding(1)]] var<uniform> x_10 : buf1;
+
+fn main_1() {
+ var f0 : f32;
+ var f1 : f32;
+ f0 = 0x1p+128;
+ let x_35 : f32 = f0;
+ f1 = fract(x_35);
+ let x_38 : f32 = gl_FragCoord.x;
+ let x_40 : f32 = x_8.x_GLF_uniform_float_values[0];
+ if ((x_38 > x_40)) {
+ let x_46 : i32 = x_10.x_GLF_uniform_int_values[1];
+ let x_49 : i32 = x_10.x_GLF_uniform_int_values[0];
+ let x_52 : i32 = x_10.x_GLF_uniform_int_values[0];
+ let x_55 : i32 = x_10.x_GLF_uniform_int_values[1];
+ x_GLF_color = vec4<f32>(f32(x_46), f32(x_49), f32(x_52), f32(x_55));
+ } else {
+ let x_58 : f32 = f1;
+ x_GLF_color = vec4<f32>(x_58, x_58, x_58, x_58);
+ }
+ return;
+}
+
+struct main_out {
+ [[location(0)]]
+ x_GLF_color_1 : vec4<f32>;
+};
+
+[[stage(fragment)]]
+fn main([[builtin(position)]] gl_FragCoord_param : vec4<f32>) -> main_out {
+ gl_FragCoord = gl_FragCoord_param;
+ main_1();
+ return main_out(x_GLF_color);
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.hlsl
index d8c4e9b..1372d60 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.hlsl
@@ -1,6 +1,43 @@
-SKIP: FAILED
+static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
+cbuffer cbuffer_x_5 : register(b0, space0) {
+ uint4 x_5[2];
+};
+cbuffer cbuffer_x_8 : register(b1, space0) {
+ uint4 x_8[2];
+};
-graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl:29:18 error: expected ')'
- a = (x_45 % 0x1.8p+128);
- ^^
+void main_1() {
+ float a = 0.0f;
+ const uint scalar_offset = ((16u * uint(0))) / 4;
+ const int x_10 = asint(x_5[scalar_offset / 4][scalar_offset % 4]);
+ const int x_11 = asint(x_5[1].x);
+ const int x_12 = asint(x_5[1].x);
+ const uint scalar_offset_1 = ((16u * uint(0))) / 4;
+ const int x_13 = asint(x_5[scalar_offset_1 / 4][scalar_offset_1 % 4]);
+ x_GLF_color = float4(float(x_10), float(x_11), float(x_12), float(x_13));
+ const float x_45 = asfloat(x_8[1].x);
+ a = (x_45 % asfloat(0x7f800000u));
+ const float x_47 = a;
+ const uint scalar_offset_2 = ((16u * uint(0))) / 4;
+ const float x_49 = asfloat(x_8[scalar_offset_2 / 4][scalar_offset_2 % 4]);
+ if ((x_47 != x_49)) {
+ const uint scalar_offset_3 = ((16u * uint(0))) / 4;
+ const float x_54 = asfloat(x_8[scalar_offset_3 / 4][scalar_offset_3 % 4]);
+ x_GLF_color.y = x_54;
+ }
+ return;
+}
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol {
+ float4 x_GLF_color_1 : SV_Target0;
+};
+
+tint_symbol main() {
+ main_1();
+ const main_out tint_symbol_1 = {x_GLF_color};
+ const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
+ return tint_symbol_4;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.msl
index d8c4e9b..642bdda 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.msl
@@ -1,6 +1,56 @@
-SKIP: FAILED
+#include <metal_stdlib>
-graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl:29:18 error: expected ')'
- a = (x_45 % 0x1.8p+128);
- ^^
+using namespace metal;
+struct tint_padded_array_element {
+ /* 0x0000 */ int el;
+ /* 0x0004 */ int8_t tint_pad[12];
+};
+struct tint_array_wrapper {
+ /* 0x0000 */ tint_padded_array_element arr[2];
+};
+struct buf0 {
+ /* 0x0000 */ tint_array_wrapper x_GLF_uniform_int_values;
+};
+struct tint_padded_array_element_1 {
+ /* 0x0000 */ float el;
+ /* 0x0004 */ int8_t tint_pad_1[12];
+};
+struct tint_array_wrapper_1 {
+ /* 0x0000 */ tint_padded_array_element_1 arr[2];
+};
+struct buf1 {
+ /* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_float_values;
+};
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol_1 {
+ float4 x_GLF_color_1 [[color(0)]];
+};
+
+void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) {
+ float a = 0.0f;
+ int const x_10 = x_5.x_GLF_uniform_int_values.arr[0].el;
+ int const x_11 = x_5.x_GLF_uniform_int_values.arr[1].el;
+ int const x_12 = x_5.x_GLF_uniform_int_values.arr[1].el;
+ int const x_13 = x_5.x_GLF_uniform_int_values.arr[0].el;
+ *(tint_symbol_4) = float4(float(x_10), float(x_11), float(x_12), float(x_13));
+ float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el;
+ a = fmod(x_45, INFINITY);
+ float const x_47 = a;
+ float const x_49 = x_8.x_GLF_uniform_float_values.arr[0].el;
+ if ((x_47 != x_49)) {
+ float const x_54 = x_8.x_GLF_uniform_float_values.arr[0].el;
+ (*(tint_symbol_4)).y = x_54;
+ }
+ return;
+}
+
+fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
+ thread float4 tint_symbol_5 = 0.0f;
+ main_1(x_5, x_8, &(tint_symbol_5));
+ main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
+ tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
+ return tint_symbol_3;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.spvasm
index d8c4e9b..690533b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.spvasm
@@ -1,6 +1,122 @@
-SKIP: FAILED
-
-graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl:29:18 error: expected ')'
- a = (x_45 % 0x1.8p+128);
- ^^
-
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 72
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %main "main" %tint_symbol_1
+ OpExecutionMode %main OriginUpperLeft
+ OpName %x_GLF_color "x_GLF_color"
+ OpName %buf0 "buf0"
+ OpMemberName %buf0 0 "x_GLF_uniform_int_values"
+ OpName %x_5 "x_5"
+ OpName %buf1 "buf1"
+ OpMemberName %buf1 0 "x_GLF_uniform_float_values"
+ OpName %x_8 "x_8"
+ OpName %tint_symbol_1 "tint_symbol_1"
+ OpName %main_1 "main_1"
+ OpName %a "a"
+ OpName %main_out "main_out"
+ OpMemberName %main_out 0 "x_GLF_color_1"
+ OpName %tint_symbol_2 "tint_symbol_2"
+ OpName %tint_symbol "tint_symbol"
+ OpName %main "main"
+ OpDecorate %buf0 Block
+ OpMemberDecorate %buf0 0 Offset 0
+ OpDecorate %_arr_int_uint_2 ArrayStride 16
+ OpDecorate %x_5 NonWritable
+ OpDecorate %x_5 DescriptorSet 0
+ OpDecorate %x_5 Binding 0
+ OpDecorate %buf1 Block
+ OpMemberDecorate %buf1 0 Offset 0
+ OpDecorate %_arr_float_uint_2 ArrayStride 16
+ OpDecorate %x_8 NonWritable
+ OpDecorate %x_8 DescriptorSet 0
+ OpDecorate %x_8 Binding 1
+ OpDecorate %tint_symbol_1 Location 0
+ OpMemberDecorate %main_out 0 Offset 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Private_v4float = OpTypePointer Private %v4float
+ %5 = OpConstantNull %v4float
+%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
+ %int = OpTypeInt 32 1
+ %uint = OpTypeInt 32 0
+ %uint_2 = OpConstant %uint 2
+%_arr_int_uint_2 = OpTypeArray %int %uint_2
+ %buf0 = OpTypeStruct %_arr_int_uint_2
+%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
+ %x_5 = OpVariable %_ptr_Uniform_buf0 Uniform
+%_arr_float_uint_2 = OpTypeArray %float %uint_2
+ %buf1 = OpTypeStruct %_arr_float_uint_2
+%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
+ %x_8 = OpVariable %_ptr_Uniform_buf1 Uniform
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %5
+ %void = OpTypeVoid
+ %19 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
+ %25 = OpConstantNull %float
+ %uint_0 = OpConstant %uint 0
+ %int_0 = OpConstant %int 0
+%_ptr_Uniform_int = OpTypePointer Uniform %int
+ %int_1 = OpConstant %int 1
+%_ptr_Uniform_float = OpTypePointer Uniform %float
+%float_0x1p_128 = OpConstant %float 0x1p+128
+ %bool = OpTypeBool
+ %uint_1 = OpConstant %uint 1
+%_ptr_Private_float = OpTypePointer Private %float
+ %main_out = OpTypeStruct %v4float
+ %60 = OpTypeFunction %void %main_out
+ %main_1 = OpFunction %void None %19
+ %22 = OpLabel
+ %a = OpVariable %_ptr_Function_float Function %25
+ %29 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
+ %30 = OpLoad %int %29
+ %32 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
+ %33 = OpLoad %int %32
+ %34 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
+ %35 = OpLoad %int %34
+ %36 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
+ %37 = OpLoad %int %36
+ %38 = OpConvertSToF %float %30
+ %39 = OpConvertSToF %float %33
+ %40 = OpConvertSToF %float %35
+ %41 = OpConvertSToF %float %37
+ %42 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ OpStore %x_GLF_color %42
+ %44 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
+ %45 = OpLoad %float %44
+ %47 = OpFRem %float %45 %float_0x1p_128
+ OpStore %a %47
+ %48 = OpLoad %float %a
+ %49 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
+ %50 = OpLoad %float %49
+ %51 = OpFOrdNotEqual %bool %48 %50
+ OpSelectionMerge %53 None
+ OpBranchConditional %51 %54 %53
+ %54 = OpLabel
+ %55 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
+ %56 = OpLoad %float %55
+ %59 = OpAccessChain %_ptr_Private_float %x_GLF_color %uint_1
+ OpStore %59 %56
+ OpBranch %53
+ %53 = OpLabel
+ OpReturn
+ OpFunctionEnd
+%tint_symbol_2 = OpFunction %void None %60
+%tint_symbol = OpFunctionParameter %main_out
+ %64 = OpLabel
+ %65 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %65
+ OpReturn
+ OpFunctionEnd
+ %main = OpFunction %void None %19
+ %67 = OpLabel
+ %68 = OpFunctionCall %void %main_1
+ %70 = OpLoad %v4float %x_GLF_color
+ %71 = OpCompositeConstruct %main_out %70
+ %69 = OpFunctionCall %void %tint_symbol_2 %71
+ OpReturn
+ OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.wgsl
index d8c4e9b..56a3b5b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl.expected.wgsl
@@ -1,6 +1,48 @@
-SKIP: FAILED
+type Arr = [[stride(16)]] array<i32, 2>;
-graphicsfuzz/cov-instruction-simplify-mod-acos-undefined/0-opt.wgsl:29:18 error: expected ')'
- a = (x_45 % 0x1.8p+128);
- ^^
+[[block]]
+struct buf0 {
+ x_GLF_uniform_int_values : Arr;
+};
+type Arr_1 = [[stride(16)]] array<f32, 2>;
+
+[[block]]
+struct buf1 {
+ x_GLF_uniform_float_values : Arr_1;
+};
+
+var<private> x_GLF_color : vec4<f32>;
+
+[[group(0), binding(0)]] var<uniform> x_5 : buf0;
+
+[[group(0), binding(1)]] var<uniform> x_8 : buf1;
+
+fn main_1() {
+ var a : f32;
+ let x_10 : i32 = x_5.x_GLF_uniform_int_values[0];
+ let x_11 : i32 = x_5.x_GLF_uniform_int_values[1];
+ let x_12 : i32 = x_5.x_GLF_uniform_int_values[1];
+ let x_13 : i32 = x_5.x_GLF_uniform_int_values[0];
+ x_GLF_color = vec4<f32>(f32(x_10), f32(x_11), f32(x_12), f32(x_13));
+ let x_45 : f32 = x_8.x_GLF_uniform_float_values[1];
+ a = (x_45 % 0x1p+128);
+ let x_47 : f32 = a;
+ let x_49 : f32 = x_8.x_GLF_uniform_float_values[0];
+ if ((x_47 != x_49)) {
+ let x_54 : f32 = x_8.x_GLF_uniform_float_values[0];
+ x_GLF_color.y = x_54;
+ }
+ return;
+}
+
+struct main_out {
+ [[location(0)]]
+ x_GLF_color_1 : vec4<f32>;
+};
+
+[[stage(fragment)]]
+fn main() -> main_out {
+ main_1();
+ return main_out(x_GLF_color);
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.hlsl
index 4302ba9..2ee05e3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.hlsl
@@ -1,6 +1,43 @@
-SKIP: FAILED
+static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
+cbuffer cbuffer_x_5 : register(b0, space0) {
+ uint4 x_5[2];
+};
+cbuffer cbuffer_x_8 : register(b1, space0) {
+ uint4 x_8[2];
+};
-graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl:29:12 error: expected ')'
- a = (-0x1.8p+128 % x_45);
- ^^
+void main_1() {
+ float a = 0.0f;
+ const uint scalar_offset = ((16u * uint(0))) / 4;
+ const int x_10 = asint(x_5[scalar_offset / 4][scalar_offset % 4]);
+ const int x_11 = asint(x_5[1].x);
+ const int x_12 = asint(x_5[1].x);
+ const uint scalar_offset_1 = ((16u * uint(0))) / 4;
+ const int x_13 = asint(x_5[scalar_offset_1 / 4][scalar_offset_1 % 4]);
+ x_GLF_color = float4(float(x_10), float(x_11), float(x_12), float(x_13));
+ const float x_45 = asfloat(x_8[1].x);
+ a = (asfloat(0xff800000u) % x_45);
+ const float x_47 = a;
+ const uint scalar_offset_2 = ((16u * uint(0))) / 4;
+ const float x_49 = asfloat(x_8[scalar_offset_2 / 4][scalar_offset_2 % 4]);
+ if ((x_47 != x_49)) {
+ const uint scalar_offset_3 = ((16u * uint(0))) / 4;
+ const float x_54 = asfloat(x_8[scalar_offset_3 / 4][scalar_offset_3 % 4]);
+ x_GLF_color.y = x_54;
+ }
+ return;
+}
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol {
+ float4 x_GLF_color_1 : SV_Target0;
+};
+
+tint_symbol main() {
+ main_1();
+ const main_out tint_symbol_1 = {x_GLF_color};
+ const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
+ return tint_symbol_4;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.msl
index 4302ba9..b4fda60 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.msl
@@ -1,6 +1,56 @@
-SKIP: FAILED
+#include <metal_stdlib>
-graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl:29:12 error: expected ')'
- a = (-0x1.8p+128 % x_45);
- ^^
+using namespace metal;
+struct tint_padded_array_element {
+ /* 0x0000 */ int el;
+ /* 0x0004 */ int8_t tint_pad[12];
+};
+struct tint_array_wrapper {
+ /* 0x0000 */ tint_padded_array_element arr[2];
+};
+struct buf0 {
+ /* 0x0000 */ tint_array_wrapper x_GLF_uniform_int_values;
+};
+struct tint_padded_array_element_1 {
+ /* 0x0000 */ float el;
+ /* 0x0004 */ int8_t tint_pad_1[12];
+};
+struct tint_array_wrapper_1 {
+ /* 0x0000 */ tint_padded_array_element_1 arr[2];
+};
+struct buf1 {
+ /* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_float_values;
+};
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol_1 {
+ float4 x_GLF_color_1 [[color(0)]];
+};
+
+void main_1(constant buf0& x_5, constant buf1& x_8, thread float4* const tint_symbol_4) {
+ float a = 0.0f;
+ int const x_10 = x_5.x_GLF_uniform_int_values.arr[0].el;
+ int const x_11 = x_5.x_GLF_uniform_int_values.arr[1].el;
+ int const x_12 = x_5.x_GLF_uniform_int_values.arr[1].el;
+ int const x_13 = x_5.x_GLF_uniform_int_values.arr[0].el;
+ *(tint_symbol_4) = float4(float(x_10), float(x_11), float(x_12), float(x_13));
+ float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el;
+ a = fmod(-INFINITY, x_45);
+ float const x_47 = a;
+ float const x_49 = x_8.x_GLF_uniform_float_values.arr[0].el;
+ if ((x_47 != x_49)) {
+ float const x_54 = x_8.x_GLF_uniform_float_values.arr[0].el;
+ (*(tint_symbol_4)).y = x_54;
+ }
+ return;
+}
+
+fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
+ thread float4 tint_symbol_5 = 0.0f;
+ main_1(x_5, x_8, &(tint_symbol_5));
+ main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
+ tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
+ return tint_symbol_3;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.spvasm
index 4302ba9..0a23eb0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.spvasm
@@ -1,6 +1,122 @@
-SKIP: FAILED
-
-graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl:29:12 error: expected ')'
- a = (-0x1.8p+128 % x_45);
- ^^
-
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 72
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %main "main" %tint_symbol_1
+ OpExecutionMode %main OriginUpperLeft
+ OpName %x_GLF_color "x_GLF_color"
+ OpName %buf0 "buf0"
+ OpMemberName %buf0 0 "x_GLF_uniform_int_values"
+ OpName %x_5 "x_5"
+ OpName %buf1 "buf1"
+ OpMemberName %buf1 0 "x_GLF_uniform_float_values"
+ OpName %x_8 "x_8"
+ OpName %tint_symbol_1 "tint_symbol_1"
+ OpName %main_1 "main_1"
+ OpName %a "a"
+ OpName %main_out "main_out"
+ OpMemberName %main_out 0 "x_GLF_color_1"
+ OpName %tint_symbol_2 "tint_symbol_2"
+ OpName %tint_symbol "tint_symbol"
+ OpName %main "main"
+ OpDecorate %buf0 Block
+ OpMemberDecorate %buf0 0 Offset 0
+ OpDecorate %_arr_int_uint_2 ArrayStride 16
+ OpDecorate %x_5 NonWritable
+ OpDecorate %x_5 DescriptorSet 0
+ OpDecorate %x_5 Binding 0
+ OpDecorate %buf1 Block
+ OpMemberDecorate %buf1 0 Offset 0
+ OpDecorate %_arr_float_uint_2 ArrayStride 16
+ OpDecorate %x_8 NonWritable
+ OpDecorate %x_8 DescriptorSet 0
+ OpDecorate %x_8 Binding 1
+ OpDecorate %tint_symbol_1 Location 0
+ OpMemberDecorate %main_out 0 Offset 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Private_v4float = OpTypePointer Private %v4float
+ %5 = OpConstantNull %v4float
+%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
+ %int = OpTypeInt 32 1
+ %uint = OpTypeInt 32 0
+ %uint_2 = OpConstant %uint 2
+%_arr_int_uint_2 = OpTypeArray %int %uint_2
+ %buf0 = OpTypeStruct %_arr_int_uint_2
+%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
+ %x_5 = OpVariable %_ptr_Uniform_buf0 Uniform
+%_arr_float_uint_2 = OpTypeArray %float %uint_2
+ %buf1 = OpTypeStruct %_arr_float_uint_2
+%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
+ %x_8 = OpVariable %_ptr_Uniform_buf1 Uniform
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %5
+ %void = OpTypeVoid
+ %19 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
+ %25 = OpConstantNull %float
+ %uint_0 = OpConstant %uint 0
+ %int_0 = OpConstant %int 0
+%_ptr_Uniform_int = OpTypePointer Uniform %int
+ %int_1 = OpConstant %int 1
+%_ptr_Uniform_float = OpTypePointer Uniform %float
+%float_n0x1p_128 = OpConstant %float -0x1p+128
+ %bool = OpTypeBool
+ %uint_1 = OpConstant %uint 1
+%_ptr_Private_float = OpTypePointer Private %float
+ %main_out = OpTypeStruct %v4float
+ %60 = OpTypeFunction %void %main_out
+ %main_1 = OpFunction %void None %19
+ %22 = OpLabel
+ %a = OpVariable %_ptr_Function_float Function %25
+ %29 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
+ %30 = OpLoad %int %29
+ %32 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
+ %33 = OpLoad %int %32
+ %34 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
+ %35 = OpLoad %int %34
+ %36 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
+ %37 = OpLoad %int %36
+ %38 = OpConvertSToF %float %30
+ %39 = OpConvertSToF %float %33
+ %40 = OpConvertSToF %float %35
+ %41 = OpConvertSToF %float %37
+ %42 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ OpStore %x_GLF_color %42
+ %44 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
+ %45 = OpLoad %float %44
+ %47 = OpFRem %float %float_n0x1p_128 %45
+ OpStore %a %47
+ %48 = OpLoad %float %a
+ %49 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
+ %50 = OpLoad %float %49
+ %51 = OpFOrdNotEqual %bool %48 %50
+ OpSelectionMerge %53 None
+ OpBranchConditional %51 %54 %53
+ %54 = OpLabel
+ %55 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
+ %56 = OpLoad %float %55
+ %59 = OpAccessChain %_ptr_Private_float %x_GLF_color %uint_1
+ OpStore %59 %56
+ OpBranch %53
+ %53 = OpLabel
+ OpReturn
+ OpFunctionEnd
+%tint_symbol_2 = OpFunction %void None %60
+%tint_symbol = OpFunctionParameter %main_out
+ %64 = OpLabel
+ %65 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %65
+ OpReturn
+ OpFunctionEnd
+ %main = OpFunction %void None %19
+ %67 = OpLabel
+ %68 = OpFunctionCall %void %main_1
+ %70 = OpLoad %v4float %x_GLF_color
+ %71 = OpCompositeConstruct %main_out %70
+ %69 = OpFunctionCall %void %tint_symbol_2 %71
+ OpReturn
+ OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.wgsl
index 4302ba9..04fcb1e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl.expected.wgsl
@@ -1,6 +1,48 @@
-SKIP: FAILED
+type Arr = [[stride(16)]] array<i32, 2>;
-graphicsfuzz/cov-instruction-simplify-mod-sqrt-undefined/0-opt.wgsl:29:12 error: expected ')'
- a = (-0x1.8p+128 % x_45);
- ^^
+[[block]]
+struct buf0 {
+ x_GLF_uniform_int_values : Arr;
+};
+type Arr_1 = [[stride(16)]] array<f32, 2>;
+
+[[block]]
+struct buf1 {
+ x_GLF_uniform_float_values : Arr_1;
+};
+
+var<private> x_GLF_color : vec4<f32>;
+
+[[group(0), binding(0)]] var<uniform> x_5 : buf0;
+
+[[group(0), binding(1)]] var<uniform> x_8 : buf1;
+
+fn main_1() {
+ var a : f32;
+ let x_10 : i32 = x_5.x_GLF_uniform_int_values[0];
+ let x_11 : i32 = x_5.x_GLF_uniform_int_values[1];
+ let x_12 : i32 = x_5.x_GLF_uniform_int_values[1];
+ let x_13 : i32 = x_5.x_GLF_uniform_int_values[0];
+ x_GLF_color = vec4<f32>(f32(x_10), f32(x_11), f32(x_12), f32(x_13));
+ let x_45 : f32 = x_8.x_GLF_uniform_float_values[1];
+ a = (-0x1p+128 % x_45);
+ let x_47 : f32 = a;
+ let x_49 : f32 = x_8.x_GLF_uniform_float_values[0];
+ if ((x_47 != x_49)) {
+ let x_54 : f32 = x_8.x_GLF_uniform_float_values[0];
+ x_GLF_color.y = x_54;
+ }
+ return;
+}
+
+struct main_out {
+ [[location(0)]]
+ x_GLF_color_1 : vec4<f32>;
+};
+
+[[stage(fragment)]]
+fn main() -> main_out {
+ main_1();
+ return main_out(x_GLF_color);
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.hlsl
index 20e17e7..1c644c9 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.hlsl
@@ -1,6 +1,53 @@
-SKIP: FAILED
+static float4 gl_FragCoord = float4(0.0f, 0.0f, 0.0f, 0.0f);
+cbuffer cbuffer_x_7 : register(b0, space0) {
+ uint4 x_7[1];
+};
+static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
-graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl:19:19 error: expected ')'
- f = (x_32 + -0x1.8p+128);
- ^^
+void main_1() {
+ float f = 0.0f;
+ bool x_49 = false;
+ bool x_50_phi = false;
+ const float x_31 = gl_FragCoord.x;
+ f = x_31;
+ f = (f + asfloat(0xff800000u));
+ if (((5.0f / f) == 0.0f)) {
+ f = (f + 1.0f);
+ }
+ const bool x_42 = isnan(f);
+ x_50_phi = x_42;
+ if (!(x_42)) {
+ const float x_46 = f;
+ const float x_48 = asfloat(x_7[0].x);
+ x_49 = (x_46 != x_48);
+ x_50_phi = x_49;
+ }
+ if (x_50_phi) {
+ f = 0.0f;
+ }
+ if ((f == 0.0f)) {
+ x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
+ } else {
+ x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ }
+ return;
+}
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol_1 {
+ float4 gl_FragCoord_param : SV_Position;
+};
+struct tint_symbol_2 {
+ float4 x_GLF_color_1 : SV_Target0;
+};
+
+tint_symbol_2 main(tint_symbol_1 tint_symbol) {
+ const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
+ gl_FragCoord = gl_FragCoord_param;
+ main_1();
+ const main_out tint_symbol_3 = {x_GLF_color};
+ const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
+ return tint_symbol_5;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.msl
index 20e17e7..6940a25 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.msl
@@ -1,6 +1,58 @@
-SKIP: FAILED
+#include <metal_stdlib>
-graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl:19:19 error: expected ')'
- f = (x_32 + -0x1.8p+128);
- ^^
+using namespace metal;
+struct buf0 {
+ /* 0x0000 */ float zero;
+};
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol_2 {
+ float4 x_GLF_color_1 [[color(0)]];
+};
+
+void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
+ float f = 0.0f;
+ bool x_49 = false;
+ bool x_50_phi = false;
+ float const x_31 = (*(tint_symbol_5)).x;
+ f = x_31;
+ float const x_32 = f;
+ f = (x_32 + -INFINITY);
+ float const x_34 = f;
+ if (((5.0f / x_34) == 0.0f)) {
+ float const x_39 = f;
+ f = (x_39 + 1.0f);
+ }
+ float const x_41 = f;
+ bool const x_42 = isnan(x_41);
+ x_50_phi = x_42;
+ if (!(x_42)) {
+ float const x_46 = f;
+ float const x_48 = x_7.zero;
+ x_49 = (x_46 != x_48);
+ x_50_phi = x_49;
+ }
+ bool const x_50 = x_50_phi;
+ if (x_50) {
+ f = 0.0f;
+ }
+ float const x_53 = f;
+ if ((x_53 == 0.0f)) {
+ *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+ } else {
+ *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ }
+ return;
+}
+
+fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]]) {
+ thread float4 tint_symbol_7 = 0.0f;
+ thread float4 tint_symbol_8 = 0.0f;
+ tint_symbol_7 = gl_FragCoord_param;
+ main_1(x_7, &(tint_symbol_7), &(tint_symbol_8));
+ main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
+ tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
+ return tint_symbol_4;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.spvasm
index 20e17e7..482cbf2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.spvasm
@@ -1,6 +1,140 @@
-SKIP: FAILED
-
-graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl:19:19 error: expected ')'
- f = (x_32 + -0x1.8p+128);
- ^^
-
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 78
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
+ OpExecutionMode %main OriginUpperLeft
+ OpName %gl_FragCoord "gl_FragCoord"
+ OpName %buf0 "buf0"
+ OpMemberName %buf0 0 "zero"
+ OpName %x_7 "x_7"
+ OpName %x_GLF_color "x_GLF_color"
+ OpName %tint_symbol "tint_symbol"
+ OpName %tint_symbol_2 "tint_symbol_2"
+ OpName %main_1 "main_1"
+ OpName %f "f"
+ OpName %x_49 "x_49"
+ OpName %x_50_phi "x_50_phi"
+ OpName %main_out "main_out"
+ OpMemberName %main_out 0 "x_GLF_color_1"
+ OpName %tint_symbol_3 "tint_symbol_3"
+ OpName %tint_symbol_1 "tint_symbol_1"
+ OpName %main "main"
+ OpDecorate %buf0 Block
+ OpMemberDecorate %buf0 0 Offset 0
+ OpDecorate %x_7 NonWritable
+ OpDecorate %x_7 DescriptorSet 0
+ OpDecorate %x_7 Binding 0
+ OpDecorate %tint_symbol BuiltIn FragCoord
+ OpDecorate %tint_symbol_2 Location 0
+ OpMemberDecorate %main_out 0 Offset 0
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Private_v4float = OpTypePointer Private %v4float
+ %5 = OpConstantNull %v4float
+%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %5
+ %buf0 = OpTypeStruct %float
+%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
+ %x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
+%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%tint_symbol = OpVariable %_ptr_Input_v4float Input
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %5
+ %void = OpTypeVoid
+ %14 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
+ %20 = OpConstantNull %float
+ %bool = OpTypeBool
+%_ptr_Function_bool = OpTypePointer Function %bool
+ %24 = OpConstantNull %bool
+ %uint = OpTypeInt 32 0
+ %uint_0 = OpConstant %uint 0
+%_ptr_Private_float = OpTypePointer Private %float
+%float_n0x1p_128 = OpConstant %float -0x1p+128
+ %float_5 = OpConstant %float 5
+ %float_0 = OpConstant %float 0
+ %float_1 = OpConstant %float 1
+%_ptr_Uniform_float = OpTypePointer Uniform %float
+ %63 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %64 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %main_out = OpTypeStruct %v4float
+ %65 = OpTypeFunction %void %main_out
+ %main_1 = OpFunction %void None %14
+ %17 = OpLabel
+ %f = OpVariable %_ptr_Function_float Function %20
+ %x_49 = OpVariable %_ptr_Function_bool Function %24
+ %x_50_phi = OpVariable %_ptr_Function_bool Function %24
+ %29 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
+ %30 = OpLoad %float %29
+ OpStore %f %30
+ %31 = OpLoad %float %f
+ %33 = OpFAdd %float %31 %float_n0x1p_128
+ OpStore %f %33
+ %34 = OpLoad %float %f
+ %36 = OpFDiv %float %float_5 %34
+ %38 = OpFOrdEqual %bool %36 %float_0
+ OpSelectionMerge %39 None
+ OpBranchConditional %38 %40 %39
+ %40 = OpLabel
+ %41 = OpLoad %float %f
+ %43 = OpFAdd %float %41 %float_1
+ OpStore %f %43
+ OpBranch %39
+ %39 = OpLabel
+ %44 = OpLoad %float %f
+ %45 = OpIsNan %bool %44
+ OpStore %x_50_phi %45
+ %46 = OpLogicalNot %bool %45
+ OpSelectionMerge %47 None
+ OpBranchConditional %46 %48 %47
+ %48 = OpLabel
+ %49 = OpLoad %float %f
+ %51 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0
+ %52 = OpLoad %float %51
+ %53 = OpFOrdNotEqual %bool %49 %52
+ OpStore %x_49 %53
+ %54 = OpLoad %bool %x_49
+ OpStore %x_50_phi %54
+ OpBranch %47
+ %47 = OpLabel
+ %55 = OpLoad %bool %x_50_phi
+ OpSelectionMerge %56 None
+ OpBranchConditional %55 %57 %56
+ %57 = OpLabel
+ OpStore %f %float_0
+ OpBranch %56
+ %56 = OpLabel
+ %58 = OpLoad %float %f
+ %59 = OpFOrdEqual %bool %58 %float_0
+ OpSelectionMerge %60 None
+ OpBranchConditional %59 %61 %62
+ %61 = OpLabel
+ OpStore %x_GLF_color %63
+ OpBranch %60
+ %62 = OpLabel
+ OpStore %x_GLF_color %64
+ OpBranch %60
+ %60 = OpLabel
+ OpReturn
+ OpFunctionEnd
+%tint_symbol_3 = OpFunction %void None %65
+%tint_symbol_1 = OpFunctionParameter %main_out
+ %69 = OpLabel
+ %70 = OpCompositeExtract %v4float %tint_symbol_1 0
+ OpStore %tint_symbol_2 %70
+ OpReturn
+ OpFunctionEnd
+ %main = OpFunction %void None %14
+ %72 = OpLabel
+ %73 = OpLoad %v4float %tint_symbol
+ OpStore %gl_FragCoord %73
+ %74 = OpFunctionCall %void %main_1
+ %76 = OpLoad %v4float %x_GLF_color
+ %77 = OpCompositeConstruct %main_out %76
+ %75 = OpFunctionCall %void %tint_symbol_3 %77
+ OpReturn
+ OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.wgsl
index 20e17e7..6ed7216 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl.expected.wgsl
@@ -1,6 +1,57 @@
-SKIP: FAILED
+[[block]]
+struct buf0 {
+ zero : f32;
+};
-graphicsfuzz/cov-simplify-smoothstep-undef/0-opt.wgsl:19:19 error: expected ')'
- f = (x_32 + -0x1.8p+128);
- ^^
+var<private> gl_FragCoord : vec4<f32>;
+[[group(0), binding(0)]] var<uniform> x_7 : buf0;
+
+var<private> x_GLF_color : vec4<f32>;
+
+fn main_1() {
+ var f : f32;
+ var x_49 : bool;
+ var x_50_phi : bool;
+ let x_31 : f32 = gl_FragCoord.x;
+ f = x_31;
+ let x_32 : f32 = f;
+ f = (x_32 + -0x1p+128);
+ let x_34 : f32 = f;
+ if (((5.0 / x_34) == 0.0)) {
+ let x_39 : f32 = f;
+ f = (x_39 + 1.0);
+ }
+ let x_41 : f32 = f;
+ let x_42 : bool = isNan(x_41);
+ x_50_phi = x_42;
+ if (!(x_42)) {
+ let x_46 : f32 = f;
+ let x_48 : f32 = x_7.zero;
+ x_49 = (x_46 != x_48);
+ x_50_phi = x_49;
+ }
+ let x_50 : bool = x_50_phi;
+ if (x_50) {
+ f = 0.0;
+ }
+ let x_53 : f32 = f;
+ if ((x_53 == 0.0)) {
+ x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
+ } else {
+ x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
+ }
+ return;
+}
+
+struct main_out {
+ [[location(0)]]
+ x_GLF_color_1 : vec4<f32>;
+};
+
+[[stage(fragment)]]
+fn main([[builtin(position)]] gl_FragCoord_param : vec4<f32>) -> main_out {
+ gl_FragCoord = gl_FragCoord_param;
+ main_1();
+ return main_out(x_GLF_color);
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.hlsl
index 5dab884..8705db8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.hlsl
@@ -1,6 +1,55 @@
-SKIP: FAILED
+cbuffer cbuffer_x_6 : register(b0, space0) {
+ uint4 x_6[1];
+};
+cbuffer cbuffer_x_8 : register(b1, space0) {
+ uint4 x_8[1];
+};
+static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
-graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl:31:22 error: expected ')' for type constructor
- v2 = vec2<f32>(-0x1.8p+128, 1.0);
- ^^
+void main_1() {
+ float2x2 m24 = float2x2(0.0f, 0.0f, 0.0f, 0.0f);
+ float a = 0.0f;
+ float2 v2 = float2(0.0f, 0.0f);
+ float2 v3 = float2(0.0f, 0.0f);
+ const uint scalar_offset = ((16u * uint(0))) / 4;
+ const float x_40 = asfloat(x_6[scalar_offset / 4][scalar_offset % 4]);
+ const uint scalar_offset_1 = ((16u * uint(0))) / 4;
+ const float x_42 = asfloat(x_6[scalar_offset_1 / 4][scalar_offset_1 % 4]);
+ const float x_44 = asfloat(x_8[0].x);
+ const uint scalar_offset_2 = ((16u * uint(0))) / 4;
+ const float x_47 = asfloat(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
+ m24 = float2x2(float2(x_40, x_42), float2((x_44 * 1.0f), x_47));
+ a = m24[0u].x;
+ v2 = float2(asfloat(0xff800000u), 1.0f);
+ v3 = reflect(v2, float2(a, 1.0f));
+ const uint scalar_offset_3 = ((16u * uint(0))) / 4;
+ const float x_58 = asfloat(x_6[scalar_offset_3 / 4][scalar_offset_3 % 4]);
+ const float2 x_59 = v3;
+ const uint scalar_offset_4 = ((16u * uint(0))) / 4;
+ const float x_61 = asfloat(x_6[scalar_offset_4 / 4][scalar_offset_4 % 4]);
+ x_GLF_color = float4(x_58, x_59.x, x_59.y, x_61);
+ const float x_66 = asfloat(x_8[0].y);
+ const uint scalar_offset_5 = ((16u * uint(0))) / 4;
+ const float x_68 = asfloat(x_6[scalar_offset_5 / 4][scalar_offset_5 % 4]);
+ if ((x_66 == x_68)) {
+ const float4 x_73 = x_GLF_color;
+ x_GLF_color = float4(x_73.x, float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).y, x_73.w);
+ } else {
+ x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ }
+ return;
+}
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol {
+ float4 x_GLF_color_1 : SV_Target0;
+};
+
+tint_symbol main() {
+ main_1();
+ const main_out tint_symbol_1 = {x_GLF_color};
+ const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
+ return tint_symbol_4;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.msl
index 5dab884..0ca872c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.msl
@@ -1,6 +1,62 @@
-SKIP: FAILED
+#include <metal_stdlib>
-graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl:31:22 error: expected ')' for type constructor
- v2 = vec2<f32>(-0x1.8p+128, 1.0);
- ^^
+using namespace metal;
+struct tint_padded_array_element {
+ /* 0x0000 */ float el;
+ /* 0x0004 */ int8_t tint_pad[12];
+};
+struct tint_array_wrapper {
+ /* 0x0000 */ tint_padded_array_element arr[1];
+};
+struct buf0 {
+ /* 0x0000 */ tint_array_wrapper x_GLF_uniform_float_values;
+};
+struct buf1 {
+ /* 0x0000 */ packed_float2 v1;
+};
+struct main_out {
+ float4 x_GLF_color_1;
+};
+struct tint_symbol_1 {
+ float4 x_GLF_color_1 [[color(0)]];
+};
+
+void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
+ float2x2 m24 = float2x2(0.0f);
+ float a = 0.0f;
+ float2 v2 = 0.0f;
+ float2 v3 = 0.0f;
+ float const x_40 = x_6.x_GLF_uniform_float_values.arr[0].el;
+ float const x_42 = x_6.x_GLF_uniform_float_values.arr[0].el;
+ float const x_44 = x_8.v1.x;
+ float const x_47 = x_6.x_GLF_uniform_float_values.arr[0].el;
+ m24 = float2x2(float2(x_40, x_42), float2((x_44 * 1.0f), x_47));
+ float2x2 const x_51 = m24;
+ a = x_51[0u].x;
+ v2 = float2(-INFINITY, 1.0f);
+ float2 const x_53 = v2;
+ float const x_54 = a;
+ v3 = reflect(x_53, float2(x_54, 1.0f));
+ float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el;
+ float2 const x_59 = v3;
+ float const x_61 = x_6.x_GLF_uniform_float_values.arr[0].el;
+ *(tint_symbol_4) = float4(x_58, x_59.x, x_59.y, x_61);
+ float const x_66 = x_8.v1.y;
+ float const x_68 = x_6.x_GLF_uniform_float_values.arr[0].el;
+ if ((x_66 == x_68)) {
+ float4 const x_73 = *(tint_symbol_4);
+ *(tint_symbol_4) = float4(x_73.x, float2(0.0f, 0.0f).x, float2(0.0f, 0.0f).y, x_73.w);
+ } else {
+ *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ }
+ return;
+}
+
+fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_8 [[buffer(1)]]) {
+ thread float4 tint_symbol_5 = 0.0f;
+ main_1(x_6, x_8, &(tint_symbol_5));
+ main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
+ tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
+ return tint_symbol_3;
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.spvasm
index 5dab884..0925219 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.spvasm
@@ -1,6 +1,155 @@
-SKIP: FAILED
-
-graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl:31:22 error: expected ')' for type constructor
- v2 = vec2<f32>(-0x1.8p+128, 1.0);
- ^^
-
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 98
+; Schema: 0
+ OpCapability Shader
+ %58 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %main "main" %tint_symbol_1
+ OpExecutionMode %main OriginUpperLeft
+ OpName %buf0 "buf0"
+ OpMemberName %buf0 0 "x_GLF_uniform_float_values"
+ OpName %x_6 "x_6"
+ OpName %buf1 "buf1"
+ OpMemberName %buf1 0 "v1"
+ OpName %x_8 "x_8"
+ OpName %x_GLF_color "x_GLF_color"
+ OpName %tint_symbol_1 "tint_symbol_1"
+ OpName %main_1 "main_1"
+ OpName %m24 "m24"
+ OpName %a "a"
+ OpName %v2 "v2"
+ OpName %v3 "v3"
+ OpName %main_out "main_out"
+ OpMemberName %main_out 0 "x_GLF_color_1"
+ OpName %tint_symbol_2 "tint_symbol_2"
+ OpName %tint_symbol "tint_symbol"
+ OpName %main "main"
+ OpDecorate %buf0 Block
+ OpMemberDecorate %buf0 0 Offset 0
+ OpDecorate %_arr_float_uint_1 ArrayStride 16
+ OpDecorate %x_6 NonWritable
+ OpDecorate %x_6 DescriptorSet 0
+ OpDecorate %x_6 Binding 0
+ OpDecorate %buf1 Block
+ OpMemberDecorate %buf1 0 Offset 0
+ OpDecorate %x_8 NonWritable
+ OpDecorate %x_8 DescriptorSet 0
+ OpDecorate %x_8 Binding 1
+ OpDecorate %tint_symbol_1 Location 0
+ OpMemberDecorate %main_out 0 Offset 0
+ %float = OpTypeFloat 32
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+ %buf0 = OpTypeStruct %_arr_float_uint_1
+%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
+ %x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
+ %v2float = OpTypeVector %float 2
+ %buf1 = OpTypeStruct %v2float
+%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
+ %x_8 = OpVariable %_ptr_Uniform_buf1 Uniform
+ %v4float = OpTypeVector %float 4
+%_ptr_Private_v4float = OpTypePointer Private %v4float
+ %15 = OpConstantNull %v4float
+%x_GLF_color = OpVariable %_ptr_Private_v4float Private %15
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %15
+ %void = OpTypeVoid
+ %18 = OpTypeFunction %void
+%mat2v2float = OpTypeMatrix %v2float 2
+%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
+ %25 = OpConstantNull %mat2v2float
+%_ptr_Function_float = OpTypePointer Function %float
+ %28 = OpConstantNull %float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %31 = OpConstantNull %v2float
+ %uint_0 = OpConstant %uint 0
+ %int = OpTypeInt 32 1
+ %int_0 = OpConstant %int 0
+%_ptr_Uniform_float = OpTypePointer Uniform %float
+ %float_1 = OpConstant %float 1
+%float_n0x1p_128 = OpConstant %float -0x1p+128
+ %54 = OpConstantComposite %v2float %float_n0x1p_128 %float_1
+ %bool = OpTypeBool
+ %float_0 = OpConstant %float 0
+ %80 = OpConstantComposite %v2float %float_0 %float_0
+ %85 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %main_out = OpTypeStruct %v4float
+ %86 = OpTypeFunction %void %main_out
+ %main_1 = OpFunction %void None %18
+ %21 = OpLabel
+ %m24 = OpVariable %_ptr_Function_mat2v2float Function %25
+ %a = OpVariable %_ptr_Function_float Function %28
+ %v2 = OpVariable %_ptr_Function_v2float Function %31
+ %v3 = OpVariable %_ptr_Function_v2float Function %31
+ %37 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
+ %38 = OpLoad %float %37
+ %39 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
+ %40 = OpLoad %float %39
+ %41 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_0
+ %42 = OpLoad %float %41
+ %43 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
+ %44 = OpLoad %float %43
+ %45 = OpCompositeConstruct %v2float %38 %40
+ %47 = OpFMul %float %42 %float_1
+ %48 = OpCompositeConstruct %v2float %47 %44
+ %49 = OpCompositeConstruct %mat2v2float %45 %48
+ OpStore %m24 %49
+ %50 = OpLoad %mat2v2float %m24
+ %51 = OpCompositeExtract %v2float %50 0
+ %52 = OpCompositeExtract %float %51 0
+ OpStore %a %52
+ OpStore %v2 %54
+ %55 = OpLoad %v2float %v2
+ %56 = OpLoad %float %a
+ %59 = OpCompositeConstruct %v2float %56 %float_1
+ %57 = OpExtInst %v2float %58 Reflect %55 %59
+ OpStore %v3 %57
+ %60 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
+ %61 = OpLoad %float %60
+ %62 = OpLoad %v2float %v3
+ %63 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
+ %64 = OpLoad %float %63
+ %65 = OpCompositeExtract %float %62 0
+ %66 = OpCompositeExtract %float %62 1
+ %67 = OpCompositeConstruct %v4float %61 %65 %66 %64
+ OpStore %x_GLF_color %67
+ %68 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_1
+ %69 = OpLoad %float %68
+ %70 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
+ %71 = OpLoad %float %70
+ %72 = OpFOrdEqual %bool %69 %71
+ OpSelectionMerge %74 None
+ OpBranchConditional %72 %75 %76
+ %75 = OpLabel
+ %77 = OpLoad %v4float %x_GLF_color
+ %78 = OpCompositeExtract %float %77 0
+ %81 = OpCompositeExtract %float %80 0
+ %82 = OpCompositeExtract %float %80 1
+ %83 = OpCompositeExtract %float %77 3
+ %84 = OpCompositeConstruct %v4float %78 %81 %82 %83
+ OpStore %x_GLF_color %84
+ OpBranch %74
+ %76 = OpLabel
+ OpStore %x_GLF_color %85
+ OpBranch %74
+ %74 = OpLabel
+ OpReturn
+ OpFunctionEnd
+%tint_symbol_2 = OpFunction %void None %86
+%tint_symbol = OpFunctionParameter %main_out
+ %90 = OpLabel
+ %91 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %91
+ OpReturn
+ OpFunctionEnd
+ %main = OpFunction %void None %18
+ %93 = OpLabel
+ %94 = OpFunctionCall %void %main_1
+ %96 = OpLoad %v4float %x_GLF_color
+ %97 = OpCompositeConstruct %main_out %96
+ %95 = OpFunctionCall %void %tint_symbol_2 %97
+ OpReturn
+ OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.wgsl
index 5dab884..eb36e3b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl.expected.wgsl
@@ -1,6 +1,59 @@
-SKIP: FAILED
+type Arr = [[stride(16)]] array<f32, 1>;
-graphicsfuzz/cov-undefined-inversesqrt-reflect/0-opt.wgsl:31:22 error: expected ')' for type constructor
- v2 = vec2<f32>(-0x1.8p+128, 1.0);
- ^^
+[[block]]
+struct buf0 {
+ x_GLF_uniform_float_values : Arr;
+};
+[[block]]
+struct buf1 {
+ v1 : vec2<f32>;
+};
+
+[[group(0), binding(0)]] var<uniform> x_6 : buf0;
+
+[[group(0), binding(1)]] var<uniform> x_8 : buf1;
+
+var<private> x_GLF_color : vec4<f32>;
+
+fn main_1() {
+ var m24 : mat2x2<f32>;
+ var a : f32;
+ var v2 : vec2<f32>;
+ var v3 : vec2<f32>;
+ let x_40 : f32 = x_6.x_GLF_uniform_float_values[0];
+ let x_42 : f32 = x_6.x_GLF_uniform_float_values[0];
+ let x_44 : f32 = x_8.v1.x;
+ let x_47 : f32 = x_6.x_GLF_uniform_float_values[0];
+ m24 = mat2x2<f32>(vec2<f32>(x_40, x_42), vec2<f32>((x_44 * 1.0), x_47));
+ let x_51 : mat2x2<f32> = m24;
+ a = x_51[0u].x;
+ v2 = vec2<f32>(-0x1p+128, 1.0);
+ let x_53 : vec2<f32> = v2;
+ let x_54 : f32 = a;
+ v3 = reflect(x_53, vec2<f32>(x_54, 1.0));
+ let x_58 : f32 = x_6.x_GLF_uniform_float_values[0];
+ let x_59 : vec2<f32> = v3;
+ let x_61 : f32 = x_6.x_GLF_uniform_float_values[0];
+ x_GLF_color = vec4<f32>(x_58, x_59.x, x_59.y, x_61);
+ let x_66 : f32 = x_8.v1.y;
+ let x_68 : f32 = x_6.x_GLF_uniform_float_values[0];
+ if ((x_66 == x_68)) {
+ let x_73 : vec4<f32> = x_GLF_color;
+ x_GLF_color = vec4<f32>(x_73.x, vec2<f32>(0.0, 0.0).x, vec2<f32>(0.0, 0.0).y, x_73.w);
+ } else {
+ x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
+ }
+ return;
+}
+
+struct main_out {
+ [[location(0)]]
+ x_GLF_color_1 : vec4<f32>;
+};
+
+[[stage(fragment)]]
+fn main() -> main_out {
+ main_1();
+ return main_out(x_GLF_color);
+}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.hlsl
index bb3eeaf..b527637 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.spvasm.expected.hlsl
@@ -1,68 +1,57 @@
-SKIP: FAILED
-
-
-type Arr = [[stride(16)]] array<i32, 2>;
-
-[[block]]
-struct buf0 {
- x_GLF_uniform_int_values : Arr;
+cbuffer cbuffer_x_6 : register(b0, space0) {
+ uint4 x_6[2];
+};
+static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
+cbuffer cbuffer_x_8 : register(b1, space0) {
+ uint4 x_8[2];
};
-type Arr_1 = [[stride(16)]] array<f32, 2>;
-
-[[block]]
-struct buf1 {
- x_GLF_uniform_float_values : Arr_1;
-};
-
-[[group(0), binding(0)]] var<uniform> x_6 : buf0;
-
-var<private> x_GLF_color : vec4<f32>;
-
-[[group(0), binding(1)]] var<uniform> x_8 : buf1;
-
-fn main_1() {
- var v1 : vec2<f32>;
- var x_54 : bool;
- var x_55_phi : bool;
- let x_35 : i32 = x_6.x_GLF_uniform_int_values[0];
- v1 = cos(cos(bitcast<vec2<f32>>(vec2<i32>(-1, x_35))));
- let x_41 : f32 = v1.x;
- x_GLF_color = vec4<f32>(x_41, x_41, x_41, x_41);
- let x_44 : f32 = v1.y;
- let x_46 : f32 = x_8.x_GLF_uniform_float_values[0];
- let x_47 : bool = (x_44 > x_46);
+void main_1() {
+ float2 v1 = float2(0.0f, 0.0f);
+ bool x_54 = false;
+ bool x_55_phi = false;
+ const uint scalar_offset = ((16u * uint(0))) / 4;
+ const int x_35 = asint(x_6[scalar_offset / 4][scalar_offset % 4]);
+ v1 = cos(cos(asfloat(int2(-1, x_35))));
+ const float x_41 = v1.x;
+ x_GLF_color = float4(x_41, x_41, x_41, x_41);
+ const float x_44 = v1.y;
+ const uint scalar_offset_1 = ((16u * uint(0))) / 4;
+ const float x_46 = asfloat(x_8[scalar_offset_1 / 4][scalar_offset_1 % 4]);
+ const bool x_47 = (x_44 > x_46);
x_55_phi = x_47;
if (x_47) {
- let x_51 : f32 = v1.y;
- let x_53 : f32 = x_8.x_GLF_uniform_float_values[1];
+ const float x_51 = v1.y;
+ const float x_53 = asfloat(x_8[1].x);
x_54 = (x_51 < x_53);
x_55_phi = x_54;
}
- let x_55 : bool = x_55_phi;
- if (x_55) {
- let x_60 : i32 = x_6.x_GLF_uniform_int_values[0];
- let x_63 : i32 = x_6.x_GLF_uniform_int_values[1];
- let x_66 : i32 = x_6.x_GLF_uniform_int_values[1];
- let x_69 : i32 = x_6.x_GLF_uniform_int_values[0];
- x_GLF_color = vec4<f32>(f32(x_60), f32(x_63), f32(x_66), f32(x_69));
+ if (x_55_phi) {
+ const uint scalar_offset_2 = ((16u * uint(0))) / 4;
+ const int x_60 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
+ const int x_63 = asint(x_6[1].x);
+ const int x_66 = asint(x_6[1].x);
+ const uint scalar_offset_3 = ((16u * uint(0))) / 4;
+ const int x_69 = asint(x_6[scalar_offset_3 / 4][scalar_offset_3 % 4]);
+ x_GLF_color = float4(float(x_60), float(x_63), float(x_66), float(x_69));
} else {
- let x_73 : i32 = x_6.x_GLF_uniform_int_values[1];
- let x_74 : f32 = f32(x_73);
- x_GLF_color = vec4<f32>(x_74, x_74, x_74, x_74);
+ const int x_73 = asint(x_6[1].x);
+ const float x_74 = float(x_73);
+ x_GLF_color = float4(x_74, x_74, x_74, x_74);
}
return;
}
struct main_out {
- [[location(0)]]
- x_GLF_color_1 : vec4<f32>;
+ float4 x_GLF_color_1;
+};
+struct tint_symbol {
+ float4 x_GLF_color_1 : SV_Target0;
};
-[[stage(fragment)]]
-fn main() -> main_out {
+tint_symbol main() {
main_1();
- return main_out(x_GLF_color);
+ const main_out tint_symbol_1 = {x_GLF_color};
+ const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
+ return tint_symbol_4;
}
-
-Failed to generate: error: Unable to do bitcast to type __vec_2__f32
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.hlsl
index bb3eeaf..b527637 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-apfloat-nan-cos-cos/0-opt.wgsl.expected.hlsl
@@ -1,68 +1,57 @@
-SKIP: FAILED
-
-
-type Arr = [[stride(16)]] array<i32, 2>;
-
-[[block]]
-struct buf0 {
- x_GLF_uniform_int_values : Arr;
+cbuffer cbuffer_x_6 : register(b0, space0) {
+ uint4 x_6[2];
+};
+static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
+cbuffer cbuffer_x_8 : register(b1, space0) {
+ uint4 x_8[2];
};
-type Arr_1 = [[stride(16)]] array<f32, 2>;
-
-[[block]]
-struct buf1 {
- x_GLF_uniform_float_values : Arr_1;
-};
-
-[[group(0), binding(0)]] var<uniform> x_6 : buf0;
-
-var<private> x_GLF_color : vec4<f32>;
-
-[[group(0), binding(1)]] var<uniform> x_8 : buf1;
-
-fn main_1() {
- var v1 : vec2<f32>;
- var x_54 : bool;
- var x_55_phi : bool;
- let x_35 : i32 = x_6.x_GLF_uniform_int_values[0];
- v1 = cos(cos(bitcast<vec2<f32>>(vec2<i32>(-1, x_35))));
- let x_41 : f32 = v1.x;
- x_GLF_color = vec4<f32>(x_41, x_41, x_41, x_41);
- let x_44 : f32 = v1.y;
- let x_46 : f32 = x_8.x_GLF_uniform_float_values[0];
- let x_47 : bool = (x_44 > x_46);
+void main_1() {
+ float2 v1 = float2(0.0f, 0.0f);
+ bool x_54 = false;
+ bool x_55_phi = false;
+ const uint scalar_offset = ((16u * uint(0))) / 4;
+ const int x_35 = asint(x_6[scalar_offset / 4][scalar_offset % 4]);
+ v1 = cos(cos(asfloat(int2(-1, x_35))));
+ const float x_41 = v1.x;
+ x_GLF_color = float4(x_41, x_41, x_41, x_41);
+ const float x_44 = v1.y;
+ const uint scalar_offset_1 = ((16u * uint(0))) / 4;
+ const float x_46 = asfloat(x_8[scalar_offset_1 / 4][scalar_offset_1 % 4]);
+ const bool x_47 = (x_44 > x_46);
x_55_phi = x_47;
if (x_47) {
- let x_51 : f32 = v1.y;
- let x_53 : f32 = x_8.x_GLF_uniform_float_values[1];
+ const float x_51 = v1.y;
+ const float x_53 = asfloat(x_8[1].x);
x_54 = (x_51 < x_53);
x_55_phi = x_54;
}
- let x_55 : bool = x_55_phi;
- if (x_55) {
- let x_60 : i32 = x_6.x_GLF_uniform_int_values[0];
- let x_63 : i32 = x_6.x_GLF_uniform_int_values[1];
- let x_66 : i32 = x_6.x_GLF_uniform_int_values[1];
- let x_69 : i32 = x_6.x_GLF_uniform_int_values[0];
- x_GLF_color = vec4<f32>(f32(x_60), f32(x_63), f32(x_66), f32(x_69));
+ if (x_55_phi) {
+ const uint scalar_offset_2 = ((16u * uint(0))) / 4;
+ const int x_60 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
+ const int x_63 = asint(x_6[1].x);
+ const int x_66 = asint(x_6[1].x);
+ const uint scalar_offset_3 = ((16u * uint(0))) / 4;
+ const int x_69 = asint(x_6[scalar_offset_3 / 4][scalar_offset_3 % 4]);
+ x_GLF_color = float4(float(x_60), float(x_63), float(x_66), float(x_69));
} else {
- let x_73 : i32 = x_6.x_GLF_uniform_int_values[1];
- let x_74 : f32 = f32(x_73);
- x_GLF_color = vec4<f32>(x_74, x_74, x_74, x_74);
+ const int x_73 = asint(x_6[1].x);
+ const float x_74 = float(x_73);
+ x_GLF_color = float4(x_74, x_74, x_74, x_74);
}
return;
}
struct main_out {
- [[location(0)]]
- x_GLF_color_1 : vec4<f32>;
+ float4 x_GLF_color_1;
+};
+struct tint_symbol {
+ float4 x_GLF_color_1 : SV_Target0;
};
-[[stage(fragment)]]
-fn main() -> main_out {
+tint_symbol main() {
main_1();
- return main_out(x_GLF_color);
+ const main_out tint_symbol_1 = {x_GLF_color};
+ const tint_symbol tint_symbol_4 = {tint_symbol_1.x_GLF_color_1};
+ return tint_symbol_4;
}
-
-Failed to generate: error: Unable to do bitcast to type __vec_2__f32
diff --git a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.hlsl
index 90b1ba3..54b15eb 100644
--- a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.spvasm.expected.hlsl
@@ -1,27 +1,25 @@
-SKIP: FAILED
+static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
-
-var<private> x_GLF_color : vec4<f32>;
-
-fn GLF_live6mand_() -> vec3<f32> {
- return mix(bitcast<vec3<f32>>(vec3<u32>(38730u, 63193u, 63173u)), vec3<f32>(463.0, 4.0, 0.0), vec3<f32>(2.0, 2.0, 2.0));
+float3 GLF_live6mand_() {
+ return lerp(asfloat(uint3(38730u, 63193u, 63173u)), float3(463.0f, 4.0f, 0.0f), float3(2.0f, 2.0f, 2.0f));
}
-fn main_1() {
- let x_27 : vec3<f32> = GLF_live6mand_();
- x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
+void main_1() {
+ const float3 x_27 = GLF_live6mand_();
+ x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
return;
}
struct main_out {
- [[location(0)]]
- x_GLF_color_1 : vec4<f32>;
+ float4 x_GLF_color_1;
+};
+struct tint_symbol {
+ float4 x_GLF_color_1 : SV_Target0;
};
-[[stage(fragment)]]
-fn main() -> main_out {
+tint_symbol main() {
main_1();
- return main_out(x_GLF_color);
+ const main_out tint_symbol_1 = {x_GLF_color};
+ const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
+ return tint_symbol_2;
}
-
-Failed to generate: error: Unable to do bitcast to type __vec_3__f32
diff --git a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.hlsl
index 90b1ba3..54b15eb 100644
--- a/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/mix-floor-add/0-opt.wgsl.expected.hlsl
@@ -1,27 +1,25 @@
-SKIP: FAILED
+static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
-
-var<private> x_GLF_color : vec4<f32>;
-
-fn GLF_live6mand_() -> vec3<f32> {
- return mix(bitcast<vec3<f32>>(vec3<u32>(38730u, 63193u, 63173u)), vec3<f32>(463.0, 4.0, 0.0), vec3<f32>(2.0, 2.0, 2.0));
+float3 GLF_live6mand_() {
+ return lerp(asfloat(uint3(38730u, 63193u, 63173u)), float3(463.0f, 4.0f, 0.0f), float3(2.0f, 2.0f, 2.0f));
}
-fn main_1() {
- let x_27 : vec3<f32> = GLF_live6mand_();
- x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
+void main_1() {
+ const float3 x_27 = GLF_live6mand_();
+ x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
return;
}
struct main_out {
- [[location(0)]]
- x_GLF_color_1 : vec4<f32>;
+ float4 x_GLF_color_1;
+};
+struct tint_symbol {
+ float4 x_GLF_color_1 : SV_Target0;
};
-[[stage(fragment)]]
-fn main() -> main_out {
+tint_symbol main() {
main_1();
- return main_out(x_GLF_color);
+ const main_out tint_symbol_1 = {x_GLF_color};
+ const tint_symbol tint_symbol_2 = {tint_symbol_1.x_GLF_color_1};
+ return tint_symbol_2;
}
-
-Failed to generate: error: Unable to do bitcast to type __vec_3__f32