mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 14:08:04 +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,139 +0,0 @@
|
||||
void set_float2(inout float2 vec, int idx, float val) {
|
||||
vec = (idx.xx == int2(0, 1)) ? val.xx : vec;
|
||||
}
|
||||
|
||||
static float4x2 m = float4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
cbuffer cbuffer_x_10 : register(b2, space0) {
|
||||
uint4 x_10[1];
|
||||
};
|
||||
cbuffer cbuffer_x_12 : register(b0, space0) {
|
||||
uint4 x_12[1];
|
||||
};
|
||||
static float4 gl_FragCoord = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
cbuffer cbuffer_x_16 : register(b1, space0) {
|
||||
uint4 x_16[4];
|
||||
};
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void func0_i1_(inout int x) {
|
||||
int i = 0;
|
||||
bool x_137 = false;
|
||||
bool x_138 = false;
|
||||
bool x_138_phi = false;
|
||||
bool x_139_phi = false;
|
||||
const int x_124 = x;
|
||||
const bool x_125 = (x_124 < 1);
|
||||
x_139_phi = x_125;
|
||||
if (!(x_125)) {
|
||||
const int x_129 = x;
|
||||
const bool x_130 = (x_129 > 1);
|
||||
x_138_phi = x_130;
|
||||
if (x_130) {
|
||||
const float x_134 = asfloat(x_10[0].x);
|
||||
const uint scalar_offset = ((16u * uint(0))) / 4;
|
||||
const float x_136 = asfloat(x_12[scalar_offset / 4][scalar_offset % 4]);
|
||||
x_137 = (x_134 > x_136);
|
||||
x_138_phi = x_137;
|
||||
}
|
||||
x_138 = x_138_phi;
|
||||
x_139_phi = x_138;
|
||||
}
|
||||
if (x_139_phi) {
|
||||
return;
|
||||
}
|
||||
const float x_143 = asfloat(x_10[0].x);
|
||||
const uint scalar_offset_1 = ((16u * uint(0))) / 4;
|
||||
const float x_145 = asfloat(x_12[scalar_offset_1 / 4][scalar_offset_1 % 4]);
|
||||
if ((x_143 == x_145)) {
|
||||
i = 0;
|
||||
while (true) {
|
||||
if ((i < 2)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
const int x_154 = x;
|
||||
const int x_155 = clamp(x_154, 0, 3);
|
||||
const int x_156 = i;
|
||||
const uint scalar_offset_2 = ((16u * uint(0))) / 4;
|
||||
const float x_158 = asfloat(x_12[scalar_offset_2 / 4][scalar_offset_2 % 4]);
|
||||
const float x_160 = m[x_155][x_156];
|
||||
set_float2(m[x_155], x_156, (x_160 + x_158));
|
||||
i = (i + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void func1_() {
|
||||
int param = 0;
|
||||
const float x_167 = gl_FragCoord.y;
|
||||
if ((x_167 < 0.0f)) {
|
||||
return;
|
||||
}
|
||||
param = 1;
|
||||
func0_i1_(param);
|
||||
return;
|
||||
}
|
||||
|
||||
void main_1() {
|
||||
m = float4x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f));
|
||||
func1_();
|
||||
func1_();
|
||||
const float4x2 x_54 = m;
|
||||
const uint scalar_offset_3 = ((16u * uint(0))) / 4;
|
||||
const int x_56 = asint(x_16[scalar_offset_3 / 4][scalar_offset_3 % 4]);
|
||||
const uint scalar_offset_4 = ((16u * uint(0))) / 4;
|
||||
const int x_59 = asint(x_16[scalar_offset_4 / 4][scalar_offset_4 % 4]);
|
||||
const int x_62 = asint(x_16[1].x);
|
||||
const int x_65 = asint(x_16[1].x);
|
||||
const uint scalar_offset_5 = ((16u * uint(0))) / 4;
|
||||
const int x_68 = asint(x_16[scalar_offset_5 / 4][scalar_offset_5 % 4]);
|
||||
const uint scalar_offset_6 = ((16u * uint(0))) / 4;
|
||||
const int x_71 = asint(x_16[scalar_offset_6 / 4][scalar_offset_6 % 4]);
|
||||
const uint scalar_offset_7 = ((16u * uint(0))) / 4;
|
||||
const int x_74 = asint(x_16[scalar_offset_7 / 4][scalar_offset_7 % 4]);
|
||||
const uint scalar_offset_8 = ((16u * uint(0))) / 4;
|
||||
const int x_77 = asint(x_16[scalar_offset_8 / 4][scalar_offset_8 % 4]);
|
||||
const float4x2 x_83 = float4x2(float2(float(x_56), float(x_59)), float2(float(x_62), float(x_65)), float2(float(x_68), float(x_71)), float2(float(x_74), float(x_77)));
|
||||
if ((((all((x_54[0u] == x_83[0u])) & all((x_54[1u] == x_83[1u]))) & all((x_54[2u] == x_83[2u]))) & all((x_54[3u] == x_83[3u])))) {
|
||||
const int x_107 = asint(x_16[3].x);
|
||||
const uint scalar_offset_9 = ((16u * uint(0))) / 4;
|
||||
const int x_110 = asint(x_16[scalar_offset_9 / 4][scalar_offset_9 % 4]);
|
||||
const uint scalar_offset_10 = ((16u * uint(0))) / 4;
|
||||
const int x_113 = asint(x_16[scalar_offset_10 / 4][scalar_offset_10 % 4]);
|
||||
const int x_116 = asint(x_16[3].x);
|
||||
x_GLF_color = float4(float(x_107), float(x_110), float(x_113), float(x_116));
|
||||
} else {
|
||||
const uint scalar_offset_11 = ((16u * uint(0))) / 4;
|
||||
const int x_120 = asint(x_16[scalar_offset_11 / 4][scalar_offset_11 % 4]);
|
||||
const float x_121 = float(x_120);
|
||||
x_GLF_color = float4(x_121, x_121, x_121, x_121);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 gl_FragCoord_param : SV_Position;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
float4 x_GLF_color_1 : SV_Target0;
|
||||
};
|
||||
|
||||
main_out main_inner(float4 gl_FragCoord_param) {
|
||||
gl_FragCoord = gl_FragCoord_param;
|
||||
main_1();
|
||||
const main_out tint_symbol_6 = {x_GLF_color};
|
||||
return tint_symbol_6;
|
||||
}
|
||||
|
||||
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
|
||||
const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
|
||||
tint_symbol_2 wrapper_result = (tint_symbol_2)0;
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct buf2 {
|
||||
/* 0x0000 */ float one;
|
||||
};
|
||||
struct tint_padded_array_element {
|
||||
/* 0x0000 */ float el;
|
||||
/* 0x0004 */ int8_t tint_pad[12];
|
||||
};
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ tint_padded_array_element arr[1];
|
||||
};
|
||||
struct buf0 {
|
||||
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_float_values;
|
||||
};
|
||||
struct tint_padded_array_element_1 {
|
||||
/* 0x0000 */ int el;
|
||||
/* 0x0004 */ int8_t tint_pad_1[12];
|
||||
};
|
||||
struct tint_array_wrapper_1 {
|
||||
/* 0x0000 */ tint_padded_array_element_1 arr[4];
|
||||
};
|
||||
struct buf1 {
|
||||
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_int_values;
|
||||
};
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 x_GLF_color_1 [[color(0)]];
|
||||
};
|
||||
|
||||
void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, thread float4x2* const tint_symbol_3) {
|
||||
int i = 0;
|
||||
bool x_137 = false;
|
||||
bool x_138 = false;
|
||||
bool x_138_phi = false;
|
||||
bool x_139_phi = false;
|
||||
int const x_124 = *(x);
|
||||
bool const x_125 = (x_124 < 1);
|
||||
x_139_phi = x_125;
|
||||
if (!(x_125)) {
|
||||
int const x_129 = *(x);
|
||||
bool const x_130 = (x_129 > 1);
|
||||
x_138_phi = x_130;
|
||||
if (x_130) {
|
||||
float const x_134 = x_10.one;
|
||||
float const x_136 = x_12.x_GLF_uniform_float_values.arr[0].el;
|
||||
x_137 = (x_134 > x_136);
|
||||
x_138_phi = x_137;
|
||||
}
|
||||
x_138 = x_138_phi;
|
||||
x_139_phi = x_138;
|
||||
}
|
||||
bool const x_139 = x_139_phi;
|
||||
if (x_139) {
|
||||
return;
|
||||
}
|
||||
float const x_143 = x_10.one;
|
||||
float const x_145 = x_12.x_GLF_uniform_float_values.arr[0].el;
|
||||
if ((x_143 == x_145)) {
|
||||
i = 0;
|
||||
while (true) {
|
||||
int const x_150 = i;
|
||||
if ((x_150 < 2)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
int const x_154 = *(x);
|
||||
int const x_155 = clamp(x_154, 0, 3);
|
||||
int const x_156 = i;
|
||||
float const x_158 = x_12.x_GLF_uniform_float_values.arr[0].el;
|
||||
float const x_160 = (*(tint_symbol_3))[x_155][x_156];
|
||||
(*(tint_symbol_3))[x_155][x_156] = (x_160 + x_158);
|
||||
int const x_163 = i;
|
||||
i = as_type<int>((as_type<uint>(x_163) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void func1_(constant buf2& x_10, constant buf0& x_12, thread float4* const tint_symbol_4, thread float4x2* const tint_symbol_5) {
|
||||
int param = 0;
|
||||
float const x_167 = (*(tint_symbol_4)).y;
|
||||
if ((x_167 < 0.0f)) {
|
||||
return;
|
||||
}
|
||||
param = 1;
|
||||
func0_i1_(x_10, x_12, &(param), tint_symbol_5);
|
||||
return;
|
||||
}
|
||||
|
||||
void main_1(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, thread float4x2* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
|
||||
*(tint_symbol_6) = float4x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f));
|
||||
func1_(x_10, x_12, tint_symbol_7, tint_symbol_6);
|
||||
func1_(x_10, x_12, tint_symbol_7, tint_symbol_6);
|
||||
float4x2 const x_54 = *(tint_symbol_6);
|
||||
int const x_56 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
int const x_59 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
int const x_62 = x_16.x_GLF_uniform_int_values.arr[1].el;
|
||||
int const x_65 = x_16.x_GLF_uniform_int_values.arr[1].el;
|
||||
int const x_68 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
int const x_71 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
int const x_74 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
int const x_77 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
float4x2 const x_83 = float4x2(float2(float(x_56), float(x_59)), float2(float(x_62), float(x_65)), float2(float(x_68), float(x_71)), float2(float(x_74), float(x_77)));
|
||||
if ((((all((x_54[0u] == x_83[0u])) & all((x_54[1u] == x_83[1u]))) & all((x_54[2u] == x_83[2u]))) & all((x_54[3u] == x_83[3u])))) {
|
||||
int const x_107 = x_16.x_GLF_uniform_int_values.arr[3].el;
|
||||
int const x_110 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
int const x_113 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
int const x_116 = x_16.x_GLF_uniform_int_values.arr[3].el;
|
||||
*(tint_symbol_8) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
|
||||
} else {
|
||||
int const x_120 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
float const x_121 = float(x_120);
|
||||
*(tint_symbol_8) = float4(x_121, x_121, x_121, x_121);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
main_out tint_symbol_inner(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4x2* const tint_symbol_10, thread float4* const tint_symbol_11) {
|
||||
*(tint_symbol_9) = gl_FragCoord_param;
|
||||
main_1(x_10, x_12, x_16, tint_symbol_10, tint_symbol_9, tint_symbol_11);
|
||||
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)};
|
||||
return tint_symbol_2;
|
||||
}
|
||||
|
||||
fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_10 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]], constant buf1& x_16 [[buffer(2)]]) {
|
||||
thread float4 tint_symbol_12 = 0.0f;
|
||||
thread float4x2 tint_symbol_13 = float4x2(0.0f);
|
||||
thread float4 tint_symbol_14 = 0.0f;
|
||||
main_out const inner_result = tint_symbol_inner(x_10, x_12, x_16, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
|
||||
tint_symbol_1 wrapper_result = {};
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
@@ -1,314 +0,0 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 208
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%92 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %gl_FragCoord_param_1 %x_GLF_color_1_1
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1"
|
||||
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
|
||||
OpName %m "m"
|
||||
OpName %buf2 "buf2"
|
||||
OpMemberName %buf2 0 "one"
|
||||
OpName %x_10 "x_10"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
|
||||
OpName %x_12 "x_12"
|
||||
OpName %gl_FragCoord "gl_FragCoord"
|
||||
OpName %buf1 "buf1"
|
||||
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
|
||||
OpName %x_16 "x_16"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %func0_i1_ "func0_i1_"
|
||||
OpName %x "x"
|
||||
OpName %i "i"
|
||||
OpName %x_137 "x_137"
|
||||
OpName %x_138 "x_138"
|
||||
OpName %x_138_phi "x_138_phi"
|
||||
OpName %x_139_phi "x_139_phi"
|
||||
OpName %func1_ "func1_"
|
||||
OpName %param "param"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %main_out "main_out"
|
||||
OpMemberName %main_out 0 "x_GLF_color_1"
|
||||
OpName %main_inner "main_inner"
|
||||
OpName %gl_FragCoord_param "gl_FragCoord_param"
|
||||
OpName %main "main"
|
||||
OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord
|
||||
OpDecorate %x_GLF_color_1_1 Location 0
|
||||
OpDecorate %buf2 Block
|
||||
OpMemberDecorate %buf2 0 Offset 0
|
||||
OpDecorate %x_10 NonWritable
|
||||
OpDecorate %x_10 DescriptorSet 0
|
||||
OpDecorate %x_10 Binding 2
|
||||
OpDecorate %buf0 Block
|
||||
OpMemberDecorate %buf0 0 Offset 0
|
||||
OpDecorate %_arr_float_uint_1 ArrayStride 16
|
||||
OpDecorate %x_12 NonWritable
|
||||
OpDecorate %x_12 DescriptorSet 0
|
||||
OpDecorate %x_12 Binding 0
|
||||
OpDecorate %buf1 Block
|
||||
OpMemberDecorate %buf1 0 Offset 0
|
||||
OpDecorate %_arr_int_uint_4 ArrayStride 16
|
||||
OpDecorate %x_16 NonWritable
|
||||
OpDecorate %x_16 DescriptorSet 0
|
||||
OpDecorate %x_16 Binding 1
|
||||
OpMemberDecorate %main_out 0 Offset 0
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Input_v4float = OpTypePointer Input %v4float
|
||||
%gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%7 = OpConstantNull %v4float
|
||||
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %7
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat4v2float = OpTypeMatrix %v2float 4
|
||||
%_ptr_Private_mat4v2float = OpTypePointer Private %mat4v2float
|
||||
%12 = OpConstantNull %mat4v2float
|
||||
%m = OpVariable %_ptr_Private_mat4v2float Private %12
|
||||
%buf2 = OpTypeStruct %float
|
||||
%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
|
||||
%x_10 = OpVariable %_ptr_Uniform_buf2 Uniform
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_float_uint_1 = OpTypeArray %float %uint_1
|
||||
%buf0 = OpTypeStruct %_arr_float_uint_1
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%x_12 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
|
||||
%int = OpTypeInt 32 1
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_int_uint_4 = OpTypeArray %int %uint_4
|
||||
%buf1 = OpTypeStruct %_arr_int_uint_4
|
||||
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
|
||||
%x_16 = OpVariable %_ptr_Uniform_buf1 Uniform
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
|
||||
%void = OpTypeVoid
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%31 = OpTypeFunction %void %_ptr_Function_int
|
||||
%38 = OpConstantNull %int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%42 = OpConstantNull %bool
|
||||
%int_1 = OpConstant %int 1
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%_ptr_Private_float = OpTypePointer Private %float
|
||||
%104 = OpTypeFunction %void
|
||||
%float_0 = OpConstant %float 0
|
||||
%118 = OpConstantComposite %v2float %float_0 %float_0
|
||||
%119 = OpConstantComposite %mat4v2float %118 %118 %118 %118
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%v2bool = OpTypeVector %bool 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%195 = OpTypeFunction %main_out %v4float
|
||||
%func0_i1_ = OpFunction %void None %31
|
||||
%x = OpFunctionParameter %_ptr_Function_int
|
||||
%36 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_int Function %38
|
||||
%x_137 = OpVariable %_ptr_Function_bool Function %42
|
||||
%x_138 = OpVariable %_ptr_Function_bool Function %42
|
||||
%x_138_phi = OpVariable %_ptr_Function_bool Function %42
|
||||
%x_139_phi = OpVariable %_ptr_Function_bool Function %42
|
||||
%47 = OpLoad %int %x
|
||||
%49 = OpSLessThan %bool %47 %int_1
|
||||
OpStore %x_139_phi %49
|
||||
%50 = OpLogicalNot %bool %49
|
||||
OpSelectionMerge %51 None
|
||||
OpBranchConditional %50 %52 %51
|
||||
%52 = OpLabel
|
||||
%54 = OpLoad %int %x
|
||||
%55 = OpSGreaterThan %bool %54 %int_1
|
||||
OpStore %x_138_phi %55
|
||||
OpSelectionMerge %56 None
|
||||
OpBranchConditional %55 %57 %56
|
||||
%57 = OpLabel
|
||||
%60 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0
|
||||
%61 = OpLoad %float %60
|
||||
%63 = OpAccessChain %_ptr_Uniform_float %x_12 %uint_0 %int_0
|
||||
%64 = OpLoad %float %63
|
||||
%65 = OpFOrdGreaterThan %bool %61 %64
|
||||
OpStore %x_137 %65
|
||||
%66 = OpLoad %bool %x_137
|
||||
OpStore %x_138_phi %66
|
||||
OpBranch %56
|
||||
%56 = OpLabel
|
||||
%67 = OpLoad %bool %x_138_phi
|
||||
OpStore %x_138 %67
|
||||
%68 = OpLoad %bool %x_138
|
||||
OpStore %x_139_phi %68
|
||||
OpBranch %51
|
||||
%51 = OpLabel
|
||||
%69 = OpLoad %bool %x_139_phi
|
||||
OpSelectionMerge %70 None
|
||||
OpBranchConditional %69 %71 %70
|
||||
%71 = OpLabel
|
||||
OpReturn
|
||||
%70 = OpLabel
|
||||
%72 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0
|
||||
%73 = OpLoad %float %72
|
||||
%74 = OpAccessChain %_ptr_Uniform_float %x_12 %uint_0 %int_0
|
||||
%75 = OpLoad %float %74
|
||||
%76 = OpFOrdEqual %bool %73 %75
|
||||
OpSelectionMerge %77 None
|
||||
OpBranchConditional %76 %78 %77
|
||||
%78 = OpLabel
|
||||
OpStore %i %int_0
|
||||
OpBranch %79
|
||||
%79 = OpLabel
|
||||
OpLoopMerge %80 %81 None
|
||||
OpBranch %82
|
||||
%82 = OpLabel
|
||||
%83 = OpLoad %int %i
|
||||
%85 = OpSLessThan %bool %83 %int_2
|
||||
OpSelectionMerge %86 None
|
||||
OpBranchConditional %85 %87 %88
|
||||
%87 = OpLabel
|
||||
OpBranch %86
|
||||
%88 = OpLabel
|
||||
OpBranch %80
|
||||
%86 = OpLabel
|
||||
OpBranch %81
|
||||
%81 = OpLabel
|
||||
%90 = OpLoad %int %x
|
||||
%91 = OpExtInst %int %92 SClamp %90 %int_0 %int_3
|
||||
%94 = OpLoad %int %i
|
||||
%95 = OpAccessChain %_ptr_Uniform_float %x_12 %uint_0 %int_0
|
||||
%96 = OpLoad %float %95
|
||||
%98 = OpAccessChain %_ptr_Private_float %m %91 %94
|
||||
%99 = OpLoad %float %98
|
||||
%100 = OpAccessChain %_ptr_Private_float %m %91 %94
|
||||
%101 = OpFAdd %float %99 %96
|
||||
OpStore %100 %101
|
||||
%102 = OpLoad %int %i
|
||||
%103 = OpIAdd %int %102 %int_1
|
||||
OpStore %i %103
|
||||
OpBranch %79
|
||||
%80 = OpLabel
|
||||
OpBranch %77
|
||||
%77 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%func1_ = OpFunction %void None %104
|
||||
%106 = OpLabel
|
||||
%param = OpVariable %_ptr_Function_int Function %38
|
||||
%108 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
||||
%109 = OpLoad %float %108
|
||||
%111 = OpFOrdLessThan %bool %109 %float_0
|
||||
OpSelectionMerge %112 None
|
||||
OpBranchConditional %111 %113 %112
|
||||
%113 = OpLabel
|
||||
OpReturn
|
||||
%112 = OpLabel
|
||||
OpStore %param %int_1
|
||||
%114 = OpFunctionCall %void %func0_i1_ %param
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_1 = OpFunction %void None %104
|
||||
%117 = OpLabel
|
||||
OpStore %m %119
|
||||
%120 = OpFunctionCall %void %func1_
|
||||
%121 = OpFunctionCall %void %func1_
|
||||
%122 = OpLoad %mat4v2float %m
|
||||
%124 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%125 = OpLoad %int %124
|
||||
%126 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%127 = OpLoad %int %126
|
||||
%128 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_1
|
||||
%129 = OpLoad %int %128
|
||||
%130 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_1
|
||||
%131 = OpLoad %int %130
|
||||
%132 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%133 = OpLoad %int %132
|
||||
%134 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%135 = OpLoad %int %134
|
||||
%136 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%137 = OpLoad %int %136
|
||||
%138 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%139 = OpLoad %int %138
|
||||
%140 = OpConvertSToF %float %125
|
||||
%141 = OpConvertSToF %float %127
|
||||
%142 = OpCompositeConstruct %v2float %140 %141
|
||||
%143 = OpConvertSToF %float %129
|
||||
%144 = OpConvertSToF %float %131
|
||||
%145 = OpCompositeConstruct %v2float %143 %144
|
||||
%146 = OpConvertSToF %float %133
|
||||
%147 = OpConvertSToF %float %135
|
||||
%148 = OpCompositeConstruct %v2float %146 %147
|
||||
%149 = OpConvertSToF %float %137
|
||||
%150 = OpConvertSToF %float %139
|
||||
%151 = OpCompositeConstruct %v2float %149 %150
|
||||
%152 = OpCompositeConstruct %mat4v2float %142 %145 %148 %151
|
||||
%154 = OpCompositeExtract %v2float %122 0
|
||||
%155 = OpCompositeExtract %v2float %152 0
|
||||
%156 = OpFOrdEqual %v2bool %154 %155
|
||||
%153 = OpAll %bool %156
|
||||
%159 = OpCompositeExtract %v2float %122 1
|
||||
%160 = OpCompositeExtract %v2float %152 1
|
||||
%161 = OpFOrdEqual %v2bool %159 %160
|
||||
%158 = OpAll %bool %161
|
||||
%162 = OpLogicalAnd %bool %153 %158
|
||||
%165 = OpCompositeExtract %v2float %122 2
|
||||
%166 = OpCompositeExtract %v2float %152 2
|
||||
%167 = OpFOrdEqual %v2bool %165 %166
|
||||
%163 = OpAll %bool %167
|
||||
%168 = OpLogicalAnd %bool %162 %163
|
||||
%171 = OpCompositeExtract %v2float %122 3
|
||||
%172 = OpCompositeExtract %v2float %152 3
|
||||
%173 = OpFOrdEqual %v2bool %171 %172
|
||||
%169 = OpAll %bool %173
|
||||
%174 = OpLogicalAnd %bool %168 %169
|
||||
OpSelectionMerge %175 None
|
||||
OpBranchConditional %174 %176 %177
|
||||
%176 = OpLabel
|
||||
%178 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_3
|
||||
%179 = OpLoad %int %178
|
||||
%180 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%181 = OpLoad %int %180
|
||||
%182 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%183 = OpLoad %int %182
|
||||
%184 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_3
|
||||
%185 = OpLoad %int %184
|
||||
%186 = OpConvertSToF %float %179
|
||||
%187 = OpConvertSToF %float %181
|
||||
%188 = OpConvertSToF %float %183
|
||||
%189 = OpConvertSToF %float %185
|
||||
%190 = OpCompositeConstruct %v4float %186 %187 %188 %189
|
||||
OpStore %x_GLF_color %190
|
||||
OpBranch %175
|
||||
%177 = OpLabel
|
||||
%191 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%192 = OpLoad %int %191
|
||||
%193 = OpConvertSToF %float %192
|
||||
%194 = OpCompositeConstruct %v4float %193 %193 %193 %193
|
||||
OpStore %x_GLF_color %194
|
||||
OpBranch %175
|
||||
%175 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %195
|
||||
%gl_FragCoord_param = OpFunctionParameter %v4float
|
||||
%199 = OpLabel
|
||||
OpStore %gl_FragCoord %gl_FragCoord_param
|
||||
%200 = OpFunctionCall %void %main_1
|
||||
%201 = OpLoad %v4float %x_GLF_color
|
||||
%202 = OpCompositeConstruct %main_out %201
|
||||
OpReturnValue %202
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %104
|
||||
%204 = OpLabel
|
||||
%206 = OpLoad %v4float %gl_FragCoord_param_1
|
||||
%205 = OpFunctionCall %main_out %main_inner %206
|
||||
%207 = OpCompositeExtract %v4float %205 0
|
||||
OpStore %x_GLF_color_1_1 %207
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,133 +0,0 @@
|
||||
[[block]]
|
||||
struct buf2 {
|
||||
one : f32;
|
||||
};
|
||||
|
||||
type Arr = [[stride(16)]] array<f32, 1>;
|
||||
|
||||
[[block]]
|
||||
struct buf0 {
|
||||
x_GLF_uniform_float_values : Arr;
|
||||
};
|
||||
|
||||
type Arr_1 = [[stride(16)]] array<i32, 4>;
|
||||
|
||||
[[block]]
|
||||
struct buf1 {
|
||||
x_GLF_uniform_int_values : Arr_1;
|
||||
};
|
||||
|
||||
var<private> m : mat4x2<f32>;
|
||||
|
||||
[[group(0), binding(2)]] var<uniform> x_10 : buf2;
|
||||
|
||||
[[group(0), binding(0)]] var<uniform> x_12 : buf0;
|
||||
|
||||
var<private> gl_FragCoord : vec4<f32>;
|
||||
|
||||
[[group(0), binding(1)]] var<uniform> x_16 : buf1;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn func0_i1_(x : ptr<function, i32>) {
|
||||
var i : i32;
|
||||
var x_137 : bool;
|
||||
var x_138 : bool;
|
||||
var x_138_phi : bool;
|
||||
var x_139_phi : bool;
|
||||
let x_124 : i32 = *(x);
|
||||
let x_125 : bool = (x_124 < 1);
|
||||
x_139_phi = x_125;
|
||||
if (!(x_125)) {
|
||||
let x_129 : i32 = *(x);
|
||||
let x_130 : bool = (x_129 > 1);
|
||||
x_138_phi = x_130;
|
||||
if (x_130) {
|
||||
let x_134 : f32 = x_10.one;
|
||||
let x_136 : f32 = x_12.x_GLF_uniform_float_values[0];
|
||||
x_137 = (x_134 > x_136);
|
||||
x_138_phi = x_137;
|
||||
}
|
||||
x_138 = x_138_phi;
|
||||
x_139_phi = x_138;
|
||||
}
|
||||
let x_139 : bool = x_139_phi;
|
||||
if (x_139) {
|
||||
return;
|
||||
}
|
||||
let x_143 : f32 = x_10.one;
|
||||
let x_145 : f32 = x_12.x_GLF_uniform_float_values[0];
|
||||
if ((x_143 == x_145)) {
|
||||
i = 0;
|
||||
loop {
|
||||
let x_150 : i32 = i;
|
||||
if ((x_150 < 2)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_154 : i32 = *(x);
|
||||
let x_155 : i32 = clamp(x_154, 0, 3);
|
||||
let x_156 : i32 = i;
|
||||
let x_158 : f32 = x_12.x_GLF_uniform_float_values[0];
|
||||
let x_160 : f32 = m[x_155][x_156];
|
||||
m[x_155][x_156] = (x_160 + x_158);
|
||||
let x_163 : i32 = i;
|
||||
i = (x_163 + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
fn func1_() {
|
||||
var param : i32;
|
||||
let x_167 : f32 = gl_FragCoord.y;
|
||||
if ((x_167 < 0.0)) {
|
||||
return;
|
||||
}
|
||||
param = 1;
|
||||
func0_i1_(&(param));
|
||||
return;
|
||||
}
|
||||
|
||||
fn main_1() {
|
||||
m = mat4x2<f32>(vec2<f32>(0.0, 0.0), vec2<f32>(0.0, 0.0), vec2<f32>(0.0, 0.0), vec2<f32>(0.0, 0.0));
|
||||
func1_();
|
||||
func1_();
|
||||
let x_54 : mat4x2<f32> = m;
|
||||
let x_56 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_59 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_62 : i32 = x_16.x_GLF_uniform_int_values[1];
|
||||
let x_65 : i32 = x_16.x_GLF_uniform_int_values[1];
|
||||
let x_68 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_71 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_74 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_77 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_83 : mat4x2<f32> = mat4x2<f32>(vec2<f32>(f32(x_56), f32(x_59)), vec2<f32>(f32(x_62), f32(x_65)), vec2<f32>(f32(x_68), f32(x_71)), vec2<f32>(f32(x_74), f32(x_77)));
|
||||
if ((((all((x_54[0u] == x_83[0u])) & all((x_54[1u] == x_83[1u]))) & all((x_54[2u] == x_83[2u]))) & all((x_54[3u] == x_83[3u])))) {
|
||||
let x_107 : i32 = x_16.x_GLF_uniform_int_values[3];
|
||||
let x_110 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_113 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_116 : i32 = x_16.x_GLF_uniform_int_values[3];
|
||||
x_GLF_color = vec4<f32>(f32(x_107), f32(x_110), f32(x_113), f32(x_116));
|
||||
} else {
|
||||
let x_120 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_121 : f32 = f32(x_120);
|
||||
x_GLF_color = vec4<f32>(x_121, x_121, x_121, x_121);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
[[location(0)]]
|
||||
x_GLF_color_1 : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main([[builtin(position)]] gl_FragCoord_param : vec4<f32>) -> main_out {
|
||||
gl_FragCoord = gl_FragCoord_param;
|
||||
main_1();
|
||||
return main_out(x_GLF_color);
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
void set_float2(inout float2 vec, int idx, float val) {
|
||||
vec = (idx.xx == int2(0, 1)) ? val.xx : vec;
|
||||
}
|
||||
|
||||
static float4x2 m = float4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
cbuffer cbuffer_x_10 : register(b2, space0) {
|
||||
uint4 x_10[1];
|
||||
};
|
||||
cbuffer cbuffer_x_12 : register(b0, space0) {
|
||||
uint4 x_12[1];
|
||||
};
|
||||
static float4 gl_FragCoord = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
cbuffer cbuffer_x_16 : register(b1, space0) {
|
||||
uint4 x_16[4];
|
||||
};
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void func0_i1_(inout int x) {
|
||||
int i = 0;
|
||||
bool x_137 = false;
|
||||
bool x_138 = false;
|
||||
bool x_138_phi = false;
|
||||
bool x_139_phi = false;
|
||||
const int x_124 = x;
|
||||
const bool x_125 = (x_124 < 1);
|
||||
x_139_phi = x_125;
|
||||
if (!(x_125)) {
|
||||
const int x_129 = x;
|
||||
const bool x_130 = (x_129 > 1);
|
||||
x_138_phi = x_130;
|
||||
if (x_130) {
|
||||
const float x_134 = asfloat(x_10[0].x);
|
||||
const uint scalar_offset = ((16u * uint(0))) / 4;
|
||||
const float x_136 = asfloat(x_12[scalar_offset / 4][scalar_offset % 4]);
|
||||
x_137 = (x_134 > x_136);
|
||||
x_138_phi = x_137;
|
||||
}
|
||||
x_138 = x_138_phi;
|
||||
x_139_phi = x_138;
|
||||
}
|
||||
if (x_139_phi) {
|
||||
return;
|
||||
}
|
||||
const float x_143 = asfloat(x_10[0].x);
|
||||
const uint scalar_offset_1 = ((16u * uint(0))) / 4;
|
||||
const float x_145 = asfloat(x_12[scalar_offset_1 / 4][scalar_offset_1 % 4]);
|
||||
if ((x_143 == x_145)) {
|
||||
i = 0;
|
||||
while (true) {
|
||||
if ((i < 2)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
const int x_154 = x;
|
||||
const int x_155 = clamp(x_154, 0, 3);
|
||||
const int x_156 = i;
|
||||
const uint scalar_offset_2 = ((16u * uint(0))) / 4;
|
||||
const float x_158 = asfloat(x_12[scalar_offset_2 / 4][scalar_offset_2 % 4]);
|
||||
const float x_160 = m[x_155][x_156];
|
||||
set_float2(m[x_155], x_156, (x_160 + x_158));
|
||||
i = (i + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void func1_() {
|
||||
int param = 0;
|
||||
const float x_167 = gl_FragCoord.y;
|
||||
if ((x_167 < 0.0f)) {
|
||||
return;
|
||||
}
|
||||
param = 1;
|
||||
func0_i1_(param);
|
||||
return;
|
||||
}
|
||||
|
||||
void main_1() {
|
||||
m = float4x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f));
|
||||
func1_();
|
||||
func1_();
|
||||
const float4x2 x_54 = m;
|
||||
const uint scalar_offset_3 = ((16u * uint(0))) / 4;
|
||||
const int x_56 = asint(x_16[scalar_offset_3 / 4][scalar_offset_3 % 4]);
|
||||
const uint scalar_offset_4 = ((16u * uint(0))) / 4;
|
||||
const int x_59 = asint(x_16[scalar_offset_4 / 4][scalar_offset_4 % 4]);
|
||||
const int x_62 = asint(x_16[1].x);
|
||||
const int x_65 = asint(x_16[1].x);
|
||||
const uint scalar_offset_5 = ((16u * uint(0))) / 4;
|
||||
const int x_68 = asint(x_16[scalar_offset_5 / 4][scalar_offset_5 % 4]);
|
||||
const uint scalar_offset_6 = ((16u * uint(0))) / 4;
|
||||
const int x_71 = asint(x_16[scalar_offset_6 / 4][scalar_offset_6 % 4]);
|
||||
const uint scalar_offset_7 = ((16u * uint(0))) / 4;
|
||||
const int x_74 = asint(x_16[scalar_offset_7 / 4][scalar_offset_7 % 4]);
|
||||
const uint scalar_offset_8 = ((16u * uint(0))) / 4;
|
||||
const int x_77 = asint(x_16[scalar_offset_8 / 4][scalar_offset_8 % 4]);
|
||||
const float4x2 x_83 = float4x2(float2(float(x_56), float(x_59)), float2(float(x_62), float(x_65)), float2(float(x_68), float(x_71)), float2(float(x_74), float(x_77)));
|
||||
bool tint_tmp_2 = all((x_54[0u] == x_83[0u]));
|
||||
if (tint_tmp_2) {
|
||||
tint_tmp_2 = all((x_54[1u] == x_83[1u]));
|
||||
}
|
||||
bool tint_tmp_1 = (tint_tmp_2);
|
||||
if (tint_tmp_1) {
|
||||
tint_tmp_1 = all((x_54[2u] == x_83[2u]));
|
||||
}
|
||||
bool tint_tmp = (tint_tmp_1);
|
||||
if (tint_tmp) {
|
||||
tint_tmp = all((x_54[3u] == x_83[3u]));
|
||||
}
|
||||
if ((tint_tmp)) {
|
||||
const int x_107 = asint(x_16[3].x);
|
||||
const uint scalar_offset_9 = ((16u * uint(0))) / 4;
|
||||
const int x_110 = asint(x_16[scalar_offset_9 / 4][scalar_offset_9 % 4]);
|
||||
const uint scalar_offset_10 = ((16u * uint(0))) / 4;
|
||||
const int x_113 = asint(x_16[scalar_offset_10 / 4][scalar_offset_10 % 4]);
|
||||
const int x_116 = asint(x_16[3].x);
|
||||
x_GLF_color = float4(float(x_107), float(x_110), float(x_113), float(x_116));
|
||||
} else {
|
||||
const uint scalar_offset_11 = ((16u * uint(0))) / 4;
|
||||
const int x_120 = asint(x_16[scalar_offset_11 / 4][scalar_offset_11 % 4]);
|
||||
const float x_121 = float(x_120);
|
||||
x_GLF_color = float4(x_121, x_121, x_121, x_121);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 gl_FragCoord_param : SV_Position;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
float4 x_GLF_color_1 : SV_Target0;
|
||||
};
|
||||
|
||||
main_out main_inner(float4 gl_FragCoord_param) {
|
||||
gl_FragCoord = gl_FragCoord_param;
|
||||
main_1();
|
||||
const main_out tint_symbol_6 = {x_GLF_color};
|
||||
return tint_symbol_6;
|
||||
}
|
||||
|
||||
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
|
||||
const main_out inner_result = main_inner(tint_symbol.gl_FragCoord_param);
|
||||
tint_symbol_2 wrapper_result = (tint_symbol_2)0;
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct buf2 {
|
||||
/* 0x0000 */ float one;
|
||||
};
|
||||
struct tint_padded_array_element {
|
||||
/* 0x0000 */ float el;
|
||||
/* 0x0004 */ int8_t tint_pad[12];
|
||||
};
|
||||
struct tint_array_wrapper {
|
||||
/* 0x0000 */ tint_padded_array_element arr[1];
|
||||
};
|
||||
struct buf0 {
|
||||
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_float_values;
|
||||
};
|
||||
struct tint_padded_array_element_1 {
|
||||
/* 0x0000 */ int el;
|
||||
/* 0x0004 */ int8_t tint_pad_1[12];
|
||||
};
|
||||
struct tint_array_wrapper_1 {
|
||||
/* 0x0000 */ tint_padded_array_element_1 arr[4];
|
||||
};
|
||||
struct buf1 {
|
||||
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_int_values;
|
||||
};
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol_1 {
|
||||
float4 x_GLF_color_1 [[color(0)]];
|
||||
};
|
||||
|
||||
void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, thread float4x2* const tint_symbol_3) {
|
||||
int i = 0;
|
||||
bool x_137 = false;
|
||||
bool x_138 = false;
|
||||
bool x_138_phi = false;
|
||||
bool x_139_phi = false;
|
||||
int const x_124 = *(x);
|
||||
bool const x_125 = (x_124 < 1);
|
||||
x_139_phi = x_125;
|
||||
if (!(x_125)) {
|
||||
int const x_129 = *(x);
|
||||
bool const x_130 = (x_129 > 1);
|
||||
x_138_phi = x_130;
|
||||
if (x_130) {
|
||||
float const x_134 = x_10.one;
|
||||
float const x_136 = x_12.x_GLF_uniform_float_values.arr[0].el;
|
||||
x_137 = (x_134 > x_136);
|
||||
x_138_phi = x_137;
|
||||
}
|
||||
x_138 = x_138_phi;
|
||||
x_139_phi = x_138;
|
||||
}
|
||||
bool const x_139 = x_139_phi;
|
||||
if (x_139) {
|
||||
return;
|
||||
}
|
||||
float const x_143 = x_10.one;
|
||||
float const x_145 = x_12.x_GLF_uniform_float_values.arr[0].el;
|
||||
if ((x_143 == x_145)) {
|
||||
i = 0;
|
||||
while (true) {
|
||||
int const x_150 = i;
|
||||
if ((x_150 < 2)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
int const x_154 = *(x);
|
||||
int const x_155 = clamp(x_154, 0, 3);
|
||||
int const x_156 = i;
|
||||
float const x_158 = x_12.x_GLF_uniform_float_values.arr[0].el;
|
||||
float const x_160 = (*(tint_symbol_3))[x_155][x_156];
|
||||
(*(tint_symbol_3))[x_155][x_156] = (x_160 + x_158);
|
||||
int const x_163 = i;
|
||||
i = as_type<int>((as_type<uint>(x_163) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void func1_(constant buf2& x_10, constant buf0& x_12, thread float4* const tint_symbol_4, thread float4x2* const tint_symbol_5) {
|
||||
int param = 0;
|
||||
float const x_167 = (*(tint_symbol_4)).y;
|
||||
if ((x_167 < 0.0f)) {
|
||||
return;
|
||||
}
|
||||
param = 1;
|
||||
func0_i1_(x_10, x_12, &(param), tint_symbol_5);
|
||||
return;
|
||||
}
|
||||
|
||||
void main_1(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, thread float4x2* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
|
||||
*(tint_symbol_6) = float4x2(float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f), float2(0.0f, 0.0f));
|
||||
func1_(x_10, x_12, tint_symbol_7, tint_symbol_6);
|
||||
func1_(x_10, x_12, tint_symbol_7, tint_symbol_6);
|
||||
float4x2 const x_54 = *(tint_symbol_6);
|
||||
int const x_56 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
int const x_59 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
int const x_62 = x_16.x_GLF_uniform_int_values.arr[1].el;
|
||||
int const x_65 = x_16.x_GLF_uniform_int_values.arr[1].el;
|
||||
int const x_68 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
int const x_71 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
int const x_74 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
int const x_77 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
float4x2 const x_83 = float4x2(float2(float(x_56), float(x_59)), float2(float(x_62), float(x_65)), float2(float(x_68), float(x_71)), float2(float(x_74), float(x_77)));
|
||||
if ((((all((x_54[0u] == x_83[0u])) && all((x_54[1u] == x_83[1u]))) && all((x_54[2u] == x_83[2u]))) && all((x_54[3u] == x_83[3u])))) {
|
||||
int const x_107 = x_16.x_GLF_uniform_int_values.arr[3].el;
|
||||
int const x_110 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
int const x_113 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
int const x_116 = x_16.x_GLF_uniform_int_values.arr[3].el;
|
||||
*(tint_symbol_8) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
|
||||
} else {
|
||||
int const x_120 = x_16.x_GLF_uniform_int_values.arr[0].el;
|
||||
float const x_121 = float(x_120);
|
||||
*(tint_symbol_8) = float4(x_121, x_121, x_121, x_121);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
main_out tint_symbol_inner(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4x2* const tint_symbol_10, thread float4* const tint_symbol_11) {
|
||||
*(tint_symbol_9) = gl_FragCoord_param;
|
||||
main_1(x_10, x_12, x_16, tint_symbol_10, tint_symbol_9, tint_symbol_11);
|
||||
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_11)};
|
||||
return tint_symbol_2;
|
||||
}
|
||||
|
||||
fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf2& x_10 [[buffer(0)]], constant buf0& x_12 [[buffer(1)]], constant buf1& x_16 [[buffer(2)]]) {
|
||||
thread float4 tint_symbol_12 = 0.0f;
|
||||
thread float4x2 tint_symbol_13 = float4x2(0.0f);
|
||||
thread float4 tint_symbol_14 = 0.0f;
|
||||
main_out const inner_result = tint_symbol_inner(x_10, x_12, x_16, gl_FragCoord_param, &(tint_symbol_12), &(tint_symbol_13), &(tint_symbol_14));
|
||||
tint_symbol_1 wrapper_result = {};
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
@@ -1,329 +0,0 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 214
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%92 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %gl_FragCoord_param_1 %x_GLF_color_1_1
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1"
|
||||
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
|
||||
OpName %m "m"
|
||||
OpName %buf2 "buf2"
|
||||
OpMemberName %buf2 0 "one"
|
||||
OpName %x_10 "x_10"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
|
||||
OpName %x_12 "x_12"
|
||||
OpName %gl_FragCoord "gl_FragCoord"
|
||||
OpName %buf1 "buf1"
|
||||
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
|
||||
OpName %x_16 "x_16"
|
||||
OpName %x_GLF_color "x_GLF_color"
|
||||
OpName %func0_i1_ "func0_i1_"
|
||||
OpName %x "x"
|
||||
OpName %i "i"
|
||||
OpName %x_137 "x_137"
|
||||
OpName %x_138 "x_138"
|
||||
OpName %x_138_phi "x_138_phi"
|
||||
OpName %x_139_phi "x_139_phi"
|
||||
OpName %func1_ "func1_"
|
||||
OpName %param "param"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %main_out "main_out"
|
||||
OpMemberName %main_out 0 "x_GLF_color_1"
|
||||
OpName %main_inner "main_inner"
|
||||
OpName %gl_FragCoord_param "gl_FragCoord_param"
|
||||
OpName %main "main"
|
||||
OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord
|
||||
OpDecorate %x_GLF_color_1_1 Location 0
|
||||
OpDecorate %buf2 Block
|
||||
OpMemberDecorate %buf2 0 Offset 0
|
||||
OpDecorate %x_10 NonWritable
|
||||
OpDecorate %x_10 DescriptorSet 0
|
||||
OpDecorate %x_10 Binding 2
|
||||
OpDecorate %buf0 Block
|
||||
OpMemberDecorate %buf0 0 Offset 0
|
||||
OpDecorate %_arr_float_uint_1 ArrayStride 16
|
||||
OpDecorate %x_12 NonWritable
|
||||
OpDecorate %x_12 DescriptorSet 0
|
||||
OpDecorate %x_12 Binding 0
|
||||
OpDecorate %buf1 Block
|
||||
OpMemberDecorate %buf1 0 Offset 0
|
||||
OpDecorate %_arr_int_uint_4 ArrayStride 16
|
||||
OpDecorate %x_16 NonWritable
|
||||
OpDecorate %x_16 DescriptorSet 0
|
||||
OpDecorate %x_16 Binding 1
|
||||
OpMemberDecorate %main_out 0 Offset 0
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Input_v4float = OpTypePointer Input %v4float
|
||||
%gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%7 = OpConstantNull %v4float
|
||||
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %7
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat4v2float = OpTypeMatrix %v2float 4
|
||||
%_ptr_Private_mat4v2float = OpTypePointer Private %mat4v2float
|
||||
%12 = OpConstantNull %mat4v2float
|
||||
%m = OpVariable %_ptr_Private_mat4v2float Private %12
|
||||
%buf2 = OpTypeStruct %float
|
||||
%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
|
||||
%x_10 = OpVariable %_ptr_Uniform_buf2 Uniform
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_float_uint_1 = OpTypeArray %float %uint_1
|
||||
%buf0 = OpTypeStruct %_arr_float_uint_1
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%x_12 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
||||
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
|
||||
%int = OpTypeInt 32 1
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_int_uint_4 = OpTypeArray %int %uint_4
|
||||
%buf1 = OpTypeStruct %_arr_int_uint_4
|
||||
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
|
||||
%x_16 = OpVariable %_ptr_Uniform_buf1 Uniform
|
||||
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
|
||||
%void = OpTypeVoid
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%31 = OpTypeFunction %void %_ptr_Function_int
|
||||
%38 = OpConstantNull %int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%42 = OpConstantNull %bool
|
||||
%int_1 = OpConstant %int 1
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%_ptr_Private_float = OpTypePointer Private %float
|
||||
%104 = OpTypeFunction %void
|
||||
%float_0 = OpConstant %float 0
|
||||
%118 = OpConstantComposite %v2float %float_0 %float_0
|
||||
%119 = OpConstantComposite %mat4v2float %118 %118 %118 %118
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%v2bool = OpTypeVector %bool 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%201 = OpTypeFunction %main_out %v4float
|
||||
%func0_i1_ = OpFunction %void None %31
|
||||
%x = OpFunctionParameter %_ptr_Function_int
|
||||
%36 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_int Function %38
|
||||
%x_137 = OpVariable %_ptr_Function_bool Function %42
|
||||
%x_138 = OpVariable %_ptr_Function_bool Function %42
|
||||
%x_138_phi = OpVariable %_ptr_Function_bool Function %42
|
||||
%x_139_phi = OpVariable %_ptr_Function_bool Function %42
|
||||
%47 = OpLoad %int %x
|
||||
%49 = OpSLessThan %bool %47 %int_1
|
||||
OpStore %x_139_phi %49
|
||||
%50 = OpLogicalNot %bool %49
|
||||
OpSelectionMerge %51 None
|
||||
OpBranchConditional %50 %52 %51
|
||||
%52 = OpLabel
|
||||
%54 = OpLoad %int %x
|
||||
%55 = OpSGreaterThan %bool %54 %int_1
|
||||
OpStore %x_138_phi %55
|
||||
OpSelectionMerge %56 None
|
||||
OpBranchConditional %55 %57 %56
|
||||
%57 = OpLabel
|
||||
%60 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0
|
||||
%61 = OpLoad %float %60
|
||||
%63 = OpAccessChain %_ptr_Uniform_float %x_12 %uint_0 %int_0
|
||||
%64 = OpLoad %float %63
|
||||
%65 = OpFOrdGreaterThan %bool %61 %64
|
||||
OpStore %x_137 %65
|
||||
%66 = OpLoad %bool %x_137
|
||||
OpStore %x_138_phi %66
|
||||
OpBranch %56
|
||||
%56 = OpLabel
|
||||
%67 = OpLoad %bool %x_138_phi
|
||||
OpStore %x_138 %67
|
||||
%68 = OpLoad %bool %x_138
|
||||
OpStore %x_139_phi %68
|
||||
OpBranch %51
|
||||
%51 = OpLabel
|
||||
%69 = OpLoad %bool %x_139_phi
|
||||
OpSelectionMerge %70 None
|
||||
OpBranchConditional %69 %71 %70
|
||||
%71 = OpLabel
|
||||
OpReturn
|
||||
%70 = OpLabel
|
||||
%72 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0
|
||||
%73 = OpLoad %float %72
|
||||
%74 = OpAccessChain %_ptr_Uniform_float %x_12 %uint_0 %int_0
|
||||
%75 = OpLoad %float %74
|
||||
%76 = OpFOrdEqual %bool %73 %75
|
||||
OpSelectionMerge %77 None
|
||||
OpBranchConditional %76 %78 %77
|
||||
%78 = OpLabel
|
||||
OpStore %i %int_0
|
||||
OpBranch %79
|
||||
%79 = OpLabel
|
||||
OpLoopMerge %80 %81 None
|
||||
OpBranch %82
|
||||
%82 = OpLabel
|
||||
%83 = OpLoad %int %i
|
||||
%85 = OpSLessThan %bool %83 %int_2
|
||||
OpSelectionMerge %86 None
|
||||
OpBranchConditional %85 %87 %88
|
||||
%87 = OpLabel
|
||||
OpBranch %86
|
||||
%88 = OpLabel
|
||||
OpBranch %80
|
||||
%86 = OpLabel
|
||||
OpBranch %81
|
||||
%81 = OpLabel
|
||||
%90 = OpLoad %int %x
|
||||
%91 = OpExtInst %int %92 SClamp %90 %int_0 %int_3
|
||||
%94 = OpLoad %int %i
|
||||
%95 = OpAccessChain %_ptr_Uniform_float %x_12 %uint_0 %int_0
|
||||
%96 = OpLoad %float %95
|
||||
%98 = OpAccessChain %_ptr_Private_float %m %91 %94
|
||||
%99 = OpLoad %float %98
|
||||
%100 = OpAccessChain %_ptr_Private_float %m %91 %94
|
||||
%101 = OpFAdd %float %99 %96
|
||||
OpStore %100 %101
|
||||
%102 = OpLoad %int %i
|
||||
%103 = OpIAdd %int %102 %int_1
|
||||
OpStore %i %103
|
||||
OpBranch %79
|
||||
%80 = OpLabel
|
||||
OpBranch %77
|
||||
%77 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%func1_ = OpFunction %void None %104
|
||||
%106 = OpLabel
|
||||
%param = OpVariable %_ptr_Function_int Function %38
|
||||
%108 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
||||
%109 = OpLoad %float %108
|
||||
%111 = OpFOrdLessThan %bool %109 %float_0
|
||||
OpSelectionMerge %112 None
|
||||
OpBranchConditional %111 %113 %112
|
||||
%113 = OpLabel
|
||||
OpReturn
|
||||
%112 = OpLabel
|
||||
OpStore %param %int_1
|
||||
%114 = OpFunctionCall %void %func0_i1_ %param
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_1 = OpFunction %void None %104
|
||||
%117 = OpLabel
|
||||
OpStore %m %119
|
||||
%120 = OpFunctionCall %void %func1_
|
||||
%121 = OpFunctionCall %void %func1_
|
||||
%122 = OpLoad %mat4v2float %m
|
||||
%124 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%125 = OpLoad %int %124
|
||||
%126 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%127 = OpLoad %int %126
|
||||
%128 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_1
|
||||
%129 = OpLoad %int %128
|
||||
%130 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_1
|
||||
%131 = OpLoad %int %130
|
||||
%132 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%133 = OpLoad %int %132
|
||||
%134 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%135 = OpLoad %int %134
|
||||
%136 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%137 = OpLoad %int %136
|
||||
%138 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%139 = OpLoad %int %138
|
||||
%140 = OpConvertSToF %float %125
|
||||
%141 = OpConvertSToF %float %127
|
||||
%142 = OpCompositeConstruct %v2float %140 %141
|
||||
%143 = OpConvertSToF %float %129
|
||||
%144 = OpConvertSToF %float %131
|
||||
%145 = OpCompositeConstruct %v2float %143 %144
|
||||
%146 = OpConvertSToF %float %133
|
||||
%147 = OpConvertSToF %float %135
|
||||
%148 = OpCompositeConstruct %v2float %146 %147
|
||||
%149 = OpConvertSToF %float %137
|
||||
%150 = OpConvertSToF %float %139
|
||||
%151 = OpCompositeConstruct %v2float %149 %150
|
||||
%152 = OpCompositeConstruct %mat4v2float %142 %145 %148 %151
|
||||
%154 = OpCompositeExtract %v2float %122 0
|
||||
%155 = OpCompositeExtract %v2float %152 0
|
||||
%156 = OpFOrdEqual %v2bool %154 %155
|
||||
%153 = OpAll %bool %156
|
||||
OpSelectionMerge %158 None
|
||||
OpBranchConditional %153 %159 %158
|
||||
%159 = OpLabel
|
||||
%161 = OpCompositeExtract %v2float %122 1
|
||||
%162 = OpCompositeExtract %v2float %152 1
|
||||
%163 = OpFOrdEqual %v2bool %161 %162
|
||||
%160 = OpAll %bool %163
|
||||
OpBranch %158
|
||||
%158 = OpLabel
|
||||
%164 = OpPhi %bool %153 %117 %160 %159
|
||||
OpSelectionMerge %165 None
|
||||
OpBranchConditional %164 %166 %165
|
||||
%166 = OpLabel
|
||||
%169 = OpCompositeExtract %v2float %122 2
|
||||
%170 = OpCompositeExtract %v2float %152 2
|
||||
%171 = OpFOrdEqual %v2bool %169 %170
|
||||
%167 = OpAll %bool %171
|
||||
OpBranch %165
|
||||
%165 = OpLabel
|
||||
%172 = OpPhi %bool %164 %158 %167 %166
|
||||
OpSelectionMerge %173 None
|
||||
OpBranchConditional %172 %174 %173
|
||||
%174 = OpLabel
|
||||
%177 = OpCompositeExtract %v2float %122 3
|
||||
%178 = OpCompositeExtract %v2float %152 3
|
||||
%179 = OpFOrdEqual %v2bool %177 %178
|
||||
%175 = OpAll %bool %179
|
||||
OpBranch %173
|
||||
%173 = OpLabel
|
||||
%180 = OpPhi %bool %172 %165 %175 %174
|
||||
OpSelectionMerge %181 None
|
||||
OpBranchConditional %180 %182 %183
|
||||
%182 = OpLabel
|
||||
%184 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_3
|
||||
%185 = OpLoad %int %184
|
||||
%186 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%187 = OpLoad %int %186
|
||||
%188 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%189 = OpLoad %int %188
|
||||
%190 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_3
|
||||
%191 = OpLoad %int %190
|
||||
%192 = OpConvertSToF %float %185
|
||||
%193 = OpConvertSToF %float %187
|
||||
%194 = OpConvertSToF %float %189
|
||||
%195 = OpConvertSToF %float %191
|
||||
%196 = OpCompositeConstruct %v4float %192 %193 %194 %195
|
||||
OpStore %x_GLF_color %196
|
||||
OpBranch %181
|
||||
%183 = OpLabel
|
||||
%197 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
|
||||
%198 = OpLoad %int %197
|
||||
%199 = OpConvertSToF %float %198
|
||||
%200 = OpCompositeConstruct %v4float %199 %199 %199 %199
|
||||
OpStore %x_GLF_color %200
|
||||
OpBranch %181
|
||||
%181 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %201
|
||||
%gl_FragCoord_param = OpFunctionParameter %v4float
|
||||
%205 = OpLabel
|
||||
OpStore %gl_FragCoord %gl_FragCoord_param
|
||||
%206 = OpFunctionCall %void %main_1
|
||||
%207 = OpLoad %v4float %x_GLF_color
|
||||
%208 = OpCompositeConstruct %main_out %207
|
||||
OpReturnValue %208
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %104
|
||||
%210 = OpLabel
|
||||
%212 = OpLoad %v4float %gl_FragCoord_param_1
|
||||
%211 = OpFunctionCall %main_out %main_inner %212
|
||||
%213 = OpCompositeExtract %v4float %211 0
|
||||
OpStore %x_GLF_color_1_1 %213
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,133 +0,0 @@
|
||||
[[block]]
|
||||
struct buf2 {
|
||||
one : f32;
|
||||
};
|
||||
|
||||
type Arr = [[stride(16)]] array<f32, 1>;
|
||||
|
||||
[[block]]
|
||||
struct buf0 {
|
||||
x_GLF_uniform_float_values : Arr;
|
||||
};
|
||||
|
||||
type Arr_1 = [[stride(16)]] array<i32, 4>;
|
||||
|
||||
[[block]]
|
||||
struct buf1 {
|
||||
x_GLF_uniform_int_values : Arr_1;
|
||||
};
|
||||
|
||||
var<private> m : mat4x2<f32>;
|
||||
|
||||
[[group(0), binding(2)]] var<uniform> x_10 : buf2;
|
||||
|
||||
[[group(0), binding(0)]] var<uniform> x_12 : buf0;
|
||||
|
||||
var<private> gl_FragCoord : vec4<f32>;
|
||||
|
||||
[[group(0), binding(1)]] var<uniform> x_16 : buf1;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn func0_i1_(x : ptr<function, i32>) {
|
||||
var i : i32;
|
||||
var x_137 : bool;
|
||||
var x_138 : bool;
|
||||
var x_138_phi : bool;
|
||||
var x_139_phi : bool;
|
||||
let x_124 : i32 = *(x);
|
||||
let x_125 : bool = (x_124 < 1);
|
||||
x_139_phi = x_125;
|
||||
if (!(x_125)) {
|
||||
let x_129 : i32 = *(x);
|
||||
let x_130 : bool = (x_129 > 1);
|
||||
x_138_phi = x_130;
|
||||
if (x_130) {
|
||||
let x_134 : f32 = x_10.one;
|
||||
let x_136 : f32 = x_12.x_GLF_uniform_float_values[0];
|
||||
x_137 = (x_134 > x_136);
|
||||
x_138_phi = x_137;
|
||||
}
|
||||
x_138 = x_138_phi;
|
||||
x_139_phi = x_138;
|
||||
}
|
||||
let x_139 : bool = x_139_phi;
|
||||
if (x_139) {
|
||||
return;
|
||||
}
|
||||
let x_143 : f32 = x_10.one;
|
||||
let x_145 : f32 = x_12.x_GLF_uniform_float_values[0];
|
||||
if ((x_143 == x_145)) {
|
||||
i = 0;
|
||||
loop {
|
||||
let x_150 : i32 = i;
|
||||
if ((x_150 < 2)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_154 : i32 = *(x);
|
||||
let x_155 : i32 = clamp(x_154, 0, 3);
|
||||
let x_156 : i32 = i;
|
||||
let x_158 : f32 = x_12.x_GLF_uniform_float_values[0];
|
||||
let x_160 : f32 = m[x_155][x_156];
|
||||
m[x_155][x_156] = (x_160 + x_158);
|
||||
let x_163 : i32 = i;
|
||||
i = (x_163 + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
fn func1_() {
|
||||
var param : i32;
|
||||
let x_167 : f32 = gl_FragCoord.y;
|
||||
if ((x_167 < 0.0)) {
|
||||
return;
|
||||
}
|
||||
param = 1;
|
||||
func0_i1_(&(param));
|
||||
return;
|
||||
}
|
||||
|
||||
fn main_1() {
|
||||
m = mat4x2<f32>(vec2<f32>(0.0, 0.0), vec2<f32>(0.0, 0.0), vec2<f32>(0.0, 0.0), vec2<f32>(0.0, 0.0));
|
||||
func1_();
|
||||
func1_();
|
||||
let x_54 : mat4x2<f32> = m;
|
||||
let x_56 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_59 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_62 : i32 = x_16.x_GLF_uniform_int_values[1];
|
||||
let x_65 : i32 = x_16.x_GLF_uniform_int_values[1];
|
||||
let x_68 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_71 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_74 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_77 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_83 : mat4x2<f32> = mat4x2<f32>(vec2<f32>(f32(x_56), f32(x_59)), vec2<f32>(f32(x_62), f32(x_65)), vec2<f32>(f32(x_68), f32(x_71)), vec2<f32>(f32(x_74), f32(x_77)));
|
||||
if ((((all((x_54[0u] == x_83[0u])) && all((x_54[1u] == x_83[1u]))) && all((x_54[2u] == x_83[2u]))) && all((x_54[3u] == x_83[3u])))) {
|
||||
let x_107 : i32 = x_16.x_GLF_uniform_int_values[3];
|
||||
let x_110 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_113 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_116 : i32 = x_16.x_GLF_uniform_int_values[3];
|
||||
x_GLF_color = vec4<f32>(f32(x_107), f32(x_110), f32(x_113), f32(x_116));
|
||||
} else {
|
||||
let x_120 : i32 = x_16.x_GLF_uniform_int_values[0];
|
||||
let x_121 : f32 = f32(x_120);
|
||||
x_GLF_color = vec4<f32>(x_121, x_121, x_121, x_121);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
[[location(0)]]
|
||||
x_GLF_color_1 : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main([[builtin(position)]] gl_FragCoord_param : vec4<f32>) -> main_out {
|
||||
gl_FragCoord = gl_FragCoord_param;
|
||||
main_1();
|
||||
return main_out(x_GLF_color);
|
||||
}
|
||||
Reference in New Issue
Block a user