mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 07:36:15 +00:00
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:
committed by
Tint LUCI CQ
parent
bd3edb564f
commit
f7e73d4ee3
248
test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm
Normal file
248
test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm
Normal file
@@ -0,0 +1,248 @@
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %_GLF_color
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpSource ESSL 320
|
||||
OpName %main "main"
|
||||
OpName %A "A"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "_GLF_uniform_int_values"
|
||||
OpName %_ ""
|
||||
OpName %ref "ref"
|
||||
OpName %a "a"
|
||||
OpName %i "i"
|
||||
OpName %ok "ok"
|
||||
OpName %i_0 "i"
|
||||
OpName %_GLF_color "_GLF_color"
|
||||
OpDecorate %_arr_int_uint_19 ArrayStride 16
|
||||
OpMemberDecorate %buf0 0 Offset 0
|
||||
OpDecorate %buf0 Block
|
||||
OpDecorate %_ DescriptorSet 0
|
||||
OpDecorate %_ Binding 0
|
||||
OpDecorate %_GLF_color Location 0
|
||||
%void = OpTypeVoid
|
||||
%14 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_17 = OpConstant %uint 17
|
||||
%_arr_int_uint_17 = OpTypeArray %int %uint_17
|
||||
%_ptr_Function__arr_int_uint_17 = OpTypePointer Function %_arr_int_uint_17
|
||||
%uint_19 = OpConstant %uint 19
|
||||
%_arr_int_uint_19 = OpTypeArray %int %uint_19
|
||||
%buf0 = OpTypeStruct %_arr_int_uint_19
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_2 = OpConstant %int 2
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%int_3 = OpConstant %int 3
|
||||
%int_4 = OpConstant %int 4
|
||||
%int_5 = OpConstant %int 5
|
||||
%int_6 = OpConstant %int 6
|
||||
%int_7 = OpConstant %int 7
|
||||
%int_8 = OpConstant %int 8
|
||||
%int_9 = OpConstant %int 9
|
||||
%int_10 = OpConstant %int 10
|
||||
%int_11 = OpConstant %int 11
|
||||
%int_12 = OpConstant %int 12
|
||||
%int_13 = OpConstant %int 13
|
||||
%int_14 = OpConstant %int 14
|
||||
%int_15 = OpConstant %int 15
|
||||
%int_16 = OpConstant %int 16
|
||||
%int_17 = OpConstant %int 17
|
||||
%int_18 = OpConstant %int 18
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%true = OpConstantTrue %bool
|
||||
%false = OpConstantFalse %bool
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%_GLF_color = OpVariable %_ptr_Output_v4float Output
|
||||
%main = OpFunction %void None %14
|
||||
%50 = OpLabel
|
||||
%A = OpVariable %_ptr_Function__arr_int_uint_17 Function
|
||||
%ref = OpVariable %_ptr_Function__arr_int_uint_17 Function
|
||||
%a = OpVariable %_ptr_Function_int Function
|
||||
%i = OpVariable %_ptr_Function_int Function
|
||||
%ok = OpVariable %_ptr_Function_bool Function
|
||||
%i_0 = OpVariable %_ptr_Function_int Function
|
||||
%51 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%52 = OpLoad %int %51
|
||||
%53 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%54 = OpLoad %int %53
|
||||
%55 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%56 = OpLoad %int %55
|
||||
%57 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%58 = OpLoad %int %57
|
||||
%59 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%60 = OpLoad %int %59
|
||||
%61 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%62 = OpLoad %int %61
|
||||
%63 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%64 = OpLoad %int %63
|
||||
%65 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%66 = OpLoad %int %65
|
||||
%67 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%68 = OpLoad %int %67
|
||||
%69 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%70 = OpLoad %int %69
|
||||
%71 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%72 = OpLoad %int %71
|
||||
%73 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%74 = OpLoad %int %73
|
||||
%75 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%76 = OpLoad %int %75
|
||||
%77 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%78 = OpLoad %int %77
|
||||
%79 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%80 = OpLoad %int %79
|
||||
%81 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%82 = OpLoad %int %81
|
||||
%83 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%84 = OpLoad %int %83
|
||||
%85 = OpCompositeConstruct %_arr_int_uint_17 %52 %54 %56 %58 %60 %62 %64 %66 %68 %70 %72 %74 %76 %78 %80 %82 %84
|
||||
OpStore %A %85
|
||||
%86 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
|
||||
%87 = OpLoad %int %86
|
||||
%88 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_4
|
||||
%89 = OpLoad %int %88
|
||||
%90 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_5
|
||||
%91 = OpLoad %int %90
|
||||
%92 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_6
|
||||
%93 = OpLoad %int %92
|
||||
%94 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_7
|
||||
%95 = OpLoad %int %94
|
||||
%96 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_8
|
||||
%97 = OpLoad %int %96
|
||||
%98 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_9
|
||||
%99 = OpLoad %int %98
|
||||
%100 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_10
|
||||
%101 = OpLoad %int %100
|
||||
%102 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_11
|
||||
%103 = OpLoad %int %102
|
||||
%104 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_12
|
||||
%105 = OpLoad %int %104
|
||||
%106 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_13
|
||||
%107 = OpLoad %int %106
|
||||
%108 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_14
|
||||
%109 = OpLoad %int %108
|
||||
%110 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_15
|
||||
%111 = OpLoad %int %110
|
||||
%112 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_16
|
||||
%113 = OpLoad %int %112
|
||||
%114 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_17
|
||||
%115 = OpLoad %int %114
|
||||
%116 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_18
|
||||
%117 = OpLoad %int %116
|
||||
%118 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%119 = OpLoad %int %118
|
||||
%120 = OpCompositeConstruct %_arr_int_uint_17 %87 %89 %91 %93 %95 %97 %99 %101 %103 %105 %107 %109 %111 %113 %115 %117 %119
|
||||
OpStore %ref %120
|
||||
%121 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%122 = OpLoad %int %121
|
||||
OpStore %a %122
|
||||
%123 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%124 = OpLoad %int %123
|
||||
OpStore %i %124
|
||||
OpBranch %125
|
||||
%125 = OpLabel
|
||||
OpLoopMerge %126 %127 None
|
||||
OpBranch %128
|
||||
%128 = OpLabel
|
||||
%129 = OpLoad %int %i
|
||||
%130 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%131 = OpLoad %int %130
|
||||
%132 = OpSLessThan %bool %129 %131
|
||||
OpBranchConditional %132 %133 %126
|
||||
%133 = OpLabel
|
||||
%134 = OpLoad %int %i
|
||||
%135 = OpLoad %int %a
|
||||
%136 = OpISub %int %135 %int_1
|
||||
OpStore %a %136
|
||||
%137 = OpAccessChain %_ptr_Function_int %A %134
|
||||
OpStore %137 %135
|
||||
%138 = OpLoad %int %i
|
||||
%139 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%140 = OpLoad %int %139
|
||||
%141 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_18
|
||||
%142 = OpLoad %int %141
|
||||
%143 = OpExtInst %int %1 SClamp %138 %140 %142
|
||||
%144 = OpLoad %int %i
|
||||
%145 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
|
||||
%146 = OpLoad %int %145
|
||||
%147 = OpIAdd %int %144 %146
|
||||
%148 = OpAccessChain %_ptr_Function_int %A %143
|
||||
OpStore %148 %147
|
||||
OpBranch %127
|
||||
%127 = OpLabel
|
||||
%149 = OpLoad %int %i
|
||||
%150 = OpIAdd %int %149 %int_1
|
||||
OpStore %i %150
|
||||
OpBranch %125
|
||||
%126 = OpLabel
|
||||
OpStore %ok %true
|
||||
%151 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%152 = OpLoad %int %151
|
||||
OpStore %i_0 %152
|
||||
OpBranch %153
|
||||
%153 = OpLabel
|
||||
OpLoopMerge %154 %155 None
|
||||
OpBranch %156
|
||||
%156 = OpLabel
|
||||
%157 = OpLoad %int %i_0
|
||||
%158 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%159 = OpLoad %int %158
|
||||
%160 = OpSLessThan %bool %157 %159
|
||||
OpBranchConditional %160 %161 %154
|
||||
%161 = OpLabel
|
||||
%162 = OpLoad %int %i_0
|
||||
%163 = OpAccessChain %_ptr_Function_int %A %162
|
||||
%164 = OpLoad %int %163
|
||||
%165 = OpLoad %int %i_0
|
||||
%166 = OpAccessChain %_ptr_Function_int %ref %165
|
||||
%167 = OpLoad %int %166
|
||||
%168 = OpINotEqual %bool %164 %167
|
||||
OpSelectionMerge %169 None
|
||||
OpBranchConditional %168 %170 %169
|
||||
%170 = OpLabel
|
||||
OpStore %ok %false
|
||||
OpBranch %169
|
||||
%169 = OpLabel
|
||||
OpBranch %155
|
||||
%155 = OpLabel
|
||||
%171 = OpLoad %int %i_0
|
||||
%172 = OpIAdd %int %171 %int_1
|
||||
OpStore %i_0 %172
|
||||
OpBranch %153
|
||||
%154 = OpLabel
|
||||
%173 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%174 = OpLoad %int %173
|
||||
%175 = OpConvertSToF %float %174
|
||||
%176 = OpCompositeConstruct %v4float %175 %175 %175 %175
|
||||
OpStore %_GLF_color %176
|
||||
%177 = OpLoad %bool %ok
|
||||
OpSelectionMerge %178 None
|
||||
OpBranchConditional %177 %179 %178
|
||||
%179 = OpLabel
|
||||
%180 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
|
||||
%181 = OpLoad %int %180
|
||||
%182 = OpConvertSToF %float %181
|
||||
%183 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%184 = OpLoad %int %183
|
||||
%185 = OpConvertSToF %float %184
|
||||
%186 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%187 = OpLoad %int %186
|
||||
%188 = OpConvertSToF %float %187
|
||||
%189 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
|
||||
%190 = OpLoad %int %189
|
||||
%191 = OpConvertSToF %float %190
|
||||
%192 = OpCompositeConstruct %v4float %182 %185 %188 %191
|
||||
OpStore %_GLF_color %192
|
||||
OpBranch %178
|
||||
%178 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,120 @@
|
||||
cbuffer cbuffer_x_6 : register(b0, space0) {
|
||||
uint4 x_6[19];
|
||||
};
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
int A[17] = (int[17])0;
|
||||
int ref[17] = (int[17])0;
|
||||
int a = 0;
|
||||
int i = 0;
|
||||
bool ok = false;
|
||||
int i_1 = 0;
|
||||
const int x_52 = asint(x_6[2].x);
|
||||
const int x_54 = asint(x_6[2].x);
|
||||
const int x_56 = asint(x_6[2].x);
|
||||
const int x_58 = asint(x_6[2].x);
|
||||
const int x_60 = asint(x_6[2].x);
|
||||
const int x_62 = asint(x_6[2].x);
|
||||
const int x_64 = asint(x_6[2].x);
|
||||
const int x_66 = asint(x_6[2].x);
|
||||
const int x_68 = asint(x_6[2].x);
|
||||
const int x_70 = asint(x_6[2].x);
|
||||
const int x_72 = asint(x_6[2].x);
|
||||
const int x_74 = asint(x_6[2].x);
|
||||
const int x_76 = asint(x_6[2].x);
|
||||
const int x_78 = asint(x_6[2].x);
|
||||
const int x_80 = asint(x_6[2].x);
|
||||
const int x_82 = asint(x_6[2].x);
|
||||
const int x_84 = asint(x_6[2].x);
|
||||
const int tint_symbol_3[17] = {x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84};
|
||||
A = tint_symbol_3;
|
||||
const int x_87 = asint(x_6[3].x);
|
||||
const int x_89 = asint(x_6[4].x);
|
||||
const int x_91 = asint(x_6[5].x);
|
||||
const int x_93 = asint(x_6[6].x);
|
||||
const int x_95 = asint(x_6[7].x);
|
||||
const int x_97 = asint(x_6[8].x);
|
||||
const int x_99 = asint(x_6[9].x);
|
||||
const int x_101 = asint(x_6[10].x);
|
||||
const int x_103 = asint(x_6[11].x);
|
||||
const int x_105 = asint(x_6[12].x);
|
||||
const int x_107 = asint(x_6[13].x);
|
||||
const int x_109 = asint(x_6[14].x);
|
||||
const int x_111 = asint(x_6[15].x);
|
||||
const int x_113 = asint(x_6[16].x);
|
||||
const int x_115 = asint(x_6[17].x);
|
||||
const int x_117 = asint(x_6[18].x);
|
||||
const int x_119 = asint(x_6[1].x);
|
||||
const int tint_symbol_4[17] = {x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119};
|
||||
ref = tint_symbol_4;
|
||||
const int x_122 = asint(x_6[2].x);
|
||||
a = x_122;
|
||||
const int x_124 = asint(x_6[2].x);
|
||||
i = x_124;
|
||||
while (true) {
|
||||
const int x_129 = i;
|
||||
const int x_131 = asint(x_6[1].x);
|
||||
if ((x_129 < x_131)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
const int x_134 = i;
|
||||
const int x_135 = a;
|
||||
a = (x_135 - 1);
|
||||
A[x_134] = x_135;
|
||||
const int x_138 = i;
|
||||
const int x_140 = asint(x_6[2].x);
|
||||
const int x_142 = asint(x_6[18].x);
|
||||
const int x_144 = i;
|
||||
const int x_146 = asint(x_6[3].x);
|
||||
A[clamp(x_138, x_140, x_142)] = (x_144 + x_146);
|
||||
{
|
||||
i = (i + 1);
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
const int x_152 = asint(x_6[2].x);
|
||||
i_1 = x_152;
|
||||
while (true) {
|
||||
const int x_157 = i_1;
|
||||
const int x_159 = asint(x_6[1].x);
|
||||
if ((x_157 < x_159)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
const int x_164 = A[i_1];
|
||||
const int x_167 = ref[i_1];
|
||||
if ((x_164 != x_167)) {
|
||||
ok = false;
|
||||
}
|
||||
{
|
||||
i_1 = (i_1 + 1);
|
||||
}
|
||||
}
|
||||
const int x_174 = asint(x_6[2].x);
|
||||
const float x_175 = float(x_174);
|
||||
x_GLF_color = float4(x_175, x_175, x_175, x_175);
|
||||
if (ok) {
|
||||
const int x_181 = asint(x_6[3].x);
|
||||
const int x_184 = asint(x_6[2].x);
|
||||
const int x_187 = asint(x_6[2].x);
|
||||
const int x_190 = asint(x_6[3].x);
|
||||
x_GLF_color = float4(float(x_181), float(x_184), float(x_187), float(x_190));
|
||||
}
|
||||
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_5 = {tint_symbol_1.x_GLF_color_1};
|
||||
return tint_symbol_5;
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
#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[19];
|
||||
};
|
||||
struct buf0 {
|
||||
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_int_values;
|
||||
};
|
||||
struct tint_array_wrapper_1 {
|
||||
int arr[17];
|
||||
};
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 x_GLF_color_1 [[color(0)]];
|
||||
};
|
||||
|
||||
void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) {
|
||||
tint_array_wrapper_1 A = {};
|
||||
tint_array_wrapper_1 ref = {};
|
||||
int a = 0;
|
||||
int i = 0;
|
||||
bool ok = false;
|
||||
int i_1 = 0;
|
||||
int const x_52 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_54 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_56 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_58 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_60 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_62 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_64 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_66 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_68 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_70 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_72 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_74 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_76 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_78 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_80 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_82 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_84 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84}};
|
||||
A = tint_symbol_3;
|
||||
int const x_87 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
||||
int const x_89 = x_6.x_GLF_uniform_int_values.arr[4].el;
|
||||
int const x_91 = x_6.x_GLF_uniform_int_values.arr[5].el;
|
||||
int const x_93 = x_6.x_GLF_uniform_int_values.arr[6].el;
|
||||
int const x_95 = x_6.x_GLF_uniform_int_values.arr[7].el;
|
||||
int const x_97 = x_6.x_GLF_uniform_int_values.arr[8].el;
|
||||
int const x_99 = x_6.x_GLF_uniform_int_values.arr[9].el;
|
||||
int const x_101 = x_6.x_GLF_uniform_int_values.arr[10].el;
|
||||
int const x_103 = x_6.x_GLF_uniform_int_values.arr[11].el;
|
||||
int const x_105 = x_6.x_GLF_uniform_int_values.arr[12].el;
|
||||
int const x_107 = x_6.x_GLF_uniform_int_values.arr[13].el;
|
||||
int const x_109 = x_6.x_GLF_uniform_int_values.arr[14].el;
|
||||
int const x_111 = x_6.x_GLF_uniform_int_values.arr[15].el;
|
||||
int const x_113 = x_6.x_GLF_uniform_int_values.arr[16].el;
|
||||
int const x_115 = x_6.x_GLF_uniform_int_values.arr[17].el;
|
||||
int const x_117 = x_6.x_GLF_uniform_int_values.arr[18].el;
|
||||
int const x_119 = x_6.x_GLF_uniform_int_values.arr[1].el;
|
||||
tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119}};
|
||||
ref = tint_symbol_4;
|
||||
int const x_122 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
a = x_122;
|
||||
int const x_124 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
i = x_124;
|
||||
while (true) {
|
||||
int const x_129 = i;
|
||||
int const x_131 = x_6.x_GLF_uniform_int_values.arr[1].el;
|
||||
if ((x_129 < x_131)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_134 = i;
|
||||
int const x_135 = a;
|
||||
a = (x_135 - 1);
|
||||
A.arr[x_134] = x_135;
|
||||
int const x_138 = i;
|
||||
int const x_140 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_142 = x_6.x_GLF_uniform_int_values.arr[18].el;
|
||||
int const x_144 = i;
|
||||
int const x_146 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
||||
A.arr[clamp(x_138, x_140, x_142)] = (x_144 + x_146);
|
||||
{
|
||||
int const x_149 = i;
|
||||
i = (x_149 + 1);
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
int const x_152 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
i_1 = x_152;
|
||||
while (true) {
|
||||
int const x_157 = i_1;
|
||||
int const x_159 = x_6.x_GLF_uniform_int_values.arr[1].el;
|
||||
if ((x_157 < x_159)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_162 = i_1;
|
||||
int const x_164 = A.arr[x_162];
|
||||
int const x_165 = i_1;
|
||||
int const x_167 = ref.arr[x_165];
|
||||
if ((x_164 != x_167)) {
|
||||
ok = false;
|
||||
}
|
||||
{
|
||||
int const x_171 = i_1;
|
||||
i_1 = (x_171 + 1);
|
||||
}
|
||||
}
|
||||
int const x_174 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
float const x_175 = float(x_174);
|
||||
*(tint_symbol_6) = float4(x_175, x_175, x_175, x_175);
|
||||
bool const x_177 = ok;
|
||||
if (x_177) {
|
||||
int const x_181 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
||||
int const x_184 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_187 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_190 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
||||
*(tint_symbol_6) = float4(float(x_181), float(x_184), float(x_187), float(x_190));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
|
||||
thread float4 tint_symbol_7 = 0.0f;
|
||||
main_1(x_6, &(tint_symbol_7));
|
||||
main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
|
||||
tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
|
||||
return tint_symbol_5;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,294 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 215
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%152 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %tint_symbol_1
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
|
||||
OpName %x_6 "x_6"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %A "A"
|
||||
OpName %ref "ref"
|
||||
OpName %a "a"
|
||||
OpName %i "i"
|
||||
OpName %ok "ok"
|
||||
OpName %i_1 "i_1"
|
||||
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_19 ArrayStride 16
|
||||
OpDecorate %x_6 NonWritable
|
||||
OpDecorate %x_6 DescriptorSet 0
|
||||
OpDecorate %x_6 Binding 0
|
||||
OpDecorate %tint_symbol_1 Location 0
|
||||
OpDecorate %_arr_int_uint_17 ArrayStride 4
|
||||
OpMemberDecorate %main_out 0 Offset 0
|
||||
%int = OpTypeInt 32 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_19 = OpConstant %uint 19
|
||||
%_arr_int_uint_19 = OpTypeArray %int %uint_19
|
||||
%buf0 = OpTypeStruct %_arr_int_uint_19
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%12 = OpConstantNull %v4float
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %12
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %12
|
||||
%void = OpTypeVoid
|
||||
%15 = OpTypeFunction %void
|
||||
%uint_17 = OpConstant %uint 17
|
||||
%_arr_int_uint_17 = OpTypeArray %int %uint_17
|
||||
%_ptr_Function__arr_int_uint_17 = OpTypePointer Function %_arr_int_uint_17
|
||||
%23 = OpConstantNull %_arr_int_uint_17
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%27 = OpConstantNull %int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%32 = OpConstantNull %bool
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%int_2 = OpConstant %int 2
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%int_3 = OpConstant %int 3
|
||||
%int_4 = OpConstant %int 4
|
||||
%int_5 = OpConstant %int 5
|
||||
%int_6 = OpConstant %int 6
|
||||
%int_7 = OpConstant %int 7
|
||||
%int_8 = OpConstant %int 8
|
||||
%int_9 = OpConstant %int 9
|
||||
%int_10 = OpConstant %int 10
|
||||
%int_11 = OpConstant %int 11
|
||||
%int_12 = OpConstant %int 12
|
||||
%int_13 = OpConstant %int 13
|
||||
%int_14 = OpConstant %int 14
|
||||
%int_15 = OpConstant %int 15
|
||||
%int_16 = OpConstant %int 16
|
||||
%int_17 = OpConstant %int 17
|
||||
%int_18 = OpConstant %int 18
|
||||
%int_1 = OpConstant %int 1
|
||||
%true = OpConstantTrue %bool
|
||||
%false = OpConstantFalse %bool
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%203 = OpTypeFunction %void %main_out
|
||||
%main_1 = OpFunction %void None %15
|
||||
%18 = OpLabel
|
||||
%A = OpVariable %_ptr_Function__arr_int_uint_17 Function %23
|
||||
%ref = OpVariable %_ptr_Function__arr_int_uint_17 Function %23
|
||||
%a = OpVariable %_ptr_Function_int Function %27
|
||||
%i = OpVariable %_ptr_Function_int Function %27
|
||||
%ok = OpVariable %_ptr_Function_bool Function %32
|
||||
%i_1 = OpVariable %_ptr_Function_int Function %27
|
||||
%37 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%38 = OpLoad %int %37
|
||||
%39 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%40 = OpLoad %int %39
|
||||
%41 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%42 = OpLoad %int %41
|
||||
%43 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%44 = OpLoad %int %43
|
||||
%45 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%46 = OpLoad %int %45
|
||||
%47 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%48 = OpLoad %int %47
|
||||
%49 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%50 = OpLoad %int %49
|
||||
%51 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%52 = OpLoad %int %51
|
||||
%53 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%54 = OpLoad %int %53
|
||||
%55 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%56 = OpLoad %int %55
|
||||
%57 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%58 = OpLoad %int %57
|
||||
%59 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%60 = OpLoad %int %59
|
||||
%61 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%62 = OpLoad %int %61
|
||||
%63 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%64 = OpLoad %int %63
|
||||
%65 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%66 = OpLoad %int %65
|
||||
%67 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%68 = OpLoad %int %67
|
||||
%69 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%70 = OpLoad %int %69
|
||||
%71 = OpCompositeConstruct %_arr_int_uint_17 %38 %40 %42 %44 %46 %48 %50 %52 %54 %56 %58 %60 %62 %64 %66 %68 %70
|
||||
OpStore %A %71
|
||||
%73 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%74 = OpLoad %int %73
|
||||
%76 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
|
||||
%77 = OpLoad %int %76
|
||||
%79 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
|
||||
%80 = OpLoad %int %79
|
||||
%82 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
|
||||
%83 = OpLoad %int %82
|
||||
%85 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_7
|
||||
%86 = OpLoad %int %85
|
||||
%88 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_8
|
||||
%89 = OpLoad %int %88
|
||||
%91 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_9
|
||||
%92 = OpLoad %int %91
|
||||
%94 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_10
|
||||
%95 = OpLoad %int %94
|
||||
%97 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%98 = OpLoad %int %97
|
||||
%100 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_12
|
||||
%101 = OpLoad %int %100
|
||||
%103 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_13
|
||||
%104 = OpLoad %int %103
|
||||
%106 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_14
|
||||
%107 = OpLoad %int %106
|
||||
%109 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_15
|
||||
%110 = OpLoad %int %109
|
||||
%112 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_16
|
||||
%113 = OpLoad %int %112
|
||||
%115 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_17
|
||||
%116 = OpLoad %int %115
|
||||
%118 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_18
|
||||
%119 = OpLoad %int %118
|
||||
%121 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
|
||||
%122 = OpLoad %int %121
|
||||
%123 = OpCompositeConstruct %_arr_int_uint_17 %74 %77 %80 %83 %86 %89 %92 %95 %98 %101 %104 %107 %110 %113 %116 %119 %122
|
||||
OpStore %ref %123
|
||||
%124 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%125 = OpLoad %int %124
|
||||
OpStore %a %125
|
||||
%126 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%127 = OpLoad %int %126
|
||||
OpStore %i %127
|
||||
OpBranch %128
|
||||
%128 = OpLabel
|
||||
OpLoopMerge %129 %130 None
|
||||
OpBranch %131
|
||||
%131 = OpLabel
|
||||
%132 = OpLoad %int %i
|
||||
%133 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
|
||||
%134 = OpLoad %int %133
|
||||
%135 = OpSLessThan %bool %132 %134
|
||||
OpSelectionMerge %136 None
|
||||
OpBranchConditional %135 %137 %138
|
||||
%137 = OpLabel
|
||||
OpBranch %136
|
||||
%138 = OpLabel
|
||||
OpBranch %129
|
||||
%136 = OpLabel
|
||||
%139 = OpLoad %int %i
|
||||
%140 = OpLoad %int %a
|
||||
%141 = OpISub %int %140 %int_1
|
||||
OpStore %a %141
|
||||
%142 = OpAccessChain %_ptr_Function_int %A %139
|
||||
OpStore %142 %140
|
||||
%143 = OpLoad %int %i
|
||||
%144 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%145 = OpLoad %int %144
|
||||
%146 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_18
|
||||
%147 = OpLoad %int %146
|
||||
%148 = OpLoad %int %i
|
||||
%149 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%150 = OpLoad %int %149
|
||||
%151 = OpExtInst %int %152 SClamp %143 %145 %147
|
||||
%153 = OpAccessChain %_ptr_Function_int %A %151
|
||||
%154 = OpIAdd %int %148 %150
|
||||
OpStore %153 %154
|
||||
OpBranch %130
|
||||
%130 = OpLabel
|
||||
%155 = OpLoad %int %i
|
||||
%156 = OpIAdd %int %155 %int_1
|
||||
OpStore %i %156
|
||||
OpBranch %128
|
||||
%129 = OpLabel
|
||||
OpStore %ok %true
|
||||
%158 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%159 = OpLoad %int %158
|
||||
OpStore %i_1 %159
|
||||
OpBranch %160
|
||||
%160 = OpLabel
|
||||
OpLoopMerge %161 %162 None
|
||||
OpBranch %163
|
||||
%163 = OpLabel
|
||||
%164 = OpLoad %int %i_1
|
||||
%165 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
|
||||
%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 = OpLoad %int %i_1
|
||||
%172 = OpAccessChain %_ptr_Function_int %A %171
|
||||
%173 = OpLoad %int %172
|
||||
%174 = OpLoad %int %i_1
|
||||
%175 = OpAccessChain %_ptr_Function_int %ref %174
|
||||
%176 = OpLoad %int %175
|
||||
%177 = OpINotEqual %bool %173 %176
|
||||
OpSelectionMerge %178 None
|
||||
OpBranchConditional %177 %179 %178
|
||||
%179 = OpLabel
|
||||
OpStore %ok %false
|
||||
OpBranch %178
|
||||
%178 = OpLabel
|
||||
OpBranch %162
|
||||
%162 = OpLabel
|
||||
%181 = OpLoad %int %i_1
|
||||
%182 = OpIAdd %int %181 %int_1
|
||||
OpStore %i_1 %182
|
||||
OpBranch %160
|
||||
%161 = OpLabel
|
||||
%183 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%184 = OpLoad %int %183
|
||||
%185 = OpConvertSToF %float %184
|
||||
%186 = OpCompositeConstruct %v4float %185 %185 %185 %185
|
||||
OpStore %x_GLF_color %186
|
||||
%187 = OpLoad %bool %ok
|
||||
OpSelectionMerge %188 None
|
||||
OpBranchConditional %187 %189 %188
|
||||
%189 = OpLabel
|
||||
%190 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%191 = OpLoad %int %190
|
||||
%192 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%193 = OpLoad %int %192
|
||||
%194 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%195 = OpLoad %int %194
|
||||
%196 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%197 = OpLoad %int %196
|
||||
%198 = OpConvertSToF %float %191
|
||||
%199 = OpConvertSToF %float %193
|
||||
%200 = OpConvertSToF %float %195
|
||||
%201 = OpConvertSToF %float %197
|
||||
%202 = OpCompositeConstruct %v4float %198 %199 %200 %201
|
||||
OpStore %x_GLF_color %202
|
||||
OpBranch %188
|
||||
%188 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %203
|
||||
%tint_symbol = OpFunctionParameter %main_out
|
||||
%207 = OpLabel
|
||||
%208 = OpCompositeExtract %v4float %tint_symbol 0
|
||||
OpStore %tint_symbol_1 %208
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %15
|
||||
%210 = OpLabel
|
||||
%211 = OpFunctionCall %void %main_1
|
||||
%213 = OpLoad %v4float %x_GLF_color
|
||||
%214 = OpCompositeConstruct %main_out %213
|
||||
%212 = OpFunctionCall %void %tint_symbol_2 %214
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,128 @@
|
||||
type Arr = [[stride(16)]] array<i32, 19>;
|
||||
|
||||
[[block]]
|
||||
struct buf0 {
|
||||
x_GLF_uniform_int_values : Arr;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<uniform> x_6 : buf0;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var A : array<i32, 17>;
|
||||
var ref : array<i32, 17>;
|
||||
var a : i32;
|
||||
var i : i32;
|
||||
var ok : bool;
|
||||
var i_1 : i32;
|
||||
let x_52 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_54 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_56 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_58 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_60 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_62 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_64 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_66 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_68 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_70 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_72 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_74 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_76 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_78 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_80 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_82 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_84 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
A = array<i32, 17>(x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84);
|
||||
let x_87 : i32 = x_6.x_GLF_uniform_int_values[3];
|
||||
let x_89 : i32 = x_6.x_GLF_uniform_int_values[4];
|
||||
let x_91 : i32 = x_6.x_GLF_uniform_int_values[5];
|
||||
let x_93 : i32 = x_6.x_GLF_uniform_int_values[6];
|
||||
let x_95 : i32 = x_6.x_GLF_uniform_int_values[7];
|
||||
let x_97 : i32 = x_6.x_GLF_uniform_int_values[8];
|
||||
let x_99 : i32 = x_6.x_GLF_uniform_int_values[9];
|
||||
let x_101 : i32 = x_6.x_GLF_uniform_int_values[10];
|
||||
let x_103 : i32 = x_6.x_GLF_uniform_int_values[11];
|
||||
let x_105 : i32 = x_6.x_GLF_uniform_int_values[12];
|
||||
let x_107 : i32 = x_6.x_GLF_uniform_int_values[13];
|
||||
let x_109 : i32 = x_6.x_GLF_uniform_int_values[14];
|
||||
let x_111 : i32 = x_6.x_GLF_uniform_int_values[15];
|
||||
let x_113 : i32 = x_6.x_GLF_uniform_int_values[16];
|
||||
let x_115 : i32 = x_6.x_GLF_uniform_int_values[17];
|
||||
let x_117 : i32 = x_6.x_GLF_uniform_int_values[18];
|
||||
let x_119 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
ref = array<i32, 17>(x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119);
|
||||
let x_122 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
a = x_122;
|
||||
let x_124 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
i = x_124;
|
||||
loop {
|
||||
let x_129 : i32 = i;
|
||||
let x_131 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
if ((x_129 < x_131)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_134 : i32 = i;
|
||||
let x_135 : i32 = a;
|
||||
a = (x_135 - 1);
|
||||
A[x_134] = x_135;
|
||||
let x_138 : i32 = i;
|
||||
let x_140 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_142 : i32 = x_6.x_GLF_uniform_int_values[18];
|
||||
let x_144 : i32 = i;
|
||||
let x_146 : i32 = x_6.x_GLF_uniform_int_values[3];
|
||||
A[clamp(x_138, x_140, x_142)] = (x_144 + x_146);
|
||||
|
||||
continuing {
|
||||
let x_149 : i32 = i;
|
||||
i = (x_149 + 1);
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
let x_152 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
i_1 = x_152;
|
||||
loop {
|
||||
let x_157 : i32 = i_1;
|
||||
let x_159 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
if ((x_157 < x_159)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_162 : i32 = i_1;
|
||||
let x_164 : i32 = A[x_162];
|
||||
let x_165 : i32 = i_1;
|
||||
let x_167 : i32 = ref[x_165];
|
||||
if ((x_164 != x_167)) {
|
||||
ok = false;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_171 : i32 = i_1;
|
||||
i_1 = (x_171 + 1);
|
||||
}
|
||||
}
|
||||
let x_174 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_175 : f32 = f32(x_174);
|
||||
x_GLF_color = vec4<f32>(x_175, x_175, x_175, x_175);
|
||||
let x_177 : bool = ok;
|
||||
if (x_177) {
|
||||
let x_181 : i32 = x_6.x_GLF_uniform_int_values[3];
|
||||
let x_184 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_187 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_190 : i32 = x_6.x_GLF_uniform_int_values[3];
|
||||
x_GLF_color = vec4<f32>(f32(x_181), f32(x_184), f32(x_187), f32(x_190));
|
||||
}
|
||||
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);
|
||||
}
|
||||
128
test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl
Normal file
128
test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl
Normal file
@@ -0,0 +1,128 @@
|
||||
type Arr = [[stride(16)]] array<i32, 19>;
|
||||
|
||||
[[block]]
|
||||
struct buf0 {
|
||||
x_GLF_uniform_int_values : Arr;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<uniform> x_6 : buf0;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var A : array<i32, 17>;
|
||||
var ref : array<i32, 17>;
|
||||
var a : i32;
|
||||
var i : i32;
|
||||
var ok : bool;
|
||||
var i_1 : i32;
|
||||
let x_52 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_54 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_56 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_58 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_60 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_62 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_64 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_66 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_68 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_70 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_72 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_74 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_76 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_78 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_80 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_82 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_84 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
A = array<i32, 17>(x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84);
|
||||
let x_87 : i32 = x_6.x_GLF_uniform_int_values[3];
|
||||
let x_89 : i32 = x_6.x_GLF_uniform_int_values[4];
|
||||
let x_91 : i32 = x_6.x_GLF_uniform_int_values[5];
|
||||
let x_93 : i32 = x_6.x_GLF_uniform_int_values[6];
|
||||
let x_95 : i32 = x_6.x_GLF_uniform_int_values[7];
|
||||
let x_97 : i32 = x_6.x_GLF_uniform_int_values[8];
|
||||
let x_99 : i32 = x_6.x_GLF_uniform_int_values[9];
|
||||
let x_101 : i32 = x_6.x_GLF_uniform_int_values[10];
|
||||
let x_103 : i32 = x_6.x_GLF_uniform_int_values[11];
|
||||
let x_105 : i32 = x_6.x_GLF_uniform_int_values[12];
|
||||
let x_107 : i32 = x_6.x_GLF_uniform_int_values[13];
|
||||
let x_109 : i32 = x_6.x_GLF_uniform_int_values[14];
|
||||
let x_111 : i32 = x_6.x_GLF_uniform_int_values[15];
|
||||
let x_113 : i32 = x_6.x_GLF_uniform_int_values[16];
|
||||
let x_115 : i32 = x_6.x_GLF_uniform_int_values[17];
|
||||
let x_117 : i32 = x_6.x_GLF_uniform_int_values[18];
|
||||
let x_119 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
ref = array<i32, 17>(x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119);
|
||||
let x_122 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
a = x_122;
|
||||
let x_124 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
i = x_124;
|
||||
loop {
|
||||
let x_129 : i32 = i;
|
||||
let x_131 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
if ((x_129 < x_131)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_134 : i32 = i;
|
||||
let x_135 : i32 = a;
|
||||
a = (x_135 - 1);
|
||||
A[x_134] = x_135;
|
||||
let x_138 : i32 = i;
|
||||
let x_140 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_142 : i32 = x_6.x_GLF_uniform_int_values[18];
|
||||
let x_144 : i32 = i;
|
||||
let x_146 : i32 = x_6.x_GLF_uniform_int_values[3];
|
||||
A[clamp(x_138, x_140, x_142)] = (x_144 + x_146);
|
||||
|
||||
continuing {
|
||||
let x_149 : i32 = i;
|
||||
i = (x_149 + 1);
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
let x_152 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
i_1 = x_152;
|
||||
loop {
|
||||
let x_157 : i32 = i_1;
|
||||
let x_159 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
if ((x_157 < x_159)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_162 : i32 = i_1;
|
||||
let x_164 : i32 = A[x_162];
|
||||
let x_165 : i32 = i_1;
|
||||
let x_167 : i32 = ref[x_165];
|
||||
if ((x_164 != x_167)) {
|
||||
ok = false;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_171 : i32 = i_1;
|
||||
i_1 = (x_171 + 1);
|
||||
}
|
||||
}
|
||||
let x_174 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_175 : f32 = f32(x_174);
|
||||
x_GLF_color = vec4<f32>(x_175, x_175, x_175, x_175);
|
||||
let x_177 : bool = ok;
|
||||
if (x_177) {
|
||||
let x_181 : i32 = x_6.x_GLF_uniform_int_values[3];
|
||||
let x_184 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_187 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_190 : i32 = x_6.x_GLF_uniform_int_values[3];
|
||||
x_GLF_color = vec4<f32>(f32(x_181), f32(x_184), f32(x_187), f32(x_190));
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
cbuffer cbuffer_x_6 : register(b0, space0) {
|
||||
uint4 x_6[19];
|
||||
};
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
int A[17] = (int[17])0;
|
||||
int ref[17] = (int[17])0;
|
||||
int a = 0;
|
||||
int i = 0;
|
||||
bool ok = false;
|
||||
int i_1 = 0;
|
||||
const int x_52 = asint(x_6[2].x);
|
||||
const int x_54 = asint(x_6[2].x);
|
||||
const int x_56 = asint(x_6[2].x);
|
||||
const int x_58 = asint(x_6[2].x);
|
||||
const int x_60 = asint(x_6[2].x);
|
||||
const int x_62 = asint(x_6[2].x);
|
||||
const int x_64 = asint(x_6[2].x);
|
||||
const int x_66 = asint(x_6[2].x);
|
||||
const int x_68 = asint(x_6[2].x);
|
||||
const int x_70 = asint(x_6[2].x);
|
||||
const int x_72 = asint(x_6[2].x);
|
||||
const int x_74 = asint(x_6[2].x);
|
||||
const int x_76 = asint(x_6[2].x);
|
||||
const int x_78 = asint(x_6[2].x);
|
||||
const int x_80 = asint(x_6[2].x);
|
||||
const int x_82 = asint(x_6[2].x);
|
||||
const int x_84 = asint(x_6[2].x);
|
||||
const int tint_symbol_3[17] = {x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84};
|
||||
A = tint_symbol_3;
|
||||
const int x_87 = asint(x_6[3].x);
|
||||
const int x_89 = asint(x_6[4].x);
|
||||
const int x_91 = asint(x_6[5].x);
|
||||
const int x_93 = asint(x_6[6].x);
|
||||
const int x_95 = asint(x_6[7].x);
|
||||
const int x_97 = asint(x_6[8].x);
|
||||
const int x_99 = asint(x_6[9].x);
|
||||
const int x_101 = asint(x_6[10].x);
|
||||
const int x_103 = asint(x_6[11].x);
|
||||
const int x_105 = asint(x_6[12].x);
|
||||
const int x_107 = asint(x_6[13].x);
|
||||
const int x_109 = asint(x_6[14].x);
|
||||
const int x_111 = asint(x_6[15].x);
|
||||
const int x_113 = asint(x_6[16].x);
|
||||
const int x_115 = asint(x_6[17].x);
|
||||
const int x_117 = asint(x_6[18].x);
|
||||
const int x_119 = asint(x_6[1].x);
|
||||
const int tint_symbol_4[17] = {x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119};
|
||||
ref = tint_symbol_4;
|
||||
const int x_122 = asint(x_6[2].x);
|
||||
a = x_122;
|
||||
const int x_124 = asint(x_6[2].x);
|
||||
i = x_124;
|
||||
while (true) {
|
||||
const int x_129 = i;
|
||||
const int x_131 = asint(x_6[1].x);
|
||||
if ((x_129 < x_131)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
const int x_134 = i;
|
||||
const int x_135 = a;
|
||||
a = (x_135 - 1);
|
||||
A[x_134] = x_135;
|
||||
const int x_138 = i;
|
||||
const int x_140 = asint(x_6[2].x);
|
||||
const int x_142 = asint(x_6[18].x);
|
||||
const int x_144 = i;
|
||||
const int x_146 = asint(x_6[3].x);
|
||||
A[clamp(x_138, x_140, x_142)] = (x_144 + x_146);
|
||||
{
|
||||
i = (i + 1);
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
const int x_152 = asint(x_6[2].x);
|
||||
i_1 = x_152;
|
||||
while (true) {
|
||||
const int x_157 = i_1;
|
||||
const int x_159 = asint(x_6[1].x);
|
||||
if ((x_157 < x_159)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
const int x_164 = A[i_1];
|
||||
const int x_167 = ref[i_1];
|
||||
if ((x_164 != x_167)) {
|
||||
ok = false;
|
||||
}
|
||||
{
|
||||
i_1 = (i_1 + 1);
|
||||
}
|
||||
}
|
||||
const int x_174 = asint(x_6[2].x);
|
||||
const float x_175 = float(x_174);
|
||||
x_GLF_color = float4(x_175, x_175, x_175, x_175);
|
||||
if (ok) {
|
||||
const int x_181 = asint(x_6[3].x);
|
||||
const int x_184 = asint(x_6[2].x);
|
||||
const int x_187 = asint(x_6[2].x);
|
||||
const int x_190 = asint(x_6[3].x);
|
||||
x_GLF_color = float4(float(x_181), float(x_184), float(x_187), float(x_190));
|
||||
}
|
||||
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_5 = {tint_symbol_1.x_GLF_color_1};
|
||||
return tint_symbol_5;
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
#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[19];
|
||||
};
|
||||
struct buf0 {
|
||||
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_int_values;
|
||||
};
|
||||
struct tint_array_wrapper_1 {
|
||||
int arr[17];
|
||||
};
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 x_GLF_color_1 [[color(0)]];
|
||||
};
|
||||
|
||||
void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) {
|
||||
tint_array_wrapper_1 A = {};
|
||||
tint_array_wrapper_1 ref = {};
|
||||
int a = 0;
|
||||
int i = 0;
|
||||
bool ok = false;
|
||||
int i_1 = 0;
|
||||
int const x_52 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_54 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_56 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_58 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_60 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_62 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_64 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_66 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_68 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_70 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_72 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_74 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_76 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_78 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_80 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_82 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_84 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84}};
|
||||
A = tint_symbol_3;
|
||||
int const x_87 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
||||
int const x_89 = x_6.x_GLF_uniform_int_values.arr[4].el;
|
||||
int const x_91 = x_6.x_GLF_uniform_int_values.arr[5].el;
|
||||
int const x_93 = x_6.x_GLF_uniform_int_values.arr[6].el;
|
||||
int const x_95 = x_6.x_GLF_uniform_int_values.arr[7].el;
|
||||
int const x_97 = x_6.x_GLF_uniform_int_values.arr[8].el;
|
||||
int const x_99 = x_6.x_GLF_uniform_int_values.arr[9].el;
|
||||
int const x_101 = x_6.x_GLF_uniform_int_values.arr[10].el;
|
||||
int const x_103 = x_6.x_GLF_uniform_int_values.arr[11].el;
|
||||
int const x_105 = x_6.x_GLF_uniform_int_values.arr[12].el;
|
||||
int const x_107 = x_6.x_GLF_uniform_int_values.arr[13].el;
|
||||
int const x_109 = x_6.x_GLF_uniform_int_values.arr[14].el;
|
||||
int const x_111 = x_6.x_GLF_uniform_int_values.arr[15].el;
|
||||
int const x_113 = x_6.x_GLF_uniform_int_values.arr[16].el;
|
||||
int const x_115 = x_6.x_GLF_uniform_int_values.arr[17].el;
|
||||
int const x_117 = x_6.x_GLF_uniform_int_values.arr[18].el;
|
||||
int const x_119 = x_6.x_GLF_uniform_int_values.arr[1].el;
|
||||
tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119}};
|
||||
ref = tint_symbol_4;
|
||||
int const x_122 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
a = x_122;
|
||||
int const x_124 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
i = x_124;
|
||||
while (true) {
|
||||
int const x_129 = i;
|
||||
int const x_131 = x_6.x_GLF_uniform_int_values.arr[1].el;
|
||||
if ((x_129 < x_131)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_134 = i;
|
||||
int const x_135 = a;
|
||||
a = (x_135 - 1);
|
||||
A.arr[x_134] = x_135;
|
||||
int const x_138 = i;
|
||||
int const x_140 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_142 = x_6.x_GLF_uniform_int_values.arr[18].el;
|
||||
int const x_144 = i;
|
||||
int const x_146 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
||||
A.arr[clamp(x_138, x_140, x_142)] = (x_144 + x_146);
|
||||
{
|
||||
int const x_149 = i;
|
||||
i = (x_149 + 1);
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
int const x_152 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
i_1 = x_152;
|
||||
while (true) {
|
||||
int const x_157 = i_1;
|
||||
int const x_159 = x_6.x_GLF_uniform_int_values.arr[1].el;
|
||||
if ((x_157 < x_159)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_162 = i_1;
|
||||
int const x_164 = A.arr[x_162];
|
||||
int const x_165 = i_1;
|
||||
int const x_167 = ref.arr[x_165];
|
||||
if ((x_164 != x_167)) {
|
||||
ok = false;
|
||||
}
|
||||
{
|
||||
int const x_171 = i_1;
|
||||
i_1 = (x_171 + 1);
|
||||
}
|
||||
}
|
||||
int const x_174 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
float const x_175 = float(x_174);
|
||||
*(tint_symbol_6) = float4(x_175, x_175, x_175, x_175);
|
||||
bool const x_177 = ok;
|
||||
if (x_177) {
|
||||
int const x_181 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
||||
int const x_184 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_187 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
||||
int const x_190 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
||||
*(tint_symbol_6) = float4(float(x_181), float(x_184), float(x_187), float(x_190));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
|
||||
thread float4 tint_symbol_7 = 0.0f;
|
||||
main_1(x_6, &(tint_symbol_7));
|
||||
main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
|
||||
tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
|
||||
return tint_symbol_5;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,294 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 215
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%152 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %tint_symbol_1
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
|
||||
OpName %x_6 "x_6"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %A "A"
|
||||
OpName %ref "ref"
|
||||
OpName %a "a"
|
||||
OpName %i "i"
|
||||
OpName %ok "ok"
|
||||
OpName %i_1 "i_1"
|
||||
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_19 ArrayStride 16
|
||||
OpDecorate %x_6 NonWritable
|
||||
OpDecorate %x_6 DescriptorSet 0
|
||||
OpDecorate %x_6 Binding 0
|
||||
OpDecorate %tint_symbol_1 Location 0
|
||||
OpDecorate %_arr_int_uint_17 ArrayStride 4
|
||||
OpMemberDecorate %main_out 0 Offset 0
|
||||
%int = OpTypeInt 32 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_19 = OpConstant %uint 19
|
||||
%_arr_int_uint_19 = OpTypeArray %int %uint_19
|
||||
%buf0 = OpTypeStruct %_arr_int_uint_19
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%12 = OpConstantNull %v4float
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %12
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %12
|
||||
%void = OpTypeVoid
|
||||
%15 = OpTypeFunction %void
|
||||
%uint_17 = OpConstant %uint 17
|
||||
%_arr_int_uint_17 = OpTypeArray %int %uint_17
|
||||
%_ptr_Function__arr_int_uint_17 = OpTypePointer Function %_arr_int_uint_17
|
||||
%23 = OpConstantNull %_arr_int_uint_17
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%27 = OpConstantNull %int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%32 = OpConstantNull %bool
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%int_2 = OpConstant %int 2
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%int_3 = OpConstant %int 3
|
||||
%int_4 = OpConstant %int 4
|
||||
%int_5 = OpConstant %int 5
|
||||
%int_6 = OpConstant %int 6
|
||||
%int_7 = OpConstant %int 7
|
||||
%int_8 = OpConstant %int 8
|
||||
%int_9 = OpConstant %int 9
|
||||
%int_10 = OpConstant %int 10
|
||||
%int_11 = OpConstant %int 11
|
||||
%int_12 = OpConstant %int 12
|
||||
%int_13 = OpConstant %int 13
|
||||
%int_14 = OpConstant %int 14
|
||||
%int_15 = OpConstant %int 15
|
||||
%int_16 = OpConstant %int 16
|
||||
%int_17 = OpConstant %int 17
|
||||
%int_18 = OpConstant %int 18
|
||||
%int_1 = OpConstant %int 1
|
||||
%true = OpConstantTrue %bool
|
||||
%false = OpConstantFalse %bool
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%203 = OpTypeFunction %void %main_out
|
||||
%main_1 = OpFunction %void None %15
|
||||
%18 = OpLabel
|
||||
%A = OpVariable %_ptr_Function__arr_int_uint_17 Function %23
|
||||
%ref = OpVariable %_ptr_Function__arr_int_uint_17 Function %23
|
||||
%a = OpVariable %_ptr_Function_int Function %27
|
||||
%i = OpVariable %_ptr_Function_int Function %27
|
||||
%ok = OpVariable %_ptr_Function_bool Function %32
|
||||
%i_1 = OpVariable %_ptr_Function_int Function %27
|
||||
%37 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%38 = OpLoad %int %37
|
||||
%39 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%40 = OpLoad %int %39
|
||||
%41 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%42 = OpLoad %int %41
|
||||
%43 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%44 = OpLoad %int %43
|
||||
%45 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%46 = OpLoad %int %45
|
||||
%47 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%48 = OpLoad %int %47
|
||||
%49 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%50 = OpLoad %int %49
|
||||
%51 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%52 = OpLoad %int %51
|
||||
%53 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%54 = OpLoad %int %53
|
||||
%55 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%56 = OpLoad %int %55
|
||||
%57 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%58 = OpLoad %int %57
|
||||
%59 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%60 = OpLoad %int %59
|
||||
%61 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%62 = OpLoad %int %61
|
||||
%63 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%64 = OpLoad %int %63
|
||||
%65 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%66 = OpLoad %int %65
|
||||
%67 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%68 = OpLoad %int %67
|
||||
%69 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%70 = OpLoad %int %69
|
||||
%71 = OpCompositeConstruct %_arr_int_uint_17 %38 %40 %42 %44 %46 %48 %50 %52 %54 %56 %58 %60 %62 %64 %66 %68 %70
|
||||
OpStore %A %71
|
||||
%73 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%74 = OpLoad %int %73
|
||||
%76 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
|
||||
%77 = OpLoad %int %76
|
||||
%79 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
|
||||
%80 = OpLoad %int %79
|
||||
%82 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
|
||||
%83 = OpLoad %int %82
|
||||
%85 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_7
|
||||
%86 = OpLoad %int %85
|
||||
%88 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_8
|
||||
%89 = OpLoad %int %88
|
||||
%91 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_9
|
||||
%92 = OpLoad %int %91
|
||||
%94 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_10
|
||||
%95 = OpLoad %int %94
|
||||
%97 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%98 = OpLoad %int %97
|
||||
%100 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_12
|
||||
%101 = OpLoad %int %100
|
||||
%103 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_13
|
||||
%104 = OpLoad %int %103
|
||||
%106 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_14
|
||||
%107 = OpLoad %int %106
|
||||
%109 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_15
|
||||
%110 = OpLoad %int %109
|
||||
%112 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_16
|
||||
%113 = OpLoad %int %112
|
||||
%115 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_17
|
||||
%116 = OpLoad %int %115
|
||||
%118 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_18
|
||||
%119 = OpLoad %int %118
|
||||
%121 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
|
||||
%122 = OpLoad %int %121
|
||||
%123 = OpCompositeConstruct %_arr_int_uint_17 %74 %77 %80 %83 %86 %89 %92 %95 %98 %101 %104 %107 %110 %113 %116 %119 %122
|
||||
OpStore %ref %123
|
||||
%124 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%125 = OpLoad %int %124
|
||||
OpStore %a %125
|
||||
%126 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%127 = OpLoad %int %126
|
||||
OpStore %i %127
|
||||
OpBranch %128
|
||||
%128 = OpLabel
|
||||
OpLoopMerge %129 %130 None
|
||||
OpBranch %131
|
||||
%131 = OpLabel
|
||||
%132 = OpLoad %int %i
|
||||
%133 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
|
||||
%134 = OpLoad %int %133
|
||||
%135 = OpSLessThan %bool %132 %134
|
||||
OpSelectionMerge %136 None
|
||||
OpBranchConditional %135 %137 %138
|
||||
%137 = OpLabel
|
||||
OpBranch %136
|
||||
%138 = OpLabel
|
||||
OpBranch %129
|
||||
%136 = OpLabel
|
||||
%139 = OpLoad %int %i
|
||||
%140 = OpLoad %int %a
|
||||
%141 = OpISub %int %140 %int_1
|
||||
OpStore %a %141
|
||||
%142 = OpAccessChain %_ptr_Function_int %A %139
|
||||
OpStore %142 %140
|
||||
%143 = OpLoad %int %i
|
||||
%144 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%145 = OpLoad %int %144
|
||||
%146 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_18
|
||||
%147 = OpLoad %int %146
|
||||
%148 = OpLoad %int %i
|
||||
%149 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%150 = OpLoad %int %149
|
||||
%151 = OpExtInst %int %152 SClamp %143 %145 %147
|
||||
%153 = OpAccessChain %_ptr_Function_int %A %151
|
||||
%154 = OpIAdd %int %148 %150
|
||||
OpStore %153 %154
|
||||
OpBranch %130
|
||||
%130 = OpLabel
|
||||
%155 = OpLoad %int %i
|
||||
%156 = OpIAdd %int %155 %int_1
|
||||
OpStore %i %156
|
||||
OpBranch %128
|
||||
%129 = OpLabel
|
||||
OpStore %ok %true
|
||||
%158 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%159 = OpLoad %int %158
|
||||
OpStore %i_1 %159
|
||||
OpBranch %160
|
||||
%160 = OpLabel
|
||||
OpLoopMerge %161 %162 None
|
||||
OpBranch %163
|
||||
%163 = OpLabel
|
||||
%164 = OpLoad %int %i_1
|
||||
%165 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
|
||||
%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 = OpLoad %int %i_1
|
||||
%172 = OpAccessChain %_ptr_Function_int %A %171
|
||||
%173 = OpLoad %int %172
|
||||
%174 = OpLoad %int %i_1
|
||||
%175 = OpAccessChain %_ptr_Function_int %ref %174
|
||||
%176 = OpLoad %int %175
|
||||
%177 = OpINotEqual %bool %173 %176
|
||||
OpSelectionMerge %178 None
|
||||
OpBranchConditional %177 %179 %178
|
||||
%179 = OpLabel
|
||||
OpStore %ok %false
|
||||
OpBranch %178
|
||||
%178 = OpLabel
|
||||
OpBranch %162
|
||||
%162 = OpLabel
|
||||
%181 = OpLoad %int %i_1
|
||||
%182 = OpIAdd %int %181 %int_1
|
||||
OpStore %i_1 %182
|
||||
OpBranch %160
|
||||
%161 = OpLabel
|
||||
%183 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%184 = OpLoad %int %183
|
||||
%185 = OpConvertSToF %float %184
|
||||
%186 = OpCompositeConstruct %v4float %185 %185 %185 %185
|
||||
OpStore %x_GLF_color %186
|
||||
%187 = OpLoad %bool %ok
|
||||
OpSelectionMerge %188 None
|
||||
OpBranchConditional %187 %189 %188
|
||||
%189 = OpLabel
|
||||
%190 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%191 = OpLoad %int %190
|
||||
%192 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%193 = OpLoad %int %192
|
||||
%194 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%195 = OpLoad %int %194
|
||||
%196 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%197 = OpLoad %int %196
|
||||
%198 = OpConvertSToF %float %191
|
||||
%199 = OpConvertSToF %float %193
|
||||
%200 = OpConvertSToF %float %195
|
||||
%201 = OpConvertSToF %float %197
|
||||
%202 = OpCompositeConstruct %v4float %198 %199 %200 %201
|
||||
OpStore %x_GLF_color %202
|
||||
OpBranch %188
|
||||
%188 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %203
|
||||
%tint_symbol = OpFunctionParameter %main_out
|
||||
%207 = OpLabel
|
||||
%208 = OpCompositeExtract %v4float %tint_symbol 0
|
||||
OpStore %tint_symbol_1 %208
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %15
|
||||
%210 = OpLabel
|
||||
%211 = OpFunctionCall %void %main_1
|
||||
%213 = OpLoad %v4float %x_GLF_color
|
||||
%214 = OpCompositeConstruct %main_out %213
|
||||
%212 = OpFunctionCall %void %tint_symbol_2 %214
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,128 @@
|
||||
type Arr = [[stride(16)]] array<i32, 19>;
|
||||
|
||||
[[block]]
|
||||
struct buf0 {
|
||||
x_GLF_uniform_int_values : Arr;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<uniform> x_6 : buf0;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var A : array<i32, 17>;
|
||||
var ref : array<i32, 17>;
|
||||
var a : i32;
|
||||
var i : i32;
|
||||
var ok : bool;
|
||||
var i_1 : i32;
|
||||
let x_52 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_54 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_56 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_58 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_60 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_62 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_64 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_66 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_68 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_70 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_72 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_74 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_76 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_78 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_80 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_82 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_84 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
A = array<i32, 17>(x_52, x_54, x_56, x_58, x_60, x_62, x_64, x_66, x_68, x_70, x_72, x_74, x_76, x_78, x_80, x_82, x_84);
|
||||
let x_87 : i32 = x_6.x_GLF_uniform_int_values[3];
|
||||
let x_89 : i32 = x_6.x_GLF_uniform_int_values[4];
|
||||
let x_91 : i32 = x_6.x_GLF_uniform_int_values[5];
|
||||
let x_93 : i32 = x_6.x_GLF_uniform_int_values[6];
|
||||
let x_95 : i32 = x_6.x_GLF_uniform_int_values[7];
|
||||
let x_97 : i32 = x_6.x_GLF_uniform_int_values[8];
|
||||
let x_99 : i32 = x_6.x_GLF_uniform_int_values[9];
|
||||
let x_101 : i32 = x_6.x_GLF_uniform_int_values[10];
|
||||
let x_103 : i32 = x_6.x_GLF_uniform_int_values[11];
|
||||
let x_105 : i32 = x_6.x_GLF_uniform_int_values[12];
|
||||
let x_107 : i32 = x_6.x_GLF_uniform_int_values[13];
|
||||
let x_109 : i32 = x_6.x_GLF_uniform_int_values[14];
|
||||
let x_111 : i32 = x_6.x_GLF_uniform_int_values[15];
|
||||
let x_113 : i32 = x_6.x_GLF_uniform_int_values[16];
|
||||
let x_115 : i32 = x_6.x_GLF_uniform_int_values[17];
|
||||
let x_117 : i32 = x_6.x_GLF_uniform_int_values[18];
|
||||
let x_119 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
ref = array<i32, 17>(x_87, x_89, x_91, x_93, x_95, x_97, x_99, x_101, x_103, x_105, x_107, x_109, x_111, x_113, x_115, x_117, x_119);
|
||||
let x_122 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
a = x_122;
|
||||
let x_124 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
i = x_124;
|
||||
loop {
|
||||
let x_129 : i32 = i;
|
||||
let x_131 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
if ((x_129 < x_131)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_134 : i32 = i;
|
||||
let x_135 : i32 = a;
|
||||
a = (x_135 - 1);
|
||||
A[x_134] = x_135;
|
||||
let x_138 : i32 = i;
|
||||
let x_140 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_142 : i32 = x_6.x_GLF_uniform_int_values[18];
|
||||
let x_144 : i32 = i;
|
||||
let x_146 : i32 = x_6.x_GLF_uniform_int_values[3];
|
||||
A[clamp(x_138, x_140, x_142)] = (x_144 + x_146);
|
||||
|
||||
continuing {
|
||||
let x_149 : i32 = i;
|
||||
i = (x_149 + 1);
|
||||
}
|
||||
}
|
||||
ok = true;
|
||||
let x_152 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
i_1 = x_152;
|
||||
loop {
|
||||
let x_157 : i32 = i_1;
|
||||
let x_159 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
if ((x_157 < x_159)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_162 : i32 = i_1;
|
||||
let x_164 : i32 = A[x_162];
|
||||
let x_165 : i32 = i_1;
|
||||
let x_167 : i32 = ref[x_165];
|
||||
if ((x_164 != x_167)) {
|
||||
ok = false;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_171 : i32 = i_1;
|
||||
i_1 = (x_171 + 1);
|
||||
}
|
||||
}
|
||||
let x_174 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_175 : f32 = f32(x_174);
|
||||
x_GLF_color = vec4<f32>(x_175, x_175, x_175, x_175);
|
||||
let x_177 : bool = ok;
|
||||
if (x_177) {
|
||||
let x_181 : i32 = x_6.x_GLF_uniform_int_values[3];
|
||||
let x_184 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_187 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_190 : i32 = x_6.x_GLF_uniform_int_values[3];
|
||||
x_GLF_color = vec4<f32>(f32(x_181), f32(x_184), f32(x_187), f32(x_190));
|
||||
}
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user