test: Remove many expected files

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

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

View File

@@ -1,285 +0,0 @@
SKIP: FAILED
static float4 gl_FragCoord = float4(0.0f, 0.0f, 0.0f, 0.0f);
cbuffer cbuffer_x_6 : register(b0, space0) {
uint4 x_6[1];
};
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void main_1() {
while (true) {
bool x_45 = false;
int x_48 = 0;
int x_49 = 0;
bool x_46 = false;
int x_115 = 0;
int x_116 = 0;
bool x_45_phi = false;
int x_48_phi = 0;
int x_50_phi = 0;
int x_52_phi = 0;
int x_111_phi = 0;
bool x_112_phi = false;
int x_115_phi = 0;
int x_118_phi = 0;
int x_120_phi = 0;
int x_161_phi = 0;
const float x_40 = asfloat(x_6[0].x);
const bool x_41 = (x_40 < -1.0f);
x_45_phi = false;
x_48_phi = 0;
x_50_phi = 0;
x_52_phi = 0;
while (true) {
int x_62 = 0;
int x_65 = 0;
int x_66 = 0;
int x_63 = 0;
int x_53 = 0;
int x_62_phi = 0;
int x_65_phi = 0;
int x_67_phi = 0;
int x_51_phi = 0;
int x_49_phi = 0;
bool x_46_phi = false;
x_45 = x_45_phi;
x_48 = x_48_phi;
const int x_50 = x_50_phi;
const int x_52 = x_52_phi;
const float x_55 = gl_FragCoord.y;
x_111_phi = x_48;
x_112_phi = x_45;
if ((x_52 < ((x_55 > -1.0f) ? 10 : 100))) {
} else {
break;
}
x_62_phi = x_48;
x_65_phi = x_50;
x_67_phi = 0;
while (true) {
int x_97 = 0;
int x_68 = 0;
int x_66_phi = 0;
x_62 = x_62_phi;
x_65 = x_65_phi;
const int x_67 = x_67_phi;
x_51_phi = x_65;
x_49_phi = x_62;
x_46_phi = x_45;
if ((x_67 < 2)) {
} else {
break;
}
while (true) {
bool x_78 = false;
int x_86_phi = 0;
int x_97_phi = 0;
bool x_98_phi = false;
const float x_77 = gl_FragCoord.x;
x_78 = (x_77 < -1.0f);
if (!((x_40 < 0.0f))) {
if (x_78) {
x_66_phi = 0;
break;
}
x_86_phi = 1;
while (true) {
int x_87 = 0;
const int x_86 = x_86_phi;
x_97_phi = x_65;
x_98_phi = false;
if ((x_86 < 3)) {
} else {
break;
}
if (x_78) {
{
x_87 = (x_86 + 1);
x_86_phi = x_87;
}
continue;
}
if ((x_86 > 0)) {
x_97_phi = 1;
x_98_phi = true;
break;
}
{
x_87 = (x_86 + 1);
x_86_phi = x_87;
}
}
x_97 = x_97_phi;
const bool x_98 = x_98_phi;
x_66_phi = x_97;
if (x_98) {
break;
}
}
x_66_phi = 0;
break;
}
x_66 = x_66_phi;
x_63 = asint((x_62 + x_66));
if (x_41) {
while (true) {
if (x_41) {
} else {
break;
}
{
const float x_105 = float(x_52);
x_GLF_color = float4(x_105, x_105, x_105, x_105);
}
}
x_51_phi = x_66;
x_49_phi = x_63;
x_46_phi = true;
break;
}
{
x_68 = (x_67 + 1);
x_62_phi = x_63;
x_65_phi = x_66;
x_67_phi = x_68;
}
}
const int x_51 = x_51_phi;
x_49 = x_49_phi;
x_46 = x_46_phi;
x_111_phi = x_49;
x_112_phi = x_46;
if (x_46) {
break;
}
if (!(x_41)) {
x_111_phi = x_49;
x_112_phi = x_46;
break;
}
{
x_53 = (x_52 + 1);
x_45_phi = x_46;
x_48_phi = x_49;
x_50_phi = x_51;
x_52_phi = x_53;
}
}
const int x_111 = x_111_phi;
if (x_112_phi) {
break;
}
x_115_phi = x_111;
x_118_phi = 0;
x_120_phi = 0;
while (true) {
int x_154 = 0;
int x_121 = 0;
int x_119_phi = 0;
x_115 = x_115_phi;
const int x_118 = x_118_phi;
const int x_120 = x_120_phi;
const float x_123 = asfloat(x_6[0].y);
x_161_phi = x_115;
if ((x_120 < int((x_123 + 1.0f)))) {
} else {
break;
}
while (true) {
bool x_135 = false;
int x_143_phi = 0;
int x_154_phi = 0;
bool x_155_phi = false;
const float x_134 = gl_FragCoord.x;
x_135 = (x_134 < -1.0f);
if (!((x_40 < 0.0f))) {
if (x_135) {
x_119_phi = 0;
break;
}
x_143_phi = 1;
while (true) {
int x_144 = 0;
const int x_143 = x_143_phi;
x_154_phi = x_118;
x_155_phi = false;
if ((x_143 < 3)) {
} else {
break;
}
if (x_135) {
{
x_144 = (x_143 + 1);
x_143_phi = x_144;
}
continue;
}
if ((x_143 > 0)) {
x_154_phi = 1;
x_155_phi = true;
break;
}
{
x_144 = (x_143 + 1);
x_143_phi = x_144;
}
}
x_154 = x_154_phi;
const bool x_155 = x_155_phi;
x_119_phi = x_154;
if (x_155) {
break;
}
}
x_119_phi = 0;
break;
}
int x_119 = 0;
x_119 = x_119_phi;
x_116 = asint((x_115 + x_119));
if ((!(x_41) ? false : x_41)) {
x_161_phi = x_116;
break;
}
{
x_121 = (x_120 + 1);
x_115_phi = x_116;
x_118_phi = x_119;
x_120_phi = x_121;
}
}
if ((x_161_phi == 4)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
}
break;
}
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;
};
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
gl_FragCoord = gl_FragCoord_param;
main_1();
const main_out tint_symbol_3 = {x_GLF_color};
const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
return tint_symbol_5;
}
C:\src\tint\test\Shader@0x000002BFA0A3D040(8,3-14): warning X3557: loop only executes for 0 iteration(s), forcing loop to unroll
C:\src\tint\test\Shader@0x000002BFA0A3D040(71,9-20): warning X3557: loop only executes for 0 iteration(s), forcing loop to unroll
C:\src\tint\test\Shader@0x000002BFA0A3D040(186,7-18): warning X3557: loop only executes for 0 iteration(s), forcing loop to unroll
C:\src\tint\test\Shader@0x000002BFA0A3D040(71,9-20): warning X3557: loop only executes for 0 iteration(s), forcing loop to unroll
C:\src\tint\test\Shader@0x000002BFA0A3D040(186,7-18): warning X3557: loop only executes for 0 iteration(s), forcing loop to unroll
C:\src\tint\test\Shader@0x000002BFA0A3D040(123,11-22): error X4029: infinite loop detected - loop never exits

View File

@@ -1,283 +0,0 @@
#include <metal_stdlib>
using namespace metal;
struct buf0 {
/* 0x0000 */ float2 injectionSwitch;
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
while (true) {
bool x_45 = false;
int x_48 = 0;
int x_49 = 0;
bool x_46 = false;
int x_115 = 0;
int x_116 = 0;
bool x_45_phi = false;
int x_48_phi = 0;
int x_50_phi = 0;
int x_52_phi = 0;
int x_111_phi = 0;
bool x_112_phi = false;
int x_115_phi = 0;
int x_118_phi = 0;
int x_120_phi = 0;
int x_161_phi = 0;
float const x_40 = x_6.injectionSwitch.x;
bool const x_41 = (x_40 < -1.0f);
x_45_phi = false;
x_48_phi = 0;
x_50_phi = 0;
x_52_phi = 0;
while (true) {
int x_62 = 0;
int x_65 = 0;
int x_66 = 0;
int x_63 = 0;
int x_53 = 0;
int x_62_phi = 0;
int x_65_phi = 0;
int x_67_phi = 0;
int x_51_phi = 0;
int x_49_phi = 0;
bool x_46_phi = false;
x_45 = x_45_phi;
x_48 = x_48_phi;
int const x_50 = x_50_phi;
int const x_52 = x_52_phi;
float const x_55 = (*(tint_symbol_3)).y;
x_111_phi = x_48;
x_112_phi = x_45;
if ((x_52 < select(100, 10, (x_55 > -1.0f)))) {
} else {
break;
}
x_62_phi = x_48;
x_65_phi = x_50;
x_67_phi = 0;
while (true) {
int x_97 = 0;
int x_68 = 0;
int x_66_phi = 0;
x_62 = x_62_phi;
x_65 = x_65_phi;
int const x_67 = x_67_phi;
x_51_phi = x_65;
x_49_phi = x_62;
x_46_phi = x_45;
if ((x_67 < 2)) {
} else {
break;
}
while (true) {
bool x_78 = false;
int x_86_phi = 0;
int x_97_phi = 0;
bool x_98_phi = false;
float const x_77 = (*(tint_symbol_3)).x;
x_78 = (x_77 < -1.0f);
if (!((x_40 < 0.0f))) {
if (x_78) {
x_66_phi = 0;
break;
}
x_86_phi = 1;
while (true) {
int x_87 = 0;
int const x_86 = x_86_phi;
x_97_phi = x_65;
x_98_phi = false;
if ((x_86 < 3)) {
} else {
break;
}
if (x_78) {
{
x_87 = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
x_86_phi = x_87;
}
continue;
}
if ((x_86 > 0)) {
x_97_phi = 1;
x_98_phi = true;
break;
}
{
x_87 = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
x_86_phi = x_87;
}
}
x_97 = x_97_phi;
bool const x_98 = x_98_phi;
x_66_phi = x_97;
if (x_98) {
break;
}
}
x_66_phi = 0;
break;
}
x_66 = x_66_phi;
x_63 = as_type<int>(as_type<int>((as_type<uint>(x_62) + as_type<uint>(x_66))));
if (x_41) {
while (true) {
if (x_41) {
} else {
break;
}
{
float const x_105 = float(x_52);
*(tint_symbol_4) = float4(x_105, x_105, x_105, x_105);
}
}
x_51_phi = x_66;
x_49_phi = x_63;
x_46_phi = true;
break;
}
{
x_68 = as_type<int>((as_type<uint>(x_67) + as_type<uint>(1)));
x_62_phi = x_63;
x_65_phi = x_66;
x_67_phi = x_68;
}
}
int const x_51 = x_51_phi;
x_49 = x_49_phi;
x_46 = x_46_phi;
x_111_phi = x_49;
x_112_phi = x_46;
if (x_46) {
break;
}
if (!(x_41)) {
x_111_phi = x_49;
x_112_phi = x_46;
break;
}
{
x_53 = as_type<int>((as_type<uint>(x_52) + as_type<uint>(1)));
x_45_phi = x_46;
x_48_phi = x_49;
x_50_phi = x_51;
x_52_phi = x_53;
}
}
int const x_111 = x_111_phi;
bool const x_112 = x_112_phi;
if (x_112) {
break;
}
x_115_phi = x_111;
x_118_phi = 0;
x_120_phi = 0;
while (true) {
int x_154 = 0;
int x_121 = 0;
int x_119_phi = 0;
x_115 = x_115_phi;
int const x_118 = x_118_phi;
int const x_120 = x_120_phi;
float const x_123 = x_6.injectionSwitch.y;
x_161_phi = x_115;
if ((x_120 < int((x_123 + 1.0f)))) {
} else {
break;
}
while (true) {
bool x_135 = false;
int x_143_phi = 0;
int x_154_phi = 0;
bool x_155_phi = false;
float const x_134 = (*(tint_symbol_3)).x;
x_135 = (x_134 < -1.0f);
if (!((x_40 < 0.0f))) {
if (x_135) {
x_119_phi = 0;
break;
}
x_143_phi = 1;
while (true) {
int x_144 = 0;
int const x_143 = x_143_phi;
x_154_phi = x_118;
x_155_phi = false;
if ((x_143 < 3)) {
} else {
break;
}
if (x_135) {
{
x_144 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
x_143_phi = x_144;
}
continue;
}
if ((x_143 > 0)) {
x_154_phi = 1;
x_155_phi = true;
break;
}
{
x_144 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
x_143_phi = x_144;
}
}
x_154 = x_154_phi;
bool const x_155 = x_155_phi;
x_119_phi = x_154;
if (x_155) {
break;
}
}
x_119_phi = 0;
break;
}
int x_119 = 0;
x_119 = x_119_phi;
x_116 = as_type<int>(as_type<int>((as_type<uint>(x_115) + as_type<uint>(x_119))));
if (select(x_41, false, !(x_41))) {
x_161_phi = x_116;
break;
}
{
x_121 = as_type<int>((as_type<uint>(x_120) + as_type<uint>(1)));
x_115_phi = x_116;
x_118_phi = x_119;
x_120_phi = x_121;
}
}
int const x_161 = x_161_phi;
if ((x_161 == 4)) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
}
break;
}
return;
}
main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
*(tint_symbol_5) = gl_FragCoord_param;
main_1(x_6, 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(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
thread float4 tint_symbol_7 = 0.0f;
thread float4 tint_symbol_8 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(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;
}

View File

@@ -1,566 +0,0 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 292
; Schema: 0
OpCapability Shader
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 %gl_FragCoord "gl_FragCoord"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_6 "x_6"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %x_45 "x_45"
OpName %x_48 "x_48"
OpName %x_49 "x_49"
OpName %x_46 "x_46"
OpName %x_115 "x_115"
OpName %x_116 "x_116"
OpName %x_45_phi "x_45_phi"
OpName %x_48_phi "x_48_phi"
OpName %x_50_phi "x_50_phi"
OpName %x_52_phi "x_52_phi"
OpName %x_111_phi "x_111_phi"
OpName %x_112_phi "x_112_phi"
OpName %x_115_phi "x_115_phi"
OpName %x_118_phi "x_118_phi"
OpName %x_120_phi "x_120_phi"
OpName %x_161_phi "x_161_phi"
OpName %x_62 "x_62"
OpName %x_65 "x_65"
OpName %x_66 "x_66"
OpName %x_63 "x_63"
OpName %x_53 "x_53"
OpName %x_62_phi "x_62_phi"
OpName %x_65_phi "x_65_phi"
OpName %x_67_phi "x_67_phi"
OpName %x_51_phi "x_51_phi"
OpName %x_49_phi "x_49_phi"
OpName %x_46_phi "x_46_phi"
OpName %x_97 "x_97"
OpName %x_68 "x_68"
OpName %x_66_phi "x_66_phi"
OpName %x_78 "x_78"
OpName %x_86_phi "x_86_phi"
OpName %x_97_phi "x_97_phi"
OpName %x_98_phi "x_98_phi"
OpName %x_87 "x_87"
OpName %x_154 "x_154"
OpName %x_121 "x_121"
OpName %x_119_phi "x_119_phi"
OpName %x_135 "x_135"
OpName %x_143_phi "x_143_phi"
OpName %x_154_phi "x_154_phi"
OpName %x_155_phi "x_155_phi"
OpName %x_144 "x_144"
OpName %x_119 "x_119"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %gl_FragCoord_param "gl_FragCoord_param"
OpName %main "main"
OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
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
%_ptr_Private_v4float = OpTypePointer Private %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
%void = OpTypeVoid
%15 = OpTypeFunction %void
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%26 = OpConstantNull %bool
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%30 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_n1 = OpConstant %float -1
%false = OpConstantFalse %bool
%int_0 = OpConstant %int 0
%uint_1 = OpConstant %uint 1
%_ptr_Private_float = OpTypePointer Private %float
%int_10 = OpConstant %int 10
%int_100 = OpConstant %int 100
%int_2 = OpConstant %int 2
%float_0 = OpConstant %float 0
%int_1 = OpConstant %int 1
%int_3 = OpConstant %int 3
%true = OpConstantTrue %bool
%float_1 = OpConstant %float 1
%int_4 = OpConstant %int 4
%277 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%278 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%279 = OpTypeFunction %main_out %v4float
%main_1 = OpFunction %void None %15
%18 = OpLabel
%x_45 = OpVariable %_ptr_Function_bool Function %26
%x_48 = OpVariable %_ptr_Function_int Function %30
%x_49 = OpVariable %_ptr_Function_int Function %30
%x_46 = OpVariable %_ptr_Function_bool Function %26
%x_115 = OpVariable %_ptr_Function_int Function %30
%x_116 = OpVariable %_ptr_Function_int Function %30
%x_45_phi = OpVariable %_ptr_Function_bool Function %26
%x_48_phi = OpVariable %_ptr_Function_int Function %30
%x_50_phi = OpVariable %_ptr_Function_int Function %30
%x_52_phi = OpVariable %_ptr_Function_int Function %30
%x_111_phi = OpVariable %_ptr_Function_int Function %30
%x_112_phi = OpVariable %_ptr_Function_bool Function %26
%x_115_phi = OpVariable %_ptr_Function_int Function %30
%x_118_phi = OpVariable %_ptr_Function_int Function %30
%x_120_phi = OpVariable %_ptr_Function_int Function %30
%x_161_phi = OpVariable %_ptr_Function_int Function %30
%x_62 = OpVariable %_ptr_Function_int Function %30
%x_65 = OpVariable %_ptr_Function_int Function %30
%x_66 = OpVariable %_ptr_Function_int Function %30
%x_63 = OpVariable %_ptr_Function_int Function %30
%x_53 = OpVariable %_ptr_Function_int Function %30
%x_62_phi = OpVariable %_ptr_Function_int Function %30
%x_65_phi = OpVariable %_ptr_Function_int Function %30
%x_67_phi = OpVariable %_ptr_Function_int Function %30
%x_51_phi = OpVariable %_ptr_Function_int Function %30
%x_49_phi = OpVariable %_ptr_Function_int Function %30
%x_46_phi = OpVariable %_ptr_Function_bool Function %26
%x_97 = OpVariable %_ptr_Function_int Function %30
%x_68 = OpVariable %_ptr_Function_int Function %30
%x_66_phi = OpVariable %_ptr_Function_int Function %30
%x_78 = OpVariable %_ptr_Function_bool Function %26
%x_86_phi = OpVariable %_ptr_Function_int Function %30
%x_97_phi = OpVariable %_ptr_Function_int Function %30
%x_98_phi = OpVariable %_ptr_Function_bool Function %26
%x_87 = OpVariable %_ptr_Function_int Function %30
%x_154 = OpVariable %_ptr_Function_int Function %30
%x_121 = OpVariable %_ptr_Function_int Function %30
%x_119_phi = OpVariable %_ptr_Function_int Function %30
%x_135 = OpVariable %_ptr_Function_bool Function %26
%x_143_phi = OpVariable %_ptr_Function_int Function %30
%x_154_phi = OpVariable %_ptr_Function_int Function %30
%x_155_phi = OpVariable %_ptr_Function_bool Function %26
%x_144 = OpVariable %_ptr_Function_int Function %30
%x_119 = OpVariable %_ptr_Function_int Function %30
OpBranch %19
%19 = OpLabel
OpLoopMerge %20 %21 None
OpBranch %22
%22 = OpLabel
%48 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_0
%49 = OpLoad %float %48
%51 = OpFOrdLessThan %bool %49 %float_n1
OpStore %x_45_phi %false
OpStore %x_48_phi %int_0
OpStore %x_50_phi %int_0
OpStore %x_52_phi %int_0
OpBranch %54
%54 = OpLabel
OpLoopMerge %55 %56 None
OpBranch %57
%57 = OpLabel
%69 = OpLoad %bool %x_45_phi
OpStore %x_45 %69
%70 = OpLoad %int %x_48_phi
OpStore %x_48 %70
%71 = OpLoad %int %x_50_phi
%72 = OpLoad %int %x_52_phi
%75 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%76 = OpLoad %float %75
%77 = OpLoad %int %x_48
OpStore %x_111_phi %77
%78 = OpLoad %bool %x_45
OpStore %x_112_phi %78
%80 = OpFOrdGreaterThan %bool %76 %float_n1
%79 = OpSelect %int %80 %int_10 %int_100
%83 = OpSLessThan %bool %72 %79
OpSelectionMerge %84 None
OpBranchConditional %83 %85 %86
%85 = OpLabel
OpBranch %84
%86 = OpLabel
OpBranch %55
%84 = OpLabel
%87 = OpLoad %int %x_48
OpStore %x_62_phi %87
OpStore %x_65_phi %71
OpStore %x_67_phi %int_0
OpBranch %88
%88 = OpLabel
OpLoopMerge %89 %90 None
OpBranch %91
%91 = OpLabel
%95 = OpLoad %int %x_62_phi
OpStore %x_62 %95
%96 = OpLoad %int %x_65_phi
OpStore %x_65 %96
%97 = OpLoad %int %x_67_phi
%98 = OpLoad %int %x_65
OpStore %x_51_phi %98
%99 = OpLoad %int %x_62
OpStore %x_49_phi %99
%100 = OpLoad %bool %x_45
OpStore %x_46_phi %100
%102 = OpSLessThan %bool %97 %int_2
OpSelectionMerge %103 None
OpBranchConditional %102 %104 %105
%104 = OpLabel
OpBranch %103
%105 = OpLabel
OpBranch %89
%103 = OpLabel
OpBranch %106
%106 = OpLabel
OpLoopMerge %107 %108 None
OpBranch %109
%109 = OpLabel
%114 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%115 = OpLoad %float %114
%116 = OpFOrdLessThan %bool %115 %float_n1
OpStore %x_78 %116
%119 = OpFOrdLessThan %bool %49 %float_0
%117 = OpLogicalNot %bool %119
OpSelectionMerge %120 None
OpBranchConditional %117 %121 %120
%121 = OpLabel
%122 = OpLoad %bool %x_78
OpSelectionMerge %123 None
OpBranchConditional %122 %124 %123
%124 = OpLabel
OpStore %x_66_phi %int_0
OpBranch %107
%123 = OpLabel
OpStore %x_86_phi %int_1
OpBranch %126
%126 = OpLabel
OpLoopMerge %127 %128 None
OpBranch %129
%129 = OpLabel
%131 = OpLoad %int %x_86_phi
%132 = OpLoad %int %x_65
OpStore %x_97_phi %132
OpStore %x_98_phi %false
%134 = OpSLessThan %bool %131 %int_3
OpSelectionMerge %135 None
OpBranchConditional %134 %136 %137
%136 = OpLabel
OpBranch %135
%137 = OpLabel
OpBranch %127
%135 = OpLabel
%138 = OpLoad %bool %x_78
OpSelectionMerge %139 None
OpBranchConditional %138 %140 %139
%140 = OpLabel
OpBranch %128
%139 = OpLabel
%141 = OpSGreaterThan %bool %131 %int_0
OpSelectionMerge %142 None
OpBranchConditional %141 %143 %142
%143 = OpLabel
OpStore %x_97_phi %int_1
OpStore %x_98_phi %true
OpBranch %127
%142 = OpLabel
OpBranch %128
%128 = OpLabel
%145 = OpIAdd %int %131 %int_1
OpStore %x_87 %145
%146 = OpLoad %int %x_87
OpStore %x_86_phi %146
OpBranch %126
%127 = OpLabel
%147 = OpLoad %int %x_97_phi
OpStore %x_97 %147
%148 = OpLoad %bool %x_98_phi
%149 = OpLoad %int %x_97
OpStore %x_66_phi %149
OpSelectionMerge %150 None
OpBranchConditional %148 %151 %150
%151 = OpLabel
OpBranch %107
%150 = OpLabel
OpBranch %120
%120 = OpLabel
OpStore %x_66_phi %int_0
OpBranch %107
%108 = OpLabel
OpBranch %106
%107 = OpLabel
%152 = OpLoad %int %x_66_phi
OpStore %x_66 %152
%154 = OpLoad %int %x_62
%155 = OpLoad %int %x_66
%156 = OpIAdd %int %154 %155
%153 = OpCopyObject %int %156
OpStore %x_63 %153
OpSelectionMerge %157 None
OpBranchConditional %51 %158 %157
%158 = OpLabel
OpBranch %159
%159 = OpLabel
OpLoopMerge %160 %161 None
OpBranch %162
%162 = OpLabel
OpSelectionMerge %163 None
OpBranchConditional %51 %164 %165
%164 = OpLabel
OpBranch %163
%165 = OpLabel
OpBranch %160
%163 = OpLabel
OpBranch %161
%161 = OpLabel
%166 = OpConvertSToF %float %72
%167 = OpCompositeConstruct %v4float %166 %166 %166 %166
OpStore %x_GLF_color %167
OpBranch %159
%160 = OpLabel
%168 = OpLoad %int %x_66
OpStore %x_51_phi %168
%169 = OpLoad %int %x_63
OpStore %x_49_phi %169
OpStore %x_46_phi %true
OpBranch %89
%157 = OpLabel
OpBranch %90
%90 = OpLabel
%170 = OpIAdd %int %97 %int_1
OpStore %x_68 %170
%171 = OpLoad %int %x_63
OpStore %x_62_phi %171
%172 = OpLoad %int %x_66
OpStore %x_65_phi %172
%173 = OpLoad %int %x_68
OpStore %x_67_phi %173
OpBranch %88
%89 = OpLabel
%174 = OpLoad %int %x_51_phi
%175 = OpLoad %int %x_49_phi
OpStore %x_49 %175
%176 = OpLoad %bool %x_46_phi
OpStore %x_46 %176
%177 = OpLoad %int %x_49
OpStore %x_111_phi %177
%178 = OpLoad %bool %x_46
OpStore %x_112_phi %178
%179 = OpLoad %bool %x_46
OpSelectionMerge %180 None
OpBranchConditional %179 %181 %180
%181 = OpLabel
OpBranch %55
%180 = OpLabel
%182 = OpLogicalNot %bool %51
OpSelectionMerge %183 None
OpBranchConditional %182 %184 %183
%184 = OpLabel
%185 = OpLoad %int %x_49
OpStore %x_111_phi %185
%186 = OpLoad %bool %x_46
OpStore %x_112_phi %186
OpBranch %55
%183 = OpLabel
OpBranch %56
%56 = OpLabel
%187 = OpIAdd %int %72 %int_1
OpStore %x_53 %187
%188 = OpLoad %bool %x_46
OpStore %x_45_phi %188
%189 = OpLoad %int %x_49
OpStore %x_48_phi %189
OpStore %x_50_phi %174
%190 = OpLoad %int %x_53
OpStore %x_52_phi %190
OpBranch %54
%55 = OpLabel
%191 = OpLoad %int %x_111_phi
%192 = OpLoad %bool %x_112_phi
OpSelectionMerge %193 None
OpBranchConditional %192 %194 %193
%194 = OpLabel
OpBranch %20
%193 = OpLabel
OpStore %x_115_phi %191
OpStore %x_118_phi %int_0
OpStore %x_120_phi %int_0
OpBranch %195
%195 = OpLabel
OpLoopMerge %196 %197 None
OpBranch %198
%198 = OpLabel
%202 = OpLoad %int %x_115_phi
OpStore %x_115 %202
%203 = OpLoad %int %x_118_phi
%204 = OpLoad %int %x_120_phi
%205 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_1
%206 = OpLoad %float %205
%207 = OpLoad %int %x_115
OpStore %x_161_phi %207
%210 = OpFAdd %float %206 %float_1
%208 = OpConvertFToS %int %210
%211 = OpSLessThan %bool %204 %208
OpSelectionMerge %212 None
OpBranchConditional %211 %213 %214
%213 = OpLabel
OpBranch %212
%214 = OpLabel
OpBranch %196
%212 = OpLabel
OpBranch %215
%215 = OpLabel
OpLoopMerge %216 %217 None
OpBranch %218
%218 = OpLabel
%223 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%224 = OpLoad %float %223
%225 = OpFOrdLessThan %bool %224 %float_n1
OpStore %x_135 %225
%227 = OpFOrdLessThan %bool %49 %float_0
%226 = OpLogicalNot %bool %227
OpSelectionMerge %228 None
OpBranchConditional %226 %229 %228
%229 = OpLabel
%230 = OpLoad %bool %x_135
OpSelectionMerge %231 None
OpBranchConditional %230 %232 %231
%232 = OpLabel
OpStore %x_119_phi %int_0
OpBranch %216
%231 = OpLabel
OpStore %x_143_phi %int_1
OpBranch %233
%233 = OpLabel
OpLoopMerge %234 %235 None
OpBranch %236
%236 = OpLabel
%238 = OpLoad %int %x_143_phi
OpStore %x_154_phi %203
OpStore %x_155_phi %false
%239 = OpSLessThan %bool %238 %int_3
OpSelectionMerge %240 None
OpBranchConditional %239 %241 %242
%241 = OpLabel
OpBranch %240
%242 = OpLabel
OpBranch %234
%240 = OpLabel
%243 = OpLoad %bool %x_135
OpSelectionMerge %244 None
OpBranchConditional %243 %245 %244
%245 = OpLabel
OpBranch %235
%244 = OpLabel
%246 = OpSGreaterThan %bool %238 %int_0
OpSelectionMerge %247 None
OpBranchConditional %246 %248 %247
%248 = OpLabel
OpStore %x_154_phi %int_1
OpStore %x_155_phi %true
OpBranch %234
%247 = OpLabel
OpBranch %235
%235 = OpLabel
%249 = OpIAdd %int %238 %int_1
OpStore %x_144 %249
%250 = OpLoad %int %x_144
OpStore %x_143_phi %250
OpBranch %233
%234 = OpLabel
%251 = OpLoad %int %x_154_phi
OpStore %x_154 %251
%252 = OpLoad %bool %x_155_phi
%253 = OpLoad %int %x_154
OpStore %x_119_phi %253
OpSelectionMerge %254 None
OpBranchConditional %252 %255 %254
%255 = OpLabel
OpBranch %216
%254 = OpLabel
OpBranch %228
%228 = OpLabel
OpStore %x_119_phi %int_0
OpBranch %216
%217 = OpLabel
OpBranch %215
%216 = OpLabel
%257 = OpLoad %int %x_119_phi
OpStore %x_119 %257
%259 = OpLoad %int %x_115
%260 = OpLoad %int %x_119
%261 = OpIAdd %int %259 %260
%258 = OpCopyObject %int %261
OpStore %x_116 %258
%263 = OpLogicalNot %bool %51
%262 = OpSelect %bool %263 %false %51
OpSelectionMerge %264 None
OpBranchConditional %262 %265 %264
%265 = OpLabel
%266 = OpLoad %int %x_116
OpStore %x_161_phi %266
OpBranch %196
%264 = OpLabel
OpBranch %197
%197 = OpLabel
%267 = OpIAdd %int %204 %int_1
OpStore %x_121 %267
%268 = OpLoad %int %x_116
OpStore %x_115_phi %268
%269 = OpLoad %int %x_119
OpStore %x_118_phi %269
%270 = OpLoad %int %x_121
OpStore %x_120_phi %270
OpBranch %195
%196 = OpLabel
%271 = OpLoad %int %x_161_phi
%273 = OpIEqual %bool %271 %int_4
OpSelectionMerge %274 None
OpBranchConditional %273 %275 %276
%275 = OpLabel
OpStore %x_GLF_color %277
OpBranch %274
%276 = OpLabel
OpStore %x_GLF_color %278
OpBranch %274
%274 = OpLabel
OpBranch %20
%21 = OpLabel
OpBranch %19
%20 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %279
%gl_FragCoord_param = OpFunctionParameter %v4float
%283 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%284 = OpFunctionCall %void %main_1
%285 = OpLoad %v4float %x_GLF_color
%286 = OpCompositeConstruct %main_out %285
OpReturnValue %286
OpFunctionEnd
%main = OpFunction %void None %15
%288 = OpLabel
%290 = OpLoad %v4float %gl_FragCoord_param_1
%289 = OpFunctionCall %main_out %main_inner %290
%291 = OpCompositeExtract %v4float %289 0
OpStore %x_GLF_color_1_1 %291
OpReturn
OpFunctionEnd

View File

@@ -1,274 +0,0 @@
[[block]]
struct buf0 {
injectionSwitch : vec2<f32>;
};
var<private> gl_FragCoord : vec4<f32>;
[[group(0), binding(0)]] var<uniform> x_6 : buf0;
var<private> x_GLF_color : vec4<f32>;
fn main_1() {
loop {
var x_45 : bool;
var x_48 : i32;
var x_49 : i32;
var x_46 : bool;
var x_115 : i32;
var x_116 : i32;
var x_45_phi : bool;
var x_48_phi : i32;
var x_50_phi : i32;
var x_52_phi : i32;
var x_111_phi : i32;
var x_112_phi : bool;
var x_115_phi : i32;
var x_118_phi : i32;
var x_120_phi : i32;
var x_161_phi : i32;
let x_40 : f32 = x_6.injectionSwitch.x;
let x_41 : bool = (x_40 < -1.0);
x_45_phi = false;
x_48_phi = 0;
x_50_phi = 0;
x_52_phi = 0;
loop {
var x_62 : i32;
var x_65 : i32;
var x_66 : i32;
var x_63 : i32;
var x_53 : i32;
var x_62_phi : i32;
var x_65_phi : i32;
var x_67_phi : i32;
var x_51_phi : i32;
var x_49_phi : i32;
var x_46_phi : bool;
x_45 = x_45_phi;
x_48 = x_48_phi;
let x_50 : i32 = x_50_phi;
let x_52 : i32 = x_52_phi;
let x_55 : f32 = gl_FragCoord.y;
x_111_phi = x_48;
x_112_phi = x_45;
if ((x_52 < select(100, 10, (x_55 > -1.0)))) {
} else {
break;
}
x_62_phi = x_48;
x_65_phi = x_50;
x_67_phi = 0;
loop {
var x_97 : i32;
var x_68 : i32;
var x_66_phi : i32;
x_62 = x_62_phi;
x_65 = x_65_phi;
let x_67 : i32 = x_67_phi;
x_51_phi = x_65;
x_49_phi = x_62;
x_46_phi = x_45;
if ((x_67 < 2)) {
} else {
break;
}
loop {
var x_78 : bool;
var x_86_phi : i32;
var x_97_phi : i32;
var x_98_phi : bool;
let x_77 : f32 = gl_FragCoord.x;
x_78 = (x_77 < -1.0);
if (!((x_40 < 0.0))) {
if (x_78) {
x_66_phi = 0;
break;
}
x_86_phi = 1;
loop {
var x_87 : i32;
let x_86 : i32 = x_86_phi;
x_97_phi = x_65;
x_98_phi = false;
if ((x_86 < 3)) {
} else {
break;
}
if (x_78) {
continue;
}
if ((x_86 > 0)) {
x_97_phi = 1;
x_98_phi = true;
break;
}
continuing {
x_87 = (x_86 + 1);
x_86_phi = x_87;
}
}
x_97 = x_97_phi;
let x_98 : bool = x_98_phi;
x_66_phi = x_97;
if (x_98) {
break;
}
}
x_66_phi = 0;
break;
}
x_66 = x_66_phi;
x_63 = bitcast<i32>((x_62 + x_66));
if (x_41) {
loop {
if (x_41) {
} else {
break;
}
continuing {
let x_105 : f32 = f32(x_52);
x_GLF_color = vec4<f32>(x_105, x_105, x_105, x_105);
}
}
x_51_phi = x_66;
x_49_phi = x_63;
x_46_phi = true;
break;
}
continuing {
x_68 = (x_67 + 1);
x_62_phi = x_63;
x_65_phi = x_66;
x_67_phi = x_68;
}
}
let x_51 : i32 = x_51_phi;
x_49 = x_49_phi;
x_46 = x_46_phi;
x_111_phi = x_49;
x_112_phi = x_46;
if (x_46) {
break;
}
if (!(x_41)) {
x_111_phi = x_49;
x_112_phi = x_46;
break;
}
continuing {
x_53 = (x_52 + 1);
x_45_phi = x_46;
x_48_phi = x_49;
x_50_phi = x_51;
x_52_phi = x_53;
}
}
let x_111 : i32 = x_111_phi;
let x_112 : bool = x_112_phi;
if (x_112) {
break;
}
x_115_phi = x_111;
x_118_phi = 0;
x_120_phi = 0;
loop {
var x_154 : i32;
var x_121 : i32;
var x_119_phi : i32;
x_115 = x_115_phi;
let x_118 : i32 = x_118_phi;
let x_120 : i32 = x_120_phi;
let x_123 : f32 = x_6.injectionSwitch.y;
x_161_phi = x_115;
if ((x_120 < i32((x_123 + 1.0)))) {
} else {
break;
}
loop {
var x_135 : bool;
var x_143_phi : i32;
var x_154_phi : i32;
var x_155_phi : bool;
let x_134 : f32 = gl_FragCoord.x;
x_135 = (x_134 < -1.0);
if (!((x_40 < 0.0))) {
if (x_135) {
x_119_phi = 0;
break;
}
x_143_phi = 1;
loop {
var x_144 : i32;
let x_143 : i32 = x_143_phi;
x_154_phi = x_118;
x_155_phi = false;
if ((x_143 < 3)) {
} else {
break;
}
if (x_135) {
continue;
}
if ((x_143 > 0)) {
x_154_phi = 1;
x_155_phi = true;
break;
}
continuing {
x_144 = (x_143 + 1);
x_143_phi = x_144;
}
}
x_154 = x_154_phi;
let x_155 : bool = x_155_phi;
x_119_phi = x_154;
if (x_155) {
break;
}
}
x_119_phi = 0;
break;
}
var x_119 : i32;
x_119 = x_119_phi;
x_116 = bitcast<i32>((x_115 + x_119));
if (select(x_41, false, !(x_41))) {
x_161_phi = x_116;
break;
}
continuing {
x_121 = (x_120 + 1);
x_115_phi = x_116;
x_118_phi = x_119;
x_120_phi = x_121;
}
}
let x_161 : i32 = x_161_phi;
if ((x_161 == 4)) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
}
break;
}
return;
}
struct main_out {
[[location(0)]]
x_GLF_color_1 : vec4<f32>;
};
[[stage(fragment)]]
fn main([[builtin(position)]] gl_FragCoord_param : vec4<f32>) -> main_out {
gl_FragCoord = gl_FragCoord_param;
main_1();
return main_out(x_GLF_color);
}

View File

@@ -1,285 +0,0 @@
SKIP: FAILED
static float4 gl_FragCoord = float4(0.0f, 0.0f, 0.0f, 0.0f);
cbuffer cbuffer_x_6 : register(b0, space0) {
uint4 x_6[1];
};
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void main_1() {
while (true) {
bool x_45 = false;
int x_48 = 0;
int x_49 = 0;
bool x_46 = false;
int x_115 = 0;
int x_116 = 0;
bool x_45_phi = false;
int x_48_phi = 0;
int x_50_phi = 0;
int x_52_phi = 0;
int x_111_phi = 0;
bool x_112_phi = false;
int x_115_phi = 0;
int x_118_phi = 0;
int x_120_phi = 0;
int x_161_phi = 0;
const float x_40 = asfloat(x_6[0].x);
const bool x_41 = (x_40 < -1.0f);
x_45_phi = false;
x_48_phi = 0;
x_50_phi = 0;
x_52_phi = 0;
while (true) {
int x_62 = 0;
int x_65 = 0;
int x_66 = 0;
int x_63 = 0;
int x_53 = 0;
int x_62_phi = 0;
int x_65_phi = 0;
int x_67_phi = 0;
int x_51_phi = 0;
int x_49_phi = 0;
bool x_46_phi = false;
x_45 = x_45_phi;
x_48 = x_48_phi;
const int x_50 = x_50_phi;
const int x_52 = x_52_phi;
const float x_55 = gl_FragCoord.y;
x_111_phi = x_48;
x_112_phi = x_45;
if ((x_52 < ((x_55 > -1.0f) ? 10 : 100))) {
} else {
break;
}
x_62_phi = x_48;
x_65_phi = x_50;
x_67_phi = 0;
while (true) {
int x_97 = 0;
int x_68 = 0;
int x_66_phi = 0;
x_62 = x_62_phi;
x_65 = x_65_phi;
const int x_67 = x_67_phi;
x_51_phi = x_65;
x_49_phi = x_62;
x_46_phi = x_45;
if ((x_67 < 2)) {
} else {
break;
}
while (true) {
bool x_78 = false;
int x_86_phi = 0;
int x_97_phi = 0;
bool x_98_phi = false;
const float x_77 = gl_FragCoord.x;
x_78 = (x_77 < -1.0f);
if (!((x_40 < 0.0f))) {
if (x_78) {
x_66_phi = 0;
break;
}
x_86_phi = 1;
while (true) {
int x_87 = 0;
const int x_86 = x_86_phi;
x_97_phi = x_65;
x_98_phi = false;
if ((x_86 < 3)) {
} else {
break;
}
if (x_78) {
{
x_87 = (x_86 + 1);
x_86_phi = x_87;
}
continue;
}
if ((x_86 > 0)) {
x_97_phi = 1;
x_98_phi = true;
break;
}
{
x_87 = (x_86 + 1);
x_86_phi = x_87;
}
}
x_97 = x_97_phi;
const bool x_98 = x_98_phi;
x_66_phi = x_97;
if (x_98) {
break;
}
}
x_66_phi = 0;
break;
}
x_66 = x_66_phi;
x_63 = asint((x_62 + x_66));
if (x_41) {
while (true) {
if (x_41) {
} else {
break;
}
{
const float x_105 = float(x_52);
x_GLF_color = float4(x_105, x_105, x_105, x_105);
}
}
x_51_phi = x_66;
x_49_phi = x_63;
x_46_phi = true;
break;
}
{
x_68 = (x_67 + 1);
x_62_phi = x_63;
x_65_phi = x_66;
x_67_phi = x_68;
}
}
const int x_51 = x_51_phi;
x_49 = x_49_phi;
x_46 = x_46_phi;
x_111_phi = x_49;
x_112_phi = x_46;
if (x_46) {
break;
}
if (!(x_41)) {
x_111_phi = x_49;
x_112_phi = x_46;
break;
}
{
x_53 = (x_52 + 1);
x_45_phi = x_46;
x_48_phi = x_49;
x_50_phi = x_51;
x_52_phi = x_53;
}
}
const int x_111 = x_111_phi;
if (x_112_phi) {
break;
}
x_115_phi = x_111;
x_118_phi = 0;
x_120_phi = 0;
while (true) {
int x_154 = 0;
int x_121 = 0;
int x_119_phi = 0;
x_115 = x_115_phi;
const int x_118 = x_118_phi;
const int x_120 = x_120_phi;
const float x_123 = asfloat(x_6[0].y);
x_161_phi = x_115;
if ((x_120 < int((x_123 + 1.0f)))) {
} else {
break;
}
while (true) {
bool x_135 = false;
int x_143_phi = 0;
int x_154_phi = 0;
bool x_155_phi = false;
const float x_134 = gl_FragCoord.x;
x_135 = (x_134 < -1.0f);
if (!((x_40 < 0.0f))) {
if (x_135) {
x_119_phi = 0;
break;
}
x_143_phi = 1;
while (true) {
int x_144 = 0;
const int x_143 = x_143_phi;
x_154_phi = x_118;
x_155_phi = false;
if ((x_143 < 3)) {
} else {
break;
}
if (x_135) {
{
x_144 = (x_143 + 1);
x_143_phi = x_144;
}
continue;
}
if ((x_143 > 0)) {
x_154_phi = 1;
x_155_phi = true;
break;
}
{
x_144 = (x_143 + 1);
x_143_phi = x_144;
}
}
x_154 = x_154_phi;
const bool x_155 = x_155_phi;
x_119_phi = x_154;
if (x_155) {
break;
}
}
x_119_phi = 0;
break;
}
int x_119 = 0;
x_119 = x_119_phi;
x_116 = asint((x_115 + x_119));
if ((!(x_41) ? false : x_41)) {
x_161_phi = x_116;
break;
}
{
x_121 = (x_120 + 1);
x_115_phi = x_116;
x_118_phi = x_119;
x_120_phi = x_121;
}
}
if ((x_161_phi == 4)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
}
break;
}
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;
};
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
const float4 gl_FragCoord_param = tint_symbol.gl_FragCoord_param;
gl_FragCoord = gl_FragCoord_param;
main_1();
const main_out tint_symbol_3 = {x_GLF_color};
const tint_symbol_2 tint_symbol_5 = {tint_symbol_3.x_GLF_color_1};
return tint_symbol_5;
}
C:\src\tint\test\Shader@0x000002E21608F310(8,3-14): warning X3557: loop only executes for 0 iteration(s), forcing loop to unroll
C:\src\tint\test\Shader@0x000002E21608F310(71,9-20): warning X3557: loop only executes for 0 iteration(s), forcing loop to unroll
C:\src\tint\test\Shader@0x000002E21608F310(186,7-18): warning X3557: loop only executes for 0 iteration(s), forcing loop to unroll
C:\src\tint\test\Shader@0x000002E21608F310(71,9-20): warning X3557: loop only executes for 0 iteration(s), forcing loop to unroll
C:\src\tint\test\Shader@0x000002E21608F310(186,7-18): warning X3557: loop only executes for 0 iteration(s), forcing loop to unroll
C:\src\tint\test\Shader@0x000002E21608F310(123,11-22): error X4029: infinite loop detected - loop never exits

View File

@@ -1,283 +0,0 @@
#include <metal_stdlib>
using namespace metal;
struct buf0 {
/* 0x0000 */ float2 injectionSwitch;
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
void main_1(constant buf0& x_6, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) {
while (true) {
bool x_45 = false;
int x_48 = 0;
int x_49 = 0;
bool x_46 = false;
int x_115 = 0;
int x_116 = 0;
bool x_45_phi = false;
int x_48_phi = 0;
int x_50_phi = 0;
int x_52_phi = 0;
int x_111_phi = 0;
bool x_112_phi = false;
int x_115_phi = 0;
int x_118_phi = 0;
int x_120_phi = 0;
int x_161_phi = 0;
float const x_40 = x_6.injectionSwitch.x;
bool const x_41 = (x_40 < -1.0f);
x_45_phi = false;
x_48_phi = 0;
x_50_phi = 0;
x_52_phi = 0;
while (true) {
int x_62 = 0;
int x_65 = 0;
int x_66 = 0;
int x_63 = 0;
int x_53 = 0;
int x_62_phi = 0;
int x_65_phi = 0;
int x_67_phi = 0;
int x_51_phi = 0;
int x_49_phi = 0;
bool x_46_phi = false;
x_45 = x_45_phi;
x_48 = x_48_phi;
int const x_50 = x_50_phi;
int const x_52 = x_52_phi;
float const x_55 = (*(tint_symbol_3)).y;
x_111_phi = x_48;
x_112_phi = x_45;
if ((x_52 < select(100, 10, (x_55 > -1.0f)))) {
} else {
break;
}
x_62_phi = x_48;
x_65_phi = x_50;
x_67_phi = 0;
while (true) {
int x_97 = 0;
int x_68 = 0;
int x_66_phi = 0;
x_62 = x_62_phi;
x_65 = x_65_phi;
int const x_67 = x_67_phi;
x_51_phi = x_65;
x_49_phi = x_62;
x_46_phi = x_45;
if ((x_67 < 2)) {
} else {
break;
}
while (true) {
bool x_78 = false;
int x_86_phi = 0;
int x_97_phi = 0;
bool x_98_phi = false;
float const x_77 = (*(tint_symbol_3)).x;
x_78 = (x_77 < -1.0f);
if (!((x_40 < 0.0f))) {
if (x_78) {
x_66_phi = 0;
break;
}
x_86_phi = 1;
while (true) {
int x_87 = 0;
int const x_86 = x_86_phi;
x_97_phi = x_65;
x_98_phi = false;
if ((x_86 < 3)) {
} else {
break;
}
if (x_78) {
{
x_87 = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
x_86_phi = x_87;
}
continue;
}
if ((x_86 > 0)) {
x_97_phi = 1;
x_98_phi = true;
break;
}
{
x_87 = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
x_86_phi = x_87;
}
}
x_97 = x_97_phi;
bool const x_98 = x_98_phi;
x_66_phi = x_97;
if (x_98) {
break;
}
}
x_66_phi = 0;
break;
}
x_66 = x_66_phi;
x_63 = as_type<int>(as_type<int>((as_type<uint>(x_62) + as_type<uint>(x_66))));
if (x_41) {
while (true) {
if (x_41) {
} else {
break;
}
{
float const x_105 = float(x_52);
*(tint_symbol_4) = float4(x_105, x_105, x_105, x_105);
}
}
x_51_phi = x_66;
x_49_phi = x_63;
x_46_phi = true;
break;
}
{
x_68 = as_type<int>((as_type<uint>(x_67) + as_type<uint>(1)));
x_62_phi = x_63;
x_65_phi = x_66;
x_67_phi = x_68;
}
}
int const x_51 = x_51_phi;
x_49 = x_49_phi;
x_46 = x_46_phi;
x_111_phi = x_49;
x_112_phi = x_46;
if (x_46) {
break;
}
if (!(x_41)) {
x_111_phi = x_49;
x_112_phi = x_46;
break;
}
{
x_53 = as_type<int>((as_type<uint>(x_52) + as_type<uint>(1)));
x_45_phi = x_46;
x_48_phi = x_49;
x_50_phi = x_51;
x_52_phi = x_53;
}
}
int const x_111 = x_111_phi;
bool const x_112 = x_112_phi;
if (x_112) {
break;
}
x_115_phi = x_111;
x_118_phi = 0;
x_120_phi = 0;
while (true) {
int x_154 = 0;
int x_121 = 0;
int x_119_phi = 0;
x_115 = x_115_phi;
int const x_118 = x_118_phi;
int const x_120 = x_120_phi;
float const x_123 = x_6.injectionSwitch.y;
x_161_phi = x_115;
if ((x_120 < int((x_123 + 1.0f)))) {
} else {
break;
}
while (true) {
bool x_135 = false;
int x_143_phi = 0;
int x_154_phi = 0;
bool x_155_phi = false;
float const x_134 = (*(tint_symbol_3)).x;
x_135 = (x_134 < -1.0f);
if (!((x_40 < 0.0f))) {
if (x_135) {
x_119_phi = 0;
break;
}
x_143_phi = 1;
while (true) {
int x_144 = 0;
int const x_143 = x_143_phi;
x_154_phi = x_118;
x_155_phi = false;
if ((x_143 < 3)) {
} else {
break;
}
if (x_135) {
{
x_144 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
x_143_phi = x_144;
}
continue;
}
if ((x_143 > 0)) {
x_154_phi = 1;
x_155_phi = true;
break;
}
{
x_144 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
x_143_phi = x_144;
}
}
x_154 = x_154_phi;
bool const x_155 = x_155_phi;
x_119_phi = x_154;
if (x_155) {
break;
}
}
x_119_phi = 0;
break;
}
int x_119 = 0;
x_119 = x_119_phi;
x_116 = as_type<int>(as_type<int>((as_type<uint>(x_115) + as_type<uint>(x_119))));
if (select(x_41, false, !(x_41))) {
x_161_phi = x_116;
break;
}
{
x_121 = as_type<int>((as_type<uint>(x_120) + as_type<uint>(1)));
x_115_phi = x_116;
x_118_phi = x_119;
x_120_phi = x_121;
}
}
int const x_161 = x_161_phi;
if ((x_161 == 4)) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
}
break;
}
return;
}
main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
*(tint_symbol_5) = gl_FragCoord_param;
main_1(x_6, 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(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
thread float4 tint_symbol_7 = 0.0f;
thread float4 tint_symbol_8 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(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;
}

View File

@@ -1,566 +0,0 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 292
; Schema: 0
OpCapability Shader
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 %gl_FragCoord "gl_FragCoord"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_6 "x_6"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %x_45 "x_45"
OpName %x_48 "x_48"
OpName %x_49 "x_49"
OpName %x_46 "x_46"
OpName %x_115 "x_115"
OpName %x_116 "x_116"
OpName %x_45_phi "x_45_phi"
OpName %x_48_phi "x_48_phi"
OpName %x_50_phi "x_50_phi"
OpName %x_52_phi "x_52_phi"
OpName %x_111_phi "x_111_phi"
OpName %x_112_phi "x_112_phi"
OpName %x_115_phi "x_115_phi"
OpName %x_118_phi "x_118_phi"
OpName %x_120_phi "x_120_phi"
OpName %x_161_phi "x_161_phi"
OpName %x_62 "x_62"
OpName %x_65 "x_65"
OpName %x_66 "x_66"
OpName %x_63 "x_63"
OpName %x_53 "x_53"
OpName %x_62_phi "x_62_phi"
OpName %x_65_phi "x_65_phi"
OpName %x_67_phi "x_67_phi"
OpName %x_51_phi "x_51_phi"
OpName %x_49_phi "x_49_phi"
OpName %x_46_phi "x_46_phi"
OpName %x_97 "x_97"
OpName %x_68 "x_68"
OpName %x_66_phi "x_66_phi"
OpName %x_78 "x_78"
OpName %x_86_phi "x_86_phi"
OpName %x_97_phi "x_97_phi"
OpName %x_98_phi "x_98_phi"
OpName %x_87 "x_87"
OpName %x_154 "x_154"
OpName %x_121 "x_121"
OpName %x_119_phi "x_119_phi"
OpName %x_135 "x_135"
OpName %x_143_phi "x_143_phi"
OpName %x_154_phi "x_154_phi"
OpName %x_155_phi "x_155_phi"
OpName %x_144 "x_144"
OpName %x_119 "x_119"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %gl_FragCoord_param "gl_FragCoord_param"
OpName %main "main"
OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
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
%_ptr_Private_v4float = OpTypePointer Private %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
%void = OpTypeVoid
%15 = OpTypeFunction %void
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%26 = OpConstantNull %bool
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%30 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_n1 = OpConstant %float -1
%false = OpConstantFalse %bool
%int_0 = OpConstant %int 0
%uint_1 = OpConstant %uint 1
%_ptr_Private_float = OpTypePointer Private %float
%int_10 = OpConstant %int 10
%int_100 = OpConstant %int 100
%int_2 = OpConstant %int 2
%float_0 = OpConstant %float 0
%int_1 = OpConstant %int 1
%int_3 = OpConstant %int 3
%true = OpConstantTrue %bool
%float_1 = OpConstant %float 1
%int_4 = OpConstant %int 4
%277 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%278 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%279 = OpTypeFunction %main_out %v4float
%main_1 = OpFunction %void None %15
%18 = OpLabel
%x_45 = OpVariable %_ptr_Function_bool Function %26
%x_48 = OpVariable %_ptr_Function_int Function %30
%x_49 = OpVariable %_ptr_Function_int Function %30
%x_46 = OpVariable %_ptr_Function_bool Function %26
%x_115 = OpVariable %_ptr_Function_int Function %30
%x_116 = OpVariable %_ptr_Function_int Function %30
%x_45_phi = OpVariable %_ptr_Function_bool Function %26
%x_48_phi = OpVariable %_ptr_Function_int Function %30
%x_50_phi = OpVariable %_ptr_Function_int Function %30
%x_52_phi = OpVariable %_ptr_Function_int Function %30
%x_111_phi = OpVariable %_ptr_Function_int Function %30
%x_112_phi = OpVariable %_ptr_Function_bool Function %26
%x_115_phi = OpVariable %_ptr_Function_int Function %30
%x_118_phi = OpVariable %_ptr_Function_int Function %30
%x_120_phi = OpVariable %_ptr_Function_int Function %30
%x_161_phi = OpVariable %_ptr_Function_int Function %30
%x_62 = OpVariable %_ptr_Function_int Function %30
%x_65 = OpVariable %_ptr_Function_int Function %30
%x_66 = OpVariable %_ptr_Function_int Function %30
%x_63 = OpVariable %_ptr_Function_int Function %30
%x_53 = OpVariable %_ptr_Function_int Function %30
%x_62_phi = OpVariable %_ptr_Function_int Function %30
%x_65_phi = OpVariable %_ptr_Function_int Function %30
%x_67_phi = OpVariable %_ptr_Function_int Function %30
%x_51_phi = OpVariable %_ptr_Function_int Function %30
%x_49_phi = OpVariable %_ptr_Function_int Function %30
%x_46_phi = OpVariable %_ptr_Function_bool Function %26
%x_97 = OpVariable %_ptr_Function_int Function %30
%x_68 = OpVariable %_ptr_Function_int Function %30
%x_66_phi = OpVariable %_ptr_Function_int Function %30
%x_78 = OpVariable %_ptr_Function_bool Function %26
%x_86_phi = OpVariable %_ptr_Function_int Function %30
%x_97_phi = OpVariable %_ptr_Function_int Function %30
%x_98_phi = OpVariable %_ptr_Function_bool Function %26
%x_87 = OpVariable %_ptr_Function_int Function %30
%x_154 = OpVariable %_ptr_Function_int Function %30
%x_121 = OpVariable %_ptr_Function_int Function %30
%x_119_phi = OpVariable %_ptr_Function_int Function %30
%x_135 = OpVariable %_ptr_Function_bool Function %26
%x_143_phi = OpVariable %_ptr_Function_int Function %30
%x_154_phi = OpVariable %_ptr_Function_int Function %30
%x_155_phi = OpVariable %_ptr_Function_bool Function %26
%x_144 = OpVariable %_ptr_Function_int Function %30
%x_119 = OpVariable %_ptr_Function_int Function %30
OpBranch %19
%19 = OpLabel
OpLoopMerge %20 %21 None
OpBranch %22
%22 = OpLabel
%48 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_0
%49 = OpLoad %float %48
%51 = OpFOrdLessThan %bool %49 %float_n1
OpStore %x_45_phi %false
OpStore %x_48_phi %int_0
OpStore %x_50_phi %int_0
OpStore %x_52_phi %int_0
OpBranch %54
%54 = OpLabel
OpLoopMerge %55 %56 None
OpBranch %57
%57 = OpLabel
%69 = OpLoad %bool %x_45_phi
OpStore %x_45 %69
%70 = OpLoad %int %x_48_phi
OpStore %x_48 %70
%71 = OpLoad %int %x_50_phi
%72 = OpLoad %int %x_52_phi
%75 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%76 = OpLoad %float %75
%77 = OpLoad %int %x_48
OpStore %x_111_phi %77
%78 = OpLoad %bool %x_45
OpStore %x_112_phi %78
%80 = OpFOrdGreaterThan %bool %76 %float_n1
%79 = OpSelect %int %80 %int_10 %int_100
%83 = OpSLessThan %bool %72 %79
OpSelectionMerge %84 None
OpBranchConditional %83 %85 %86
%85 = OpLabel
OpBranch %84
%86 = OpLabel
OpBranch %55
%84 = OpLabel
%87 = OpLoad %int %x_48
OpStore %x_62_phi %87
OpStore %x_65_phi %71
OpStore %x_67_phi %int_0
OpBranch %88
%88 = OpLabel
OpLoopMerge %89 %90 None
OpBranch %91
%91 = OpLabel
%95 = OpLoad %int %x_62_phi
OpStore %x_62 %95
%96 = OpLoad %int %x_65_phi
OpStore %x_65 %96
%97 = OpLoad %int %x_67_phi
%98 = OpLoad %int %x_65
OpStore %x_51_phi %98
%99 = OpLoad %int %x_62
OpStore %x_49_phi %99
%100 = OpLoad %bool %x_45
OpStore %x_46_phi %100
%102 = OpSLessThan %bool %97 %int_2
OpSelectionMerge %103 None
OpBranchConditional %102 %104 %105
%104 = OpLabel
OpBranch %103
%105 = OpLabel
OpBranch %89
%103 = OpLabel
OpBranch %106
%106 = OpLabel
OpLoopMerge %107 %108 None
OpBranch %109
%109 = OpLabel
%114 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%115 = OpLoad %float %114
%116 = OpFOrdLessThan %bool %115 %float_n1
OpStore %x_78 %116
%119 = OpFOrdLessThan %bool %49 %float_0
%117 = OpLogicalNot %bool %119
OpSelectionMerge %120 None
OpBranchConditional %117 %121 %120
%121 = OpLabel
%122 = OpLoad %bool %x_78
OpSelectionMerge %123 None
OpBranchConditional %122 %124 %123
%124 = OpLabel
OpStore %x_66_phi %int_0
OpBranch %107
%123 = OpLabel
OpStore %x_86_phi %int_1
OpBranch %126
%126 = OpLabel
OpLoopMerge %127 %128 None
OpBranch %129
%129 = OpLabel
%131 = OpLoad %int %x_86_phi
%132 = OpLoad %int %x_65
OpStore %x_97_phi %132
OpStore %x_98_phi %false
%134 = OpSLessThan %bool %131 %int_3
OpSelectionMerge %135 None
OpBranchConditional %134 %136 %137
%136 = OpLabel
OpBranch %135
%137 = OpLabel
OpBranch %127
%135 = OpLabel
%138 = OpLoad %bool %x_78
OpSelectionMerge %139 None
OpBranchConditional %138 %140 %139
%140 = OpLabel
OpBranch %128
%139 = OpLabel
%141 = OpSGreaterThan %bool %131 %int_0
OpSelectionMerge %142 None
OpBranchConditional %141 %143 %142
%143 = OpLabel
OpStore %x_97_phi %int_1
OpStore %x_98_phi %true
OpBranch %127
%142 = OpLabel
OpBranch %128
%128 = OpLabel
%145 = OpIAdd %int %131 %int_1
OpStore %x_87 %145
%146 = OpLoad %int %x_87
OpStore %x_86_phi %146
OpBranch %126
%127 = OpLabel
%147 = OpLoad %int %x_97_phi
OpStore %x_97 %147
%148 = OpLoad %bool %x_98_phi
%149 = OpLoad %int %x_97
OpStore %x_66_phi %149
OpSelectionMerge %150 None
OpBranchConditional %148 %151 %150
%151 = OpLabel
OpBranch %107
%150 = OpLabel
OpBranch %120
%120 = OpLabel
OpStore %x_66_phi %int_0
OpBranch %107
%108 = OpLabel
OpBranch %106
%107 = OpLabel
%152 = OpLoad %int %x_66_phi
OpStore %x_66 %152
%154 = OpLoad %int %x_62
%155 = OpLoad %int %x_66
%156 = OpIAdd %int %154 %155
%153 = OpCopyObject %int %156
OpStore %x_63 %153
OpSelectionMerge %157 None
OpBranchConditional %51 %158 %157
%158 = OpLabel
OpBranch %159
%159 = OpLabel
OpLoopMerge %160 %161 None
OpBranch %162
%162 = OpLabel
OpSelectionMerge %163 None
OpBranchConditional %51 %164 %165
%164 = OpLabel
OpBranch %163
%165 = OpLabel
OpBranch %160
%163 = OpLabel
OpBranch %161
%161 = OpLabel
%166 = OpConvertSToF %float %72
%167 = OpCompositeConstruct %v4float %166 %166 %166 %166
OpStore %x_GLF_color %167
OpBranch %159
%160 = OpLabel
%168 = OpLoad %int %x_66
OpStore %x_51_phi %168
%169 = OpLoad %int %x_63
OpStore %x_49_phi %169
OpStore %x_46_phi %true
OpBranch %89
%157 = OpLabel
OpBranch %90
%90 = OpLabel
%170 = OpIAdd %int %97 %int_1
OpStore %x_68 %170
%171 = OpLoad %int %x_63
OpStore %x_62_phi %171
%172 = OpLoad %int %x_66
OpStore %x_65_phi %172
%173 = OpLoad %int %x_68
OpStore %x_67_phi %173
OpBranch %88
%89 = OpLabel
%174 = OpLoad %int %x_51_phi
%175 = OpLoad %int %x_49_phi
OpStore %x_49 %175
%176 = OpLoad %bool %x_46_phi
OpStore %x_46 %176
%177 = OpLoad %int %x_49
OpStore %x_111_phi %177
%178 = OpLoad %bool %x_46
OpStore %x_112_phi %178
%179 = OpLoad %bool %x_46
OpSelectionMerge %180 None
OpBranchConditional %179 %181 %180
%181 = OpLabel
OpBranch %55
%180 = OpLabel
%182 = OpLogicalNot %bool %51
OpSelectionMerge %183 None
OpBranchConditional %182 %184 %183
%184 = OpLabel
%185 = OpLoad %int %x_49
OpStore %x_111_phi %185
%186 = OpLoad %bool %x_46
OpStore %x_112_phi %186
OpBranch %55
%183 = OpLabel
OpBranch %56
%56 = OpLabel
%187 = OpIAdd %int %72 %int_1
OpStore %x_53 %187
%188 = OpLoad %bool %x_46
OpStore %x_45_phi %188
%189 = OpLoad %int %x_49
OpStore %x_48_phi %189
OpStore %x_50_phi %174
%190 = OpLoad %int %x_53
OpStore %x_52_phi %190
OpBranch %54
%55 = OpLabel
%191 = OpLoad %int %x_111_phi
%192 = OpLoad %bool %x_112_phi
OpSelectionMerge %193 None
OpBranchConditional %192 %194 %193
%194 = OpLabel
OpBranch %20
%193 = OpLabel
OpStore %x_115_phi %191
OpStore %x_118_phi %int_0
OpStore %x_120_phi %int_0
OpBranch %195
%195 = OpLabel
OpLoopMerge %196 %197 None
OpBranch %198
%198 = OpLabel
%202 = OpLoad %int %x_115_phi
OpStore %x_115 %202
%203 = OpLoad %int %x_118_phi
%204 = OpLoad %int %x_120_phi
%205 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_1
%206 = OpLoad %float %205
%207 = OpLoad %int %x_115
OpStore %x_161_phi %207
%210 = OpFAdd %float %206 %float_1
%208 = OpConvertFToS %int %210
%211 = OpSLessThan %bool %204 %208
OpSelectionMerge %212 None
OpBranchConditional %211 %213 %214
%213 = OpLabel
OpBranch %212
%214 = OpLabel
OpBranch %196
%212 = OpLabel
OpBranch %215
%215 = OpLabel
OpLoopMerge %216 %217 None
OpBranch %218
%218 = OpLabel
%223 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%224 = OpLoad %float %223
%225 = OpFOrdLessThan %bool %224 %float_n1
OpStore %x_135 %225
%227 = OpFOrdLessThan %bool %49 %float_0
%226 = OpLogicalNot %bool %227
OpSelectionMerge %228 None
OpBranchConditional %226 %229 %228
%229 = OpLabel
%230 = OpLoad %bool %x_135
OpSelectionMerge %231 None
OpBranchConditional %230 %232 %231
%232 = OpLabel
OpStore %x_119_phi %int_0
OpBranch %216
%231 = OpLabel
OpStore %x_143_phi %int_1
OpBranch %233
%233 = OpLabel
OpLoopMerge %234 %235 None
OpBranch %236
%236 = OpLabel
%238 = OpLoad %int %x_143_phi
OpStore %x_154_phi %203
OpStore %x_155_phi %false
%239 = OpSLessThan %bool %238 %int_3
OpSelectionMerge %240 None
OpBranchConditional %239 %241 %242
%241 = OpLabel
OpBranch %240
%242 = OpLabel
OpBranch %234
%240 = OpLabel
%243 = OpLoad %bool %x_135
OpSelectionMerge %244 None
OpBranchConditional %243 %245 %244
%245 = OpLabel
OpBranch %235
%244 = OpLabel
%246 = OpSGreaterThan %bool %238 %int_0
OpSelectionMerge %247 None
OpBranchConditional %246 %248 %247
%248 = OpLabel
OpStore %x_154_phi %int_1
OpStore %x_155_phi %true
OpBranch %234
%247 = OpLabel
OpBranch %235
%235 = OpLabel
%249 = OpIAdd %int %238 %int_1
OpStore %x_144 %249
%250 = OpLoad %int %x_144
OpStore %x_143_phi %250
OpBranch %233
%234 = OpLabel
%251 = OpLoad %int %x_154_phi
OpStore %x_154 %251
%252 = OpLoad %bool %x_155_phi
%253 = OpLoad %int %x_154
OpStore %x_119_phi %253
OpSelectionMerge %254 None
OpBranchConditional %252 %255 %254
%255 = OpLabel
OpBranch %216
%254 = OpLabel
OpBranch %228
%228 = OpLabel
OpStore %x_119_phi %int_0
OpBranch %216
%217 = OpLabel
OpBranch %215
%216 = OpLabel
%257 = OpLoad %int %x_119_phi
OpStore %x_119 %257
%259 = OpLoad %int %x_115
%260 = OpLoad %int %x_119
%261 = OpIAdd %int %259 %260
%258 = OpCopyObject %int %261
OpStore %x_116 %258
%263 = OpLogicalNot %bool %51
%262 = OpSelect %bool %263 %false %51
OpSelectionMerge %264 None
OpBranchConditional %262 %265 %264
%265 = OpLabel
%266 = OpLoad %int %x_116
OpStore %x_161_phi %266
OpBranch %196
%264 = OpLabel
OpBranch %197
%197 = OpLabel
%267 = OpIAdd %int %204 %int_1
OpStore %x_121 %267
%268 = OpLoad %int %x_116
OpStore %x_115_phi %268
%269 = OpLoad %int %x_119
OpStore %x_118_phi %269
%270 = OpLoad %int %x_121
OpStore %x_120_phi %270
OpBranch %195
%196 = OpLabel
%271 = OpLoad %int %x_161_phi
%273 = OpIEqual %bool %271 %int_4
OpSelectionMerge %274 None
OpBranchConditional %273 %275 %276
%275 = OpLabel
OpStore %x_GLF_color %277
OpBranch %274
%276 = OpLabel
OpStore %x_GLF_color %278
OpBranch %274
%274 = OpLabel
OpBranch %20
%21 = OpLabel
OpBranch %19
%20 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %279
%gl_FragCoord_param = OpFunctionParameter %v4float
%283 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%284 = OpFunctionCall %void %main_1
%285 = OpLoad %v4float %x_GLF_color
%286 = OpCompositeConstruct %main_out %285
OpReturnValue %286
OpFunctionEnd
%main = OpFunction %void None %15
%288 = OpLabel
%290 = OpLoad %v4float %gl_FragCoord_param_1
%289 = OpFunctionCall %main_out %main_inner %290
%291 = OpCompositeExtract %v4float %289 0
OpStore %x_GLF_color_1_1 %291
OpReturn
OpFunctionEnd

View File

@@ -1,274 +0,0 @@
[[block]]
struct buf0 {
injectionSwitch : vec2<f32>;
};
var<private> gl_FragCoord : vec4<f32>;
[[group(0), binding(0)]] var<uniform> x_6 : buf0;
var<private> x_GLF_color : vec4<f32>;
fn main_1() {
loop {
var x_45 : bool;
var x_48 : i32;
var x_49 : i32;
var x_46 : bool;
var x_115 : i32;
var x_116 : i32;
var x_45_phi : bool;
var x_48_phi : i32;
var x_50_phi : i32;
var x_52_phi : i32;
var x_111_phi : i32;
var x_112_phi : bool;
var x_115_phi : i32;
var x_118_phi : i32;
var x_120_phi : i32;
var x_161_phi : i32;
let x_40 : f32 = x_6.injectionSwitch.x;
let x_41 : bool = (x_40 < -1.0);
x_45_phi = false;
x_48_phi = 0;
x_50_phi = 0;
x_52_phi = 0;
loop {
var x_62 : i32;
var x_65 : i32;
var x_66 : i32;
var x_63 : i32;
var x_53 : i32;
var x_62_phi : i32;
var x_65_phi : i32;
var x_67_phi : i32;
var x_51_phi : i32;
var x_49_phi : i32;
var x_46_phi : bool;
x_45 = x_45_phi;
x_48 = x_48_phi;
let x_50 : i32 = x_50_phi;
let x_52 : i32 = x_52_phi;
let x_55 : f32 = gl_FragCoord.y;
x_111_phi = x_48;
x_112_phi = x_45;
if ((x_52 < select(100, 10, (x_55 > -1.0)))) {
} else {
break;
}
x_62_phi = x_48;
x_65_phi = x_50;
x_67_phi = 0;
loop {
var x_97 : i32;
var x_68 : i32;
var x_66_phi : i32;
x_62 = x_62_phi;
x_65 = x_65_phi;
let x_67 : i32 = x_67_phi;
x_51_phi = x_65;
x_49_phi = x_62;
x_46_phi = x_45;
if ((x_67 < 2)) {
} else {
break;
}
loop {
var x_78 : bool;
var x_86_phi : i32;
var x_97_phi : i32;
var x_98_phi : bool;
let x_77 : f32 = gl_FragCoord.x;
x_78 = (x_77 < -1.0);
if (!((x_40 < 0.0))) {
if (x_78) {
x_66_phi = 0;
break;
}
x_86_phi = 1;
loop {
var x_87 : i32;
let x_86 : i32 = x_86_phi;
x_97_phi = x_65;
x_98_phi = false;
if ((x_86 < 3)) {
} else {
break;
}
if (x_78) {
continue;
}
if ((x_86 > 0)) {
x_97_phi = 1;
x_98_phi = true;
break;
}
continuing {
x_87 = (x_86 + 1);
x_86_phi = x_87;
}
}
x_97 = x_97_phi;
let x_98 : bool = x_98_phi;
x_66_phi = x_97;
if (x_98) {
break;
}
}
x_66_phi = 0;
break;
}
x_66 = x_66_phi;
x_63 = bitcast<i32>((x_62 + x_66));
if (x_41) {
loop {
if (x_41) {
} else {
break;
}
continuing {
let x_105 : f32 = f32(x_52);
x_GLF_color = vec4<f32>(x_105, x_105, x_105, x_105);
}
}
x_51_phi = x_66;
x_49_phi = x_63;
x_46_phi = true;
break;
}
continuing {
x_68 = (x_67 + 1);
x_62_phi = x_63;
x_65_phi = x_66;
x_67_phi = x_68;
}
}
let x_51 : i32 = x_51_phi;
x_49 = x_49_phi;
x_46 = x_46_phi;
x_111_phi = x_49;
x_112_phi = x_46;
if (x_46) {
break;
}
if (!(x_41)) {
x_111_phi = x_49;
x_112_phi = x_46;
break;
}
continuing {
x_53 = (x_52 + 1);
x_45_phi = x_46;
x_48_phi = x_49;
x_50_phi = x_51;
x_52_phi = x_53;
}
}
let x_111 : i32 = x_111_phi;
let x_112 : bool = x_112_phi;
if (x_112) {
break;
}
x_115_phi = x_111;
x_118_phi = 0;
x_120_phi = 0;
loop {
var x_154 : i32;
var x_121 : i32;
var x_119_phi : i32;
x_115 = x_115_phi;
let x_118 : i32 = x_118_phi;
let x_120 : i32 = x_120_phi;
let x_123 : f32 = x_6.injectionSwitch.y;
x_161_phi = x_115;
if ((x_120 < i32((x_123 + 1.0)))) {
} else {
break;
}
loop {
var x_135 : bool;
var x_143_phi : i32;
var x_154_phi : i32;
var x_155_phi : bool;
let x_134 : f32 = gl_FragCoord.x;
x_135 = (x_134 < -1.0);
if (!((x_40 < 0.0))) {
if (x_135) {
x_119_phi = 0;
break;
}
x_143_phi = 1;
loop {
var x_144 : i32;
let x_143 : i32 = x_143_phi;
x_154_phi = x_118;
x_155_phi = false;
if ((x_143 < 3)) {
} else {
break;
}
if (x_135) {
continue;
}
if ((x_143 > 0)) {
x_154_phi = 1;
x_155_phi = true;
break;
}
continuing {
x_144 = (x_143 + 1);
x_143_phi = x_144;
}
}
x_154 = x_154_phi;
let x_155 : bool = x_155_phi;
x_119_phi = x_154;
if (x_155) {
break;
}
}
x_119_phi = 0;
break;
}
var x_119 : i32;
x_119 = x_119_phi;
x_116 = bitcast<i32>((x_115 + x_119));
if (select(x_41, false, !(x_41))) {
x_161_phi = x_116;
break;
}
continuing {
x_121 = (x_120 + 1);
x_115_phi = x_116;
x_118_phi = x_119;
x_120_phi = x_121;
}
}
let x_161 : i32 = x_161_phi;
if ((x_161 == 4)) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
}
break;
}
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);
}