Add tests derived from VK-GL-CTS

This adds SPIR-V assembly and WGSL tests derived from VK-GL-CTS commit
571256871c2e2f03995373e1e4a02958d8cd8cf5. The following procedure was
followed:

- Those .amber files in VK-GL-CTS wholly owned by Google were
  identified

- All GLSL and SPIR-V shaders were extracted from the Amber files and
  converted into SPIR-V binaries

- The compact-ids pass of spirv-opt was applied to each binary

- Duplicate binaries were removed

- spirv-opt -O was used to obtain an optimized version of each remaining
  binary, with duplicates discarded

- Binaries that failed validation using spirv-val with target
  environment SPIR-V 1.3 were discarded

- Those binaries that tint could not successfully convert into WGSL were
  put aside for further investigation

- SPIR-V assembly versions of the remaining binaries are included in
  this CL

- test-runner with -generate-expected and -generate-skip was used to
  generate expected .spvasm, .msl, .hlsl and .wgsl outputs for these
  SPIR-V assembly tests

- Each successfully-generated .expected.wgsl is included in this CL
  again, as a WGLSL test

- test-runner with -generate-expected and -generate-skip was used again,
  to generate expected outputs for these WGSL tests

Change-Id: Ibe9baf2729cf97e0b633db9a426f53362a5de540
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58842
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
Alastair Donaldson
2021-07-23 13:10:12 +00:00
committed by Tint LUCI CQ
parent bd3edb564f
commit f7e73d4ee3
5160 changed files with 621458 additions and 0 deletions

View File

@@ -0,0 +1,431 @@
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %_GLF_color
OpExecutionMode %main OriginUpperLeft
OpSource ESSL 310
OpName %main "main"
OpName %sums "sums"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "_GLF_uniform_int_values"
OpName %_ ""
OpName %buf1 "buf1"
OpMemberName %buf1 0 "_GLF_uniform_float_values"
OpName %__0 ""
OpName %a "a"
OpName %b "b"
OpName %c "c"
OpName %d "d"
OpName %e "e"
OpName %f "f"
OpName %g "g"
OpName %h "h"
OpName %i "i"
OpName %j "j"
OpName %_GLF_color "_GLF_color"
OpDecorate %_arr_int_uint_7 ArrayStride 16
OpMemberDecorate %buf0 0 RelaxedPrecision
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %buf0 Block
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 0
OpDecorate %20 RelaxedPrecision
OpDecorate %_arr_float_uint_3 ArrayStride 16
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %buf1 Block
OpDecorate %__0 DescriptorSet 0
OpDecorate %__0 Binding 1
OpDecorate %22 RelaxedPrecision
OpDecorate %a RelaxedPrecision
OpDecorate %23 RelaxedPrecision
OpDecorate %24 RelaxedPrecision
OpDecorate %25 RelaxedPrecision
OpDecorate %b RelaxedPrecision
OpDecorate %26 RelaxedPrecision
OpDecorate %27 RelaxedPrecision
OpDecorate %28 RelaxedPrecision
OpDecorate %c RelaxedPrecision
OpDecorate %29 RelaxedPrecision
OpDecorate %30 RelaxedPrecision
OpDecorate %31 RelaxedPrecision
OpDecorate %d RelaxedPrecision
OpDecorate %32 RelaxedPrecision
OpDecorate %33 RelaxedPrecision
OpDecorate %34 RelaxedPrecision
OpDecorate %e RelaxedPrecision
OpDecorate %35 RelaxedPrecision
OpDecorate %36 RelaxedPrecision
OpDecorate %37 RelaxedPrecision
OpDecorate %f RelaxedPrecision
OpDecorate %38 RelaxedPrecision
OpDecorate %39 RelaxedPrecision
OpDecorate %40 RelaxedPrecision
OpDecorate %g RelaxedPrecision
OpDecorate %41 RelaxedPrecision
OpDecorate %42 RelaxedPrecision
OpDecorate %43 RelaxedPrecision
OpDecorate %h RelaxedPrecision
OpDecorate %44 RelaxedPrecision
OpDecorate %45 RelaxedPrecision
OpDecorate %46 RelaxedPrecision
OpDecorate %i RelaxedPrecision
OpDecorate %47 RelaxedPrecision
OpDecorate %48 RelaxedPrecision
OpDecorate %49 RelaxedPrecision
OpDecorate %j RelaxedPrecision
OpDecorate %50 RelaxedPrecision
OpDecorate %51 RelaxedPrecision
OpDecorate %52 RelaxedPrecision
OpDecorate %53 RelaxedPrecision
OpDecorate %54 RelaxedPrecision
OpDecorate %55 RelaxedPrecision
OpDecorate %56 RelaxedPrecision
OpDecorate %57 RelaxedPrecision
OpDecorate %58 RelaxedPrecision
OpDecorate %59 RelaxedPrecision
OpDecorate %60 RelaxedPrecision
OpDecorate %61 RelaxedPrecision
OpDecorate %62 RelaxedPrecision
OpDecorate %63 RelaxedPrecision
OpDecorate %64 RelaxedPrecision
OpDecorate %65 RelaxedPrecision
OpDecorate %66 RelaxedPrecision
OpDecorate %67 RelaxedPrecision
OpDecorate %68 RelaxedPrecision
OpDecorate %69 RelaxedPrecision
OpDecorate %70 RelaxedPrecision
OpDecorate %71 RelaxedPrecision
OpDecorate %72 RelaxedPrecision
OpDecorate %73 RelaxedPrecision
OpDecorate %74 RelaxedPrecision
OpDecorate %75 RelaxedPrecision
OpDecorate %_GLF_color Location 0
OpDecorate %76 RelaxedPrecision
OpDecorate %77 RelaxedPrecision
OpDecorate %78 RelaxedPrecision
OpDecorate %79 RelaxedPrecision
OpDecorate %80 RelaxedPrecision
%void = OpTypeVoid
%82 = OpTypeFunction %void
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%_ptr_Function__arr_float_uint_2 = OpTypePointer Function %_arr_float_uint_2
%int = OpTypeInt 32 1
%uint_7 = OpConstant %uint 7
%_arr_int_uint_7 = OpTypeArray %int %uint_7
%buf0 = OpTypeStruct %_arr_int_uint_7
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%uint_3 = OpConstant %uint 3
%_arr_float_uint_3 = OpTypeArray %float %uint_3
%buf1 = OpTypeStruct %_arr_float_uint_3
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%__0 = OpVariable %_ptr_Uniform_buf1 Uniform
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Function_float = OpTypePointer Function %float
%int_2 = OpConstant %int 2
%_ptr_Function_int = OpTypePointer Function %int
%bool = OpTypeBool
%int_5 = OpConstant %int 5
%int_3 = OpConstant %int 3
%int_6 = OpConstant %int 6
%int_4 = OpConstant %int 4
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%main = OpFunction %void None %82
%107 = OpLabel
%sums = OpVariable %_ptr_Function__arr_float_uint_2 Function
%a = OpVariable %_ptr_Function_int Function
%b = OpVariable %_ptr_Function_int Function
%c = OpVariable %_ptr_Function_int Function
%d = OpVariable %_ptr_Function_int Function
%e = OpVariable %_ptr_Function_int Function
%f = OpVariable %_ptr_Function_int Function
%g = OpVariable %_ptr_Function_int Function
%h = OpVariable %_ptr_Function_int Function
%i = OpVariable %_ptr_Function_int Function
%j = OpVariable %_ptr_Function_int Function
%108 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%20 = OpLoad %int %108
%109 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_0
%110 = OpLoad %float %109
%111 = OpAccessChain %_ptr_Function_float %sums %20
OpStore %111 %110
%112 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
%22 = OpLoad %int %112
%113 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_0
%114 = OpLoad %float %113
%115 = OpAccessChain %_ptr_Function_float %sums %22
OpStore %115 %114
%116 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%23 = OpLoad %int %116
OpStore %a %23
OpBranch %117
%117 = OpLabel
OpLoopMerge %118 %119 None
OpBranch %120
%120 = OpLabel
%24 = OpLoad %int %a
%121 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%25 = OpLoad %int %121
%122 = OpSLessThan %bool %24 %25
OpBranchConditional %122 %123 %118
%123 = OpLabel
%124 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_5
%26 = OpLoad %int %124
OpStore %b %26
OpBranch %125
%125 = OpLabel
OpLoopMerge %126 %127 None
OpBranch %128
%128 = OpLabel
%27 = OpLoad %int %b
%129 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
%28 = OpLoad %int %129
%130 = OpSLessThan %bool %27 %28
OpBranchConditional %130 %131 %126
%131 = OpLabel
%132 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_6
%29 = OpLoad %int %132
OpStore %c %29
OpBranch %133
%133 = OpLabel
OpLoopMerge %134 %135 None
OpBranch %136
%136 = OpLabel
%30 = OpLoad %int %c
%137 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_4
%31 = OpLoad %int %137
%138 = OpSLessThanEqual %bool %30 %31
OpBranchConditional %138 %139 %134
%139 = OpLabel
%140 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%32 = OpLoad %int %140
OpStore %d %32
OpBranch %141
%141 = OpLabel
OpLoopMerge %142 %143 None
OpBranch %144
%144 = OpLabel
%33 = OpLoad %int %d
%145 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_6
%34 = OpLoad %int %145
%146 = OpSLessThan %bool %33 %34
OpBranchConditional %146 %147 %142
%147 = OpLabel
%148 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%35 = OpLoad %int %148
OpStore %e %35
OpBranch %149
%149 = OpLabel
OpLoopMerge %150 %151 None
OpBranch %152
%152 = OpLabel
%36 = OpLoad %int %e
%153 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_4
%37 = OpLoad %int %153
%154 = OpSLessThanEqual %bool %36 %37
OpBranchConditional %154 %155 %150
%155 = OpLabel
%156 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%38 = OpLoad %int %156
OpStore %f %38
OpBranch %157
%157 = OpLabel
OpLoopMerge %158 %159 None
OpBranch %160
%160 = OpLabel
%39 = OpLoad %int %f
%161 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%40 = OpLoad %int %161
%162 = OpSLessThan %bool %39 %40
OpBranchConditional %162 %163 %158
%163 = OpLabel
%164 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%41 = OpLoad %int %164
OpStore %g %41
OpBranch %165
%165 = OpLabel
OpLoopMerge %166 %167 None
OpBranch %168
%168 = OpLabel
%42 = OpLoad %int %g
%169 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_6
%43 = OpLoad %int %169
%170 = OpSLessThan %bool %42 %43
OpBranchConditional %170 %171 %166
%171 = OpLabel
%172 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%44 = OpLoad %int %172
OpStore %h %44
OpBranch %173
%173 = OpLabel
OpLoopMerge %174 %175 None
OpBranch %176
%176 = OpLabel
%45 = OpLoad %int %h
%177 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%46 = OpLoad %int %177
%178 = OpSLessThan %bool %45 %46
OpBranchConditional %178 %179 %174
%179 = OpLabel
%180 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%47 = OpLoad %int %180
OpStore %i %47
OpBranch %181
%181 = OpLabel
OpLoopMerge %182 %183 None
OpBranch %184
%184 = OpLabel
%48 = OpLoad %int %i
%185 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_4
%49 = OpLoad %int %185
%186 = OpSLessThan %bool %48 %49
OpBranchConditional %186 %187 %182
%187 = OpLabel
%188 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%50 = OpLoad %int %188
OpStore %j %50
OpBranch %189
%189 = OpLabel
OpLoopMerge %190 %191 None
OpBranch %192
%192 = OpLabel
%51 = OpLoad %int %j
%193 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%52 = OpLoad %int %193
%194 = OpSGreaterThan %bool %51 %52
OpBranchConditional %194 %195 %190
%195 = OpLabel
%53 = OpLoad %int %a
%196 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_2
%197 = OpLoad %float %196
%198 = OpAccessChain %_ptr_Function_float %sums %53
%199 = OpLoad %float %198
%200 = OpFAdd %float %199 %197
%201 = OpAccessChain %_ptr_Function_float %sums %53
OpStore %201 %200
OpBranch %191
%191 = OpLabel
%54 = OpLoad %int %j
%55 = OpISub %int %54 %int_1
OpStore %j %55
OpBranch %189
%190 = OpLabel
OpBranch %183
%183 = OpLabel
%56 = OpLoad %int %i
%57 = OpIAdd %int %56 %int_1
OpStore %i %57
OpBranch %181
%182 = OpLabel
OpBranch %175
%175 = OpLabel
%58 = OpLoad %int %h
%59 = OpIAdd %int %58 %int_1
OpStore %h %59
OpBranch %173
%174 = OpLabel
OpBranch %167
%167 = OpLabel
%60 = OpLoad %int %g
%61 = OpIAdd %int %60 %int_1
OpStore %g %61
OpBranch %165
%166 = OpLabel
OpBranch %159
%159 = OpLabel
%62 = OpLoad %int %f
%63 = OpIAdd %int %62 %int_1
OpStore %f %63
OpBranch %157
%158 = OpLabel
OpBranch %151
%151 = OpLabel
%64 = OpLoad %int %e
%65 = OpIAdd %int %64 %int_1
OpStore %e %65
OpBranch %149
%150 = OpLabel
OpBranch %143
%143 = OpLabel
%66 = OpLoad %int %d
%67 = OpIAdd %int %66 %int_1
OpStore %d %67
OpBranch %141
%142 = OpLabel
OpBranch %135
%135 = OpLabel
%68 = OpLoad %int %c
%69 = OpIAdd %int %68 %int_1
OpStore %c %69
OpBranch %133
%134 = OpLabel
OpBranch %127
%127 = OpLabel
%70 = OpLoad %int %b
%71 = OpIAdd %int %70 %int_1
OpStore %b %71
OpBranch %125
%126 = OpLabel
OpBranch %119
%119 = OpLabel
%72 = OpLoad %int %a
%73 = OpIAdd %int %72 %int_1
OpStore %a %73
OpBranch %117
%118 = OpLabel
%202 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%74 = OpLoad %int %202
%203 = OpAccessChain %_ptr_Function_float %sums %74
%204 = OpLoad %float %203
%205 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_1
%206 = OpLoad %float %205
%207 = OpFOrdEqual %bool %204 %206
OpSelectionMerge %208 None
OpBranchConditional %207 %209 %208
%209 = OpLabel
%210 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
%75 = OpLoad %int %210
%211 = OpAccessChain %_ptr_Function_float %sums %75
%212 = OpLoad %float %211
%213 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_1
%214 = OpLoad %float %213
%215 = OpFOrdEqual %bool %212 %214
OpBranch %208
%208 = OpLabel
%216 = OpPhi %bool %207 %118 %215 %209
OpSelectionMerge %217 None
OpBranchConditional %216 %218 %219
%218 = OpLabel
%220 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
%76 = OpLoad %int %220
%221 = OpConvertSToF %float %76
%222 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%77 = OpLoad %int %222
%223 = OpConvertSToF %float %77
%224 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%78 = OpLoad %int %224
%225 = OpConvertSToF %float %78
%226 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
%79 = OpLoad %int %226
%227 = OpConvertSToF %float %79
%228 = OpCompositeConstruct %v4float %221 %223 %225 %227
OpStore %_GLF_color %228
OpBranch %217
%219 = OpLabel
%229 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
%80 = OpLoad %int %229
%230 = OpConvertSToF %float %80
%231 = OpCompositeConstruct %v4float %230 %230 %230 %230
OpStore %_GLF_color %231
OpBranch %217
%217 = OpLabel
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,208 @@
cbuffer cbuffer_x_6 : register(b0, space0) {
uint4 x_6[7];
};
cbuffer cbuffer_x_8 : register(b1, space0) {
uint4 x_8[3];
};
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void main_1() {
float sums[2] = (float[2])0;
int a = 0;
int b = 0;
int c = 0;
int d = 0;
int e = 0;
int f = 0;
int g = 0;
int h = 0;
int i = 0;
int j = 0;
bool x_215 = false;
bool x_216_phi = false;
const int x_20 = asint(x_6[1].x);
const uint scalar_offset = ((16u * uint(0))) / 4;
const float x_110 = asfloat(x_8[scalar_offset / 4][scalar_offset % 4]);
sums[x_20] = x_110;
const int x_22 = asint(x_6[2].x);
const uint scalar_offset_1 = ((16u * uint(0))) / 4;
const float x_114 = asfloat(x_8[scalar_offset_1 / 4][scalar_offset_1 % 4]);
sums[x_22] = x_114;
const int x_23 = asint(x_6[1].x);
a = x_23;
while (true) {
const int x_24 = a;
const uint scalar_offset_2 = ((16u * uint(0))) / 4;
const int x_25 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
if ((x_24 < x_25)) {
} else {
break;
}
const int x_26 = asint(x_6[5].x);
b = x_26;
while (true) {
const int x_27 = b;
const int x_28 = asint(x_6[3].x);
if ((x_27 < x_28)) {
} else {
break;
}
const int x_29 = asint(x_6[6].x);
c = x_29;
while (true) {
const int x_30 = c;
const int x_31 = asint(x_6[4].x);
if ((x_30 <= x_31)) {
} else {
break;
}
const int x_32 = asint(x_6[1].x);
d = x_32;
while (true) {
const int x_33 = d;
const int x_34 = asint(x_6[6].x);
if ((x_33 < x_34)) {
} else {
break;
}
const uint scalar_offset_3 = ((16u * uint(0))) / 4;
const int x_35 = asint(x_6[scalar_offset_3 / 4][scalar_offset_3 % 4]);
e = x_35;
while (true) {
const int x_36 = e;
const int x_37 = asint(x_6[4].x);
if ((x_36 <= x_37)) {
} else {
break;
}
const int x_38 = asint(x_6[1].x);
f = x_38;
while (true) {
const int x_39 = f;
const uint scalar_offset_4 = ((16u * uint(0))) / 4;
const int x_40 = asint(x_6[scalar_offset_4 / 4][scalar_offset_4 % 4]);
if ((x_39 < x_40)) {
} else {
break;
}
const int x_41 = asint(x_6[1].x);
g = x_41;
while (true) {
const int x_42 = g;
const int x_43 = asint(x_6[6].x);
if ((x_42 < x_43)) {
} else {
break;
}
const int x_44 = asint(x_6[1].x);
h = x_44;
while (true) {
const int x_45 = h;
const uint scalar_offset_5 = ((16u * uint(0))) / 4;
const int x_46 = asint(x_6[scalar_offset_5 / 4][scalar_offset_5 % 4]);
if ((x_45 < x_46)) {
} else {
break;
}
const int x_47 = asint(x_6[1].x);
i = x_47;
while (true) {
const int x_48 = i;
const int x_49 = asint(x_6[4].x);
if ((x_48 < x_49)) {
} else {
break;
}
const uint scalar_offset_6 = ((16u * uint(0))) / 4;
const int x_50 = asint(x_6[scalar_offset_6 / 4][scalar_offset_6 % 4]);
j = x_50;
while (true) {
const int x_51 = j;
const int x_52 = asint(x_6[1].x);
if ((x_51 > x_52)) {
} else {
break;
}
const int x_53 = a;
const float x_197 = asfloat(x_8[2].x);
const float x_199 = sums[x_53];
sums[x_53] = (x_199 + x_197);
{
j = (j - 1);
}
}
{
i = (i + 1);
}
}
{
h = (h + 1);
}
}
{
g = (g + 1);
}
}
{
f = (f + 1);
}
}
{
e = (e + 1);
}
}
{
d = (d + 1);
}
}
{
c = (c + 1);
}
}
{
b = (b + 1);
}
}
{
a = (a + 1);
}
}
const int x_74 = asint(x_6[1].x);
const float x_204 = sums[x_74];
const float x_206 = asfloat(x_8[1].x);
const bool x_207 = (x_204 == x_206);
x_216_phi = x_207;
if (x_207) {
const int x_75 = asint(x_6[2].x);
const float x_212 = sums[x_75];
const float x_214 = asfloat(x_8[1].x);
x_215 = (x_212 == x_214);
x_216_phi = x_215;
}
if (x_216_phi) {
const int x_76 = asint(x_6[2].x);
const int x_77 = asint(x_6[1].x);
const int x_78 = asint(x_6[1].x);
const int x_79 = asint(x_6[2].x);
x_GLF_color = float4(float(x_76), float(x_77), float(x_78), float(x_79));
} else {
const int x_80 = asint(x_6[1].x);
const float x_230 = float(x_80);
x_GLF_color = float4(x_230, x_230, x_230, x_230);
}
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;
}

View File

@@ -0,0 +1,232 @@
#include <metal_stdlib>
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[7];
};
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[3];
};
struct buf1 {
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_float_values;
};
struct tint_array_wrapper_2 {
float 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_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
tint_array_wrapper_2 sums = {};
int a = 0;
int b = 0;
int c = 0;
int d = 0;
int e = 0;
int f = 0;
int g = 0;
int h = 0;
int i = 0;
int j = 0;
bool x_215 = false;
bool x_216_phi = false;
int const x_20 = x_6.x_GLF_uniform_int_values.arr[1].el;
float const x_110 = x_8.x_GLF_uniform_float_values.arr[0].el;
sums.arr[x_20] = x_110;
int const x_22 = x_6.x_GLF_uniform_int_values.arr[2].el;
float const x_114 = x_8.x_GLF_uniform_float_values.arr[0].el;
sums.arr[x_22] = x_114;
int const x_23 = x_6.x_GLF_uniform_int_values.arr[1].el;
a = x_23;
while (true) {
int const x_24 = a;
int const x_25 = x_6.x_GLF_uniform_int_values.arr[0].el;
if ((x_24 < x_25)) {
} else {
break;
}
int const x_26 = x_6.x_GLF_uniform_int_values.arr[5].el;
b = x_26;
while (true) {
int const x_27 = b;
int const x_28 = x_6.x_GLF_uniform_int_values.arr[3].el;
if ((x_27 < x_28)) {
} else {
break;
}
int const x_29 = x_6.x_GLF_uniform_int_values.arr[6].el;
c = x_29;
while (true) {
int const x_30 = c;
int const x_31 = x_6.x_GLF_uniform_int_values.arr[4].el;
if ((x_30 <= x_31)) {
} else {
break;
}
int const x_32 = x_6.x_GLF_uniform_int_values.arr[1].el;
d = x_32;
while (true) {
int const x_33 = d;
int const x_34 = x_6.x_GLF_uniform_int_values.arr[6].el;
if ((x_33 < x_34)) {
} else {
break;
}
int const x_35 = x_6.x_GLF_uniform_int_values.arr[0].el;
e = x_35;
while (true) {
int const x_36 = e;
int const x_37 = x_6.x_GLF_uniform_int_values.arr[4].el;
if ((x_36 <= x_37)) {
} else {
break;
}
int const x_38 = x_6.x_GLF_uniform_int_values.arr[1].el;
f = x_38;
while (true) {
int const x_39 = f;
int const x_40 = x_6.x_GLF_uniform_int_values.arr[0].el;
if ((x_39 < x_40)) {
} else {
break;
}
int const x_41 = x_6.x_GLF_uniform_int_values.arr[1].el;
g = x_41;
while (true) {
int const x_42 = g;
int const x_43 = x_6.x_GLF_uniform_int_values.arr[6].el;
if ((x_42 < x_43)) {
} else {
break;
}
int const x_44 = x_6.x_GLF_uniform_int_values.arr[1].el;
h = x_44;
while (true) {
int const x_45 = h;
int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el;
if ((x_45 < x_46)) {
} else {
break;
}
int const x_47 = x_6.x_GLF_uniform_int_values.arr[1].el;
i = x_47;
while (true) {
int const x_48 = i;
int const x_49 = x_6.x_GLF_uniform_int_values.arr[4].el;
if ((x_48 < x_49)) {
} else {
break;
}
int const x_50 = x_6.x_GLF_uniform_int_values.arr[0].el;
j = x_50;
while (true) {
int const x_51 = j;
int const x_52 = x_6.x_GLF_uniform_int_values.arr[1].el;
if ((x_51 > x_52)) {
} else {
break;
}
int const x_53 = a;
float const x_197 = x_8.x_GLF_uniform_float_values.arr[2].el;
float const x_199 = sums.arr[x_53];
sums.arr[x_53] = (x_199 + x_197);
{
int const x_54 = j;
j = (x_54 - 1);
}
}
{
int const x_56 = i;
i = (x_56 + 1);
}
}
{
int const x_58 = h;
h = (x_58 + 1);
}
}
{
int const x_60 = g;
g = (x_60 + 1);
}
}
{
int const x_62 = f;
f = (x_62 + 1);
}
}
{
int const x_64 = e;
e = (x_64 + 1);
}
}
{
int const x_66 = d;
d = (x_66 + 1);
}
}
{
int const x_68 = c;
c = (x_68 + 1);
}
}
{
int const x_70 = b;
b = (x_70 + 1);
}
}
{
int const x_72 = a;
a = (x_72 + 1);
}
}
int const x_74 = x_6.x_GLF_uniform_int_values.arr[1].el;
float const x_204 = sums.arr[x_74];
float const x_206 = x_8.x_GLF_uniform_float_values.arr[1].el;
bool const x_207 = (x_204 == x_206);
x_216_phi = x_207;
if (x_207) {
int const x_75 = x_6.x_GLF_uniform_int_values.arr[2].el;
float const x_212 = sums.arr[x_75];
float const x_214 = x_8.x_GLF_uniform_float_values.arr[1].el;
x_215 = (x_212 == x_214);
x_216_phi = x_215;
}
bool const x_216 = x_216_phi;
if (x_216) {
int const x_76 = x_6.x_GLF_uniform_int_values.arr[2].el;
int const x_77 = x_6.x_GLF_uniform_int_values.arr[1].el;
int const x_78 = x_6.x_GLF_uniform_int_values.arr[1].el;
int const x_79 = x_6.x_GLF_uniform_int_values.arr[2].el;
*(tint_symbol_4) = float4(float(x_76), float(x_77), float(x_78), float(x_79));
} else {
int const x_80 = x_6.x_GLF_uniform_int_values.arr[1].el;
float const x_230 = float(x_80);
*(tint_symbol_4) = float4(x_230, x_230, x_230, x_230);
}
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;
}

View File

@@ -0,0 +1,456 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 274
; Schema: 0
OpCapability Shader
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 %sums "sums"
OpName %a "a"
OpName %b "b"
OpName %c "c"
OpName %d "d"
OpName %e "e"
OpName %f "f"
OpName %g "g"
OpName %h "h"
OpName %i "i"
OpName %j "j"
OpName %x_215 "x_215"
OpName %x_216_phi "x_216_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_7 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_3 ArrayStride 16
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 1
OpDecorate %tint_symbol_1 Location 0
OpDecorate %_arr_float_uint_2 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_7 = OpConstant %uint 7
%_arr_int_uint_7 = OpTypeArray %int %uint_7
%buf0 = OpTypeStruct %_arr_int_uint_7
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%float = OpTypeFloat 32
%uint_3 = OpConstant %uint 3
%_arr_float_uint_3 = OpTypeArray %float %uint_3
%buf1 = OpTypeStruct %_arr_float_uint_3
%_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
%uint_2 = OpConstant %uint 2
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%_ptr_Function__arr_float_uint_2 = OpTypePointer Function %_arr_float_uint_2
%28 = OpConstantNull %_arr_float_uint_2
%_ptr_Function_int = OpTypePointer Function %int
%31 = OpConstantNull %int
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%44 = OpConstantNull %bool
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Function_float = OpTypePointer Function %float
%int_2 = OpConstant %int 2
%int_5 = OpConstant %int 5
%int_3 = OpConstant %int 3
%int_6 = OpConstant %int 6
%int_4 = OpConstant %int 4
%main_out = OpTypeStruct %v4float
%262 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%sums = OpVariable %_ptr_Function__arr_float_uint_2 Function %28
%a = OpVariable %_ptr_Function_int Function %31
%b = OpVariable %_ptr_Function_int Function %31
%c = OpVariable %_ptr_Function_int Function %31
%d = OpVariable %_ptr_Function_int Function %31
%e = OpVariable %_ptr_Function_int Function %31
%f = OpVariable %_ptr_Function_int Function %31
%g = OpVariable %_ptr_Function_int Function %31
%h = OpVariable %_ptr_Function_int Function %31
%i = OpVariable %_ptr_Function_int Function %31
%j = OpVariable %_ptr_Function_int Function %31
%x_215 = OpVariable %_ptr_Function_bool Function %44
%x_216_phi = OpVariable %_ptr_Function_bool Function %44
%49 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%50 = OpLoad %int %49
%53 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%54 = OpLoad %float %53
%56 = OpAccessChain %_ptr_Function_float %sums %50
OpStore %56 %54
%58 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%59 = OpLoad %int %58
%60 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%61 = OpLoad %float %60
%62 = OpAccessChain %_ptr_Function_float %sums %59
OpStore %62 %61
%63 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%64 = OpLoad %int %63
OpStore %a %64
OpBranch %65
%65 = OpLabel
OpLoopMerge %66 %67 None
OpBranch %68
%68 = OpLabel
%69 = OpLoad %int %a
%70 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%71 = OpLoad %int %70
%72 = OpSLessThan %bool %69 %71
OpSelectionMerge %73 None
OpBranchConditional %72 %74 %75
%74 = OpLabel
OpBranch %73
%75 = OpLabel
OpBranch %66
%73 = OpLabel
%77 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
%78 = OpLoad %int %77
OpStore %b %78
OpBranch %79
%79 = OpLabel
OpLoopMerge %80 %81 None
OpBranch %82
%82 = OpLabel
%83 = OpLoad %int %b
%85 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%86 = OpLoad %int %85
%87 = OpSLessThan %bool %83 %86
OpSelectionMerge %88 None
OpBranchConditional %87 %89 %90
%89 = OpLabel
OpBranch %88
%90 = OpLabel
OpBranch %80
%88 = OpLabel
%92 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
%93 = OpLoad %int %92
OpStore %c %93
OpBranch %94
%94 = OpLabel
OpLoopMerge %95 %96 None
OpBranch %97
%97 = OpLabel
%98 = OpLoad %int %c
%100 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%101 = OpLoad %int %100
%102 = OpSLessThanEqual %bool %98 %101
OpSelectionMerge %103 None
OpBranchConditional %102 %104 %105
%104 = OpLabel
OpBranch %103
%105 = OpLabel
OpBranch %95
%103 = OpLabel
%106 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%107 = OpLoad %int %106
OpStore %d %107
OpBranch %108
%108 = OpLabel
OpLoopMerge %109 %110 None
OpBranch %111
%111 = OpLabel
%112 = OpLoad %int %d
%113 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
%114 = OpLoad %int %113
%115 = OpSLessThan %bool %112 %114
OpSelectionMerge %116 None
OpBranchConditional %115 %117 %118
%117 = OpLabel
OpBranch %116
%118 = OpLabel
OpBranch %109
%116 = OpLabel
%119 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%120 = OpLoad %int %119
OpStore %e %120
OpBranch %121
%121 = OpLabel
OpLoopMerge %122 %123 None
OpBranch %124
%124 = OpLabel
%125 = OpLoad %int %e
%126 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%127 = OpLoad %int %126
%128 = OpSLessThanEqual %bool %125 %127
OpSelectionMerge %129 None
OpBranchConditional %128 %130 %131
%130 = OpLabel
OpBranch %129
%131 = OpLabel
OpBranch %122
%129 = OpLabel
%132 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%133 = OpLoad %int %132
OpStore %f %133
OpBranch %134
%134 = OpLabel
OpLoopMerge %135 %136 None
OpBranch %137
%137 = OpLabel
%138 = OpLoad %int %f
%139 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%140 = OpLoad %int %139
%141 = OpSLessThan %bool %138 %140
OpSelectionMerge %142 None
OpBranchConditional %141 %143 %144
%143 = OpLabel
OpBranch %142
%144 = OpLabel
OpBranch %135
%142 = OpLabel
%145 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%146 = OpLoad %int %145
OpStore %g %146
OpBranch %147
%147 = OpLabel
OpLoopMerge %148 %149 None
OpBranch %150
%150 = OpLabel
%151 = OpLoad %int %g
%152 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
%153 = OpLoad %int %152
%154 = OpSLessThan %bool %151 %153
OpSelectionMerge %155 None
OpBranchConditional %154 %156 %157
%156 = OpLabel
OpBranch %155
%157 = OpLabel
OpBranch %148
%155 = OpLabel
%158 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%159 = OpLoad %int %158
OpStore %h %159
OpBranch %160
%160 = OpLabel
OpLoopMerge %161 %162 None
OpBranch %163
%163 = OpLabel
%164 = OpLoad %int %h
%165 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%166 = OpLoad %int %165
%167 = OpSLessThan %bool %164 %166
OpSelectionMerge %168 None
OpBranchConditional %167 %169 %170
%169 = OpLabel
OpBranch %168
%170 = OpLabel
OpBranch %161
%168 = OpLabel
%171 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%172 = OpLoad %int %171
OpStore %i %172
OpBranch %173
%173 = OpLabel
OpLoopMerge %174 %175 None
OpBranch %176
%176 = OpLabel
%177 = OpLoad %int %i
%178 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%179 = OpLoad %int %178
%180 = OpSLessThan %bool %177 %179
OpSelectionMerge %181 None
OpBranchConditional %180 %182 %183
%182 = OpLabel
OpBranch %181
%183 = OpLabel
OpBranch %174
%181 = OpLabel
%184 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%185 = OpLoad %int %184
OpStore %j %185
OpBranch %186
%186 = OpLabel
OpLoopMerge %187 %188 None
OpBranch %189
%189 = OpLabel
%190 = OpLoad %int %j
%191 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%192 = OpLoad %int %191
%193 = OpSGreaterThan %bool %190 %192
OpSelectionMerge %194 None
OpBranchConditional %193 %195 %196
%195 = OpLabel
OpBranch %194
%196 = OpLabel
OpBranch %187
%194 = OpLabel
%197 = OpLoad %int %a
%198 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_2
%199 = OpLoad %float %198
%200 = OpAccessChain %_ptr_Function_float %sums %197
%201 = OpLoad %float %200
%202 = OpAccessChain %_ptr_Function_float %sums %197
%203 = OpFAdd %float %201 %199
OpStore %202 %203
OpBranch %188
%188 = OpLabel
%204 = OpLoad %int %j
%205 = OpISub %int %204 %int_1
OpStore %j %205
OpBranch %186
%187 = OpLabel
OpBranch %175
%175 = OpLabel
%206 = OpLoad %int %i
%207 = OpIAdd %int %206 %int_1
OpStore %i %207
OpBranch %173
%174 = OpLabel
OpBranch %162
%162 = OpLabel
%208 = OpLoad %int %h
%209 = OpIAdd %int %208 %int_1
OpStore %h %209
OpBranch %160
%161 = OpLabel
OpBranch %149
%149 = OpLabel
%210 = OpLoad %int %g
%211 = OpIAdd %int %210 %int_1
OpStore %g %211
OpBranch %147
%148 = OpLabel
OpBranch %136
%136 = OpLabel
%212 = OpLoad %int %f
%213 = OpIAdd %int %212 %int_1
OpStore %f %213
OpBranch %134
%135 = OpLabel
OpBranch %123
%123 = OpLabel
%214 = OpLoad %int %e
%215 = OpIAdd %int %214 %int_1
OpStore %e %215
OpBranch %121
%122 = OpLabel
OpBranch %110
%110 = OpLabel
%216 = OpLoad %int %d
%217 = OpIAdd %int %216 %int_1
OpStore %d %217
OpBranch %108
%109 = OpLabel
OpBranch %96
%96 = OpLabel
%218 = OpLoad %int %c
%219 = OpIAdd %int %218 %int_1
OpStore %c %219
OpBranch %94
%95 = OpLabel
OpBranch %81
%81 = OpLabel
%220 = OpLoad %int %b
%221 = OpIAdd %int %220 %int_1
OpStore %b %221
OpBranch %79
%80 = OpLabel
OpBranch %67
%67 = OpLabel
%222 = OpLoad %int %a
%223 = OpIAdd %int %222 %int_1
OpStore %a %223
OpBranch %65
%66 = OpLabel
%224 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%225 = OpLoad %int %224
%226 = OpAccessChain %_ptr_Function_float %sums %225
%227 = OpLoad %float %226
%228 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
%229 = OpLoad %float %228
%230 = OpFOrdEqual %bool %227 %229
OpStore %x_216_phi %230
OpSelectionMerge %231 None
OpBranchConditional %230 %232 %231
%232 = OpLabel
%233 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%234 = OpLoad %int %233
%235 = OpAccessChain %_ptr_Function_float %sums %234
%236 = OpLoad %float %235
%237 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
%238 = OpLoad %float %237
%239 = OpFOrdEqual %bool %236 %238
OpStore %x_215 %239
%240 = OpLoad %bool %x_215
OpStore %x_216_phi %240
OpBranch %231
%231 = OpLabel
%241 = OpLoad %bool %x_216_phi
OpSelectionMerge %242 None
OpBranchConditional %241 %243 %244
%243 = OpLabel
%245 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%246 = OpLoad %int %245
%247 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%248 = OpLoad %int %247
%249 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%250 = OpLoad %int %249
%251 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%252 = OpLoad %int %251
%253 = OpConvertSToF %float %246
%254 = OpConvertSToF %float %248
%255 = OpConvertSToF %float %250
%256 = OpConvertSToF %float %252
%257 = OpCompositeConstruct %v4float %253 %254 %255 %256
OpStore %x_GLF_color %257
OpBranch %242
%244 = OpLabel
%258 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%259 = OpLoad %int %258
%260 = OpConvertSToF %float %259
%261 = OpCompositeConstruct %v4float %260 %260 %260 %260
OpStore %x_GLF_color %261
OpBranch %242
%242 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %262
%tint_symbol = OpFunctionParameter %main_out
%266 = OpLabel
%267 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %267
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
%269 = OpLabel
%270 = OpFunctionCall %void %main_1
%272 = OpLoad %v4float %x_GLF_color
%273 = OpCompositeConstruct %main_out %272
%271 = OpFunctionCall %void %tint_symbol_2 %273
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,231 @@
type Arr = [[stride(16)]] array<i32, 7>;
[[block]]
struct buf0 {
x_GLF_uniform_int_values : Arr;
};
type Arr_1 = [[stride(16)]] array<f32, 3>;
[[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 sums : array<f32, 2>;
var a : i32;
var b : i32;
var c : i32;
var d : i32;
var e : i32;
var f : i32;
var g : i32;
var h : i32;
var i : i32;
var j : i32;
var x_215 : bool;
var x_216_phi : bool;
let x_20 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_110 : f32 = x_8.x_GLF_uniform_float_values[0];
sums[x_20] = x_110;
let x_22 : i32 = x_6.x_GLF_uniform_int_values[2];
let x_114 : f32 = x_8.x_GLF_uniform_float_values[0];
sums[x_22] = x_114;
let x_23 : i32 = x_6.x_GLF_uniform_int_values[1];
a = x_23;
loop {
let x_24 : i32 = a;
let x_25 : i32 = x_6.x_GLF_uniform_int_values[0];
if ((x_24 < x_25)) {
} else {
break;
}
let x_26 : i32 = x_6.x_GLF_uniform_int_values[5];
b = x_26;
loop {
let x_27 : i32 = b;
let x_28 : i32 = x_6.x_GLF_uniform_int_values[3];
if ((x_27 < x_28)) {
} else {
break;
}
let x_29 : i32 = x_6.x_GLF_uniform_int_values[6];
c = x_29;
loop {
let x_30 : i32 = c;
let x_31 : i32 = x_6.x_GLF_uniform_int_values[4];
if ((x_30 <= x_31)) {
} else {
break;
}
let x_32 : i32 = x_6.x_GLF_uniform_int_values[1];
d = x_32;
loop {
let x_33 : i32 = d;
let x_34 : i32 = x_6.x_GLF_uniform_int_values[6];
if ((x_33 < x_34)) {
} else {
break;
}
let x_35 : i32 = x_6.x_GLF_uniform_int_values[0];
e = x_35;
loop {
let x_36 : i32 = e;
let x_37 : i32 = x_6.x_GLF_uniform_int_values[4];
if ((x_36 <= x_37)) {
} else {
break;
}
let x_38 : i32 = x_6.x_GLF_uniform_int_values[1];
f = x_38;
loop {
let x_39 : i32 = f;
let x_40 : i32 = x_6.x_GLF_uniform_int_values[0];
if ((x_39 < x_40)) {
} else {
break;
}
let x_41 : i32 = x_6.x_GLF_uniform_int_values[1];
g = x_41;
loop {
let x_42 : i32 = g;
let x_43 : i32 = x_6.x_GLF_uniform_int_values[6];
if ((x_42 < x_43)) {
} else {
break;
}
let x_44 : i32 = x_6.x_GLF_uniform_int_values[1];
h = x_44;
loop {
let x_45 : i32 = h;
let x_46 : i32 = x_6.x_GLF_uniform_int_values[0];
if ((x_45 < x_46)) {
} else {
break;
}
let x_47 : i32 = x_6.x_GLF_uniform_int_values[1];
i = x_47;
loop {
let x_48 : i32 = i;
let x_49 : i32 = x_6.x_GLF_uniform_int_values[4];
if ((x_48 < x_49)) {
} else {
break;
}
let x_50 : i32 = x_6.x_GLF_uniform_int_values[0];
j = x_50;
loop {
let x_51 : i32 = j;
let x_52 : i32 = x_6.x_GLF_uniform_int_values[1];
if ((x_51 > x_52)) {
} else {
break;
}
let x_53 : i32 = a;
let x_197 : f32 = x_8.x_GLF_uniform_float_values[2];
let x_199 : f32 = sums[x_53];
sums[x_53] = (x_199 + x_197);
continuing {
let x_54 : i32 = j;
j = (x_54 - 1);
}
}
continuing {
let x_56 : i32 = i;
i = (x_56 + 1);
}
}
continuing {
let x_58 : i32 = h;
h = (x_58 + 1);
}
}
continuing {
let x_60 : i32 = g;
g = (x_60 + 1);
}
}
continuing {
let x_62 : i32 = f;
f = (x_62 + 1);
}
}
continuing {
let x_64 : i32 = e;
e = (x_64 + 1);
}
}
continuing {
let x_66 : i32 = d;
d = (x_66 + 1);
}
}
continuing {
let x_68 : i32 = c;
c = (x_68 + 1);
}
}
continuing {
let x_70 : i32 = b;
b = (x_70 + 1);
}
}
continuing {
let x_72 : i32 = a;
a = (x_72 + 1);
}
}
let x_74 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_204 : f32 = sums[x_74];
let x_206 : f32 = x_8.x_GLF_uniform_float_values[1];
let x_207 : bool = (x_204 == x_206);
x_216_phi = x_207;
if (x_207) {
let x_75 : i32 = x_6.x_GLF_uniform_int_values[2];
let x_212 : f32 = sums[x_75];
let x_214 : f32 = x_8.x_GLF_uniform_float_values[1];
x_215 = (x_212 == x_214);
x_216_phi = x_215;
}
let x_216 : bool = x_216_phi;
if (x_216) {
let x_76 : i32 = x_6.x_GLF_uniform_int_values[2];
let x_77 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_78 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_79 : i32 = x_6.x_GLF_uniform_int_values[2];
x_GLF_color = vec4<f32>(f32(x_76), f32(x_77), f32(x_78), f32(x_79));
} else {
let x_80 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_230 : f32 = f32(x_80);
x_GLF_color = vec4<f32>(x_230, x_230, x_230, x_230);
}
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);
}

View File

@@ -0,0 +1,231 @@
type Arr = [[stride(16)]] array<i32, 7>;
[[block]]
struct buf0 {
x_GLF_uniform_int_values : Arr;
};
type Arr_1 = [[stride(16)]] array<f32, 3>;
[[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 sums : array<f32, 2>;
var a : i32;
var b : i32;
var c : i32;
var d : i32;
var e : i32;
var f : i32;
var g : i32;
var h : i32;
var i : i32;
var j : i32;
var x_215 : bool;
var x_216_phi : bool;
let x_20 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_110 : f32 = x_8.x_GLF_uniform_float_values[0];
sums[x_20] = x_110;
let x_22 : i32 = x_6.x_GLF_uniform_int_values[2];
let x_114 : f32 = x_8.x_GLF_uniform_float_values[0];
sums[x_22] = x_114;
let x_23 : i32 = x_6.x_GLF_uniform_int_values[1];
a = x_23;
loop {
let x_24 : i32 = a;
let x_25 : i32 = x_6.x_GLF_uniform_int_values[0];
if ((x_24 < x_25)) {
} else {
break;
}
let x_26 : i32 = x_6.x_GLF_uniform_int_values[5];
b = x_26;
loop {
let x_27 : i32 = b;
let x_28 : i32 = x_6.x_GLF_uniform_int_values[3];
if ((x_27 < x_28)) {
} else {
break;
}
let x_29 : i32 = x_6.x_GLF_uniform_int_values[6];
c = x_29;
loop {
let x_30 : i32 = c;
let x_31 : i32 = x_6.x_GLF_uniform_int_values[4];
if ((x_30 <= x_31)) {
} else {
break;
}
let x_32 : i32 = x_6.x_GLF_uniform_int_values[1];
d = x_32;
loop {
let x_33 : i32 = d;
let x_34 : i32 = x_6.x_GLF_uniform_int_values[6];
if ((x_33 < x_34)) {
} else {
break;
}
let x_35 : i32 = x_6.x_GLF_uniform_int_values[0];
e = x_35;
loop {
let x_36 : i32 = e;
let x_37 : i32 = x_6.x_GLF_uniform_int_values[4];
if ((x_36 <= x_37)) {
} else {
break;
}
let x_38 : i32 = x_6.x_GLF_uniform_int_values[1];
f = x_38;
loop {
let x_39 : i32 = f;
let x_40 : i32 = x_6.x_GLF_uniform_int_values[0];
if ((x_39 < x_40)) {
} else {
break;
}
let x_41 : i32 = x_6.x_GLF_uniform_int_values[1];
g = x_41;
loop {
let x_42 : i32 = g;
let x_43 : i32 = x_6.x_GLF_uniform_int_values[6];
if ((x_42 < x_43)) {
} else {
break;
}
let x_44 : i32 = x_6.x_GLF_uniform_int_values[1];
h = x_44;
loop {
let x_45 : i32 = h;
let x_46 : i32 = x_6.x_GLF_uniform_int_values[0];
if ((x_45 < x_46)) {
} else {
break;
}
let x_47 : i32 = x_6.x_GLF_uniform_int_values[1];
i = x_47;
loop {
let x_48 : i32 = i;
let x_49 : i32 = x_6.x_GLF_uniform_int_values[4];
if ((x_48 < x_49)) {
} else {
break;
}
let x_50 : i32 = x_6.x_GLF_uniform_int_values[0];
j = x_50;
loop {
let x_51 : i32 = j;
let x_52 : i32 = x_6.x_GLF_uniform_int_values[1];
if ((x_51 > x_52)) {
} else {
break;
}
let x_53 : i32 = a;
let x_197 : f32 = x_8.x_GLF_uniform_float_values[2];
let x_199 : f32 = sums[x_53];
sums[x_53] = (x_199 + x_197);
continuing {
let x_54 : i32 = j;
j = (x_54 - 1);
}
}
continuing {
let x_56 : i32 = i;
i = (x_56 + 1);
}
}
continuing {
let x_58 : i32 = h;
h = (x_58 + 1);
}
}
continuing {
let x_60 : i32 = g;
g = (x_60 + 1);
}
}
continuing {
let x_62 : i32 = f;
f = (x_62 + 1);
}
}
continuing {
let x_64 : i32 = e;
e = (x_64 + 1);
}
}
continuing {
let x_66 : i32 = d;
d = (x_66 + 1);
}
}
continuing {
let x_68 : i32 = c;
c = (x_68 + 1);
}
}
continuing {
let x_70 : i32 = b;
b = (x_70 + 1);
}
}
continuing {
let x_72 : i32 = a;
a = (x_72 + 1);
}
}
let x_74 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_204 : f32 = sums[x_74];
let x_206 : f32 = x_8.x_GLF_uniform_float_values[1];
let x_207 : bool = (x_204 == x_206);
x_216_phi = x_207;
if (x_207) {
let x_75 : i32 = x_6.x_GLF_uniform_int_values[2];
let x_212 : f32 = sums[x_75];
let x_214 : f32 = x_8.x_GLF_uniform_float_values[1];
x_215 = (x_212 == x_214);
x_216_phi = x_215;
}
let x_216 : bool = x_216_phi;
if (x_216) {
let x_76 : i32 = x_6.x_GLF_uniform_int_values[2];
let x_77 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_78 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_79 : i32 = x_6.x_GLF_uniform_int_values[2];
x_GLF_color = vec4<f32>(f32(x_76), f32(x_77), f32(x_78), f32(x_79));
} else {
let x_80 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_230 : f32 = f32(x_80);
x_GLF_color = vec4<f32>(x_230, x_230, x_230, x_230);
}
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);
}

View File

@@ -0,0 +1,208 @@
cbuffer cbuffer_x_6 : register(b0, space0) {
uint4 x_6[7];
};
cbuffer cbuffer_x_8 : register(b1, space0) {
uint4 x_8[3];
};
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void main_1() {
float sums[2] = (float[2])0;
int a = 0;
int b = 0;
int c = 0;
int d = 0;
int e = 0;
int f = 0;
int g = 0;
int h = 0;
int i = 0;
int j = 0;
bool x_215 = false;
bool x_216_phi = false;
const int x_20 = asint(x_6[1].x);
const uint scalar_offset = ((16u * uint(0))) / 4;
const float x_110 = asfloat(x_8[scalar_offset / 4][scalar_offset % 4]);
sums[x_20] = x_110;
const int x_22 = asint(x_6[2].x);
const uint scalar_offset_1 = ((16u * uint(0))) / 4;
const float x_114 = asfloat(x_8[scalar_offset_1 / 4][scalar_offset_1 % 4]);
sums[x_22] = x_114;
const int x_23 = asint(x_6[1].x);
a = x_23;
while (true) {
const int x_24 = a;
const uint scalar_offset_2 = ((16u * uint(0))) / 4;
const int x_25 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
if ((x_24 < x_25)) {
} else {
break;
}
const int x_26 = asint(x_6[5].x);
b = x_26;
while (true) {
const int x_27 = b;
const int x_28 = asint(x_6[3].x);
if ((x_27 < x_28)) {
} else {
break;
}
const int x_29 = asint(x_6[6].x);
c = x_29;
while (true) {
const int x_30 = c;
const int x_31 = asint(x_6[4].x);
if ((x_30 <= x_31)) {
} else {
break;
}
const int x_32 = asint(x_6[1].x);
d = x_32;
while (true) {
const int x_33 = d;
const int x_34 = asint(x_6[6].x);
if ((x_33 < x_34)) {
} else {
break;
}
const uint scalar_offset_3 = ((16u * uint(0))) / 4;
const int x_35 = asint(x_6[scalar_offset_3 / 4][scalar_offset_3 % 4]);
e = x_35;
while (true) {
const int x_36 = e;
const int x_37 = asint(x_6[4].x);
if ((x_36 <= x_37)) {
} else {
break;
}
const int x_38 = asint(x_6[1].x);
f = x_38;
while (true) {
const int x_39 = f;
const uint scalar_offset_4 = ((16u * uint(0))) / 4;
const int x_40 = asint(x_6[scalar_offset_4 / 4][scalar_offset_4 % 4]);
if ((x_39 < x_40)) {
} else {
break;
}
const int x_41 = asint(x_6[1].x);
g = x_41;
while (true) {
const int x_42 = g;
const int x_43 = asint(x_6[6].x);
if ((x_42 < x_43)) {
} else {
break;
}
const int x_44 = asint(x_6[1].x);
h = x_44;
while (true) {
const int x_45 = h;
const uint scalar_offset_5 = ((16u * uint(0))) / 4;
const int x_46 = asint(x_6[scalar_offset_5 / 4][scalar_offset_5 % 4]);
if ((x_45 < x_46)) {
} else {
break;
}
const int x_47 = asint(x_6[1].x);
i = x_47;
while (true) {
const int x_48 = i;
const int x_49 = asint(x_6[4].x);
if ((x_48 < x_49)) {
} else {
break;
}
const uint scalar_offset_6 = ((16u * uint(0))) / 4;
const int x_50 = asint(x_6[scalar_offset_6 / 4][scalar_offset_6 % 4]);
j = x_50;
while (true) {
const int x_51 = j;
const int x_52 = asint(x_6[1].x);
if ((x_51 > x_52)) {
} else {
break;
}
const int x_53 = a;
const float x_197 = asfloat(x_8[2].x);
const float x_199 = sums[x_53];
sums[x_53] = (x_199 + x_197);
{
j = (j - 1);
}
}
{
i = (i + 1);
}
}
{
h = (h + 1);
}
}
{
g = (g + 1);
}
}
{
f = (f + 1);
}
}
{
e = (e + 1);
}
}
{
d = (d + 1);
}
}
{
c = (c + 1);
}
}
{
b = (b + 1);
}
}
{
a = (a + 1);
}
}
const int x_74 = asint(x_6[1].x);
const float x_204 = sums[x_74];
const float x_206 = asfloat(x_8[1].x);
const bool x_207 = (x_204 == x_206);
x_216_phi = x_207;
if (x_207) {
const int x_75 = asint(x_6[2].x);
const float x_212 = sums[x_75];
const float x_214 = asfloat(x_8[1].x);
x_215 = (x_212 == x_214);
x_216_phi = x_215;
}
if (x_216_phi) {
const int x_76 = asint(x_6[2].x);
const int x_77 = asint(x_6[1].x);
const int x_78 = asint(x_6[1].x);
const int x_79 = asint(x_6[2].x);
x_GLF_color = float4(float(x_76), float(x_77), float(x_78), float(x_79));
} else {
const int x_80 = asint(x_6[1].x);
const float x_230 = float(x_80);
x_GLF_color = float4(x_230, x_230, x_230, x_230);
}
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;
}

View File

@@ -0,0 +1,232 @@
#include <metal_stdlib>
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[7];
};
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[3];
};
struct buf1 {
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_float_values;
};
struct tint_array_wrapper_2 {
float 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_6, constant buf1& x_8, thread float4* const tint_symbol_4) {
tint_array_wrapper_2 sums = {};
int a = 0;
int b = 0;
int c = 0;
int d = 0;
int e = 0;
int f = 0;
int g = 0;
int h = 0;
int i = 0;
int j = 0;
bool x_215 = false;
bool x_216_phi = false;
int const x_20 = x_6.x_GLF_uniform_int_values.arr[1].el;
float const x_110 = x_8.x_GLF_uniform_float_values.arr[0].el;
sums.arr[x_20] = x_110;
int const x_22 = x_6.x_GLF_uniform_int_values.arr[2].el;
float const x_114 = x_8.x_GLF_uniform_float_values.arr[0].el;
sums.arr[x_22] = x_114;
int const x_23 = x_6.x_GLF_uniform_int_values.arr[1].el;
a = x_23;
while (true) {
int const x_24 = a;
int const x_25 = x_6.x_GLF_uniform_int_values.arr[0].el;
if ((x_24 < x_25)) {
} else {
break;
}
int const x_26 = x_6.x_GLF_uniform_int_values.arr[5].el;
b = x_26;
while (true) {
int const x_27 = b;
int const x_28 = x_6.x_GLF_uniform_int_values.arr[3].el;
if ((x_27 < x_28)) {
} else {
break;
}
int const x_29 = x_6.x_GLF_uniform_int_values.arr[6].el;
c = x_29;
while (true) {
int const x_30 = c;
int const x_31 = x_6.x_GLF_uniform_int_values.arr[4].el;
if ((x_30 <= x_31)) {
} else {
break;
}
int const x_32 = x_6.x_GLF_uniform_int_values.arr[1].el;
d = x_32;
while (true) {
int const x_33 = d;
int const x_34 = x_6.x_GLF_uniform_int_values.arr[6].el;
if ((x_33 < x_34)) {
} else {
break;
}
int const x_35 = x_6.x_GLF_uniform_int_values.arr[0].el;
e = x_35;
while (true) {
int const x_36 = e;
int const x_37 = x_6.x_GLF_uniform_int_values.arr[4].el;
if ((x_36 <= x_37)) {
} else {
break;
}
int const x_38 = x_6.x_GLF_uniform_int_values.arr[1].el;
f = x_38;
while (true) {
int const x_39 = f;
int const x_40 = x_6.x_GLF_uniform_int_values.arr[0].el;
if ((x_39 < x_40)) {
} else {
break;
}
int const x_41 = x_6.x_GLF_uniform_int_values.arr[1].el;
g = x_41;
while (true) {
int const x_42 = g;
int const x_43 = x_6.x_GLF_uniform_int_values.arr[6].el;
if ((x_42 < x_43)) {
} else {
break;
}
int const x_44 = x_6.x_GLF_uniform_int_values.arr[1].el;
h = x_44;
while (true) {
int const x_45 = h;
int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el;
if ((x_45 < x_46)) {
} else {
break;
}
int const x_47 = x_6.x_GLF_uniform_int_values.arr[1].el;
i = x_47;
while (true) {
int const x_48 = i;
int const x_49 = x_6.x_GLF_uniform_int_values.arr[4].el;
if ((x_48 < x_49)) {
} else {
break;
}
int const x_50 = x_6.x_GLF_uniform_int_values.arr[0].el;
j = x_50;
while (true) {
int const x_51 = j;
int const x_52 = x_6.x_GLF_uniform_int_values.arr[1].el;
if ((x_51 > x_52)) {
} else {
break;
}
int const x_53 = a;
float const x_197 = x_8.x_GLF_uniform_float_values.arr[2].el;
float const x_199 = sums.arr[x_53];
sums.arr[x_53] = (x_199 + x_197);
{
int const x_54 = j;
j = (x_54 - 1);
}
}
{
int const x_56 = i;
i = (x_56 + 1);
}
}
{
int const x_58 = h;
h = (x_58 + 1);
}
}
{
int const x_60 = g;
g = (x_60 + 1);
}
}
{
int const x_62 = f;
f = (x_62 + 1);
}
}
{
int const x_64 = e;
e = (x_64 + 1);
}
}
{
int const x_66 = d;
d = (x_66 + 1);
}
}
{
int const x_68 = c;
c = (x_68 + 1);
}
}
{
int const x_70 = b;
b = (x_70 + 1);
}
}
{
int const x_72 = a;
a = (x_72 + 1);
}
}
int const x_74 = x_6.x_GLF_uniform_int_values.arr[1].el;
float const x_204 = sums.arr[x_74];
float const x_206 = x_8.x_GLF_uniform_float_values.arr[1].el;
bool const x_207 = (x_204 == x_206);
x_216_phi = x_207;
if (x_207) {
int const x_75 = x_6.x_GLF_uniform_int_values.arr[2].el;
float const x_212 = sums.arr[x_75];
float const x_214 = x_8.x_GLF_uniform_float_values.arr[1].el;
x_215 = (x_212 == x_214);
x_216_phi = x_215;
}
bool const x_216 = x_216_phi;
if (x_216) {
int const x_76 = x_6.x_GLF_uniform_int_values.arr[2].el;
int const x_77 = x_6.x_GLF_uniform_int_values.arr[1].el;
int const x_78 = x_6.x_GLF_uniform_int_values.arr[1].el;
int const x_79 = x_6.x_GLF_uniform_int_values.arr[2].el;
*(tint_symbol_4) = float4(float(x_76), float(x_77), float(x_78), float(x_79));
} else {
int const x_80 = x_6.x_GLF_uniform_int_values.arr[1].el;
float const x_230 = float(x_80);
*(tint_symbol_4) = float4(x_230, x_230, x_230, x_230);
}
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;
}

View File

@@ -0,0 +1,456 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 274
; Schema: 0
OpCapability Shader
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 %sums "sums"
OpName %a "a"
OpName %b "b"
OpName %c "c"
OpName %d "d"
OpName %e "e"
OpName %f "f"
OpName %g "g"
OpName %h "h"
OpName %i "i"
OpName %j "j"
OpName %x_215 "x_215"
OpName %x_216_phi "x_216_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_7 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_3 ArrayStride 16
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 1
OpDecorate %tint_symbol_1 Location 0
OpDecorate %_arr_float_uint_2 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_7 = OpConstant %uint 7
%_arr_int_uint_7 = OpTypeArray %int %uint_7
%buf0 = OpTypeStruct %_arr_int_uint_7
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%float = OpTypeFloat 32
%uint_3 = OpConstant %uint 3
%_arr_float_uint_3 = OpTypeArray %float %uint_3
%buf1 = OpTypeStruct %_arr_float_uint_3
%_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
%uint_2 = OpConstant %uint 2
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%_ptr_Function__arr_float_uint_2 = OpTypePointer Function %_arr_float_uint_2
%28 = OpConstantNull %_arr_float_uint_2
%_ptr_Function_int = OpTypePointer Function %int
%31 = OpConstantNull %int
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%44 = OpConstantNull %bool
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Function_float = OpTypePointer Function %float
%int_2 = OpConstant %int 2
%int_5 = OpConstant %int 5
%int_3 = OpConstant %int 3
%int_6 = OpConstant %int 6
%int_4 = OpConstant %int 4
%main_out = OpTypeStruct %v4float
%262 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%sums = OpVariable %_ptr_Function__arr_float_uint_2 Function %28
%a = OpVariable %_ptr_Function_int Function %31
%b = OpVariable %_ptr_Function_int Function %31
%c = OpVariable %_ptr_Function_int Function %31
%d = OpVariable %_ptr_Function_int Function %31
%e = OpVariable %_ptr_Function_int Function %31
%f = OpVariable %_ptr_Function_int Function %31
%g = OpVariable %_ptr_Function_int Function %31
%h = OpVariable %_ptr_Function_int Function %31
%i = OpVariable %_ptr_Function_int Function %31
%j = OpVariable %_ptr_Function_int Function %31
%x_215 = OpVariable %_ptr_Function_bool Function %44
%x_216_phi = OpVariable %_ptr_Function_bool Function %44
%49 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%50 = OpLoad %int %49
%53 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%54 = OpLoad %float %53
%56 = OpAccessChain %_ptr_Function_float %sums %50
OpStore %56 %54
%58 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%59 = OpLoad %int %58
%60 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%61 = OpLoad %float %60
%62 = OpAccessChain %_ptr_Function_float %sums %59
OpStore %62 %61
%63 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%64 = OpLoad %int %63
OpStore %a %64
OpBranch %65
%65 = OpLabel
OpLoopMerge %66 %67 None
OpBranch %68
%68 = OpLabel
%69 = OpLoad %int %a
%70 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%71 = OpLoad %int %70
%72 = OpSLessThan %bool %69 %71
OpSelectionMerge %73 None
OpBranchConditional %72 %74 %75
%74 = OpLabel
OpBranch %73
%75 = OpLabel
OpBranch %66
%73 = OpLabel
%77 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
%78 = OpLoad %int %77
OpStore %b %78
OpBranch %79
%79 = OpLabel
OpLoopMerge %80 %81 None
OpBranch %82
%82 = OpLabel
%83 = OpLoad %int %b
%85 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%86 = OpLoad %int %85
%87 = OpSLessThan %bool %83 %86
OpSelectionMerge %88 None
OpBranchConditional %87 %89 %90
%89 = OpLabel
OpBranch %88
%90 = OpLabel
OpBranch %80
%88 = OpLabel
%92 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
%93 = OpLoad %int %92
OpStore %c %93
OpBranch %94
%94 = OpLabel
OpLoopMerge %95 %96 None
OpBranch %97
%97 = OpLabel
%98 = OpLoad %int %c
%100 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%101 = OpLoad %int %100
%102 = OpSLessThanEqual %bool %98 %101
OpSelectionMerge %103 None
OpBranchConditional %102 %104 %105
%104 = OpLabel
OpBranch %103
%105 = OpLabel
OpBranch %95
%103 = OpLabel
%106 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%107 = OpLoad %int %106
OpStore %d %107
OpBranch %108
%108 = OpLabel
OpLoopMerge %109 %110 None
OpBranch %111
%111 = OpLabel
%112 = OpLoad %int %d
%113 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
%114 = OpLoad %int %113
%115 = OpSLessThan %bool %112 %114
OpSelectionMerge %116 None
OpBranchConditional %115 %117 %118
%117 = OpLabel
OpBranch %116
%118 = OpLabel
OpBranch %109
%116 = OpLabel
%119 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%120 = OpLoad %int %119
OpStore %e %120
OpBranch %121
%121 = OpLabel
OpLoopMerge %122 %123 None
OpBranch %124
%124 = OpLabel
%125 = OpLoad %int %e
%126 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%127 = OpLoad %int %126
%128 = OpSLessThanEqual %bool %125 %127
OpSelectionMerge %129 None
OpBranchConditional %128 %130 %131
%130 = OpLabel
OpBranch %129
%131 = OpLabel
OpBranch %122
%129 = OpLabel
%132 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%133 = OpLoad %int %132
OpStore %f %133
OpBranch %134
%134 = OpLabel
OpLoopMerge %135 %136 None
OpBranch %137
%137 = OpLabel
%138 = OpLoad %int %f
%139 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%140 = OpLoad %int %139
%141 = OpSLessThan %bool %138 %140
OpSelectionMerge %142 None
OpBranchConditional %141 %143 %144
%143 = OpLabel
OpBranch %142
%144 = OpLabel
OpBranch %135
%142 = OpLabel
%145 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%146 = OpLoad %int %145
OpStore %g %146
OpBranch %147
%147 = OpLabel
OpLoopMerge %148 %149 None
OpBranch %150
%150 = OpLabel
%151 = OpLoad %int %g
%152 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
%153 = OpLoad %int %152
%154 = OpSLessThan %bool %151 %153
OpSelectionMerge %155 None
OpBranchConditional %154 %156 %157
%156 = OpLabel
OpBranch %155
%157 = OpLabel
OpBranch %148
%155 = OpLabel
%158 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%159 = OpLoad %int %158
OpStore %h %159
OpBranch %160
%160 = OpLabel
OpLoopMerge %161 %162 None
OpBranch %163
%163 = OpLabel
%164 = OpLoad %int %h
%165 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%166 = OpLoad %int %165
%167 = OpSLessThan %bool %164 %166
OpSelectionMerge %168 None
OpBranchConditional %167 %169 %170
%169 = OpLabel
OpBranch %168
%170 = OpLabel
OpBranch %161
%168 = OpLabel
%171 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%172 = OpLoad %int %171
OpStore %i %172
OpBranch %173
%173 = OpLabel
OpLoopMerge %174 %175 None
OpBranch %176
%176 = OpLabel
%177 = OpLoad %int %i
%178 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%179 = OpLoad %int %178
%180 = OpSLessThan %bool %177 %179
OpSelectionMerge %181 None
OpBranchConditional %180 %182 %183
%182 = OpLabel
OpBranch %181
%183 = OpLabel
OpBranch %174
%181 = OpLabel
%184 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%185 = OpLoad %int %184
OpStore %j %185
OpBranch %186
%186 = OpLabel
OpLoopMerge %187 %188 None
OpBranch %189
%189 = OpLabel
%190 = OpLoad %int %j
%191 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%192 = OpLoad %int %191
%193 = OpSGreaterThan %bool %190 %192
OpSelectionMerge %194 None
OpBranchConditional %193 %195 %196
%195 = OpLabel
OpBranch %194
%196 = OpLabel
OpBranch %187
%194 = OpLabel
%197 = OpLoad %int %a
%198 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_2
%199 = OpLoad %float %198
%200 = OpAccessChain %_ptr_Function_float %sums %197
%201 = OpLoad %float %200
%202 = OpAccessChain %_ptr_Function_float %sums %197
%203 = OpFAdd %float %201 %199
OpStore %202 %203
OpBranch %188
%188 = OpLabel
%204 = OpLoad %int %j
%205 = OpISub %int %204 %int_1
OpStore %j %205
OpBranch %186
%187 = OpLabel
OpBranch %175
%175 = OpLabel
%206 = OpLoad %int %i
%207 = OpIAdd %int %206 %int_1
OpStore %i %207
OpBranch %173
%174 = OpLabel
OpBranch %162
%162 = OpLabel
%208 = OpLoad %int %h
%209 = OpIAdd %int %208 %int_1
OpStore %h %209
OpBranch %160
%161 = OpLabel
OpBranch %149
%149 = OpLabel
%210 = OpLoad %int %g
%211 = OpIAdd %int %210 %int_1
OpStore %g %211
OpBranch %147
%148 = OpLabel
OpBranch %136
%136 = OpLabel
%212 = OpLoad %int %f
%213 = OpIAdd %int %212 %int_1
OpStore %f %213
OpBranch %134
%135 = OpLabel
OpBranch %123
%123 = OpLabel
%214 = OpLoad %int %e
%215 = OpIAdd %int %214 %int_1
OpStore %e %215
OpBranch %121
%122 = OpLabel
OpBranch %110
%110 = OpLabel
%216 = OpLoad %int %d
%217 = OpIAdd %int %216 %int_1
OpStore %d %217
OpBranch %108
%109 = OpLabel
OpBranch %96
%96 = OpLabel
%218 = OpLoad %int %c
%219 = OpIAdd %int %218 %int_1
OpStore %c %219
OpBranch %94
%95 = OpLabel
OpBranch %81
%81 = OpLabel
%220 = OpLoad %int %b
%221 = OpIAdd %int %220 %int_1
OpStore %b %221
OpBranch %79
%80 = OpLabel
OpBranch %67
%67 = OpLabel
%222 = OpLoad %int %a
%223 = OpIAdd %int %222 %int_1
OpStore %a %223
OpBranch %65
%66 = OpLabel
%224 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%225 = OpLoad %int %224
%226 = OpAccessChain %_ptr_Function_float %sums %225
%227 = OpLoad %float %226
%228 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
%229 = OpLoad %float %228
%230 = OpFOrdEqual %bool %227 %229
OpStore %x_216_phi %230
OpSelectionMerge %231 None
OpBranchConditional %230 %232 %231
%232 = OpLabel
%233 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%234 = OpLoad %int %233
%235 = OpAccessChain %_ptr_Function_float %sums %234
%236 = OpLoad %float %235
%237 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
%238 = OpLoad %float %237
%239 = OpFOrdEqual %bool %236 %238
OpStore %x_215 %239
%240 = OpLoad %bool %x_215
OpStore %x_216_phi %240
OpBranch %231
%231 = OpLabel
%241 = OpLoad %bool %x_216_phi
OpSelectionMerge %242 None
OpBranchConditional %241 %243 %244
%243 = OpLabel
%245 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%246 = OpLoad %int %245
%247 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%248 = OpLoad %int %247
%249 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%250 = OpLoad %int %249
%251 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%252 = OpLoad %int %251
%253 = OpConvertSToF %float %246
%254 = OpConvertSToF %float %248
%255 = OpConvertSToF %float %250
%256 = OpConvertSToF %float %252
%257 = OpCompositeConstruct %v4float %253 %254 %255 %256
OpStore %x_GLF_color %257
OpBranch %242
%244 = OpLabel
%258 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%259 = OpLoad %int %258
%260 = OpConvertSToF %float %259
%261 = OpCompositeConstruct %v4float %260 %260 %260 %260
OpStore %x_GLF_color %261
OpBranch %242
%242 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %262
%tint_symbol = OpFunctionParameter %main_out
%266 = OpLabel
%267 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %267
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
%269 = OpLabel
%270 = OpFunctionCall %void %main_1
%272 = OpLoad %v4float %x_GLF_color
%273 = OpCompositeConstruct %main_out %272
%271 = OpFunctionCall %void %tint_symbol_2 %273
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,231 @@
type Arr = [[stride(16)]] array<i32, 7>;
[[block]]
struct buf0 {
x_GLF_uniform_int_values : Arr;
};
type Arr_1 = [[stride(16)]] array<f32, 3>;
[[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 sums : array<f32, 2>;
var a : i32;
var b : i32;
var c : i32;
var d : i32;
var e : i32;
var f : i32;
var g : i32;
var h : i32;
var i : i32;
var j : i32;
var x_215 : bool;
var x_216_phi : bool;
let x_20 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_110 : f32 = x_8.x_GLF_uniform_float_values[0];
sums[x_20] = x_110;
let x_22 : i32 = x_6.x_GLF_uniform_int_values[2];
let x_114 : f32 = x_8.x_GLF_uniform_float_values[0];
sums[x_22] = x_114;
let x_23 : i32 = x_6.x_GLF_uniform_int_values[1];
a = x_23;
loop {
let x_24 : i32 = a;
let x_25 : i32 = x_6.x_GLF_uniform_int_values[0];
if ((x_24 < x_25)) {
} else {
break;
}
let x_26 : i32 = x_6.x_GLF_uniform_int_values[5];
b = x_26;
loop {
let x_27 : i32 = b;
let x_28 : i32 = x_6.x_GLF_uniform_int_values[3];
if ((x_27 < x_28)) {
} else {
break;
}
let x_29 : i32 = x_6.x_GLF_uniform_int_values[6];
c = x_29;
loop {
let x_30 : i32 = c;
let x_31 : i32 = x_6.x_GLF_uniform_int_values[4];
if ((x_30 <= x_31)) {
} else {
break;
}
let x_32 : i32 = x_6.x_GLF_uniform_int_values[1];
d = x_32;
loop {
let x_33 : i32 = d;
let x_34 : i32 = x_6.x_GLF_uniform_int_values[6];
if ((x_33 < x_34)) {
} else {
break;
}
let x_35 : i32 = x_6.x_GLF_uniform_int_values[0];
e = x_35;
loop {
let x_36 : i32 = e;
let x_37 : i32 = x_6.x_GLF_uniform_int_values[4];
if ((x_36 <= x_37)) {
} else {
break;
}
let x_38 : i32 = x_6.x_GLF_uniform_int_values[1];
f = x_38;
loop {
let x_39 : i32 = f;
let x_40 : i32 = x_6.x_GLF_uniform_int_values[0];
if ((x_39 < x_40)) {
} else {
break;
}
let x_41 : i32 = x_6.x_GLF_uniform_int_values[1];
g = x_41;
loop {
let x_42 : i32 = g;
let x_43 : i32 = x_6.x_GLF_uniform_int_values[6];
if ((x_42 < x_43)) {
} else {
break;
}
let x_44 : i32 = x_6.x_GLF_uniform_int_values[1];
h = x_44;
loop {
let x_45 : i32 = h;
let x_46 : i32 = x_6.x_GLF_uniform_int_values[0];
if ((x_45 < x_46)) {
} else {
break;
}
let x_47 : i32 = x_6.x_GLF_uniform_int_values[1];
i = x_47;
loop {
let x_48 : i32 = i;
let x_49 : i32 = x_6.x_GLF_uniform_int_values[4];
if ((x_48 < x_49)) {
} else {
break;
}
let x_50 : i32 = x_6.x_GLF_uniform_int_values[0];
j = x_50;
loop {
let x_51 : i32 = j;
let x_52 : i32 = x_6.x_GLF_uniform_int_values[1];
if ((x_51 > x_52)) {
} else {
break;
}
let x_53 : i32 = a;
let x_197 : f32 = x_8.x_GLF_uniform_float_values[2];
let x_199 : f32 = sums[x_53];
sums[x_53] = (x_199 + x_197);
continuing {
let x_54 : i32 = j;
j = (x_54 - 1);
}
}
continuing {
let x_56 : i32 = i;
i = (x_56 + 1);
}
}
continuing {
let x_58 : i32 = h;
h = (x_58 + 1);
}
}
continuing {
let x_60 : i32 = g;
g = (x_60 + 1);
}
}
continuing {
let x_62 : i32 = f;
f = (x_62 + 1);
}
}
continuing {
let x_64 : i32 = e;
e = (x_64 + 1);
}
}
continuing {
let x_66 : i32 = d;
d = (x_66 + 1);
}
}
continuing {
let x_68 : i32 = c;
c = (x_68 + 1);
}
}
continuing {
let x_70 : i32 = b;
b = (x_70 + 1);
}
}
continuing {
let x_72 : i32 = a;
a = (x_72 + 1);
}
}
let x_74 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_204 : f32 = sums[x_74];
let x_206 : f32 = x_8.x_GLF_uniform_float_values[1];
let x_207 : bool = (x_204 == x_206);
x_216_phi = x_207;
if (x_207) {
let x_75 : i32 = x_6.x_GLF_uniform_int_values[2];
let x_212 : f32 = sums[x_75];
let x_214 : f32 = x_8.x_GLF_uniform_float_values[1];
x_215 = (x_212 == x_214);
x_216_phi = x_215;
}
let x_216 : bool = x_216_phi;
if (x_216) {
let x_76 : i32 = x_6.x_GLF_uniform_int_values[2];
let x_77 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_78 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_79 : i32 = x_6.x_GLF_uniform_int_values[2];
x_GLF_color = vec4<f32>(f32(x_76), f32(x_77), f32(x_78), f32(x_79));
} else {
let x_80 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_230 : f32 = f32(x_80);
x_GLF_color = vec4<f32>(x_230, x_230, x_230, x_230);
}
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);
}