mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 14:46:08 +00:00
tint->dawn: Shuffle source tree in preperation of merging repos
docs/ -> docs/tint/ fuzzers/ -> src/tint/fuzzers/ samples/ -> src/tint/cmd/ src/ -> src/tint/ test/ -> test/tint/ BUG=tint:1418,tint:1433 Change-Id: Id2aa79f989aef3245b80ef4aa37a27ff16cd700b Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/80482 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
committed by
Tint LUCI CQ
parent
38f1e9c75c
commit
dbc13af287
@@ -0,0 +1,275 @@
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %gl_FragCoord %_GLF_color
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpSource ESSL 310
|
||||
OpName %main "main"
|
||||
OpName %gl_FragCoord "gl_FragCoord"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "injectionSwitch"
|
||||
OpName %_ ""
|
||||
OpName %_GLF_color "_GLF_color"
|
||||
OpDecorate %gl_FragCoord BuiltIn FragCoord
|
||||
OpMemberDecorate %buf0 0 Offset 0
|
||||
OpDecorate %buf0 Block
|
||||
OpDecorate %_ DescriptorSet 0
|
||||
OpDecorate %_ Binding 0
|
||||
OpDecorate %_GLF_color Location 0
|
||||
%void = OpTypeVoid
|
||||
%8 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%bool = OpTypeBool
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Input_v4float = OpTypePointer Input %v4float
|
||||
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Input_float = OpTypePointer Input %float
|
||||
%float_n1 = OpConstant %float -1
|
||||
%v2float = OpTypeVector %float 2
|
||||
%buf0 = OpTypeStruct %v2float
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%int_0 = OpConstant %int 0
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%float_0 = OpConstant %float 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%int_10 = OpConstant %int 10
|
||||
%int_100 = OpConstant %int 100
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%_GLF_color = OpVariable %_ptr_Output_v4float Output
|
||||
%float_1 = OpConstant %float 1
|
||||
%int_4 = OpConstant %int 4
|
||||
%32 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
|
||||
%33 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||
%false = OpConstantFalse %bool
|
||||
%true = OpConstantTrue %bool
|
||||
%36 = OpUndef %int
|
||||
%main = OpFunction %void None %8
|
||||
%37 = OpLabel
|
||||
OpBranch %38
|
||||
%38 = OpLabel
|
||||
%39 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %uint_0
|
||||
%40 = OpLoad %float %39
|
||||
%41 = OpFOrdLessThan %bool %40 %float_n1
|
||||
OpLoopMerge %42 %43 None
|
||||
OpBranch %44
|
||||
%44 = OpLabel
|
||||
%45 = OpPhi %bool %false %38 %46 %47
|
||||
%48 = OpPhi %int %int_0 %38 %49 %47
|
||||
%50 = OpPhi %int %36 %38 %51 %47
|
||||
%52 = OpPhi %int %int_0 %38 %53 %47
|
||||
%54 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
|
||||
%55 = OpLoad %float %54
|
||||
%56 = OpFOrdGreaterThan %bool %55 %float_n1
|
||||
%57 = OpSelect %int %56 %int_10 %int_100
|
||||
%58 = OpSLessThan %bool %52 %57
|
||||
OpLoopMerge %59 %47 None
|
||||
OpBranchConditional %58 %60 %59
|
||||
%60 = OpLabel
|
||||
OpBranch %61
|
||||
%61 = OpLabel
|
||||
%62 = OpPhi %int %48 %60 %63 %64
|
||||
%65 = OpPhi %int %50 %60 %66 %64
|
||||
%67 = OpPhi %int %int_0 %60 %68 %64
|
||||
%69 = OpSLessThan %bool %67 %int_2
|
||||
OpLoopMerge %70 %64 None
|
||||
OpBranchConditional %69 %71 %70
|
||||
%71 = OpLabel
|
||||
OpBranch %72
|
||||
%72 = OpLabel
|
||||
OpLoopMerge %73 %74 None
|
||||
OpBranch %75
|
||||
%75 = OpLabel
|
||||
%76 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0
|
||||
%77 = OpLoad %float %76
|
||||
%78 = OpFOrdLessThan %bool %77 %float_n1
|
||||
%79 = OpFOrdLessThan %bool %40 %float_0
|
||||
%80 = OpLogicalNot %bool %79
|
||||
OpSelectionMerge %81 None
|
||||
OpBranchConditional %80 %82 %81
|
||||
%82 = OpLabel
|
||||
OpSelectionMerge %83 None
|
||||
OpBranchConditional %78 %84 %83
|
||||
%84 = OpLabel
|
||||
OpBranch %73
|
||||
%83 = OpLabel
|
||||
OpBranch %85
|
||||
%85 = OpLabel
|
||||
%86 = OpPhi %int %int_1 %83 %87 %88
|
||||
%89 = OpSLessThan %bool %86 %int_3
|
||||
OpLoopMerge %90 %88 None
|
||||
OpBranchConditional %89 %91 %90
|
||||
%91 = OpLabel
|
||||
OpSelectionMerge %92 None
|
||||
OpBranchConditional %78 %93 %92
|
||||
%93 = OpLabel
|
||||
OpBranch %88
|
||||
%92 = OpLabel
|
||||
%94 = OpSGreaterThan %bool %86 %int_0
|
||||
OpSelectionMerge %95 None
|
||||
OpBranchConditional %94 %96 %95
|
||||
%96 = OpLabel
|
||||
OpBranch %90
|
||||
%95 = OpLabel
|
||||
OpBranch %88
|
||||
%88 = OpLabel
|
||||
%87 = OpIAdd %int %86 %int_1
|
||||
OpBranch %85
|
||||
%90 = OpLabel
|
||||
%97 = OpPhi %int %65 %85 %int_1 %96
|
||||
%98 = OpPhi %bool %false %85 %true %96
|
||||
OpSelectionMerge %99 None
|
||||
OpBranchConditional %98 %73 %99
|
||||
%99 = OpLabel
|
||||
OpBranch %81
|
||||
%81 = OpLabel
|
||||
OpBranch %73
|
||||
%74 = OpLabel
|
||||
OpBranch %72
|
||||
%73 = OpLabel
|
||||
%66 = OpPhi %int %int_0 %84 %97 %90 %int_0 %81
|
||||
%63 = OpIAdd %int %62 %66
|
||||
OpSelectionMerge %100 None
|
||||
OpBranchConditional %41 %101 %100
|
||||
%101 = OpLabel
|
||||
OpBranch %102
|
||||
%102 = OpLabel
|
||||
OpLoopMerge %103 %104 None
|
||||
OpBranchConditional %41 %104 %103
|
||||
%104 = OpLabel
|
||||
%105 = OpConvertSToF %float %52
|
||||
%106 = OpCompositeConstruct %v4float %105 %105 %105 %105
|
||||
OpStore %_GLF_color %106
|
||||
OpBranch %102
|
||||
%103 = OpLabel
|
||||
OpBranch %70
|
||||
%100 = OpLabel
|
||||
OpBranch %64
|
||||
%64 = OpLabel
|
||||
%68 = OpIAdd %int %67 %int_1
|
||||
OpBranch %61
|
||||
%70 = OpLabel
|
||||
%51 = OpPhi %int %65 %61 %66 %103
|
||||
%49 = OpPhi %int %62 %61 %63 %103
|
||||
%46 = OpPhi %bool %45 %61 %true %103
|
||||
OpSelectionMerge %107 None
|
||||
OpBranchConditional %46 %59 %107
|
||||
%107 = OpLabel
|
||||
%108 = OpLogicalNot %bool %41
|
||||
OpSelectionMerge %109 None
|
||||
OpBranchConditional %108 %110 %109
|
||||
%110 = OpLabel
|
||||
OpBranch %59
|
||||
%109 = OpLabel
|
||||
OpBranch %47
|
||||
%47 = OpLabel
|
||||
%53 = OpIAdd %int %52 %int_1
|
||||
OpBranch %44
|
||||
%59 = OpLabel
|
||||
%111 = OpPhi %int %48 %44 %49 %70 %49 %110
|
||||
%112 = OpPhi %bool %45 %44 %46 %70 %46 %110
|
||||
OpSelectionMerge %113 None
|
||||
OpBranchConditional %112 %42 %113
|
||||
%113 = OpLabel
|
||||
OpBranch %114
|
||||
%114 = OpLabel
|
||||
%115 = OpPhi %int %111 %113 %116 %117
|
||||
%118 = OpPhi %int %36 %113 %119 %117
|
||||
%120 = OpPhi %int %int_0 %113 %121 %117
|
||||
%122 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %uint_1
|
||||
%123 = OpLoad %float %122
|
||||
%124 = OpFAdd %float %123 %float_1
|
||||
%125 = OpConvertFToS %int %124
|
||||
%126 = OpSLessThan %bool %120 %125
|
||||
OpLoopMerge %127 %117 None
|
||||
OpBranchConditional %126 %128 %127
|
||||
%128 = OpLabel
|
||||
OpBranch %129
|
||||
%129 = OpLabel
|
||||
OpLoopMerge %130 %131 None
|
||||
OpBranch %132
|
||||
%132 = OpLabel
|
||||
%133 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0
|
||||
%134 = OpLoad %float %133
|
||||
%135 = OpFOrdLessThan %bool %134 %float_n1
|
||||
%136 = OpFOrdLessThan %bool %40 %float_0
|
||||
%137 = OpLogicalNot %bool %136
|
||||
OpSelectionMerge %138 None
|
||||
OpBranchConditional %137 %139 %138
|
||||
%139 = OpLabel
|
||||
OpSelectionMerge %140 None
|
||||
OpBranchConditional %135 %141 %140
|
||||
%141 = OpLabel
|
||||
OpBranch %130
|
||||
%140 = OpLabel
|
||||
OpBranch %142
|
||||
%142 = OpLabel
|
||||
%143 = OpPhi %int %int_1 %140 %144 %145
|
||||
%146 = OpSLessThan %bool %143 %int_3
|
||||
OpLoopMerge %147 %145 None
|
||||
OpBranchConditional %146 %148 %147
|
||||
%148 = OpLabel
|
||||
OpSelectionMerge %149 None
|
||||
OpBranchConditional %135 %150 %149
|
||||
%150 = OpLabel
|
||||
OpBranch %145
|
||||
%149 = OpLabel
|
||||
%151 = OpSGreaterThan %bool %143 %int_0
|
||||
OpSelectionMerge %152 None
|
||||
OpBranchConditional %151 %153 %152
|
||||
%153 = OpLabel
|
||||
OpBranch %147
|
||||
%152 = OpLabel
|
||||
OpBranch %145
|
||||
%145 = OpLabel
|
||||
%144 = OpIAdd %int %143 %int_1
|
||||
OpBranch %142
|
||||
%147 = OpLabel
|
||||
%154 = OpPhi %int %118 %142 %int_1 %153
|
||||
%155 = OpPhi %bool %false %142 %true %153
|
||||
OpSelectionMerge %156 None
|
||||
OpBranchConditional %155 %130 %156
|
||||
%156 = OpLabel
|
||||
OpBranch %138
|
||||
%138 = OpLabel
|
||||
OpBranch %130
|
||||
%131 = OpLabel
|
||||
OpBranch %129
|
||||
%130 = OpLabel
|
||||
%119 = OpPhi %int %int_0 %141 %154 %147 %int_0 %138
|
||||
%116 = OpIAdd %int %115 %119
|
||||
%157 = OpLogicalNot %bool %41
|
||||
%158 = OpSelect %bool %157 %false %41
|
||||
OpSelectionMerge %159 None
|
||||
OpBranchConditional %158 %160 %159
|
||||
%160 = OpLabel
|
||||
OpBranch %127
|
||||
%159 = OpLabel
|
||||
OpBranch %117
|
||||
%117 = OpLabel
|
||||
%121 = OpIAdd %int %120 %int_1
|
||||
OpBranch %114
|
||||
%127 = OpLabel
|
||||
%161 = OpPhi %int %115 %114 %116 %160
|
||||
%162 = OpIEqual %bool %161 %int_4
|
||||
OpSelectionMerge %163 None
|
||||
OpBranchConditional %162 %164 %165
|
||||
%165 = OpLabel
|
||||
OpStore %_GLF_color %33
|
||||
OpBranch %163
|
||||
%164 = OpLabel
|
||||
OpStore %_GLF_color %32
|
||||
OpBranch %163
|
||||
%163 = OpLabel
|
||||
OpBranch %42
|
||||
%43 = OpLabel
|
||||
OpBranch %38
|
||||
%42 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,288 @@
|
||||
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() {
|
||||
[loop] 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;
|
||||
[loop] 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;
|
||||
[loop] 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;
|
||||
}
|
||||
[loop] 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;
|
||||
[loop] 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) {
|
||||
[loop] 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;
|
||||
[loop] 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;
|
||||
}
|
||||
[loop] 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;
|
||||
[loop] 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;
|
||||
};
|
||||
|
||||
main_out main_inner(float4 gl_FragCoord_param) {
|
||||
gl_FragCoord = gl_FragCoord_param;
|
||||
main_1();
|
||||
const main_out tint_symbol_4 = {x_GLF_color};
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
C:\src\tint\test\Shader@0x000002215620C140(8,10-21): warning X3557: loop only executes for 0 iteration(s), consider removing [loop]
|
||||
C:\src\tint\test\Shader@0x000002215620C140(71,16-27): warning X3557: loop only executes for 0 iteration(s), consider removing [loop]
|
||||
C:\src\tint\test\Shader@0x000002215620C140(186,14-25): warning X3557: loop only executes for 0 iteration(s), consider removing [loop]
|
||||
C:\src\tint\test\Shader@0x000002215620C140(123,18-29): error X4029: infinite loop detected - loop never exits
|
||||
|
||||
@@ -0,0 +1,273 @@
|
||||
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);
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
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() {
|
||||
[loop] 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;
|
||||
[loop] 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;
|
||||
[loop] 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;
|
||||
}
|
||||
[loop] 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;
|
||||
[loop] 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) {
|
||||
[loop] 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;
|
||||
[loop] 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;
|
||||
}
|
||||
[loop] 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;
|
||||
[loop] 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;
|
||||
};
|
||||
|
||||
main_out main_inner(float4 gl_FragCoord_param) {
|
||||
gl_FragCoord = gl_FragCoord_param;
|
||||
main_1();
|
||||
const main_out tint_symbol_4 = {x_GLF_color};
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
C:\src\tint\test\Shader@0x0000020EFE36E240(8,10-21): warning X3557: loop only executes for 0 iteration(s), consider removing [loop]
|
||||
C:\src\tint\test\Shader@0x0000020EFE36E240(71,16-27): warning X3557: loop only executes for 0 iteration(s), consider removing [loop]
|
||||
C:\src\tint\test\Shader@0x0000020EFE36E240(186,14-25): warning X3557: loop only executes for 0 iteration(s), consider removing [loop]
|
||||
C:\src\tint\test\Shader@0x0000020EFE36E240(123,18-29): error X4029: infinite loop detected - loop never exits
|
||||
|
||||
Reference in New Issue
Block a user