test: Remove many expected files

For these tests, we only really care that we can successfully consume
them and generate valid output for each backend. Having the expected
files in the tree generates significant churn for any change to how we
generate backend code, which makes it hard to inspect diffs.

Change-Id: Ic98c248081144c0fb1791f1303eaf6d459548e3d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/62720
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
This commit is contained in:
James Price
2021-08-24 22:49:42 +00:00
committed by Tint LUCI CQ
parent 568136dd10
commit 87cce20f67
8526 changed files with 12 additions and 613699 deletions

View File

@@ -1,3 +0,0 @@
SKIP: FAILED
exit status 3221225725

View File

@@ -1,115 +0,0 @@
#include <metal_stdlib>
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[4];
};
struct buf1 {
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_int_values;
};
struct tint_array_wrapper_2 {
float4 arr[2];
};
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_7, constant buf1& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
tint_array_wrapper_2 data = {};
int b = 0;
int y = 0;
int i = 0;
float const x_42 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_45 = x_7.x_GLF_uniform_float_values.arr[0].el;
tint_array_wrapper_2 const tint_symbol_2 = {.arr={float4(x_42, x_42, x_42, x_42), float4(x_45, x_45, x_45, x_45)}};
data = tint_symbol_2;
int const x_49 = x_10.x_GLF_uniform_int_values.arr[1].el;
b = x_49;
float const x_51 = (*(tint_symbol_4)).y;
int const x_54 = x_10.x_GLF_uniform_int_values.arr[1].el;
float const x_56 = (*(tint_symbol_4)).y;
int const x_60 = x_10.x_GLF_uniform_int_values.arr[1].el;
y = clamp(int(x_51), (x_54 | int(x_56)), x_60);
int const x_63 = x_10.x_GLF_uniform_int_values.arr[1].el;
i = x_63;
while (true) {
bool x_82 = false;
bool x_83_phi = false;
int const x_68 = i;
int const x_70 = x_10.x_GLF_uniform_int_values.arr[0].el;
if ((x_68 < x_70)) {
} else {
break;
}
int const x_73 = b;
int const x_75 = x_10.x_GLF_uniform_int_values.arr[0].el;
bool const x_76 = (x_73 > x_75);
x_83_phi = x_76;
if (x_76) {
int const x_79 = y;
int const x_81 = x_10.x_GLF_uniform_int_values.arr[1].el;
x_82 = (x_79 > x_81);
x_83_phi = x_82;
}
bool const x_83 = x_83_phi;
if (x_83) {
break;
}
int const x_86 = b;
b = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
{
int const x_88 = i;
i = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
}
}
int const x_90 = b;
int const x_92 = x_10.x_GLF_uniform_int_values.arr[0].el;
if ((x_90 == x_92)) {
int const x_97 = x_10.x_GLF_uniform_int_values.arr[2].el;
int const x_99 = x_10.x_GLF_uniform_int_values.arr[1].el;
int const x_101 = x_10.x_GLF_uniform_int_values.arr[3].el;
int const x_104 = x_10.x_GLF_uniform_int_values.arr[1].el;
int const x_107 = x_10.x_GLF_uniform_int_values.arr[2].el;
int const x_110 = x_10.x_GLF_uniform_int_values.arr[2].el;
int const x_113 = x_10.x_GLF_uniform_int_values.arr[1].el;
data.arr[clamp(x_97, x_99, x_101)] = float4(float(x_104), float(x_107), float(x_110), float(x_113));
}
int const x_118 = x_10.x_GLF_uniform_int_values.arr[1].el;
float4 const x_120 = data.arr[x_118];
*(tint_symbol_5) = float4(x_120.x, x_120.y, x_120.z, x_120.w);
return;
}
main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
*(tint_symbol_6) = gl_FragCoord_param;
main_1(x_7, x_10, tint_symbol_6, tint_symbol_7);
main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
return tint_symbol_3;
}
fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
thread float4 tint_symbol_8 = 0.0f;
thread float4 tint_symbol_9 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}

View File

@@ -1,236 +0,0 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 153
; Schema: 0
OpCapability Shader
%61 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %gl_FragCoord_param_1 %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1"
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_7 "x_7"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
OpName %x_10 "x_10"
OpName %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %data "data"
OpName %b "b"
OpName %y "y"
OpName %i "i"
OpName %x_82 "x_82"
OpName %x_83_phi "x_83_phi"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %gl_FragCoord_param "gl_FragCoord_param"
OpName %main "main"
OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_1 ArrayStride 16
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_4 ArrayStride 16
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 1
OpDecorate %_arr_v4float_uint_2 ArrayStride 16
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%7 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %7
%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_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%int = OpTypeInt 32 1
%uint_4 = OpConstant %uint 4
%_arr_int_uint_4 = OpTypeArray %int %uint_4
%buf1 = OpTypeStruct %_arr_int_uint_4
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_10 = OpVariable %_ptr_Uniform_buf1 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
%void = OpTypeVoid
%23 = OpTypeFunction %void
%uint_2 = OpConstant %uint 2
%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2
%_ptr_Function__arr_v4float_uint_2 = OpTypePointer Function %_arr_v4float_uint_2
%31 = OpConstantNull %_arr_v4float_uint_2
%_ptr_Function_int = OpTypePointer Function %int
%34 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%_ptr_Private_float = OpTypePointer Private %float
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%74 = OpConstantNull %bool
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
%main_out = OpTypeStruct %v4float
%140 = OpTypeFunction %main_out %v4float
%main_1 = OpFunction %void None %23
%26 = OpLabel
%data = OpVariable %_ptr_Function__arr_v4float_uint_2 Function %31
%b = OpVariable %_ptr_Function_int Function %34
%y = OpVariable %_ptr_Function_int Function %34
%i = OpVariable %_ptr_Function_int Function %34
%x_82 = OpVariable %_ptr_Function_bool Function %74
%x_83_phi = OpVariable %_ptr_Function_bool Function %74
%40 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%41 = OpLoad %float %40
%42 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%43 = OpLoad %float %42
%44 = OpCompositeConstruct %v4float %41 %41 %41 %41
%45 = OpCompositeConstruct %v4float %43 %43 %43 %43
%46 = OpCompositeConstruct %_arr_v4float_uint_2 %44 %45
OpStore %data %46
%49 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%50 = OpLoad %int %49
OpStore %b %50
%52 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%53 = OpLoad %float %52
%54 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%55 = OpLoad %int %54
%56 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%57 = OpLoad %float %56
%58 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%59 = OpLoad %int %58
%62 = OpConvertFToS %int %53
%63 = OpConvertFToS %int %57
%64 = OpBitwiseOr %int %55 %63
%60 = OpExtInst %int %61 SClamp %62 %64 %59
OpStore %y %60
%65 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%66 = OpLoad %int %65
OpStore %i %66
OpBranch %67
%67 = OpLabel
OpLoopMerge %68 %69 None
OpBranch %70
%70 = OpLabel
%76 = OpLoad %int %i
%77 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%78 = OpLoad %int %77
%79 = OpSLessThan %bool %76 %78
OpSelectionMerge %80 None
OpBranchConditional %79 %81 %82
%81 = OpLabel
OpBranch %80
%82 = OpLabel
OpBranch %68
%80 = OpLabel
%83 = OpLoad %int %b
%84 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%85 = OpLoad %int %84
%86 = OpSGreaterThan %bool %83 %85
OpStore %x_83_phi %86
OpSelectionMerge %87 None
OpBranchConditional %86 %88 %87
%88 = OpLabel
%89 = OpLoad %int %y
%90 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%91 = OpLoad %int %90
%92 = OpSGreaterThan %bool %89 %91
OpStore %x_82 %92
%93 = OpLoad %bool %x_82
OpStore %x_83_phi %93
OpBranch %87
%87 = OpLabel
%94 = OpLoad %bool %x_83_phi
OpSelectionMerge %95 None
OpBranchConditional %94 %96 %95
%96 = OpLabel
OpBranch %68
%95 = OpLabel
%97 = OpLoad %int %b
%98 = OpIAdd %int %97 %int_1
OpStore %b %98
OpBranch %69
%69 = OpLabel
%99 = OpLoad %int %i
%100 = OpIAdd %int %99 %int_1
OpStore %i %100
OpBranch %67
%68 = OpLabel
%101 = OpLoad %int %b
%102 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%103 = OpLoad %int %102
%104 = OpIEqual %bool %101 %103
OpSelectionMerge %105 None
OpBranchConditional %104 %106 %105
%106 = OpLabel
%108 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%109 = OpLoad %int %108
%110 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%111 = OpLoad %int %110
%113 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%114 = OpLoad %int %113
%115 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%116 = OpLoad %int %115
%117 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%118 = OpLoad %int %117
%119 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%120 = OpLoad %int %119
%121 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%122 = OpLoad %int %121
%123 = OpExtInst %int %61 SClamp %109 %111 %114
%125 = OpAccessChain %_ptr_Function_v4float %data %123
%126 = OpConvertSToF %float %116
%127 = OpConvertSToF %float %118
%128 = OpConvertSToF %float %120
%129 = OpConvertSToF %float %122
%130 = OpCompositeConstruct %v4float %126 %127 %128 %129
OpStore %125 %130
OpBranch %105
%105 = OpLabel
%131 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%132 = OpLoad %int %131
%133 = OpAccessChain %_ptr_Function_v4float %data %132
%134 = OpLoad %v4float %133
%135 = OpCompositeExtract %float %134 0
%136 = OpCompositeExtract %float %134 1
%137 = OpCompositeExtract %float %134 2
%138 = OpCompositeExtract %float %134 3
%139 = OpCompositeConstruct %v4float %135 %136 %137 %138
OpStore %x_GLF_color %139
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %140
%gl_FragCoord_param = OpFunctionParameter %v4float
%144 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%145 = OpFunctionCall %void %main_1
%146 = OpLoad %v4float %x_GLF_color
%147 = OpCompositeConstruct %main_out %146
OpReturnValue %147
OpFunctionEnd
%main = OpFunction %void None %23
%149 = OpLabel
%151 = OpLoad %v4float %gl_FragCoord_param_1
%150 = OpFunctionCall %main_out %main_inner %151
%152 = OpCompositeExtract %v4float %150 0
OpStore %x_GLF_color_1_1 %152
OpReturn
OpFunctionEnd

View File

@@ -1,99 +0,0 @@
type Arr = [[stride(16)]] array<f32, 1>;
[[block]]
struct buf0 {
x_GLF_uniform_float_values : Arr;
};
type Arr_1 = [[stride(16)]] array<i32, 4>;
[[block]]
struct buf1 {
x_GLF_uniform_int_values : Arr_1;
};
[[group(0), binding(0)]] var<uniform> x_7 : buf0;
[[group(0), binding(1)]] var<uniform> x_10 : buf1;
var<private> gl_FragCoord : vec4<f32>;
var<private> x_GLF_color : vec4<f32>;
fn main_1() {
var data : array<vec4<f32>, 2>;
var b : i32;
var y : i32;
var i : i32;
let x_42 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_45 : f32 = x_7.x_GLF_uniform_float_values[0];
data = array<vec4<f32>, 2>(vec4<f32>(x_42, x_42, x_42, x_42), vec4<f32>(x_45, x_45, x_45, x_45));
let x_49 : i32 = x_10.x_GLF_uniform_int_values[1];
b = x_49;
let x_51 : f32 = gl_FragCoord.y;
let x_54 : i32 = x_10.x_GLF_uniform_int_values[1];
let x_56 : f32 = gl_FragCoord.y;
let x_60 : i32 = x_10.x_GLF_uniform_int_values[1];
y = clamp(i32(x_51), (x_54 | i32(x_56)), x_60);
let x_63 : i32 = x_10.x_GLF_uniform_int_values[1];
i = x_63;
loop {
var x_82 : bool;
var x_83_phi : bool;
let x_68 : i32 = i;
let x_70 : i32 = x_10.x_GLF_uniform_int_values[0];
if ((x_68 < x_70)) {
} else {
break;
}
let x_73 : i32 = b;
let x_75 : i32 = x_10.x_GLF_uniform_int_values[0];
let x_76 : bool = (x_73 > x_75);
x_83_phi = x_76;
if (x_76) {
let x_79 : i32 = y;
let x_81 : i32 = x_10.x_GLF_uniform_int_values[1];
x_82 = (x_79 > x_81);
x_83_phi = x_82;
}
let x_83 : bool = x_83_phi;
if (x_83) {
break;
}
let x_86 : i32 = b;
b = (x_86 + 1);
continuing {
let x_88 : i32 = i;
i = (x_88 + 1);
}
}
let x_90 : i32 = b;
let x_92 : i32 = x_10.x_GLF_uniform_int_values[0];
if ((x_90 == x_92)) {
let x_97 : i32 = x_10.x_GLF_uniform_int_values[2];
let x_99 : i32 = x_10.x_GLF_uniform_int_values[1];
let x_101 : i32 = x_10.x_GLF_uniform_int_values[3];
let x_104 : i32 = x_10.x_GLF_uniform_int_values[1];
let x_107 : i32 = x_10.x_GLF_uniform_int_values[2];
let x_110 : i32 = x_10.x_GLF_uniform_int_values[2];
let x_113 : i32 = x_10.x_GLF_uniform_int_values[1];
data[clamp(x_97, x_99, x_101)] = vec4<f32>(f32(x_104), f32(x_107), f32(x_110), f32(x_113));
}
let x_118 : i32 = x_10.x_GLF_uniform_int_values[1];
let x_120 : vec4<f32> = data[x_118];
x_GLF_color = vec4<f32>(x_120.x, x_120.y, x_120.z, x_120.w);
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);
}

View File

@@ -1,3 +0,0 @@
SKIP: FAILED
exit status 3221225725

View File

@@ -1,115 +0,0 @@
#include <metal_stdlib>
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[4];
};
struct buf1 {
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_int_values;
};
struct tint_array_wrapper_2 {
float4 arr[2];
};
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_7, constant buf1& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
tint_array_wrapper_2 data = {};
int b = 0;
int y = 0;
int i = 0;
float const x_42 = x_7.x_GLF_uniform_float_values.arr[0].el;
float const x_45 = x_7.x_GLF_uniform_float_values.arr[0].el;
tint_array_wrapper_2 const tint_symbol_2 = {.arr={float4(x_42, x_42, x_42, x_42), float4(x_45, x_45, x_45, x_45)}};
data = tint_symbol_2;
int const x_49 = x_10.x_GLF_uniform_int_values.arr[1].el;
b = x_49;
float const x_51 = (*(tint_symbol_4)).y;
int const x_54 = x_10.x_GLF_uniform_int_values.arr[1].el;
float const x_56 = (*(tint_symbol_4)).y;
int const x_60 = x_10.x_GLF_uniform_int_values.arr[1].el;
y = clamp(int(x_51), (x_54 | int(x_56)), x_60);
int const x_63 = x_10.x_GLF_uniform_int_values.arr[1].el;
i = x_63;
while (true) {
bool x_82 = false;
bool x_83_phi = false;
int const x_68 = i;
int const x_70 = x_10.x_GLF_uniform_int_values.arr[0].el;
if ((x_68 < x_70)) {
} else {
break;
}
int const x_73 = b;
int const x_75 = x_10.x_GLF_uniform_int_values.arr[0].el;
bool const x_76 = (x_73 > x_75);
x_83_phi = x_76;
if (x_76) {
int const x_79 = y;
int const x_81 = x_10.x_GLF_uniform_int_values.arr[1].el;
x_82 = (x_79 > x_81);
x_83_phi = x_82;
}
bool const x_83 = x_83_phi;
if (x_83) {
break;
}
int const x_86 = b;
b = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
{
int const x_88 = i;
i = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
}
}
int const x_90 = b;
int const x_92 = x_10.x_GLF_uniform_int_values.arr[0].el;
if ((x_90 == x_92)) {
int const x_97 = x_10.x_GLF_uniform_int_values.arr[2].el;
int const x_99 = x_10.x_GLF_uniform_int_values.arr[1].el;
int const x_101 = x_10.x_GLF_uniform_int_values.arr[3].el;
int const x_104 = x_10.x_GLF_uniform_int_values.arr[1].el;
int const x_107 = x_10.x_GLF_uniform_int_values.arr[2].el;
int const x_110 = x_10.x_GLF_uniform_int_values.arr[2].el;
int const x_113 = x_10.x_GLF_uniform_int_values.arr[1].el;
data.arr[clamp(x_97, x_99, x_101)] = float4(float(x_104), float(x_107), float(x_110), float(x_113));
}
int const x_118 = x_10.x_GLF_uniform_int_values.arr[1].el;
float4 const x_120 = data.arr[x_118];
*(tint_symbol_5) = float4(x_120.x, x_120.y, x_120.z, x_120.w);
return;
}
main_out tint_symbol_inner(constant buf0& x_7, constant buf1& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
*(tint_symbol_6) = gl_FragCoord_param;
main_1(x_7, x_10, tint_symbol_6, tint_symbol_7);
main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)};
return tint_symbol_3;
}
fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
thread float4 tint_symbol_8 = 0.0f;
thread float4 tint_symbol_9 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_7, x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}

View File

@@ -1,236 +0,0 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 153
; Schema: 0
OpCapability Shader
%61 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %gl_FragCoord_param_1 %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1"
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_7 "x_7"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
OpName %x_10 "x_10"
OpName %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %data "data"
OpName %b "b"
OpName %y "y"
OpName %i "i"
OpName %x_82 "x_82"
OpName %x_83_phi "x_83_phi"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %gl_FragCoord_param "gl_FragCoord_param"
OpName %main "main"
OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_1 ArrayStride 16
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_4 ArrayStride 16
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 1
OpDecorate %_arr_v4float_uint_2 ArrayStride 16
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%7 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %7
%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_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%int = OpTypeInt 32 1
%uint_4 = OpConstant %uint 4
%_arr_int_uint_4 = OpTypeArray %int %uint_4
%buf1 = OpTypeStruct %_arr_int_uint_4
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_10 = OpVariable %_ptr_Uniform_buf1 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
%void = OpTypeVoid
%23 = OpTypeFunction %void
%uint_2 = OpConstant %uint 2
%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2
%_ptr_Function__arr_v4float_uint_2 = OpTypePointer Function %_arr_v4float_uint_2
%31 = OpConstantNull %_arr_v4float_uint_2
%_ptr_Function_int = OpTypePointer Function %int
%34 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%_ptr_Private_float = OpTypePointer Private %float
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%74 = OpConstantNull %bool
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
%main_out = OpTypeStruct %v4float
%140 = OpTypeFunction %main_out %v4float
%main_1 = OpFunction %void None %23
%26 = OpLabel
%data = OpVariable %_ptr_Function__arr_v4float_uint_2 Function %31
%b = OpVariable %_ptr_Function_int Function %34
%y = OpVariable %_ptr_Function_int Function %34
%i = OpVariable %_ptr_Function_int Function %34
%x_82 = OpVariable %_ptr_Function_bool Function %74
%x_83_phi = OpVariable %_ptr_Function_bool Function %74
%40 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%41 = OpLoad %float %40
%42 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%43 = OpLoad %float %42
%44 = OpCompositeConstruct %v4float %41 %41 %41 %41
%45 = OpCompositeConstruct %v4float %43 %43 %43 %43
%46 = OpCompositeConstruct %_arr_v4float_uint_2 %44 %45
OpStore %data %46
%49 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%50 = OpLoad %int %49
OpStore %b %50
%52 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%53 = OpLoad %float %52
%54 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%55 = OpLoad %int %54
%56 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%57 = OpLoad %float %56
%58 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%59 = OpLoad %int %58
%62 = OpConvertFToS %int %53
%63 = OpConvertFToS %int %57
%64 = OpBitwiseOr %int %55 %63
%60 = OpExtInst %int %61 SClamp %62 %64 %59
OpStore %y %60
%65 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%66 = OpLoad %int %65
OpStore %i %66
OpBranch %67
%67 = OpLabel
OpLoopMerge %68 %69 None
OpBranch %70
%70 = OpLabel
%76 = OpLoad %int %i
%77 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%78 = OpLoad %int %77
%79 = OpSLessThan %bool %76 %78
OpSelectionMerge %80 None
OpBranchConditional %79 %81 %82
%81 = OpLabel
OpBranch %80
%82 = OpLabel
OpBranch %68
%80 = OpLabel
%83 = OpLoad %int %b
%84 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%85 = OpLoad %int %84
%86 = OpSGreaterThan %bool %83 %85
OpStore %x_83_phi %86
OpSelectionMerge %87 None
OpBranchConditional %86 %88 %87
%88 = OpLabel
%89 = OpLoad %int %y
%90 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%91 = OpLoad %int %90
%92 = OpSGreaterThan %bool %89 %91
OpStore %x_82 %92
%93 = OpLoad %bool %x_82
OpStore %x_83_phi %93
OpBranch %87
%87 = OpLabel
%94 = OpLoad %bool %x_83_phi
OpSelectionMerge %95 None
OpBranchConditional %94 %96 %95
%96 = OpLabel
OpBranch %68
%95 = OpLabel
%97 = OpLoad %int %b
%98 = OpIAdd %int %97 %int_1
OpStore %b %98
OpBranch %69
%69 = OpLabel
%99 = OpLoad %int %i
%100 = OpIAdd %int %99 %int_1
OpStore %i %100
OpBranch %67
%68 = OpLabel
%101 = OpLoad %int %b
%102 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%103 = OpLoad %int %102
%104 = OpIEqual %bool %101 %103
OpSelectionMerge %105 None
OpBranchConditional %104 %106 %105
%106 = OpLabel
%108 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%109 = OpLoad %int %108
%110 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%111 = OpLoad %int %110
%113 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%114 = OpLoad %int %113
%115 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%116 = OpLoad %int %115
%117 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%118 = OpLoad %int %117
%119 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%120 = OpLoad %int %119
%121 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%122 = OpLoad %int %121
%123 = OpExtInst %int %61 SClamp %109 %111 %114
%125 = OpAccessChain %_ptr_Function_v4float %data %123
%126 = OpConvertSToF %float %116
%127 = OpConvertSToF %float %118
%128 = OpConvertSToF %float %120
%129 = OpConvertSToF %float %122
%130 = OpCompositeConstruct %v4float %126 %127 %128 %129
OpStore %125 %130
OpBranch %105
%105 = OpLabel
%131 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%132 = OpLoad %int %131
%133 = OpAccessChain %_ptr_Function_v4float %data %132
%134 = OpLoad %v4float %133
%135 = OpCompositeExtract %float %134 0
%136 = OpCompositeExtract %float %134 1
%137 = OpCompositeExtract %float %134 2
%138 = OpCompositeExtract %float %134 3
%139 = OpCompositeConstruct %v4float %135 %136 %137 %138
OpStore %x_GLF_color %139
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %140
%gl_FragCoord_param = OpFunctionParameter %v4float
%144 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%145 = OpFunctionCall %void %main_1
%146 = OpLoad %v4float %x_GLF_color
%147 = OpCompositeConstruct %main_out %146
OpReturnValue %147
OpFunctionEnd
%main = OpFunction %void None %23
%149 = OpLabel
%151 = OpLoad %v4float %gl_FragCoord_param_1
%150 = OpFunctionCall %main_out %main_inner %151
%152 = OpCompositeExtract %v4float %150 0
OpStore %x_GLF_color_1_1 %152
OpReturn
OpFunctionEnd

View File

@@ -1,99 +0,0 @@
type Arr = [[stride(16)]] array<f32, 1>;
[[block]]
struct buf0 {
x_GLF_uniform_float_values : Arr;
};
type Arr_1 = [[stride(16)]] array<i32, 4>;
[[block]]
struct buf1 {
x_GLF_uniform_int_values : Arr_1;
};
[[group(0), binding(0)]] var<uniform> x_7 : buf0;
[[group(0), binding(1)]] var<uniform> x_10 : buf1;
var<private> gl_FragCoord : vec4<f32>;
var<private> x_GLF_color : vec4<f32>;
fn main_1() {
var data : array<vec4<f32>, 2>;
var b : i32;
var y : i32;
var i : i32;
let x_42 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_45 : f32 = x_7.x_GLF_uniform_float_values[0];
data = array<vec4<f32>, 2>(vec4<f32>(x_42, x_42, x_42, x_42), vec4<f32>(x_45, x_45, x_45, x_45));
let x_49 : i32 = x_10.x_GLF_uniform_int_values[1];
b = x_49;
let x_51 : f32 = gl_FragCoord.y;
let x_54 : i32 = x_10.x_GLF_uniform_int_values[1];
let x_56 : f32 = gl_FragCoord.y;
let x_60 : i32 = x_10.x_GLF_uniform_int_values[1];
y = clamp(i32(x_51), (x_54 | i32(x_56)), x_60);
let x_63 : i32 = x_10.x_GLF_uniform_int_values[1];
i = x_63;
loop {
var x_82 : bool;
var x_83_phi : bool;
let x_68 : i32 = i;
let x_70 : i32 = x_10.x_GLF_uniform_int_values[0];
if ((x_68 < x_70)) {
} else {
break;
}
let x_73 : i32 = b;
let x_75 : i32 = x_10.x_GLF_uniform_int_values[0];
let x_76 : bool = (x_73 > x_75);
x_83_phi = x_76;
if (x_76) {
let x_79 : i32 = y;
let x_81 : i32 = x_10.x_GLF_uniform_int_values[1];
x_82 = (x_79 > x_81);
x_83_phi = x_82;
}
let x_83 : bool = x_83_phi;
if (x_83) {
break;
}
let x_86 : i32 = b;
b = (x_86 + 1);
continuing {
let x_88 : i32 = i;
i = (x_88 + 1);
}
}
let x_90 : i32 = b;
let x_92 : i32 = x_10.x_GLF_uniform_int_values[0];
if ((x_90 == x_92)) {
let x_97 : i32 = x_10.x_GLF_uniform_int_values[2];
let x_99 : i32 = x_10.x_GLF_uniform_int_values[1];
let x_101 : i32 = x_10.x_GLF_uniform_int_values[3];
let x_104 : i32 = x_10.x_GLF_uniform_int_values[1];
let x_107 : i32 = x_10.x_GLF_uniform_int_values[2];
let x_110 : i32 = x_10.x_GLF_uniform_int_values[2];
let x_113 : i32 = x_10.x_GLF_uniform_int_values[1];
data[clamp(x_97, x_99, x_101)] = vec4<f32>(f32(x_104), f32(x_107), f32(x_110), f32(x_113));
}
let x_118 : i32 = x_10.x_GLF_uniform_int_values[1];
let x_120 : vec4<f32> = data[x_118];
x_GLF_color = vec4<f32>(x_120.x, x_120.y, x_120.z, x_120.w);
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);
}