mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-15 08:06:19 +00:00
test: Remove many expected files
For these tests, we only really care that we can successfully consume them and generate valid output for each backend. Having the expected files in the tree generates significant churn for any change to how we generate backend code, which makes it hard to inspect diffs. Change-Id: Ic98c248081144c0fb1791f1303eaf6d459548e3d Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/62720 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: James Price <jrprice@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
568136dd10
commit
87cce20f67
@@ -1,120 +0,0 @@
|
||||
void set_float4(inout float4 vec, int idx, float val) {
|
||||
vec = (idx.xxxx == int4(0, 1, 2, 3)) ? val.xxxx : vec;
|
||||
}
|
||||
|
||||
static int x_GLF_global_loop_count = 0;
|
||||
cbuffer cbuffer_x_7 : register(b1, space0) {
|
||||
uint4 x_7[18];
|
||||
};
|
||||
cbuffer cbuffer_x_12 : register(b0, space0) {
|
||||
uint4 x_12[4];
|
||||
};
|
||||
cbuffer cbuffer_x_15 : register(b2, space0) {
|
||||
uint4 x_15[1];
|
||||
};
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
float4x4 m = float4x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
float4 v = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
float f = 0.0f;
|
||||
int a = 0;
|
||||
int b = 0;
|
||||
float zero = 0.0f;
|
||||
x_GLF_global_loop_count = 0;
|
||||
const float x_62 = asfloat(x_7[1].x);
|
||||
const float x_64 = asfloat(x_7[2].x);
|
||||
const float x_66 = asfloat(x_7[3].x);
|
||||
const float x_68 = asfloat(x_7[4].x);
|
||||
const float x_70 = asfloat(x_7[5].x);
|
||||
const float x_72 = asfloat(x_7[6].x);
|
||||
const float x_74 = asfloat(x_7[7].x);
|
||||
const float x_76 = asfloat(x_7[8].x);
|
||||
const float x_78 = asfloat(x_7[9].x);
|
||||
const float x_80 = asfloat(x_7[10].x);
|
||||
const float x_82 = asfloat(x_7[11].x);
|
||||
const float x_84 = asfloat(x_7[12].x);
|
||||
const float x_86 = asfloat(x_7[13].x);
|
||||
const float x_88 = asfloat(x_7[14].x);
|
||||
const float x_90 = asfloat(x_7[15].x);
|
||||
const float x_92 = asfloat(x_7[16].x);
|
||||
m = float4x4(float4(x_62, x_64, x_66, x_68), float4(x_70, x_72, x_74, x_76), float4(x_78, x_80, x_82, x_84), float4(x_86, x_88, x_90, x_92));
|
||||
const float x_99 = asfloat(x_7[1].x);
|
||||
const float x_101 = asfloat(x_7[2].x);
|
||||
const float x_103 = asfloat(x_7[3].x);
|
||||
const float x_105 = asfloat(x_7[4].x);
|
||||
v = float4(x_99, x_101, x_103, x_105);
|
||||
const float x_108 = asfloat(x_7[1].x);
|
||||
f = x_108;
|
||||
const uint scalar_offset = ((16u * uint(0))) / 4;
|
||||
const int x_110 = asint(x_12[scalar_offset / 4][scalar_offset % 4]);
|
||||
a = x_110;
|
||||
{
|
||||
for(; (x_GLF_global_loop_count < 10); a = (a + 1)) {
|
||||
x_GLF_global_loop_count = (x_GLF_global_loop_count + 1);
|
||||
const int x_121 = clamp(a, 0, 3);
|
||||
const float x_123 = asfloat(x_7[1].x);
|
||||
const float x_125 = v[x_121];
|
||||
set_float4(v, x_121, (x_125 + x_123));
|
||||
const int x_129 = asint(x_12[2].x);
|
||||
b = x_129;
|
||||
{
|
||||
for(; (x_GLF_global_loop_count < 10); b = (b - 1)) {
|
||||
x_GLF_global_loop_count = (x_GLF_global_loop_count + 1);
|
||||
const float x_142 = v[clamp(b, 0, 3)];
|
||||
const float x_147 = m[clamp(b, 0, 3)][a];
|
||||
f = (f + (x_142 * x_147));
|
||||
}
|
||||
}
|
||||
const int x_153 = a;
|
||||
const float x_156 = asfloat(x_7[1].x);
|
||||
set_float4(m[1], clamp(x_153, 0, 3), x_156);
|
||||
const int x_159 = asint(x_15[0].x);
|
||||
const uint scalar_offset_1 = ((16u * uint(0))) / 4;
|
||||
const int x_161 = asint(x_12[scalar_offset_1 / 4][scalar_offset_1 % 4]);
|
||||
if ((x_159 == x_161)) {
|
||||
discard;
|
||||
}
|
||||
const int x_166 = asint(x_15[0].x);
|
||||
const int x_168 = asint(x_12[1].x);
|
||||
if ((x_166 == x_168)) {
|
||||
discard;
|
||||
}
|
||||
}
|
||||
}
|
||||
const uint scalar_offset_2 = ((16u * uint(0))) / 4;
|
||||
const float x_175 = asfloat(x_7[scalar_offset_2 / 4][scalar_offset_2 % 4]);
|
||||
zero = x_175;
|
||||
const float x_176 = f;
|
||||
const float x_178 = asfloat(x_7[17].x);
|
||||
if (!((x_176 == x_178))) {
|
||||
const float x_183 = asfloat(x_7[1].x);
|
||||
zero = x_183;
|
||||
}
|
||||
const float x_184 = f;
|
||||
const float x_185 = zero;
|
||||
const uint scalar_offset_3 = ((16u * uint(0))) / 4;
|
||||
const int x_187 = asint(x_12[scalar_offset_3 / 4][scalar_offset_3 % 4]);
|
||||
x_GLF_color = float4(x_184, x_185, float(x_187), f);
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol {
|
||||
float4 x_GLF_color_1 : SV_Target0;
|
||||
};
|
||||
|
||||
main_out main_inner() {
|
||||
main_1();
|
||||
const main_out tint_symbol_4 = {x_GLF_color};
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
tint_symbol main() {
|
||||
const main_out inner_result = main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_padded_array_element {
|
||||
/* 0x0000 */ float el;
|
||||
/* 0x0004 */ int8_t tint_pad[12];
|
||||
};
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ tint_padded_array_element arr[18];
|
||||
};
|
||||
struct buf1 {
|
||||
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_float_values;
|
||||
};
|
||||
struct tint_padded_array_element_1 {
|
||||
/* 0x0000 */ int el;
|
||||
/* 0x0004 */ int8_t tint_pad_1[12];
|
||||
};
|
||||
struct tint_array_wrapper_1 {
|
||||
/* 0x0000 */ tint_padded_array_element_1 arr[4];
|
||||
};
|
||||
struct buf0 {
|
||||
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_int_values;
|
||||
};
|
||||
struct buf2 {
|
||||
/* 0x0000 */ int one;
|
||||
};
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 x_GLF_color_1 [[color(0)]];
|
||||
};
|
||||
|
||||
void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
|
||||
float4x4 m = float4x4(0.0f);
|
||||
float4 v = 0.0f;
|
||||
float f = 0.0f;
|
||||
int a = 0;
|
||||
int b = 0;
|
||||
float zero = 0.0f;
|
||||
*(tint_symbol_3) = 0;
|
||||
float const x_62 = x_7.x_GLF_uniform_float_values.arr[1].el;
|
||||
float const x_64 = x_7.x_GLF_uniform_float_values.arr[2].el;
|
||||
float const x_66 = x_7.x_GLF_uniform_float_values.arr[3].el;
|
||||
float const x_68 = x_7.x_GLF_uniform_float_values.arr[4].el;
|
||||
float const x_70 = x_7.x_GLF_uniform_float_values.arr[5].el;
|
||||
float const x_72 = x_7.x_GLF_uniform_float_values.arr[6].el;
|
||||
float const x_74 = x_7.x_GLF_uniform_float_values.arr[7].el;
|
||||
float const x_76 = x_7.x_GLF_uniform_float_values.arr[8].el;
|
||||
float const x_78 = x_7.x_GLF_uniform_float_values.arr[9].el;
|
||||
float const x_80 = x_7.x_GLF_uniform_float_values.arr[10].el;
|
||||
float const x_82 = x_7.x_GLF_uniform_float_values.arr[11].el;
|
||||
float const x_84 = x_7.x_GLF_uniform_float_values.arr[12].el;
|
||||
float const x_86 = x_7.x_GLF_uniform_float_values.arr[13].el;
|
||||
float const x_88 = x_7.x_GLF_uniform_float_values.arr[14].el;
|
||||
float const x_90 = x_7.x_GLF_uniform_float_values.arr[15].el;
|
||||
float const x_92 = x_7.x_GLF_uniform_float_values.arr[16].el;
|
||||
m = float4x4(float4(x_62, x_64, x_66, x_68), float4(x_70, x_72, x_74, x_76), float4(x_78, x_80, x_82, x_84), float4(x_86, x_88, x_90, x_92));
|
||||
float const x_99 = x_7.x_GLF_uniform_float_values.arr[1].el;
|
||||
float const x_101 = x_7.x_GLF_uniform_float_values.arr[2].el;
|
||||
float const x_103 = x_7.x_GLF_uniform_float_values.arr[3].el;
|
||||
float const x_105 = x_7.x_GLF_uniform_float_values.arr[4].el;
|
||||
v = float4(x_99, x_101, x_103, x_105);
|
||||
float const x_108 = x_7.x_GLF_uniform_float_values.arr[1].el;
|
||||
f = x_108;
|
||||
int const x_110 = x_12.x_GLF_uniform_int_values.arr[0].el;
|
||||
a = x_110;
|
||||
while (true) {
|
||||
int const x_115 = *(tint_symbol_3);
|
||||
if ((x_115 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_118 = *(tint_symbol_3);
|
||||
*(tint_symbol_3) = as_type<int>((as_type<uint>(x_118) + as_type<uint>(1)));
|
||||
int const x_120 = a;
|
||||
int const x_121 = clamp(x_120, 0, 3);
|
||||
float const x_123 = x_7.x_GLF_uniform_float_values.arr[1].el;
|
||||
float const x_125 = v[x_121];
|
||||
v[x_121] = (x_125 + x_123);
|
||||
int const x_129 = x_12.x_GLF_uniform_int_values.arr[2].el;
|
||||
b = x_129;
|
||||
while (true) {
|
||||
int const x_134 = *(tint_symbol_3);
|
||||
if ((x_134 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_137 = *(tint_symbol_3);
|
||||
*(tint_symbol_3) = as_type<int>((as_type<uint>(x_137) + as_type<uint>(1)));
|
||||
int const x_139 = b;
|
||||
float const x_142 = v[clamp(x_139, 0, 3)];
|
||||
int const x_143 = b;
|
||||
int const x_145 = a;
|
||||
float const x_147 = m[clamp(x_143, 0, 3)][x_145];
|
||||
float const x_149 = f;
|
||||
f = (x_149 + (x_142 * x_147));
|
||||
{
|
||||
int const x_151 = b;
|
||||
b = as_type<int>((as_type<uint>(x_151) - as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
int const x_153 = a;
|
||||
float const x_156 = x_7.x_GLF_uniform_float_values.arr[1].el;
|
||||
m[1][clamp(x_153, 0, 3)] = x_156;
|
||||
int const x_159 = x_15.one;
|
||||
int const x_161 = x_12.x_GLF_uniform_int_values.arr[0].el;
|
||||
if ((x_159 == x_161)) {
|
||||
discard_fragment();
|
||||
}
|
||||
int const x_166 = x_15.one;
|
||||
int const x_168 = x_12.x_GLF_uniform_int_values.arr[1].el;
|
||||
if ((x_166 == x_168)) {
|
||||
discard_fragment();
|
||||
}
|
||||
{
|
||||
int const x_172 = a;
|
||||
a = as_type<int>((as_type<uint>(x_172) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
float const x_175 = x_7.x_GLF_uniform_float_values.arr[0].el;
|
||||
zero = x_175;
|
||||
float const x_176 = f;
|
||||
float const x_178 = x_7.x_GLF_uniform_float_values.arr[17].el;
|
||||
if (!((x_176 == x_178))) {
|
||||
float const x_183 = x_7.x_GLF_uniform_float_values.arr[1].el;
|
||||
zero = x_183;
|
||||
}
|
||||
float const x_184 = f;
|
||||
float const x_185 = zero;
|
||||
int const x_187 = x_12.x_GLF_uniform_int_values.arr[0].el;
|
||||
float const x_189 = f;
|
||||
*(tint_symbol_4) = float4(x_184, x_185, float(x_187), x_189);
|
||||
return;
|
||||
}
|
||||
|
||||
main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
|
||||
main_1(x_7, x_12, x_15, tint_symbol_5, tint_symbol_6);
|
||||
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
|
||||
return tint_symbol_2;
|
||||
}
|
||||
|
||||
fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]], constant buf2& x_15 [[buffer(2)]]) {
|
||||
thread int tint_symbol_7 = 0;
|
||||
thread float4 tint_symbol_8 = 0.0f;
|
||||
main_out const inner_result = tint_symbol_inner(x_7, x_12, x_15, &(tint_symbol_7), &(tint_symbol_8));
|
||||
tint_symbol_1 wrapper_result = {};
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
@@ -1,312 +0,0 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 212
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%127 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
|
||||
OpName %x_GLF_global_loop_count "x_GLF_global_loop_count"
|
||||
OpName %buf1 "buf1"
|
||||
OpMemberName %buf1 0 "x_GLF_uniform_float_values"
|
||||
OpName %x_7 "x_7"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
|
||||
OpName %x_12 "x_12"
|
||||
OpName %buf2 "buf2"
|
||||
OpMemberName %buf2 0 "one"
|
||||
OpName %x_15 "x_15"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %m "m"
|
||||
OpName %v "v"
|
||||
OpName %f "f"
|
||||
OpName %a "a"
|
||||
OpName %b "b"
|
||||
OpName %zero "zero"
|
||||
OpName %main_out "main_out"
|
||||
OpMemberName %main_out 0 "x_GLF_color_1"
|
||||
OpName %main_inner "main_inner"
|
||||
OpName %main "main"
|
||||
OpDecorate %x_GLF_color_1_1 Location 0
|
||||
OpDecorate %buf1 Block
|
||||
OpMemberDecorate %buf1 0 Offset 0
|
||||
OpDecorate %_arr_float_uint_18 ArrayStride 16
|
||||
OpDecorate %x_7 NonWritable
|
||||
OpDecorate %x_7 DescriptorSet 0
|
||||
OpDecorate %x_7 Binding 1
|
||||
OpDecorate %buf0 Block
|
||||
OpMemberDecorate %buf0 0 Offset 0
|
||||
OpDecorate %_arr_int_uint_4 ArrayStride 16
|
||||
OpDecorate %x_12 NonWritable
|
||||
OpDecorate %x_12 DescriptorSet 0
|
||||
OpDecorate %x_12 Binding 0
|
||||
OpDecorate %buf2 Block
|
||||
OpMemberDecorate %buf2 0 Offset 0
|
||||
OpDecorate %x_15 NonWritable
|
||||
OpDecorate %x_15 DescriptorSet 0
|
||||
OpDecorate %x_15 Binding 2
|
||||
OpMemberDecorate %main_out 0 Offset 0
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Private_int = OpTypePointer Private %int
|
||||
%9 = OpConstantNull %int
|
||||
%x_GLF_global_loop_count = OpVariable %_ptr_Private_int Private %9
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_18 = OpConstant %uint 18
|
||||
%_arr_float_uint_18 = OpTypeArray %float %uint_18
|
||||
%buf1 = OpTypeStruct %_arr_float_uint_18
|
||||
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
|
||||
%x_7 = OpVariable %_ptr_Uniform_buf1 Uniform
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_int_uint_4 = OpTypeArray %int %uint_4
|
||||
%buf0 = OpTypeStruct %_arr_int_uint_4
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%x_12 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%buf2 = OpTypeStruct %int
|
||||
%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
|
||||
%x_15 = OpVariable %_ptr_Uniform_buf2 Uniform
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
|
||||
%void = OpTypeVoid
|
||||
%26 = OpTypeFunction %void
|
||||
%mat4v4float = OpTypeMatrix %v4float 4
|
||||
%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float
|
||||
%33 = OpConstantNull %mat4v4float
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%38 = OpConstantNull %float
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%int_0 = OpConstant %int 0
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%int_2 = OpConstant %int 2
|
||||
%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
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%bool = OpTypeBool
|
||||
%int_17 = OpConstant %int 17
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%201 = OpTypeFunction %main_out
|
||||
%main_1 = OpFunction %void None %26
|
||||
%29 = OpLabel
|
||||
%m = OpVariable %_ptr_Function_mat4v4float Function %33
|
||||
%v = OpVariable %_ptr_Function_v4float Function %5
|
||||
%f = OpVariable %_ptr_Function_float Function %38
|
||||
%a = OpVariable %_ptr_Function_int Function %9
|
||||
%b = OpVariable %_ptr_Function_int Function %9
|
||||
%zero = OpVariable %_ptr_Function_float Function %38
|
||||
OpStore %x_GLF_global_loop_count %int_0
|
||||
%47 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
|
||||
%48 = OpLoad %float %47
|
||||
%50 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_2
|
||||
%51 = OpLoad %float %50
|
||||
%53 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_3
|
||||
%54 = OpLoad %float %53
|
||||
%56 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_4
|
||||
%57 = OpLoad %float %56
|
||||
%59 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_5
|
||||
%60 = OpLoad %float %59
|
||||
%62 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_6
|
||||
%63 = OpLoad %float %62
|
||||
%65 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_7
|
||||
%66 = OpLoad %float %65
|
||||
%68 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_8
|
||||
%69 = OpLoad %float %68
|
||||
%71 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_9
|
||||
%72 = OpLoad %float %71
|
||||
%74 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_10
|
||||
%75 = OpLoad %float %74
|
||||
%77 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_11
|
||||
%78 = OpLoad %float %77
|
||||
%80 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_12
|
||||
%81 = OpLoad %float %80
|
||||
%83 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_13
|
||||
%84 = OpLoad %float %83
|
||||
%86 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_14
|
||||
%87 = OpLoad %float %86
|
||||
%89 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_15
|
||||
%90 = OpLoad %float %89
|
||||
%92 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_16
|
||||
%93 = OpLoad %float %92
|
||||
%94 = OpCompositeConstruct %v4float %48 %51 %54 %57
|
||||
%95 = OpCompositeConstruct %v4float %60 %63 %66 %69
|
||||
%96 = OpCompositeConstruct %v4float %72 %75 %78 %81
|
||||
%97 = OpCompositeConstruct %v4float %84 %87 %90 %93
|
||||
%98 = OpCompositeConstruct %mat4v4float %94 %95 %96 %97
|
||||
OpStore %m %98
|
||||
%99 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
|
||||
%100 = OpLoad %float %99
|
||||
%101 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_2
|
||||
%102 = OpLoad %float %101
|
||||
%103 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_3
|
||||
%104 = OpLoad %float %103
|
||||
%105 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_4
|
||||
%106 = OpLoad %float %105
|
||||
%107 = OpCompositeConstruct %v4float %100 %102 %104 %106
|
||||
OpStore %v %107
|
||||
%108 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
|
||||
%109 = OpLoad %float %108
|
||||
OpStore %f %109
|
||||
%111 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_0
|
||||
%112 = OpLoad %int %111
|
||||
OpStore %a %112
|
||||
OpBranch %113
|
||||
%113 = OpLabel
|
||||
OpLoopMerge %114 %115 None
|
||||
OpBranch %116
|
||||
%116 = OpLabel
|
||||
%117 = OpLoad %int %x_GLF_global_loop_count
|
||||
%118 = OpSLessThan %bool %117 %int_10
|
||||
OpSelectionMerge %120 None
|
||||
OpBranchConditional %118 %121 %122
|
||||
%121 = OpLabel
|
||||
OpBranch %120
|
||||
%122 = OpLabel
|
||||
OpBranch %114
|
||||
%120 = OpLabel
|
||||
%123 = OpLoad %int %x_GLF_global_loop_count
|
||||
%124 = OpIAdd %int %123 %int_1
|
||||
OpStore %x_GLF_global_loop_count %124
|
||||
%125 = OpLoad %int %a
|
||||
%126 = OpExtInst %int %127 SClamp %125 %int_0 %int_3
|
||||
%128 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
|
||||
%129 = OpLoad %float %128
|
||||
%130 = OpAccessChain %_ptr_Function_float %v %126
|
||||
%131 = OpLoad %float %130
|
||||
%132 = OpAccessChain %_ptr_Function_float %v %126
|
||||
%133 = OpFAdd %float %131 %129
|
||||
OpStore %132 %133
|
||||
%134 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_2
|
||||
%135 = OpLoad %int %134
|
||||
OpStore %b %135
|
||||
OpBranch %136
|
||||
%136 = OpLabel
|
||||
OpLoopMerge %137 %138 None
|
||||
OpBranch %139
|
||||
%139 = OpLabel
|
||||
%140 = OpLoad %int %x_GLF_global_loop_count
|
||||
%141 = OpSLessThan %bool %140 %int_10
|
||||
OpSelectionMerge %142 None
|
||||
OpBranchConditional %141 %143 %144
|
||||
%143 = OpLabel
|
||||
OpBranch %142
|
||||
%144 = OpLabel
|
||||
OpBranch %137
|
||||
%142 = OpLabel
|
||||
%145 = OpLoad %int %x_GLF_global_loop_count
|
||||
%146 = OpIAdd %int %145 %int_1
|
||||
OpStore %x_GLF_global_loop_count %146
|
||||
%147 = OpLoad %int %b
|
||||
%148 = OpExtInst %int %127 SClamp %147 %int_0 %int_3
|
||||
%149 = OpAccessChain %_ptr_Function_float %v %148
|
||||
%150 = OpLoad %float %149
|
||||
%151 = OpLoad %int %b
|
||||
%152 = OpLoad %int %a
|
||||
%153 = OpExtInst %int %127 SClamp %151 %int_0 %int_3
|
||||
%154 = OpAccessChain %_ptr_Function_float %m %153 %152
|
||||
%155 = OpLoad %float %154
|
||||
%156 = OpLoad %float %f
|
||||
%157 = OpFMul %float %150 %155
|
||||
%158 = OpFAdd %float %156 %157
|
||||
OpStore %f %158
|
||||
OpBranch %138
|
||||
%138 = OpLabel
|
||||
%159 = OpLoad %int %b
|
||||
%160 = OpISub %int %159 %int_1
|
||||
OpStore %b %160
|
||||
OpBranch %136
|
||||
%137 = OpLabel
|
||||
%161 = OpLoad %int %a
|
||||
%162 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
|
||||
%163 = OpLoad %float %162
|
||||
%164 = OpExtInst %int %127 SClamp %161 %int_0 %int_3
|
||||
%165 = OpAccessChain %_ptr_Function_float %m %int_1 %164
|
||||
OpStore %165 %163
|
||||
%166 = OpAccessChain %_ptr_Uniform_int %x_15 %uint_0
|
||||
%167 = OpLoad %int %166
|
||||
%168 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_0
|
||||
%169 = OpLoad %int %168
|
||||
%170 = OpIEqual %bool %167 %169
|
||||
OpSelectionMerge %171 None
|
||||
OpBranchConditional %170 %172 %171
|
||||
%172 = OpLabel
|
||||
OpKill
|
||||
%171 = OpLabel
|
||||
%173 = OpAccessChain %_ptr_Uniform_int %x_15 %uint_0
|
||||
%174 = OpLoad %int %173
|
||||
%175 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_1
|
||||
%176 = OpLoad %int %175
|
||||
%177 = OpIEqual %bool %174 %176
|
||||
OpSelectionMerge %178 None
|
||||
OpBranchConditional %177 %179 %178
|
||||
%179 = OpLabel
|
||||
OpKill
|
||||
%178 = OpLabel
|
||||
OpBranch %115
|
||||
%115 = OpLabel
|
||||
%180 = OpLoad %int %a
|
||||
%181 = OpIAdd %int %180 %int_1
|
||||
OpStore %a %181
|
||||
OpBranch %113
|
||||
%114 = OpLabel
|
||||
%182 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
|
||||
%183 = OpLoad %float %182
|
||||
OpStore %zero %183
|
||||
%184 = OpLoad %float %f
|
||||
%186 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_17
|
||||
%187 = OpLoad %float %186
|
||||
%189 = OpFOrdEqual %bool %184 %187
|
||||
%188 = OpLogicalNot %bool %189
|
||||
OpSelectionMerge %190 None
|
||||
OpBranchConditional %188 %191 %190
|
||||
%191 = OpLabel
|
||||
%192 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
|
||||
%193 = OpLoad %float %192
|
||||
OpStore %zero %193
|
||||
OpBranch %190
|
||||
%190 = OpLabel
|
||||
%194 = OpLoad %float %f
|
||||
%195 = OpLoad %float %zero
|
||||
%196 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_0
|
||||
%197 = OpLoad %int %196
|
||||
%198 = OpLoad %float %f
|
||||
%199 = OpConvertSToF %float %197
|
||||
%200 = OpCompositeConstruct %v4float %194 %195 %199 %198
|
||||
OpStore %x_GLF_color %200
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %201
|
||||
%204 = OpLabel
|
||||
%205 = OpFunctionCall %void %main_1
|
||||
%206 = OpLoad %v4float %x_GLF_color
|
||||
%207 = OpCompositeConstruct %main_out %206
|
||||
OpReturnValue %207
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %26
|
||||
%209 = OpLabel
|
||||
%210 = OpFunctionCall %main_out %main_inner
|
||||
%211 = OpCompositeExtract %v4float %210 0
|
||||
OpStore %x_GLF_color_1_1 %211
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,144 +0,0 @@
|
||||
type Arr = [[stride(16)]] array<f32, 18>;
|
||||
|
||||
[[block]]
|
||||
struct buf1 {
|
||||
x_GLF_uniform_float_values : Arr;
|
||||
};
|
||||
|
||||
type Arr_1 = [[stride(16)]] array<i32, 4>;
|
||||
|
||||
[[block]]
|
||||
struct buf0 {
|
||||
x_GLF_uniform_int_values : Arr_1;
|
||||
};
|
||||
|
||||
[[block]]
|
||||
struct buf2 {
|
||||
one : i32;
|
||||
};
|
||||
|
||||
var<private> x_GLF_global_loop_count : i32;
|
||||
|
||||
[[group(0), binding(1)]] var<uniform> x_7 : buf1;
|
||||
|
||||
[[group(0), binding(0)]] var<uniform> x_12 : buf0;
|
||||
|
||||
[[group(0), binding(2)]] var<uniform> x_15 : buf2;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var m : mat4x4<f32>;
|
||||
var v : vec4<f32>;
|
||||
var f : f32;
|
||||
var a : i32;
|
||||
var b : i32;
|
||||
var zero : f32;
|
||||
x_GLF_global_loop_count = 0;
|
||||
let x_62 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
let x_64 : f32 = x_7.x_GLF_uniform_float_values[2];
|
||||
let x_66 : f32 = x_7.x_GLF_uniform_float_values[3];
|
||||
let x_68 : f32 = x_7.x_GLF_uniform_float_values[4];
|
||||
let x_70 : f32 = x_7.x_GLF_uniform_float_values[5];
|
||||
let x_72 : f32 = x_7.x_GLF_uniform_float_values[6];
|
||||
let x_74 : f32 = x_7.x_GLF_uniform_float_values[7];
|
||||
let x_76 : f32 = x_7.x_GLF_uniform_float_values[8];
|
||||
let x_78 : f32 = x_7.x_GLF_uniform_float_values[9];
|
||||
let x_80 : f32 = x_7.x_GLF_uniform_float_values[10];
|
||||
let x_82 : f32 = x_7.x_GLF_uniform_float_values[11];
|
||||
let x_84 : f32 = x_7.x_GLF_uniform_float_values[12];
|
||||
let x_86 : f32 = x_7.x_GLF_uniform_float_values[13];
|
||||
let x_88 : f32 = x_7.x_GLF_uniform_float_values[14];
|
||||
let x_90 : f32 = x_7.x_GLF_uniform_float_values[15];
|
||||
let x_92 : f32 = x_7.x_GLF_uniform_float_values[16];
|
||||
m = mat4x4<f32>(vec4<f32>(x_62, x_64, x_66, x_68), vec4<f32>(x_70, x_72, x_74, x_76), vec4<f32>(x_78, x_80, x_82, x_84), vec4<f32>(x_86, x_88, x_90, x_92));
|
||||
let x_99 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
let x_101 : f32 = x_7.x_GLF_uniform_float_values[2];
|
||||
let x_103 : f32 = x_7.x_GLF_uniform_float_values[3];
|
||||
let x_105 : f32 = x_7.x_GLF_uniform_float_values[4];
|
||||
v = vec4<f32>(x_99, x_101, x_103, x_105);
|
||||
let x_108 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
f = x_108;
|
||||
let x_110 : i32 = x_12.x_GLF_uniform_int_values[0];
|
||||
a = x_110;
|
||||
loop {
|
||||
let x_115 : i32 = x_GLF_global_loop_count;
|
||||
if ((x_115 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_118 : i32 = x_GLF_global_loop_count;
|
||||
x_GLF_global_loop_count = (x_118 + 1);
|
||||
let x_120 : i32 = a;
|
||||
let x_121 : i32 = clamp(x_120, 0, 3);
|
||||
let x_123 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
let x_125 : f32 = v[x_121];
|
||||
v[x_121] = (x_125 + x_123);
|
||||
let x_129 : i32 = x_12.x_GLF_uniform_int_values[2];
|
||||
b = x_129;
|
||||
loop {
|
||||
let x_134 : i32 = x_GLF_global_loop_count;
|
||||
if ((x_134 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_137 : i32 = x_GLF_global_loop_count;
|
||||
x_GLF_global_loop_count = (x_137 + 1);
|
||||
let x_139 : i32 = b;
|
||||
let x_142 : f32 = v[clamp(x_139, 0, 3)];
|
||||
let x_143 : i32 = b;
|
||||
let x_145 : i32 = a;
|
||||
let x_147 : f32 = m[clamp(x_143, 0, 3)][x_145];
|
||||
let x_149 : f32 = f;
|
||||
f = (x_149 + (x_142 * x_147));
|
||||
|
||||
continuing {
|
||||
let x_151 : i32 = b;
|
||||
b = (x_151 - 1);
|
||||
}
|
||||
}
|
||||
let x_153 : i32 = a;
|
||||
let x_156 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
m[1][clamp(x_153, 0, 3)] = x_156;
|
||||
let x_159 : i32 = x_15.one;
|
||||
let x_161 : i32 = x_12.x_GLF_uniform_int_values[0];
|
||||
if ((x_159 == x_161)) {
|
||||
discard;
|
||||
}
|
||||
let x_166 : i32 = x_15.one;
|
||||
let x_168 : i32 = x_12.x_GLF_uniform_int_values[1];
|
||||
if ((x_166 == x_168)) {
|
||||
discard;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_172 : i32 = a;
|
||||
a = (x_172 + 1);
|
||||
}
|
||||
}
|
||||
let x_175 : f32 = x_7.x_GLF_uniform_float_values[0];
|
||||
zero = x_175;
|
||||
let x_176 : f32 = f;
|
||||
let x_178 : f32 = x_7.x_GLF_uniform_float_values[17];
|
||||
if (!((x_176 == x_178))) {
|
||||
let x_183 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
zero = x_183;
|
||||
}
|
||||
let x_184 : f32 = f;
|
||||
let x_185 : f32 = zero;
|
||||
let x_187 : i32 = x_12.x_GLF_uniform_int_values[0];
|
||||
let x_189 : f32 = f;
|
||||
x_GLF_color = vec4<f32>(x_184, x_185, f32(x_187), x_189);
|
||||
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);
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
void set_float4(inout float4 vec, int idx, float val) {
|
||||
vec = (idx.xxxx == int4(0, 1, 2, 3)) ? val.xxxx : vec;
|
||||
}
|
||||
|
||||
static int x_GLF_global_loop_count = 0;
|
||||
cbuffer cbuffer_x_7 : register(b1, space0) {
|
||||
uint4 x_7[18];
|
||||
};
|
||||
cbuffer cbuffer_x_12 : register(b0, space0) {
|
||||
uint4 x_12[4];
|
||||
};
|
||||
cbuffer cbuffer_x_15 : register(b2, space0) {
|
||||
uint4 x_15[1];
|
||||
};
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
float4x4 m = float4x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
float4 v = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
float f = 0.0f;
|
||||
int a = 0;
|
||||
int b = 0;
|
||||
float zero = 0.0f;
|
||||
x_GLF_global_loop_count = 0;
|
||||
const float x_62 = asfloat(x_7[1].x);
|
||||
const float x_64 = asfloat(x_7[2].x);
|
||||
const float x_66 = asfloat(x_7[3].x);
|
||||
const float x_68 = asfloat(x_7[4].x);
|
||||
const float x_70 = asfloat(x_7[5].x);
|
||||
const float x_72 = asfloat(x_7[6].x);
|
||||
const float x_74 = asfloat(x_7[7].x);
|
||||
const float x_76 = asfloat(x_7[8].x);
|
||||
const float x_78 = asfloat(x_7[9].x);
|
||||
const float x_80 = asfloat(x_7[10].x);
|
||||
const float x_82 = asfloat(x_7[11].x);
|
||||
const float x_84 = asfloat(x_7[12].x);
|
||||
const float x_86 = asfloat(x_7[13].x);
|
||||
const float x_88 = asfloat(x_7[14].x);
|
||||
const float x_90 = asfloat(x_7[15].x);
|
||||
const float x_92 = asfloat(x_7[16].x);
|
||||
m = float4x4(float4(x_62, x_64, x_66, x_68), float4(x_70, x_72, x_74, x_76), float4(x_78, x_80, x_82, x_84), float4(x_86, x_88, x_90, x_92));
|
||||
const float x_99 = asfloat(x_7[1].x);
|
||||
const float x_101 = asfloat(x_7[2].x);
|
||||
const float x_103 = asfloat(x_7[3].x);
|
||||
const float x_105 = asfloat(x_7[4].x);
|
||||
v = float4(x_99, x_101, x_103, x_105);
|
||||
const float x_108 = asfloat(x_7[1].x);
|
||||
f = x_108;
|
||||
const uint scalar_offset = ((16u * uint(0))) / 4;
|
||||
const int x_110 = asint(x_12[scalar_offset / 4][scalar_offset % 4]);
|
||||
a = x_110;
|
||||
{
|
||||
for(; (x_GLF_global_loop_count < 10); a = (a + 1)) {
|
||||
x_GLF_global_loop_count = (x_GLF_global_loop_count + 1);
|
||||
const int x_121 = clamp(a, 0, 3);
|
||||
const float x_123 = asfloat(x_7[1].x);
|
||||
const float x_125 = v[x_121];
|
||||
set_float4(v, x_121, (x_125 + x_123));
|
||||
const int x_129 = asint(x_12[2].x);
|
||||
b = x_129;
|
||||
{
|
||||
for(; (x_GLF_global_loop_count < 10); b = (b - 1)) {
|
||||
x_GLF_global_loop_count = (x_GLF_global_loop_count + 1);
|
||||
const float x_142 = v[clamp(b, 0, 3)];
|
||||
const float x_147 = m[clamp(b, 0, 3)][a];
|
||||
f = (f + (x_142 * x_147));
|
||||
}
|
||||
}
|
||||
const int x_153 = a;
|
||||
const float x_156 = asfloat(x_7[1].x);
|
||||
set_float4(m[1], clamp(x_153, 0, 3), x_156);
|
||||
const int x_159 = asint(x_15[0].x);
|
||||
const uint scalar_offset_1 = ((16u * uint(0))) / 4;
|
||||
const int x_161 = asint(x_12[scalar_offset_1 / 4][scalar_offset_1 % 4]);
|
||||
if ((x_159 == x_161)) {
|
||||
discard;
|
||||
}
|
||||
const int x_166 = asint(x_15[0].x);
|
||||
const int x_168 = asint(x_12[1].x);
|
||||
if ((x_166 == x_168)) {
|
||||
discard;
|
||||
}
|
||||
}
|
||||
}
|
||||
const uint scalar_offset_2 = ((16u * uint(0))) / 4;
|
||||
const float x_175 = asfloat(x_7[scalar_offset_2 / 4][scalar_offset_2 % 4]);
|
||||
zero = x_175;
|
||||
const float x_176 = f;
|
||||
const float x_178 = asfloat(x_7[17].x);
|
||||
if (!((x_176 == x_178))) {
|
||||
const float x_183 = asfloat(x_7[1].x);
|
||||
zero = x_183;
|
||||
}
|
||||
const float x_184 = f;
|
||||
const float x_185 = zero;
|
||||
const uint scalar_offset_3 = ((16u * uint(0))) / 4;
|
||||
const int x_187 = asint(x_12[scalar_offset_3 / 4][scalar_offset_3 % 4]);
|
||||
x_GLF_color = float4(x_184, x_185, float(x_187), f);
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol {
|
||||
float4 x_GLF_color_1 : SV_Target0;
|
||||
};
|
||||
|
||||
main_out main_inner() {
|
||||
main_1();
|
||||
const main_out tint_symbol_4 = {x_GLF_color};
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
tint_symbol main() {
|
||||
const main_out inner_result = main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_padded_array_element {
|
||||
/* 0x0000 */ float el;
|
||||
/* 0x0004 */ int8_t tint_pad[12];
|
||||
};
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ tint_padded_array_element arr[18];
|
||||
};
|
||||
struct buf1 {
|
||||
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_float_values;
|
||||
};
|
||||
struct tint_padded_array_element_1 {
|
||||
/* 0x0000 */ int el;
|
||||
/* 0x0004 */ int8_t tint_pad_1[12];
|
||||
};
|
||||
struct tint_array_wrapper_1 {
|
||||
/* 0x0000 */ tint_padded_array_element_1 arr[4];
|
||||
};
|
||||
struct buf0 {
|
||||
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_int_values;
|
||||
};
|
||||
struct buf2 {
|
||||
/* 0x0000 */ int one;
|
||||
};
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 x_GLF_color_1 [[color(0)]];
|
||||
};
|
||||
|
||||
void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_3, thread float4* const tint_symbol_4) {
|
||||
float4x4 m = float4x4(0.0f);
|
||||
float4 v = 0.0f;
|
||||
float f = 0.0f;
|
||||
int a = 0;
|
||||
int b = 0;
|
||||
float zero = 0.0f;
|
||||
*(tint_symbol_3) = 0;
|
||||
float const x_62 = x_7.x_GLF_uniform_float_values.arr[1].el;
|
||||
float const x_64 = x_7.x_GLF_uniform_float_values.arr[2].el;
|
||||
float const x_66 = x_7.x_GLF_uniform_float_values.arr[3].el;
|
||||
float const x_68 = x_7.x_GLF_uniform_float_values.arr[4].el;
|
||||
float const x_70 = x_7.x_GLF_uniform_float_values.arr[5].el;
|
||||
float const x_72 = x_7.x_GLF_uniform_float_values.arr[6].el;
|
||||
float const x_74 = x_7.x_GLF_uniform_float_values.arr[7].el;
|
||||
float const x_76 = x_7.x_GLF_uniform_float_values.arr[8].el;
|
||||
float const x_78 = x_7.x_GLF_uniform_float_values.arr[9].el;
|
||||
float const x_80 = x_7.x_GLF_uniform_float_values.arr[10].el;
|
||||
float const x_82 = x_7.x_GLF_uniform_float_values.arr[11].el;
|
||||
float const x_84 = x_7.x_GLF_uniform_float_values.arr[12].el;
|
||||
float const x_86 = x_7.x_GLF_uniform_float_values.arr[13].el;
|
||||
float const x_88 = x_7.x_GLF_uniform_float_values.arr[14].el;
|
||||
float const x_90 = x_7.x_GLF_uniform_float_values.arr[15].el;
|
||||
float const x_92 = x_7.x_GLF_uniform_float_values.arr[16].el;
|
||||
m = float4x4(float4(x_62, x_64, x_66, x_68), float4(x_70, x_72, x_74, x_76), float4(x_78, x_80, x_82, x_84), float4(x_86, x_88, x_90, x_92));
|
||||
float const x_99 = x_7.x_GLF_uniform_float_values.arr[1].el;
|
||||
float const x_101 = x_7.x_GLF_uniform_float_values.arr[2].el;
|
||||
float const x_103 = x_7.x_GLF_uniform_float_values.arr[3].el;
|
||||
float const x_105 = x_7.x_GLF_uniform_float_values.arr[4].el;
|
||||
v = float4(x_99, x_101, x_103, x_105);
|
||||
float const x_108 = x_7.x_GLF_uniform_float_values.arr[1].el;
|
||||
f = x_108;
|
||||
int const x_110 = x_12.x_GLF_uniform_int_values.arr[0].el;
|
||||
a = x_110;
|
||||
while (true) {
|
||||
int const x_115 = *(tint_symbol_3);
|
||||
if ((x_115 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_118 = *(tint_symbol_3);
|
||||
*(tint_symbol_3) = as_type<int>((as_type<uint>(x_118) + as_type<uint>(1)));
|
||||
int const x_120 = a;
|
||||
int const x_121 = clamp(x_120, 0, 3);
|
||||
float const x_123 = x_7.x_GLF_uniform_float_values.arr[1].el;
|
||||
float const x_125 = v[x_121];
|
||||
v[x_121] = (x_125 + x_123);
|
||||
int const x_129 = x_12.x_GLF_uniform_int_values.arr[2].el;
|
||||
b = x_129;
|
||||
while (true) {
|
||||
int const x_134 = *(tint_symbol_3);
|
||||
if ((x_134 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
int const x_137 = *(tint_symbol_3);
|
||||
*(tint_symbol_3) = as_type<int>((as_type<uint>(x_137) + as_type<uint>(1)));
|
||||
int const x_139 = b;
|
||||
float const x_142 = v[clamp(x_139, 0, 3)];
|
||||
int const x_143 = b;
|
||||
int const x_145 = a;
|
||||
float const x_147 = m[clamp(x_143, 0, 3)][x_145];
|
||||
float const x_149 = f;
|
||||
f = (x_149 + (x_142 * x_147));
|
||||
{
|
||||
int const x_151 = b;
|
||||
b = as_type<int>((as_type<uint>(x_151) - as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
int const x_153 = a;
|
||||
float const x_156 = x_7.x_GLF_uniform_float_values.arr[1].el;
|
||||
m[1][clamp(x_153, 0, 3)] = x_156;
|
||||
int const x_159 = x_15.one;
|
||||
int const x_161 = x_12.x_GLF_uniform_int_values.arr[0].el;
|
||||
if ((x_159 == x_161)) {
|
||||
discard_fragment();
|
||||
}
|
||||
int const x_166 = x_15.one;
|
||||
int const x_168 = x_12.x_GLF_uniform_int_values.arr[1].el;
|
||||
if ((x_166 == x_168)) {
|
||||
discard_fragment();
|
||||
}
|
||||
{
|
||||
int const x_172 = a;
|
||||
a = as_type<int>((as_type<uint>(x_172) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
float const x_175 = x_7.x_GLF_uniform_float_values.arr[0].el;
|
||||
zero = x_175;
|
||||
float const x_176 = f;
|
||||
float const x_178 = x_7.x_GLF_uniform_float_values.arr[17].el;
|
||||
if (!((x_176 == x_178))) {
|
||||
float const x_183 = x_7.x_GLF_uniform_float_values.arr[1].el;
|
||||
zero = x_183;
|
||||
}
|
||||
float const x_184 = f;
|
||||
float const x_185 = zero;
|
||||
int const x_187 = x_12.x_GLF_uniform_int_values.arr[0].el;
|
||||
float const x_189 = f;
|
||||
*(tint_symbol_4) = float4(x_184, x_185, float(x_187), x_189);
|
||||
return;
|
||||
}
|
||||
|
||||
main_out tint_symbol_inner(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread int* const tint_symbol_5, thread float4* const tint_symbol_6) {
|
||||
main_1(x_7, x_12, x_15, tint_symbol_5, tint_symbol_6);
|
||||
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
|
||||
return tint_symbol_2;
|
||||
}
|
||||
|
||||
fragment tint_symbol_1 tint_symbol(constant buf1& x_7 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]], constant buf2& x_15 [[buffer(2)]]) {
|
||||
thread int tint_symbol_7 = 0;
|
||||
thread float4 tint_symbol_8 = 0.0f;
|
||||
main_out const inner_result = tint_symbol_inner(x_7, x_12, x_15, &(tint_symbol_7), &(tint_symbol_8));
|
||||
tint_symbol_1 wrapper_result = {};
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
@@ -1,312 +0,0 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 212
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%127 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
|
||||
OpName %x_GLF_global_loop_count "x_GLF_global_loop_count"
|
||||
OpName %buf1 "buf1"
|
||||
OpMemberName %buf1 0 "x_GLF_uniform_float_values"
|
||||
OpName %x_7 "x_7"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
|
||||
OpName %x_12 "x_12"
|
||||
OpName %buf2 "buf2"
|
||||
OpMemberName %buf2 0 "one"
|
||||
OpName %x_15 "x_15"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %m "m"
|
||||
OpName %v "v"
|
||||
OpName %f "f"
|
||||
OpName %a "a"
|
||||
OpName %b "b"
|
||||
OpName %zero "zero"
|
||||
OpName %main_out "main_out"
|
||||
OpMemberName %main_out 0 "x_GLF_color_1"
|
||||
OpName %main_inner "main_inner"
|
||||
OpName %main "main"
|
||||
OpDecorate %x_GLF_color_1_1 Location 0
|
||||
OpDecorate %buf1 Block
|
||||
OpMemberDecorate %buf1 0 Offset 0
|
||||
OpDecorate %_arr_float_uint_18 ArrayStride 16
|
||||
OpDecorate %x_7 NonWritable
|
||||
OpDecorate %x_7 DescriptorSet 0
|
||||
OpDecorate %x_7 Binding 1
|
||||
OpDecorate %buf0 Block
|
||||
OpMemberDecorate %buf0 0 Offset 0
|
||||
OpDecorate %_arr_int_uint_4 ArrayStride 16
|
||||
OpDecorate %x_12 NonWritable
|
||||
OpDecorate %x_12 DescriptorSet 0
|
||||
OpDecorate %x_12 Binding 0
|
||||
OpDecorate %buf2 Block
|
||||
OpMemberDecorate %buf2 0 Offset 0
|
||||
OpDecorate %x_15 NonWritable
|
||||
OpDecorate %x_15 DescriptorSet 0
|
||||
OpDecorate %x_15 Binding 2
|
||||
OpMemberDecorate %main_out 0 Offset 0
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Private_int = OpTypePointer Private %int
|
||||
%9 = OpConstantNull %int
|
||||
%x_GLF_global_loop_count = OpVariable %_ptr_Private_int Private %9
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_18 = OpConstant %uint 18
|
||||
%_arr_float_uint_18 = OpTypeArray %float %uint_18
|
||||
%buf1 = OpTypeStruct %_arr_float_uint_18
|
||||
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
|
||||
%x_7 = OpVariable %_ptr_Uniform_buf1 Uniform
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_int_uint_4 = OpTypeArray %int %uint_4
|
||||
%buf0 = OpTypeStruct %_arr_int_uint_4
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%x_12 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%buf2 = OpTypeStruct %int
|
||||
%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
|
||||
%x_15 = OpVariable %_ptr_Uniform_buf2 Uniform
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
|
||||
%void = OpTypeVoid
|
||||
%26 = OpTypeFunction %void
|
||||
%mat4v4float = OpTypeMatrix %v4float 4
|
||||
%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float
|
||||
%33 = OpConstantNull %mat4v4float
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%38 = OpConstantNull %float
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%int_0 = OpConstant %int 0
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%int_2 = OpConstant %int 2
|
||||
%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
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%bool = OpTypeBool
|
||||
%int_17 = OpConstant %int 17
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%201 = OpTypeFunction %main_out
|
||||
%main_1 = OpFunction %void None %26
|
||||
%29 = OpLabel
|
||||
%m = OpVariable %_ptr_Function_mat4v4float Function %33
|
||||
%v = OpVariable %_ptr_Function_v4float Function %5
|
||||
%f = OpVariable %_ptr_Function_float Function %38
|
||||
%a = OpVariable %_ptr_Function_int Function %9
|
||||
%b = OpVariable %_ptr_Function_int Function %9
|
||||
%zero = OpVariable %_ptr_Function_float Function %38
|
||||
OpStore %x_GLF_global_loop_count %int_0
|
||||
%47 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
|
||||
%48 = OpLoad %float %47
|
||||
%50 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_2
|
||||
%51 = OpLoad %float %50
|
||||
%53 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_3
|
||||
%54 = OpLoad %float %53
|
||||
%56 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_4
|
||||
%57 = OpLoad %float %56
|
||||
%59 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_5
|
||||
%60 = OpLoad %float %59
|
||||
%62 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_6
|
||||
%63 = OpLoad %float %62
|
||||
%65 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_7
|
||||
%66 = OpLoad %float %65
|
||||
%68 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_8
|
||||
%69 = OpLoad %float %68
|
||||
%71 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_9
|
||||
%72 = OpLoad %float %71
|
||||
%74 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_10
|
||||
%75 = OpLoad %float %74
|
||||
%77 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_11
|
||||
%78 = OpLoad %float %77
|
||||
%80 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_12
|
||||
%81 = OpLoad %float %80
|
||||
%83 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_13
|
||||
%84 = OpLoad %float %83
|
||||
%86 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_14
|
||||
%87 = OpLoad %float %86
|
||||
%89 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_15
|
||||
%90 = OpLoad %float %89
|
||||
%92 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_16
|
||||
%93 = OpLoad %float %92
|
||||
%94 = OpCompositeConstruct %v4float %48 %51 %54 %57
|
||||
%95 = OpCompositeConstruct %v4float %60 %63 %66 %69
|
||||
%96 = OpCompositeConstruct %v4float %72 %75 %78 %81
|
||||
%97 = OpCompositeConstruct %v4float %84 %87 %90 %93
|
||||
%98 = OpCompositeConstruct %mat4v4float %94 %95 %96 %97
|
||||
OpStore %m %98
|
||||
%99 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
|
||||
%100 = OpLoad %float %99
|
||||
%101 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_2
|
||||
%102 = OpLoad %float %101
|
||||
%103 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_3
|
||||
%104 = OpLoad %float %103
|
||||
%105 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_4
|
||||
%106 = OpLoad %float %105
|
||||
%107 = OpCompositeConstruct %v4float %100 %102 %104 %106
|
||||
OpStore %v %107
|
||||
%108 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
|
||||
%109 = OpLoad %float %108
|
||||
OpStore %f %109
|
||||
%111 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_0
|
||||
%112 = OpLoad %int %111
|
||||
OpStore %a %112
|
||||
OpBranch %113
|
||||
%113 = OpLabel
|
||||
OpLoopMerge %114 %115 None
|
||||
OpBranch %116
|
||||
%116 = OpLabel
|
||||
%117 = OpLoad %int %x_GLF_global_loop_count
|
||||
%118 = OpSLessThan %bool %117 %int_10
|
||||
OpSelectionMerge %120 None
|
||||
OpBranchConditional %118 %121 %122
|
||||
%121 = OpLabel
|
||||
OpBranch %120
|
||||
%122 = OpLabel
|
||||
OpBranch %114
|
||||
%120 = OpLabel
|
||||
%123 = OpLoad %int %x_GLF_global_loop_count
|
||||
%124 = OpIAdd %int %123 %int_1
|
||||
OpStore %x_GLF_global_loop_count %124
|
||||
%125 = OpLoad %int %a
|
||||
%126 = OpExtInst %int %127 SClamp %125 %int_0 %int_3
|
||||
%128 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
|
||||
%129 = OpLoad %float %128
|
||||
%130 = OpAccessChain %_ptr_Function_float %v %126
|
||||
%131 = OpLoad %float %130
|
||||
%132 = OpAccessChain %_ptr_Function_float %v %126
|
||||
%133 = OpFAdd %float %131 %129
|
||||
OpStore %132 %133
|
||||
%134 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_2
|
||||
%135 = OpLoad %int %134
|
||||
OpStore %b %135
|
||||
OpBranch %136
|
||||
%136 = OpLabel
|
||||
OpLoopMerge %137 %138 None
|
||||
OpBranch %139
|
||||
%139 = OpLabel
|
||||
%140 = OpLoad %int %x_GLF_global_loop_count
|
||||
%141 = OpSLessThan %bool %140 %int_10
|
||||
OpSelectionMerge %142 None
|
||||
OpBranchConditional %141 %143 %144
|
||||
%143 = OpLabel
|
||||
OpBranch %142
|
||||
%144 = OpLabel
|
||||
OpBranch %137
|
||||
%142 = OpLabel
|
||||
%145 = OpLoad %int %x_GLF_global_loop_count
|
||||
%146 = OpIAdd %int %145 %int_1
|
||||
OpStore %x_GLF_global_loop_count %146
|
||||
%147 = OpLoad %int %b
|
||||
%148 = OpExtInst %int %127 SClamp %147 %int_0 %int_3
|
||||
%149 = OpAccessChain %_ptr_Function_float %v %148
|
||||
%150 = OpLoad %float %149
|
||||
%151 = OpLoad %int %b
|
||||
%152 = OpLoad %int %a
|
||||
%153 = OpExtInst %int %127 SClamp %151 %int_0 %int_3
|
||||
%154 = OpAccessChain %_ptr_Function_float %m %153 %152
|
||||
%155 = OpLoad %float %154
|
||||
%156 = OpLoad %float %f
|
||||
%157 = OpFMul %float %150 %155
|
||||
%158 = OpFAdd %float %156 %157
|
||||
OpStore %f %158
|
||||
OpBranch %138
|
||||
%138 = OpLabel
|
||||
%159 = OpLoad %int %b
|
||||
%160 = OpISub %int %159 %int_1
|
||||
OpStore %b %160
|
||||
OpBranch %136
|
||||
%137 = OpLabel
|
||||
%161 = OpLoad %int %a
|
||||
%162 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
|
||||
%163 = OpLoad %float %162
|
||||
%164 = OpExtInst %int %127 SClamp %161 %int_0 %int_3
|
||||
%165 = OpAccessChain %_ptr_Function_float %m %int_1 %164
|
||||
OpStore %165 %163
|
||||
%166 = OpAccessChain %_ptr_Uniform_int %x_15 %uint_0
|
||||
%167 = OpLoad %int %166
|
||||
%168 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_0
|
||||
%169 = OpLoad %int %168
|
||||
%170 = OpIEqual %bool %167 %169
|
||||
OpSelectionMerge %171 None
|
||||
OpBranchConditional %170 %172 %171
|
||||
%172 = OpLabel
|
||||
OpKill
|
||||
%171 = OpLabel
|
||||
%173 = OpAccessChain %_ptr_Uniform_int %x_15 %uint_0
|
||||
%174 = OpLoad %int %173
|
||||
%175 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_1
|
||||
%176 = OpLoad %int %175
|
||||
%177 = OpIEqual %bool %174 %176
|
||||
OpSelectionMerge %178 None
|
||||
OpBranchConditional %177 %179 %178
|
||||
%179 = OpLabel
|
||||
OpKill
|
||||
%178 = OpLabel
|
||||
OpBranch %115
|
||||
%115 = OpLabel
|
||||
%180 = OpLoad %int %a
|
||||
%181 = OpIAdd %int %180 %int_1
|
||||
OpStore %a %181
|
||||
OpBranch %113
|
||||
%114 = OpLabel
|
||||
%182 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
|
||||
%183 = OpLoad %float %182
|
||||
OpStore %zero %183
|
||||
%184 = OpLoad %float %f
|
||||
%186 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_17
|
||||
%187 = OpLoad %float %186
|
||||
%189 = OpFOrdEqual %bool %184 %187
|
||||
%188 = OpLogicalNot %bool %189
|
||||
OpSelectionMerge %190 None
|
||||
OpBranchConditional %188 %191 %190
|
||||
%191 = OpLabel
|
||||
%192 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_1
|
||||
%193 = OpLoad %float %192
|
||||
OpStore %zero %193
|
||||
OpBranch %190
|
||||
%190 = OpLabel
|
||||
%194 = OpLoad %float %f
|
||||
%195 = OpLoad %float %zero
|
||||
%196 = OpAccessChain %_ptr_Uniform_int %x_12 %uint_0 %int_0
|
||||
%197 = OpLoad %int %196
|
||||
%198 = OpLoad %float %f
|
||||
%199 = OpConvertSToF %float %197
|
||||
%200 = OpCompositeConstruct %v4float %194 %195 %199 %198
|
||||
OpStore %x_GLF_color %200
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %201
|
||||
%204 = OpLabel
|
||||
%205 = OpFunctionCall %void %main_1
|
||||
%206 = OpLoad %v4float %x_GLF_color
|
||||
%207 = OpCompositeConstruct %main_out %206
|
||||
OpReturnValue %207
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %26
|
||||
%209 = OpLabel
|
||||
%210 = OpFunctionCall %main_out %main_inner
|
||||
%211 = OpCompositeExtract %v4float %210 0
|
||||
OpStore %x_GLF_color_1_1 %211
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,144 +0,0 @@
|
||||
type Arr = [[stride(16)]] array<f32, 18>;
|
||||
|
||||
[[block]]
|
||||
struct buf1 {
|
||||
x_GLF_uniform_float_values : Arr;
|
||||
};
|
||||
|
||||
type Arr_1 = [[stride(16)]] array<i32, 4>;
|
||||
|
||||
[[block]]
|
||||
struct buf0 {
|
||||
x_GLF_uniform_int_values : Arr_1;
|
||||
};
|
||||
|
||||
[[block]]
|
||||
struct buf2 {
|
||||
one : i32;
|
||||
};
|
||||
|
||||
var<private> x_GLF_global_loop_count : i32;
|
||||
|
||||
[[group(0), binding(1)]] var<uniform> x_7 : buf1;
|
||||
|
||||
[[group(0), binding(0)]] var<uniform> x_12 : buf0;
|
||||
|
||||
[[group(0), binding(2)]] var<uniform> x_15 : buf2;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var m : mat4x4<f32>;
|
||||
var v : vec4<f32>;
|
||||
var f : f32;
|
||||
var a : i32;
|
||||
var b : i32;
|
||||
var zero : f32;
|
||||
x_GLF_global_loop_count = 0;
|
||||
let x_62 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
let x_64 : f32 = x_7.x_GLF_uniform_float_values[2];
|
||||
let x_66 : f32 = x_7.x_GLF_uniform_float_values[3];
|
||||
let x_68 : f32 = x_7.x_GLF_uniform_float_values[4];
|
||||
let x_70 : f32 = x_7.x_GLF_uniform_float_values[5];
|
||||
let x_72 : f32 = x_7.x_GLF_uniform_float_values[6];
|
||||
let x_74 : f32 = x_7.x_GLF_uniform_float_values[7];
|
||||
let x_76 : f32 = x_7.x_GLF_uniform_float_values[8];
|
||||
let x_78 : f32 = x_7.x_GLF_uniform_float_values[9];
|
||||
let x_80 : f32 = x_7.x_GLF_uniform_float_values[10];
|
||||
let x_82 : f32 = x_7.x_GLF_uniform_float_values[11];
|
||||
let x_84 : f32 = x_7.x_GLF_uniform_float_values[12];
|
||||
let x_86 : f32 = x_7.x_GLF_uniform_float_values[13];
|
||||
let x_88 : f32 = x_7.x_GLF_uniform_float_values[14];
|
||||
let x_90 : f32 = x_7.x_GLF_uniform_float_values[15];
|
||||
let x_92 : f32 = x_7.x_GLF_uniform_float_values[16];
|
||||
m = mat4x4<f32>(vec4<f32>(x_62, x_64, x_66, x_68), vec4<f32>(x_70, x_72, x_74, x_76), vec4<f32>(x_78, x_80, x_82, x_84), vec4<f32>(x_86, x_88, x_90, x_92));
|
||||
let x_99 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
let x_101 : f32 = x_7.x_GLF_uniform_float_values[2];
|
||||
let x_103 : f32 = x_7.x_GLF_uniform_float_values[3];
|
||||
let x_105 : f32 = x_7.x_GLF_uniform_float_values[4];
|
||||
v = vec4<f32>(x_99, x_101, x_103, x_105);
|
||||
let x_108 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
f = x_108;
|
||||
let x_110 : i32 = x_12.x_GLF_uniform_int_values[0];
|
||||
a = x_110;
|
||||
loop {
|
||||
let x_115 : i32 = x_GLF_global_loop_count;
|
||||
if ((x_115 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_118 : i32 = x_GLF_global_loop_count;
|
||||
x_GLF_global_loop_count = (x_118 + 1);
|
||||
let x_120 : i32 = a;
|
||||
let x_121 : i32 = clamp(x_120, 0, 3);
|
||||
let x_123 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
let x_125 : f32 = v[x_121];
|
||||
v[x_121] = (x_125 + x_123);
|
||||
let x_129 : i32 = x_12.x_GLF_uniform_int_values[2];
|
||||
b = x_129;
|
||||
loop {
|
||||
let x_134 : i32 = x_GLF_global_loop_count;
|
||||
if ((x_134 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_137 : i32 = x_GLF_global_loop_count;
|
||||
x_GLF_global_loop_count = (x_137 + 1);
|
||||
let x_139 : i32 = b;
|
||||
let x_142 : f32 = v[clamp(x_139, 0, 3)];
|
||||
let x_143 : i32 = b;
|
||||
let x_145 : i32 = a;
|
||||
let x_147 : f32 = m[clamp(x_143, 0, 3)][x_145];
|
||||
let x_149 : f32 = f;
|
||||
f = (x_149 + (x_142 * x_147));
|
||||
|
||||
continuing {
|
||||
let x_151 : i32 = b;
|
||||
b = (x_151 - 1);
|
||||
}
|
||||
}
|
||||
let x_153 : i32 = a;
|
||||
let x_156 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
m[1][clamp(x_153, 0, 3)] = x_156;
|
||||
let x_159 : i32 = x_15.one;
|
||||
let x_161 : i32 = x_12.x_GLF_uniform_int_values[0];
|
||||
if ((x_159 == x_161)) {
|
||||
discard;
|
||||
}
|
||||
let x_166 : i32 = x_15.one;
|
||||
let x_168 : i32 = x_12.x_GLF_uniform_int_values[1];
|
||||
if ((x_166 == x_168)) {
|
||||
discard;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_172 : i32 = a;
|
||||
a = (x_172 + 1);
|
||||
}
|
||||
}
|
||||
let x_175 : f32 = x_7.x_GLF_uniform_float_values[0];
|
||||
zero = x_175;
|
||||
let x_176 : f32 = f;
|
||||
let x_178 : f32 = x_7.x_GLF_uniform_float_values[17];
|
||||
if (!((x_176 == x_178))) {
|
||||
let x_183 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
zero = x_183;
|
||||
}
|
||||
let x_184 : f32 = f;
|
||||
let x_185 : f32 = zero;
|
||||
let x_187 : i32 = x_12.x_GLF_uniform_int_values[0];
|
||||
let x_189 : f32 = f;
|
||||
x_GLF_color = vec4<f32>(x_184, x_185, f32(x_187), x_189);
|
||||
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