spirv-reader: fix mapping of OpLogicalOr, OpLogicalAnd

These work on scalar and vector of bool, and map to ast::BinaryOp::kOr
and kAnd.

Bug: tint:1043
Change-Id: I009edf8e43c21cb75ccfdcde1106ec177d2fe50e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59561
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: David Neto <dneto@google.com>
This commit is contained in:
David Neto 2021-07-26 17:34:58 +00:00 committed by Tint LUCI CQ
parent 5f3063359c
commit 1444a2e117
188 changed files with 2306 additions and 3080 deletions

View File

@ -230,9 +230,9 @@ ast::BinaryOp ConvertBinaryOp(SpvOp opcode) {
case SpvOpBitwiseXor: case SpvOpBitwiseXor:
return ast::BinaryOp::kXor; return ast::BinaryOp::kXor;
case SpvOpLogicalAnd: case SpvOpLogicalAnd:
return ast::BinaryOp::kLogicalAnd; return ast::BinaryOp::kAnd;
case SpvOpLogicalOr: case SpvOpLogicalOr:
return ast::BinaryOp::kLogicalOr; return ast::BinaryOp::kOr;
case SpvOpUGreaterThan: case SpvOpUGreaterThan:
case SpvOpSGreaterThan: case SpvOpSGreaterThan:
case SpvOpFOrdGreaterThan: case SpvOpFOrdGreaterThan:

View File

@ -440,11 +440,10 @@ INSTANTIATE_TEST_SUITE_P(
SpvBinaryLogicalTest, SpvBinaryLogicalTest,
::testing::Values(BinaryData{"bool", "true", "OpLogicalAnd", "false", ::testing::Values(BinaryData{"bool", "true", "OpLogicalAnd", "false",
"__bool", "ScalarConstructor[not set]{true}", "__bool", "ScalarConstructor[not set]{true}",
"logical_and", "and", "ScalarConstructor[not set]{false}"},
"ScalarConstructor[not set]{false}"},
BinaryData{"v2bool", "v2bool_t_f", "OpLogicalAnd", BinaryData{"v2bool", "v2bool_t_f", "OpLogicalAnd",
"v2bool_f_t", "__vec_2__bool", "v2bool_f_t", "__vec_2__bool",
AstFor("v2bool_t_f"), "logical_and", AstFor("v2bool_t_f"), "and",
AstFor("v2bool_f_t")})); AstFor("v2bool_f_t")}));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(
@ -452,11 +451,10 @@ INSTANTIATE_TEST_SUITE_P(
SpvBinaryLogicalTest, SpvBinaryLogicalTest,
::testing::Values(BinaryData{"bool", "true", "OpLogicalOr", "false", ::testing::Values(BinaryData{"bool", "true", "OpLogicalOr", "false",
"__bool", "ScalarConstructor[not set]{true}", "__bool", "ScalarConstructor[not set]{true}",
"logical_or", "or", "ScalarConstructor[not set]{false}"},
"ScalarConstructor[not set]{false}"},
BinaryData{"v2bool", "v2bool_t_f", "OpLogicalOr", BinaryData{"v2bool", "v2bool_t_f", "OpLogicalOr",
"v2bool_f_t", "__vec_2__bool", "v2bool_f_t", "__vec_2__bool",
AstFor("v2bool_t_f"), "logical_or", AstFor("v2bool_t_f"), "or",
AstFor("v2bool_f_t")})); AstFor("v2bool_f_t")}));
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(

View File

@ -2399,7 +2399,7 @@ VariableDeclStatement{
{ {
Binary[not set]{ Binary[not set]{
ScalarConstructor[not set]{true} ScalarConstructor[not set]{true}
logical_and and
ScalarConstructor[not set]{true} ScalarConstructor[not set]{true}
} }
} }

View File

@ -102,27 +102,11 @@ float3 drawShape_vf2_(inout float2 pos) {
break; break;
} }
GLF_live7_looplimiter0 = (GLF_live7_looplimiter0 + 1); GLF_live7_looplimiter0 = (GLF_live7_looplimiter0 + 1);
bool tint_tmp = (GLF_live7c >= 0); set_float3(GLF_live7m33[(((GLF_live7c >= 0) & (GLF_live7c < 3)) ? GLF_live7c : 0)], (((GLF_live7r >= 0) & (GLF_live7r < 3)) ? GLF_live7r : 0), 1.0f);
if (tint_tmp) {
tint_tmp = (GLF_live7c < 3);
}
bool tint_tmp_1 = (GLF_live7r >= 0);
if (tint_tmp_1) {
tint_tmp_1 = (GLF_live7r < 3);
}
set_float3(GLF_live7m33[((tint_tmp) ? GLF_live7c : 0)], ((tint_tmp_1) ? GLF_live7r : 0), 1.0f);
const float x_267 = asfloat(x_25[0].y); const float x_267 = asfloat(x_25[0].y);
if ((0.0f > x_267)) { if ((0.0f > x_267)) {
} else { } else {
bool tint_tmp_2 = (GLF_live7c >= 0); set_float2(GLF_live7m42[(((GLF_live7c >= 0) & (GLF_live7c < 4)) ? GLF_live7c : 0)], (((GLF_live7r >= 0) & (GLF_live7r < 2)) ? GLF_live7r : 0), 1.0f);
if (tint_tmp_2) {
tint_tmp_2 = (GLF_live7c < 4);
}
bool tint_tmp_3 = (GLF_live7r >= 0);
if (tint_tmp_3) {
tint_tmp_3 = (GLF_live7r < 2);
}
set_float2(GLF_live7m42[((tint_tmp_2) ? GLF_live7c : 0)], ((tint_tmp_3) ? GLF_live7r : 0), 1.0f);
} }
} }
} }
@ -142,22 +126,14 @@ float3 drawShape_vf2_(inout float2 pos) {
} }
GLF_live7_looplimiter7 = (GLF_live7_looplimiter7 + 1); GLF_live7_looplimiter7 = (GLF_live7_looplimiter7 + 1);
GLF_live7rows_1 = 2; GLF_live7rows_1 = 2;
bool tint_tmp_4 = (GLF_live7sum_index >= 0); GLF_live7sums[(((GLF_live7sum_index >= 0) & (GLF_live7sum_index < 9)) ? GLF_live7sum_index : 0)] = 0.0f;
if (tint_tmp_4) {
tint_tmp_4 = (GLF_live7sum_index < 9);
}
GLF_live7sums[((tint_tmp_4) ? GLF_live7sum_index : 0)] = 0.0f;
GLF_live7c_1 = 0; GLF_live7c_1 = 0;
{ {
for(; (GLF_live7c_1 < 1); GLF_live7c_1 = (GLF_live7c_1 + 1)) { for(; (GLF_live7c_1 < 1); GLF_live7c_1 = (GLF_live7c_1 + 1)) {
GLF_live7r_1 = 0; GLF_live7r_1 = 0;
{ {
for(; (GLF_live7r_1 < GLF_live7rows_1); GLF_live7r_1 = (GLF_live7r_1 + 1)) { for(; (GLF_live7r_1 < GLF_live7rows_1); GLF_live7r_1 = (GLF_live7r_1 + 1)) {
bool tint_tmp_5 = (GLF_live7sum_index >= 0); const int x_310 = (((GLF_live7sum_index >= 0) & (GLF_live7sum_index < 9)) ? GLF_live7sum_index : 0);
if (tint_tmp_5) {
tint_tmp_5 = (GLF_live7sum_index < 9);
}
const int x_310 = ((tint_tmp_5) ? GLF_live7sum_index : 0);
const float3x3 x_312 = transpose(GLF_live7m33); const float3x3 x_312 = transpose(GLF_live7m33);
if ((GLF_live7c_1 < 3)) { if ((GLF_live7c_1 < 3)) {
x_180 = 1; x_180 = 1;
@ -171,11 +147,7 @@ float3 drawShape_vf2_(inout float2 pos) {
const float x_324 = indexable[x_320][((x_93 < 3) ? 1 : 0)]; const float x_324 = indexable[x_320][((x_93 < 3) ? 1 : 0)];
const float x_326 = GLF_live7sums[x_310]; const float x_326 = GLF_live7sums[x_310];
GLF_live7sums[x_310] = (x_326 + x_324); GLF_live7sums[x_310] = (x_326 + x_324);
bool tint_tmp_6 = (GLF_live7sum_index >= 0); const int x_332 = (((GLF_live7sum_index >= 0) & (GLF_live7sum_index < 9)) ? GLF_live7sum_index : 0);
if (tint_tmp_6) {
tint_tmp_6 = (GLF_live7sum_index < 9);
}
const int x_332 = ((tint_tmp_6) ? GLF_live7sum_index : 0);
const float x_334 = GLF_live7m42[1][GLF_live7r_1]; const float x_334 = GLF_live7m42[1][GLF_live7r_1];
const float x_336 = GLF_live7sums[x_332]; const float x_336 = GLF_live7sums[x_332];
GLF_live7sums[x_332] = (x_336 + x_334); GLF_live7sums[x_332] = (x_336 + x_334);

View File

@ -145,7 +145,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) {
int const x_62 = GLF_live7r; int const x_62 = GLF_live7r;
int const x_63 = GLF_live7r; int const x_63 = GLF_live7r;
int const x_64 = GLF_live7r; int const x_64 = GLF_live7r;
GLF_live7m33[select(0, x_61, ((x_59 >= 0) && (x_60 < 3)))][select(0, x_64, ((x_62 >= 0) && (x_63 < 3)))] = 1.0f; GLF_live7m33[select(0, x_61, ((x_59 >= 0) & (x_60 < 3)))][select(0, x_64, ((x_62 >= 0) & (x_63 < 3)))] = 1.0f;
float const x_267 = x_25.injectionSwitch.y; float const x_267 = x_25.injectionSwitch.y;
if ((0.0f > x_267)) { if ((0.0f > x_267)) {
} else { } else {
@ -155,7 +155,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) {
int const x_68 = GLF_live7r; int const x_68 = GLF_live7r;
int const x_69 = GLF_live7r; int const x_69 = GLF_live7r;
int const x_70 = GLF_live7r; int const x_70 = GLF_live7r;
GLF_live7m42[select(0, x_67, ((x_65 >= 0) && (x_66 < 4)))][select(0, x_70, ((x_68 >= 0) && (x_69 < 2)))] = 1.0f; GLF_live7m42[select(0, x_67, ((x_65 >= 0) & (x_66 < 4)))][select(0, x_70, ((x_68 >= 0) & (x_69 < 2)))] = 1.0f;
} }
{ {
int const x_71 = GLF_live7r; int const x_71 = GLF_live7r;
@ -196,7 +196,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) {
int const x_83 = GLF_live7sum_index; int const x_83 = GLF_live7sum_index;
int const x_84 = GLF_live7sum_index; int const x_84 = GLF_live7sum_index;
int const x_85 = GLF_live7sum_index; int const x_85 = GLF_live7sum_index;
GLF_live7sums.arr[select(0, x_85, ((x_83 >= 0) && (x_84 < 9)))] = 0.0f; GLF_live7sums.arr[select(0, x_85, ((x_83 >= 0) & (x_84 < 9)))] = 0.0f;
GLF_live7c_1 = 0; GLF_live7c_1 = 0;
while (true) { while (true) {
int const x_86 = GLF_live7c_1; int const x_86 = GLF_live7c_1;
@ -215,7 +215,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) {
int const x_89 = GLF_live7sum_index; int const x_89 = GLF_live7sum_index;
int const x_90 = GLF_live7sum_index; int const x_90 = GLF_live7sum_index;
int const x_91 = GLF_live7sum_index; int const x_91 = GLF_live7sum_index;
int const x_310 = select(0, x_91, ((x_89 >= 0) && (x_90 < 9))); int const x_310 = select(0, x_91, ((x_89 >= 0) & (x_90 < 9)));
float3x3 const x_311 = GLF_live7m33; float3x3 const x_311 = GLF_live7m33;
float3x3 const x_312 = transpose(x_311); float3x3 const x_312 = transpose(x_311);
int const x_92 = GLF_live7c_1; int const x_92 = GLF_live7c_1;
@ -234,7 +234,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) {
int const x_94 = GLF_live7sum_index; int const x_94 = GLF_live7sum_index;
int const x_95 = GLF_live7sum_index; int const x_95 = GLF_live7sum_index;
int const x_96 = GLF_live7sum_index; int const x_96 = GLF_live7sum_index;
int const x_332 = select(0, x_96, ((x_94 >= 0) && (x_95 < 9))); int const x_332 = select(0, x_96, ((x_94 >= 0) & (x_95 < 9)));
int const x_97 = GLF_live7r_1; int const x_97 = GLF_live7r_1;
float const x_334 = GLF_live7m42[1][x_97]; float const x_334 = GLF_live7m42[1][x_97];
float const x_336 = GLF_live7sums.arr[x_332]; float const x_336 = GLF_live7sums.arr[x_332];

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 403 ; Bound: 389
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -119,13 +119,13 @@
%_ptr_Uniform_float = OpTypePointer Uniform %float %_ptr_Uniform_float = OpTypePointer Uniform %float
%int_9 = OpConstant %int 9 %int_9 = OpConstant %int 9
%void = OpTypeVoid %void = OpTypeVoid
%348 = OpTypeFunction %void %334 = OpTypeFunction %void
%353 = OpConstantNull %v2float %339 = OpConstantNull %v2float
%float_2 = OpConstant %float 2 %float_2 = OpConstant %float 2
%int_25 = OpConstant %int 25 %int_25 = OpConstant %int 25
%389 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %375 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%390 = OpTypeFunction %void %main_out %376 = OpTypeFunction %void %main_out
%drawShape_vf2_ = OpFunction %v3float None %15 %drawShape_vf2_ = OpFunction %v3float None %15
%pos = OpFunctionParameter %_ptr_Function_v2float %pos = OpFunctionParameter %_ptr_Function_v2float
%20 = OpLabel %20 = OpLabel
@ -341,323 +341,288 @@
%199 = OpLoad %int %GLF_live7r %199 = OpLoad %int %GLF_live7r
%200 = OpLoad %int %GLF_live7r %200 = OpLoad %int %GLF_live7r
%202 = OpSGreaterThanEqual %bool %195 %int_0 %202 = OpSGreaterThanEqual %bool %195 %int_0
OpSelectionMerge %203 None %203 = OpSLessThan %bool %196 %int_3
OpBranchConditional %202 %204 %203 %204 = OpLogicalAnd %bool %202 %203
%204 = OpLabel %201 = OpSelect %int %204 %197 %int_0
%205 = OpSLessThan %bool %196 %int_3 %206 = OpSGreaterThanEqual %bool %198 %int_0
OpBranch %203 %207 = OpSLessThan %bool %199 %int_3
%203 = OpLabel %208 = OpLogicalAnd %bool %206 %207
%206 = OpPhi %bool %202 %191 %205 %204 %205 = OpSelect %int %208 %200 %int_0
%201 = OpSelect %int %206 %197 %int_0 %209 = OpAccessChain %_ptr_Function_float %GLF_live7m33 %201 %205
%208 = OpSGreaterThanEqual %bool %198 %int_0 OpStore %209 %float_1
OpSelectionMerge %209 None %211 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_1
OpBranchConditional %208 %210 %209 %212 = OpLoad %float %211
%210 = OpLabel %213 = OpFOrdGreaterThan %bool %float_0 %212
%211 = OpSLessThan %bool %199 %int_3 OpSelectionMerge %214 None
OpBranch %209 OpBranchConditional %213 %215 %216
%209 = OpLabel %215 = OpLabel
%212 = OpPhi %bool %208 %203 %211 %210 OpBranch %214
%207 = OpSelect %int %212 %200 %int_0 %216 = OpLabel
%213 = OpAccessChain %_ptr_Function_float %GLF_live7m33 %201 %207 %217 = OpLoad %int %GLF_live7c
OpStore %213 %float_1 %218 = OpLoad %int %GLF_live7c
%215 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_1 %219 = OpLoad %int %GLF_live7c
%216 = OpLoad %float %215 %220 = OpLoad %int %GLF_live7r
%217 = OpFOrdGreaterThan %bool %float_0 %216 %221 = OpLoad %int %GLF_live7r
OpSelectionMerge %218 None %222 = OpLoad %int %GLF_live7r
OpBranchConditional %217 %219 %220 %224 = OpSGreaterThanEqual %bool %217 %int_0
%219 = OpLabel %225 = OpSLessThan %bool %218 %int_4
OpBranch %218 %226 = OpLogicalAnd %bool %224 %225
%220 = OpLabel %223 = OpSelect %int %226 %219 %int_0
%221 = OpLoad %int %GLF_live7c %228 = OpSGreaterThanEqual %bool %220 %int_0
%222 = OpLoad %int %GLF_live7c %229 = OpSLessThan %bool %221 %int_2
%223 = OpLoad %int %GLF_live7c %230 = OpLogicalAnd %bool %228 %229
%224 = OpLoad %int %GLF_live7r %227 = OpSelect %int %230 %222 %int_0
%225 = OpLoad %int %GLF_live7r %231 = OpAccessChain %_ptr_Function_float %GLF_live7m42 %223 %227
%226 = OpLoad %int %GLF_live7r OpStore %231 %float_1
%228 = OpSGreaterThanEqual %bool %221 %int_0 OpBranch %214
OpSelectionMerge %229 None %214 = OpLabel
OpBranchConditional %228 %230 %229
%230 = OpLabel
%231 = OpSLessThan %bool %222 %int_4
OpBranch %229
%229 = OpLabel
%232 = OpPhi %bool %228 %220 %231 %230
%227 = OpSelect %int %232 %223 %int_0
%234 = OpSGreaterThanEqual %bool %224 %int_0
OpSelectionMerge %235 None
OpBranchConditional %234 %236 %235
%236 = OpLabel
%237 = OpSLessThan %bool %225 %int_2
OpBranch %235
%235 = OpLabel
%238 = OpPhi %bool %234 %229 %237 %236
%233 = OpSelect %int %238 %226 %int_0
%239 = OpAccessChain %_ptr_Function_float %GLF_live7m42 %227 %233
OpStore %239 %float_1
OpBranch %218
%218 = OpLabel
OpBranch %182 OpBranch %182
%182 = OpLabel %182 = OpLabel
%240 = OpLoad %int %GLF_live7r %232 = OpLoad %int %GLF_live7r
%241 = OpIAdd %int %240 %int_1 %233 = OpIAdd %int %232 %int_1
OpStore %GLF_live7r %241 OpStore %GLF_live7r %233
OpBranch %180 OpBranch %180
%181 = OpLabel %181 = OpLabel
OpBranch %166 OpBranch %166
%166 = OpLabel %166 = OpLabel
%242 = OpLoad %int %GLF_live7c %234 = OpLoad %int %GLF_live7c
%243 = OpIAdd %int %242 %int_1 %235 = OpIAdd %int %234 %int_1
OpStore %GLF_live7c %243 OpStore %GLF_live7c %235
OpBranch %164 OpBranch %164
%165 = OpLabel %165 = OpLabel
OpBranch %151 OpBranch %151
%151 = OpLabel %151 = OpLabel
%244 = OpLoad %int %GLF_live7rows %236 = OpLoad %int %GLF_live7rows
%245 = OpIAdd %int %244 %int_1 %237 = OpIAdd %int %236 %int_1
OpStore %GLF_live7rows %245 OpStore %GLF_live7rows %237
OpBranch %149 OpBranch %149
%150 = OpLabel %150 = OpLabel
OpBranch %136 OpBranch %136
%136 = OpLabel %136 = OpLabel
%246 = OpLoad %int %GLF_live7cols %238 = OpLoad %int %GLF_live7cols
%247 = OpIAdd %int %246 %int_1 %239 = OpIAdd %int %238 %int_1
OpStore %GLF_live7cols %247 OpStore %GLF_live7cols %239
OpBranch %134 OpBranch %134
%135 = OpLabel %135 = OpLabel
OpStore %GLF_live7sum_index %int_0 OpStore %GLF_live7sum_index %int_0
OpStore %GLF_live7_looplimiter7 %int_0 OpStore %GLF_live7_looplimiter7 %int_0
OpStore %GLF_live7cols_1 %int_2 OpStore %GLF_live7cols_1 %int_2
OpBranch %248 OpBranch %240
%240 = OpLabel
OpLoopMerge %241 %242 None
OpBranch %243
%243 = OpLabel
%244 = OpLoad %int %GLF_live7cols_1
%245 = OpSLessThan %bool %244 %int_4
OpSelectionMerge %246 None
OpBranchConditional %245 %247 %248
%247 = OpLabel
OpBranch %246
%248 = OpLabel %248 = OpLabel
OpLoopMerge %249 %250 None OpBranch %241
OpBranch %251 %246 = OpLabel
%249 = OpLoad %int %GLF_live7_looplimiter7
%250 = OpSGreaterThanEqual %bool %249 %int_7
OpSelectionMerge %251 None
OpBranchConditional %250 %252 %251
%252 = OpLabel
OpBranch %241
%251 = OpLabel %251 = OpLabel
%252 = OpLoad %int %GLF_live7cols_1 %253 = OpLoad %int %GLF_live7_looplimiter7
%253 = OpSLessThan %bool %252 %int_4 %254 = OpIAdd %int %253 %int_1
OpSelectionMerge %254 None OpStore %GLF_live7_looplimiter7 %254
OpBranchConditional %253 %255 %256
%255 = OpLabel
OpBranch %254
%256 = OpLabel
OpBranch %249
%254 = OpLabel
%257 = OpLoad %int %GLF_live7_looplimiter7
%258 = OpSGreaterThanEqual %bool %257 %int_7
OpSelectionMerge %259 None
OpBranchConditional %258 %260 %259
%260 = OpLabel
OpBranch %249
%259 = OpLabel
%261 = OpLoad %int %GLF_live7_looplimiter7
%262 = OpIAdd %int %261 %int_1
OpStore %GLF_live7_looplimiter7 %262
OpStore %GLF_live7rows_1 %int_2 OpStore %GLF_live7rows_1 %int_2
%263 = OpLoad %int %GLF_live7sum_index %255 = OpLoad %int %GLF_live7sum_index
%264 = OpLoad %int %GLF_live7sum_index %256 = OpLoad %int %GLF_live7sum_index
%265 = OpLoad %int %GLF_live7sum_index %257 = OpLoad %int %GLF_live7sum_index
%267 = OpSGreaterThanEqual %bool %263 %int_0 %259 = OpSGreaterThanEqual %bool %255 %int_0
OpSelectionMerge %268 None %261 = OpSLessThan %bool %256 %int_9
OpBranchConditional %267 %269 %268 %262 = OpLogicalAnd %bool %259 %261
%269 = OpLabel %258 = OpSelect %int %262 %257 %int_0
%271 = OpSLessThan %bool %264 %int_9 %263 = OpAccessChain %_ptr_Function_float %GLF_live7sums %258
OpBranch %268 OpStore %263 %float_0
%268 = OpLabel
%272 = OpPhi %bool %267 %259 %271 %269
%266 = OpSelect %int %272 %265 %int_0
%273 = OpAccessChain %_ptr_Function_float %GLF_live7sums %266
OpStore %273 %float_0
OpStore %GLF_live7c_1 %int_0 OpStore %GLF_live7c_1 %int_0
OpBranch %274 OpBranch %264
%274 = OpLabel %264 = OpLabel
OpLoopMerge %275 %276 None OpLoopMerge %265 %266 None
OpBranch %277 OpBranch %267
%277 = OpLabel %267 = OpLabel
%278 = OpLoad %int %GLF_live7c_1 %268 = OpLoad %int %GLF_live7c_1
%279 = OpSLessThan %bool %278 %int_1 %269 = OpSLessThan %bool %268 %int_1
OpSelectionMerge %270 None
OpBranchConditional %269 %271 %272
%271 = OpLabel
OpBranch %270
%272 = OpLabel
OpBranch %265
%270 = OpLabel
OpStore %GLF_live7r_1 %int_0
OpBranch %273
%273 = OpLabel
OpLoopMerge %274 %275 None
OpBranch %276
%276 = OpLabel
%277 = OpLoad %int %GLF_live7r_1
%278 = OpLoad %int %GLF_live7rows_1
%279 = OpSLessThan %bool %277 %278
OpSelectionMerge %280 None OpSelectionMerge %280 None
OpBranchConditional %279 %281 %282 OpBranchConditional %279 %281 %282
%281 = OpLabel %281 = OpLabel
OpBranch %280 OpBranch %280
%282 = OpLabel %282 = OpLabel
OpBranch %275
%280 = OpLabel
OpStore %GLF_live7r_1 %int_0
OpBranch %283
%283 = OpLabel
OpLoopMerge %284 %285 None
OpBranch %286
%286 = OpLabel
%287 = OpLoad %int %GLF_live7r_1
%288 = OpLoad %int %GLF_live7rows_1
%289 = OpSLessThan %bool %287 %288
OpSelectionMerge %290 None
OpBranchConditional %289 %291 %292
%291 = OpLabel
OpBranch %290
%292 = OpLabel
OpBranch %284
%290 = OpLabel
%293 = OpLoad %int %GLF_live7sum_index
%294 = OpLoad %int %GLF_live7sum_index
%295 = OpLoad %int %GLF_live7sum_index
%297 = OpSGreaterThanEqual %bool %293 %int_0
OpSelectionMerge %298 None
OpBranchConditional %297 %299 %298
%299 = OpLabel
%300 = OpSLessThan %bool %294 %int_9
OpBranch %298
%298 = OpLabel
%301 = OpPhi %bool %297 %290 %300 %299
%296 = OpSelect %int %301 %295 %int_0
%302 = OpLoad %mat3v3float %GLF_live7m33
%303 = OpTranspose %mat3v3float %302
%304 = OpLoad %int %GLF_live7c_1
%305 = OpSLessThan %bool %304 %int_3
OpSelectionMerge %306 None
OpBranchConditional %305 %307 %308
%307 = OpLabel
OpStore %x_180 %int_1
OpBranch %306
%308 = OpLabel
%309 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_0
%310 = OpLoad %float %309
%311 = OpConvertFToS %int %310
OpStore %x_180 %311
OpBranch %306
%306 = OpLabel
%312 = OpLoad %int %x_180
%313 = OpLoad %int %GLF_live7r_1
OpStore %indexable %303
%315 = OpSLessThan %bool %313 %int_3
%314 = OpSelect %int %315 %int_1 %int_0
%316 = OpAccessChain %_ptr_Function_float %indexable %312 %314
%317 = OpLoad %float %316
%318 = OpAccessChain %_ptr_Function_float %GLF_live7sums %296
%319 = OpLoad %float %318
%320 = OpAccessChain %_ptr_Function_float %GLF_live7sums %296
%321 = OpFAdd %float %319 %317
OpStore %320 %321
%322 = OpLoad %int %GLF_live7sum_index
%323 = OpLoad %int %GLF_live7sum_index
%324 = OpLoad %int %GLF_live7sum_index
%326 = OpSGreaterThanEqual %bool %322 %int_0
OpSelectionMerge %327 None
OpBranchConditional %326 %328 %327
%328 = OpLabel
%329 = OpSLessThan %bool %323 %int_9
OpBranch %327
%327 = OpLabel
%330 = OpPhi %bool %326 %306 %329 %328
%325 = OpSelect %int %330 %324 %int_0
%331 = OpLoad %int %GLF_live7r_1
%332 = OpAccessChain %_ptr_Function_float %GLF_live7m42 %int_1 %331
%333 = OpLoad %float %332
%334 = OpAccessChain %_ptr_Function_float %GLF_live7sums %325
%335 = OpLoad %float %334
%336 = OpAccessChain %_ptr_Function_float %GLF_live7sums %325
%337 = OpFAdd %float %335 %333
OpStore %336 %337
OpBranch %285
%285 = OpLabel
%338 = OpLoad %int %GLF_live7r_1
%339 = OpIAdd %int %338 %int_1
OpStore %GLF_live7r_1 %339
OpBranch %283
%284 = OpLabel
OpBranch %276
%276 = OpLabel
%340 = OpLoad %int %GLF_live7c_1
%341 = OpIAdd %int %340 %int_1
OpStore %GLF_live7c_1 %341
OpBranch %274 OpBranch %274
%280 = OpLabel
%283 = OpLoad %int %GLF_live7sum_index
%284 = OpLoad %int %GLF_live7sum_index
%285 = OpLoad %int %GLF_live7sum_index
%287 = OpSGreaterThanEqual %bool %283 %int_0
%288 = OpSLessThan %bool %284 %int_9
%289 = OpLogicalAnd %bool %287 %288
%286 = OpSelect %int %289 %285 %int_0
%290 = OpLoad %mat3v3float %GLF_live7m33
%291 = OpTranspose %mat3v3float %290
%292 = OpLoad %int %GLF_live7c_1
%293 = OpSLessThan %bool %292 %int_3
OpSelectionMerge %294 None
OpBranchConditional %293 %295 %296
%295 = OpLabel
OpStore %x_180 %int_1
OpBranch %294
%296 = OpLabel
%297 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_0
%298 = OpLoad %float %297
%299 = OpConvertFToS %int %298
OpStore %x_180 %299
OpBranch %294
%294 = OpLabel
%300 = OpLoad %int %x_180
%301 = OpLoad %int %GLF_live7r_1
OpStore %indexable %291
%303 = OpSLessThan %bool %301 %int_3
%302 = OpSelect %int %303 %int_1 %int_0
%304 = OpAccessChain %_ptr_Function_float %indexable %300 %302
%305 = OpLoad %float %304
%306 = OpAccessChain %_ptr_Function_float %GLF_live7sums %286
%307 = OpLoad %float %306
%308 = OpAccessChain %_ptr_Function_float %GLF_live7sums %286
%309 = OpFAdd %float %307 %305
OpStore %308 %309
%310 = OpLoad %int %GLF_live7sum_index
%311 = OpLoad %int %GLF_live7sum_index
%312 = OpLoad %int %GLF_live7sum_index
%314 = OpSGreaterThanEqual %bool %310 %int_0
%315 = OpSLessThan %bool %311 %int_9
%316 = OpLogicalAnd %bool %314 %315
%313 = OpSelect %int %316 %312 %int_0
%317 = OpLoad %int %GLF_live7r_1
%318 = OpAccessChain %_ptr_Function_float %GLF_live7m42 %int_1 %317
%319 = OpLoad %float %318
%320 = OpAccessChain %_ptr_Function_float %GLF_live7sums %313
%321 = OpLoad %float %320
%322 = OpAccessChain %_ptr_Function_float %GLF_live7sums %313
%323 = OpFAdd %float %321 %319
OpStore %322 %323
OpBranch %275
%275 = OpLabel %275 = OpLabel
%342 = OpLoad %int %GLF_live7sum_index %324 = OpLoad %int %GLF_live7r_1
%343 = OpIAdd %int %342 %int_1 %325 = OpIAdd %int %324 %int_1
OpStore %GLF_live7sum_index %343 OpStore %GLF_live7r_1 %325
OpBranch %250 OpBranch %273
%250 = OpLabel %274 = OpLabel
%344 = OpLoad %int %GLF_live7cols_1 OpBranch %266
%345 = OpIAdd %int %344 %int_1 %266 = OpLabel
OpStore %GLF_live7cols_1 %345 %326 = OpLoad %int %GLF_live7c_1
OpBranch %248 %327 = OpIAdd %int %326 %int_1
%249 = OpLabel OpStore %GLF_live7c_1 %327
OpBranch %264
%265 = OpLabel
%328 = OpLoad %int %GLF_live7sum_index
%329 = OpIAdd %int %328 %int_1
OpStore %GLF_live7sum_index %329
OpBranch %242
%242 = OpLabel
%330 = OpLoad %int %GLF_live7cols_1
%331 = OpIAdd %int %330 %int_1
OpStore %GLF_live7cols_1 %331
OpBranch %240
%241 = OpLabel
OpBranch %108 OpBranch %108
%108 = OpLabel %108 = OpLabel
%346 = OpLoad %int %GLF_live4i %332 = OpLoad %int %GLF_live4i
%347 = OpIAdd %int %346 %int_1 %333 = OpIAdd %int %332 %int_1
OpStore %GLF_live4i %347 OpStore %GLF_live4i %333
OpBranch %106 OpBranch %106
%107 = OpLabel %107 = OpLabel
OpReturnValue %74 OpReturnValue %74
OpFunctionEnd OpFunctionEnd
%main_1 = OpFunction %void None %348 %main_1 = OpFunction %void None %334
%351 = OpLabel %337 = OpLabel
%position = OpVariable %_ptr_Function_v2float Function %353 %position = OpVariable %_ptr_Function_v2float Function %339
%param = OpVariable %_ptr_Function_v2float Function %353 %param = OpVariable %_ptr_Function_v2float Function %339
%param_1 = OpVariable %_ptr_Function_v2float Function %353 %param_1 = OpVariable %_ptr_Function_v2float Function %339
%i = OpVariable %_ptr_Function_int Function %32 %i = OpVariable %_ptr_Function_int Function %32
%param_2 = OpVariable %_ptr_Function_v2float Function %353 %param_2 = OpVariable %_ptr_Function_v2float Function %339
%358 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_0 %344 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_0
%359 = OpLoad %float %358 %345 = OpLoad %float %344
%361 = OpFOrdGreaterThanEqual %bool %359 %float_2 %347 = OpFOrdGreaterThanEqual %bool %345 %float_2
OpSelectionMerge %362 None OpSelectionMerge %348 None
OpBranchConditional %361 %363 %362 OpBranchConditional %347 %349 %348
%363 = OpLabel %349 = OpLabel
%364 = OpLoad %v4float %gl_FragCoord %350 = OpLoad %v4float %gl_FragCoord
%365 = OpCompositeExtract %float %364 0 %351 = OpCompositeExtract %float %350 0
%366 = OpCompositeExtract %float %364 1 %352 = OpCompositeExtract %float %350 1
%367 = OpCompositeConstruct %v2float %365 %366 %353 = OpCompositeConstruct %v2float %351 %352
OpStore %position %367 OpStore %position %353
%368 = OpLoad %v2float %position %354 = OpLoad %v2float %position
OpStore %param %368 OpStore %param %354
%369 = OpFunctionCall %v3float %drawShape_vf2_ %param %355 = OpFunctionCall %v3float %drawShape_vf2_ %param
%371 = OpLoad %v2float %position %357 = OpLoad %v2float %position
OpStore %param_1 %371 OpStore %param_1 %357
%372 = OpFunctionCall %v3float %drawShape_vf2_ %param_1 %358 = OpFunctionCall %v3float %drawShape_vf2_ %param_1
OpStore %i %int_25 OpStore %i %int_25
OpBranch %375 OpBranch %361
%375 = OpLabel %361 = OpLabel
OpLoopMerge %376 %377 None OpLoopMerge %362 %363 None
OpBranch %378 OpBranch %364
%378 = OpLabel %364 = OpLabel
%379 = OpLoad %int %i %365 = OpLoad %int %i
%380 = OpSGreaterThan %bool %379 %int_0 %366 = OpSGreaterThan %bool %365 %int_0
OpSelectionMerge %381 None OpSelectionMerge %367 None
OpBranchConditional %380 %382 %383 OpBranchConditional %366 %368 %369
%382 = OpLabel %368 = OpLabel
OpBranch %381 OpBranch %367
%383 = OpLabel %369 = OpLabel
OpBranch %376
%381 = OpLabel
%384 = OpLoad %v2float %position
OpStore %param_2 %384
%385 = OpFunctionCall %v3float %drawShape_vf2_ %param_2
OpBranch %377
%377 = OpLabel
%387 = OpLoad %int %i
%388 = OpISub %int %387 %int_1
OpStore %i %388
OpBranch %375
%376 = OpLabel
OpBranch %362 OpBranch %362
%367 = OpLabel
%370 = OpLoad %v2float %position
OpStore %param_2 %370
%371 = OpFunctionCall %v3float %drawShape_vf2_ %param_2
OpBranch %363
%363 = OpLabel
%373 = OpLoad %int %i
%374 = OpISub %int %373 %int_1
OpStore %i %374
OpBranch %361
%362 = OpLabel %362 = OpLabel
OpStore %x_GLF_color %389 OpBranch %348
%348 = OpLabel
OpStore %x_GLF_color %375
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %390 %tint_symbol_3 = OpFunction %void None %376
%tint_symbol_1 = OpFunctionParameter %main_out %tint_symbol_1 = OpFunctionParameter %main_out
%394 = OpLabel %380 = OpLabel
%395 = OpCompositeExtract %v4float %tint_symbol_1 0 %381 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %395 OpStore %tint_symbol_2 %381
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %348 %main = OpFunction %void None %334
%397 = OpLabel %383 = OpLabel
%398 = OpLoad %v4float %tint_symbol %384 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %398 OpStore %gl_FragCoord %384
%399 = OpFunctionCall %void %main_1 %385 = OpFunctionCall %void %main_1
%401 = OpLoad %v4float %x_GLF_color %387 = OpLoad %v4float %x_GLF_color
%402 = OpCompositeConstruct %main_out %401 %388 = OpCompositeConstruct %main_out %387
%400 = OpFunctionCall %void %tint_symbol_3 %402 %386 = OpFunctionCall %void %tint_symbol_3 %388
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -140,7 +140,7 @@ fn drawShape_vf2_(pos : ptr<function, vec2<f32>>) -> vec3<f32> {
let x_62 : i32 = GLF_live7r; let x_62 : i32 = GLF_live7r;
let x_63 : i32 = GLF_live7r; let x_63 : i32 = GLF_live7r;
let x_64 : i32 = GLF_live7r; let x_64 : i32 = GLF_live7r;
GLF_live7m33[select(0, x_61, ((x_59 >= 0) && (x_60 < 3)))][select(0, x_64, ((x_62 >= 0) && (x_63 < 3)))] = 1.0; GLF_live7m33[select(0, x_61, ((x_59 >= 0) & (x_60 < 3)))][select(0, x_64, ((x_62 >= 0) & (x_63 < 3)))] = 1.0;
let x_267 : f32 = x_25.injectionSwitch.y; let x_267 : f32 = x_25.injectionSwitch.y;
if ((0.0 > x_267)) { if ((0.0 > x_267)) {
} else { } else {
@ -150,7 +150,7 @@ fn drawShape_vf2_(pos : ptr<function, vec2<f32>>) -> vec3<f32> {
let x_68 : i32 = GLF_live7r; let x_68 : i32 = GLF_live7r;
let x_69 : i32 = GLF_live7r; let x_69 : i32 = GLF_live7r;
let x_70 : i32 = GLF_live7r; let x_70 : i32 = GLF_live7r;
GLF_live7m42[select(0, x_67, ((x_65 >= 0) && (x_66 < 4)))][select(0, x_70, ((x_68 >= 0) && (x_69 < 2)))] = 1.0; GLF_live7m42[select(0, x_67, ((x_65 >= 0) & (x_66 < 4)))][select(0, x_70, ((x_68 >= 0) & (x_69 < 2)))] = 1.0;
} }
continuing { continuing {
@ -195,7 +195,7 @@ fn drawShape_vf2_(pos : ptr<function, vec2<f32>>) -> vec3<f32> {
let x_83 : i32 = GLF_live7sum_index; let x_83 : i32 = GLF_live7sum_index;
let x_84 : i32 = GLF_live7sum_index; let x_84 : i32 = GLF_live7sum_index;
let x_85 : i32 = GLF_live7sum_index; let x_85 : i32 = GLF_live7sum_index;
GLF_live7sums[select(0, x_85, ((x_83 >= 0) && (x_84 < 9)))] = 0.0; GLF_live7sums[select(0, x_85, ((x_83 >= 0) & (x_84 < 9)))] = 0.0;
GLF_live7c_1 = 0; GLF_live7c_1 = 0;
loop { loop {
let x_86 : i32 = GLF_live7c_1; let x_86 : i32 = GLF_live7c_1;
@ -214,7 +214,7 @@ fn drawShape_vf2_(pos : ptr<function, vec2<f32>>) -> vec3<f32> {
let x_89 : i32 = GLF_live7sum_index; let x_89 : i32 = GLF_live7sum_index;
let x_90 : i32 = GLF_live7sum_index; let x_90 : i32 = GLF_live7sum_index;
let x_91 : i32 = GLF_live7sum_index; let x_91 : i32 = GLF_live7sum_index;
let x_310 : i32 = select(0, x_91, ((x_89 >= 0) && (x_90 < 9))); let x_310 : i32 = select(0, x_91, ((x_89 >= 0) & (x_90 < 9)));
let x_311 : mat3x3<f32> = GLF_live7m33; let x_311 : mat3x3<f32> = GLF_live7m33;
let x_312 : mat3x3<f32> = transpose(x_311); let x_312 : mat3x3<f32> = transpose(x_311);
let x_92 : i32 = GLF_live7c_1; let x_92 : i32 = GLF_live7c_1;
@ -233,7 +233,7 @@ fn drawShape_vf2_(pos : ptr<function, vec2<f32>>) -> vec3<f32> {
let x_94 : i32 = GLF_live7sum_index; let x_94 : i32 = GLF_live7sum_index;
let x_95 : i32 = GLF_live7sum_index; let x_95 : i32 = GLF_live7sum_index;
let x_96 : i32 = GLF_live7sum_index; let x_96 : i32 = GLF_live7sum_index;
let x_332 : i32 = select(0, x_96, ((x_94 >= 0) && (x_95 < 9))); let x_332 : i32 = select(0, x_96, ((x_94 >= 0) & (x_95 < 9)));
let x_97 : i32 = GLF_live7r_1; let x_97 : i32 = GLF_live7r_1;
let x_334 : f32 = GLF_live7m42[1][x_97]; let x_334 : f32 = GLF_live7m42[1][x_97];
let x_336 : f32 = GLF_live7sums[x_332]; let x_336 : f32 = GLF_live7sums[x_332];

View File

@ -23,41 +23,25 @@ void main_1() {
bool x_72_phi = false; bool x_72_phi = false;
const float x_42 = s1; const float x_42 = s1;
f1 = (10.0f - (x_42 * floor((10.0f / x_42)))); f1 = (10.0f - (x_42 * floor((10.0f / x_42))));
bool tint_tmp = isinf(f1); const bool x_48 = (isinf(f1) | (s1 == 1.0f));
if (!tint_tmp) {
tint_tmp = (s1 == 1.0f);
}
const bool x_48 = (tint_tmp);
x_73_phi = x_48; x_73_phi = x_48;
if (!(x_48)) { if (!(x_48)) {
const bool x_54 = (f0 == f1); const bool x_54 = (f0 == f1);
x_63_phi = x_54; x_63_phi = x_54;
if (!(x_54)) { if (!(x_54)) {
bool tint_tmp_1 = (f0 > 0.99000001f); x_62 = ((f0 > 0.99000001f) & (f0 < 0.01f));
if (tint_tmp_1) {
tint_tmp_1 = (f0 < 0.01f);
}
x_62 = (tint_tmp_1);
x_63_phi = x_62; x_63_phi = x_62;
} }
const bool x_63 = x_63_phi; const bool x_63 = x_63_phi;
x_72_phi = x_63; x_72_phi = x_63;
if (!(x_63)) { if (!(x_63)) {
bool tint_tmp_2 = (f1 > 0.99000001f); x_71 = ((f1 > 0.99000001f) & (f1 < 0.01f));
if (tint_tmp_2) {
tint_tmp_2 = (f1 < 0.01f);
}
x_71 = (tint_tmp_2);
x_72_phi = x_71; x_72_phi = x_71;
} }
x_72 = x_72_phi; x_72 = x_72_phi;
x_73_phi = x_72; x_73_phi = x_72;
} }
bool tint_tmp_3 = x_73_phi; if ((x_73_phi | (f1 == 10.0f))) {
if (!tint_tmp_3) {
tint_tmp_3 = (f1 == 10.0f);
}
if ((tint_tmp_3)) {
const int x_81 = asint(x_8[1].x); const int x_81 = asint(x_8[1].x);
const uint scalar_offset = ((16u * uint(0))) / 4; const uint scalar_offset = ((16u * uint(0))) / 4;
const int x_84 = asint(x_8[scalar_offset / 4][scalar_offset % 4]); const int x_84 = asint(x_8[scalar_offset / 4][scalar_offset % 4]);

View File

@ -48,7 +48,7 @@ void main_1(constant buf1& x_8, thread float4* const tint_symbol_4) {
f1 = (10.0f - (x_42 * floor((10.0f / x_42)))); f1 = (10.0f - (x_42 * floor((10.0f / x_42))));
float const x_44 = f1; float const x_44 = f1;
float const x_46 = s1; float const x_46 = s1;
bool const x_48 = (isinf(x_44) || (x_46 == 1.0f)); bool const x_48 = (isinf(x_44) | (x_46 == 1.0f));
x_73_phi = x_48; x_73_phi = x_48;
if (!(x_48)) { if (!(x_48)) {
float const x_52 = f0; float const x_52 = f0;
@ -58,7 +58,7 @@ void main_1(constant buf1& x_8, thread float4* const tint_symbol_4) {
if (!(x_54)) { if (!(x_54)) {
float const x_58 = f0; float const x_58 = f0;
float const x_60 = f0; float const x_60 = f0;
x_62 = ((x_58 > 0.99000001f) && (x_60 < 0.01f)); x_62 = ((x_58 > 0.99000001f) & (x_60 < 0.01f));
x_63_phi = x_62; x_63_phi = x_62;
} }
bool const x_63 = x_63_phi; bool const x_63 = x_63_phi;
@ -66,7 +66,7 @@ void main_1(constant buf1& x_8, thread float4* const tint_symbol_4) {
if (!(x_63)) { if (!(x_63)) {
float const x_67 = f1; float const x_67 = f1;
float const x_69 = f1; float const x_69 = f1;
x_71 = ((x_67 > 0.99000001f) && (x_69 < 0.01f)); x_71 = ((x_67 > 0.99000001f) & (x_69 < 0.01f));
x_72_phi = x_71; x_72_phi = x_71;
} }
x_72 = x_72_phi; x_72 = x_72_phi;
@ -74,7 +74,7 @@ void main_1(constant buf1& x_8, thread float4* const tint_symbol_4) {
} }
bool const x_73 = x_73_phi; bool const x_73 = x_73_phi;
float const x_74 = f1; float const x_74 = f1;
if ((x_73 || (x_74 == 10.0f))) { if ((x_73 | (x_74 == 10.0f))) {
int const x_81 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_81 = x_8.x_GLF_uniform_int_values.arr[1].el;
int const x_84 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_84 = x_8.x_GLF_uniform_int_values.arr[0].el;
int const x_87 = x_8.x_GLF_uniform_int_values.arr[0].el; int const x_87 = x_8.x_GLF_uniform_int_values.arr[0].el;

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 139 ; Bound: 131
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
%37 = OpExtInstImport "GLSL.std.450" %37 = OpExtInstImport "GLSL.std.450"
@ -83,7 +83,7 @@
%_ptr_Uniform_int = OpTypePointer Uniform %int %_ptr_Uniform_int = OpTypePointer Uniform %int
%int_0 = OpConstant %int 0 %int_0 = OpConstant %int 0
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%127 = OpTypeFunction %void %main_out %119 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20 %main_1 = OpFunction %void None %20
%23 = OpLabel %23 = OpLabel
%f0 = OpVariable %_ptr_Function_float Function %26 %f0 = OpVariable %_ptr_Function_float Function %26
@ -118,117 +118,97 @@
%57 = OpLoad %float %f1 %57 = OpLoad %float %f1
%58 = OpLoad %float %s1 %58 = OpLoad %float %s1
%59 = OpIsInf %bool %57 %59 = OpIsInf %bool %57
OpSelectionMerge %60 None %60 = OpFOrdEqual %bool %58 %float_1
OpBranchConditional %59 %60 %61 %61 = OpLogicalOr %bool %59 %60
%61 = OpLabel OpStore %x_73_phi %61
%62 = OpFOrdEqual %bool %58 %float_1 %62 = OpLogicalNot %bool %61
OpBranch %60 OpSelectionMerge %63 None
%60 = OpLabel OpBranchConditional %62 %64 %63
%63 = OpPhi %bool %59 %45 %62 %61 %64 = OpLabel
OpStore %x_73_phi %63 %65 = OpLoad %float %f0
%64 = OpLogicalNot %bool %63 %66 = OpLoad %float %f1
OpSelectionMerge %65 None %67 = OpFOrdEqual %bool %65 %66
OpBranchConditional %64 %66 %65 OpStore %x_63_phi %67
%66 = OpLabel %68 = OpLogicalNot %bool %67
%67 = OpLoad %float %f0 OpSelectionMerge %69 None
%68 = OpLoad %float %f1 OpBranchConditional %68 %70 %69
%69 = OpFOrdEqual %bool %67 %68 %70 = OpLabel
OpStore %x_63_phi %69 %71 = OpLoad %float %f0
%70 = OpLogicalNot %bool %69 %72 = OpLoad %float %f0
OpSelectionMerge %71 None %74 = OpFOrdGreaterThan %bool %71 %float_0_99000001
OpBranchConditional %70 %72 %71 %76 = OpFOrdLessThan %bool %72 %float_0_00999999978
%72 = OpLabel %77 = OpLogicalAnd %bool %74 %76
%73 = OpLoad %float %f0 OpStore %x_62 %77
%74 = OpLoad %float %f0 %78 = OpLoad %bool %x_62
%76 = OpFOrdGreaterThan %bool %73 %float_0_99000001 OpStore %x_63_phi %78
OpSelectionMerge %77 None OpBranch %69
OpBranchConditional %76 %78 %77 %69 = OpLabel
%78 = OpLabel %79 = OpLoad %bool %x_63_phi
%80 = OpFOrdLessThan %bool %74 %float_0_00999999978 OpStore %x_72_phi %79
OpBranch %77 %80 = OpLogicalNot %bool %79
%77 = OpLabel OpSelectionMerge %81 None
%81 = OpPhi %bool %76 %72 %80 %78 OpBranchConditional %80 %82 %81
OpStore %x_62 %81 %82 = OpLabel
%82 = OpLoad %bool %x_62 %83 = OpLoad %float %f1
OpStore %x_63_phi %82 %84 = OpLoad %float %f1
OpBranch %71 %85 = OpFOrdGreaterThan %bool %83 %float_0_99000001
%71 = OpLabel %86 = OpFOrdLessThan %bool %84 %float_0_00999999978
%83 = OpLoad %bool %x_63_phi %87 = OpLogicalAnd %bool %85 %86
OpStore %x_72_phi %83 OpStore %x_71 %87
%84 = OpLogicalNot %bool %83 %88 = OpLoad %bool %x_71
OpSelectionMerge %85 None OpStore %x_72_phi %88
OpBranchConditional %84 %86 %85 OpBranch %81
%86 = OpLabel %81 = OpLabel
%87 = OpLoad %float %f1 %89 = OpLoad %bool %x_72_phi
%88 = OpLoad %float %f1 OpStore %x_72 %89
%89 = OpFOrdGreaterThan %bool %87 %float_0_99000001 %90 = OpLoad %bool %x_72
OpSelectionMerge %90 None OpStore %x_73_phi %90
OpBranchConditional %89 %91 %90 OpBranch %63
%91 = OpLabel %63 = OpLabel
%92 = OpFOrdLessThan %bool %88 %float_0_00999999978 %91 = OpLoad %bool %x_73_phi
OpBranch %90 %92 = OpLoad %float %f1
%90 = OpLabel %93 = OpFOrdEqual %bool %92 %float_10
%93 = OpPhi %bool %89 %86 %92 %91 %94 = OpLogicalOr %bool %91 %93
OpStore %x_71 %93 OpSelectionMerge %95 None
%94 = OpLoad %bool %x_71 OpBranchConditional %94 %96 %97
OpStore %x_72_phi %94 %96 = OpLabel
OpBranch %85 %101 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%85 = OpLabel %102 = OpLoad %int %101
%95 = OpLoad %bool %x_72_phi %104 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
OpStore %x_72 %95 %105 = OpLoad %int %104
%96 = OpLoad %bool %x_72 %106 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
OpStore %x_73_phi %96 %107 = OpLoad %int %106
OpBranch %65 %108 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%65 = OpLabel %109 = OpLoad %int %108
%97 = OpLoad %bool %x_73_phi %110 = OpConvertSToF %float %102
%98 = OpLoad %float %f1 %111 = OpConvertSToF %float %105
OpSelectionMerge %99 None %112 = OpConvertSToF %float %107
OpBranchConditional %97 %99 %100 %113 = OpConvertSToF %float %109
%100 = OpLabel %114 = OpCompositeConstruct %v4float %110 %111 %112 %113
%101 = OpFOrdEqual %bool %98 %float_10 OpStore %x_GLF_color %114
OpBranch %99 OpBranch %95
%99 = OpLabel %97 = OpLabel
%102 = OpPhi %bool %97 %65 %101 %100 %115 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
OpSelectionMerge %103 None %116 = OpLoad %int %115
OpBranchConditional %102 %104 %105 %117 = OpConvertSToF %float %116
%104 = OpLabel %118 = OpCompositeConstruct %v4float %117 %117 %117 %117
%109 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1 OpStore %x_GLF_color %118
%110 = OpLoad %int %109 OpBranch %95
%112 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0 %95 = OpLabel
%113 = OpLoad %int %112
%114 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%115 = OpLoad %int %114
%116 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%117 = OpLoad %int %116
%118 = OpConvertSToF %float %110
%119 = OpConvertSToF %float %113
%120 = OpConvertSToF %float %115
%121 = OpConvertSToF %float %117
%122 = OpCompositeConstruct %v4float %118 %119 %120 %121
OpStore %x_GLF_color %122
OpBranch %103
%105 = OpLabel
%123 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%124 = OpLoad %int %123
%125 = OpConvertSToF %float %124
%126 = OpCompositeConstruct %v4float %125 %125 %125 %125
OpStore %x_GLF_color %126
OpBranch %103
%103 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %127 %tint_symbol_2 = OpFunction %void None %119
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%131 = OpLabel %123 = OpLabel
%132 = OpCompositeExtract %v4float %tint_symbol 0 %124 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %132 OpStore %tint_symbol_1 %124
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %20 %main = OpFunction %void None %20
%134 = OpLabel %126 = OpLabel
%135 = OpFunctionCall %void %main_1 %127 = OpFunctionCall %void %main_1
%137 = OpLoad %v4float %x_GLF_color %129 = OpLoad %v4float %x_GLF_color
%138 = OpCompositeConstruct %main_out %137 %130 = OpCompositeConstruct %main_out %129
%136 = OpFunctionCall %void %tint_symbol_2 %138 %128 = OpFunctionCall %void %tint_symbol_2 %130
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -38,7 +38,7 @@ fn main_1() {
f1 = (10.0 - (x_42 * floor((10.0 / x_42)))); f1 = (10.0 - (x_42 * floor((10.0 / x_42))));
let x_44 : f32 = f1; let x_44 : f32 = f1;
let x_46 : f32 = s1; let x_46 : f32 = s1;
let x_48 : bool = (isInf(x_44) || (x_46 == 1.0)); let x_48 : bool = (isInf(x_44) | (x_46 == 1.0));
x_73_phi = x_48; x_73_phi = x_48;
if (!(x_48)) { if (!(x_48)) {
let x_52 : f32 = f0; let x_52 : f32 = f0;
@ -48,7 +48,7 @@ fn main_1() {
if (!(x_54)) { if (!(x_54)) {
let x_58 : f32 = f0; let x_58 : f32 = f0;
let x_60 : f32 = f0; let x_60 : f32 = f0;
x_62 = ((x_58 > 0.99000001) && (x_60 < 0.01)); x_62 = ((x_58 > 0.99000001) & (x_60 < 0.01));
x_63_phi = x_62; x_63_phi = x_62;
} }
let x_63 : bool = x_63_phi; let x_63 : bool = x_63_phi;
@ -56,7 +56,7 @@ fn main_1() {
if (!(x_63)) { if (!(x_63)) {
let x_67 : f32 = f1; let x_67 : f32 = f1;
let x_69 : f32 = f1; let x_69 : f32 = f1;
x_71 = ((x_67 > 0.99000001) && (x_69 < 0.01)); x_71 = ((x_67 > 0.99000001) & (x_69 < 0.01));
x_72_phi = x_71; x_72_phi = x_71;
} }
x_72 = x_72_phi; x_72 = x_72_phi;
@ -64,7 +64,7 @@ fn main_1() {
} }
let x_73 : bool = x_73_phi; let x_73 : bool = x_73_phi;
let x_74 : f32 = f1; let x_74 : f32 = f1;
if ((x_73 || (x_74 == 10.0))) { if ((x_73 | (x_74 == 10.0))) {
let x_81 : i32 = x_8.x_GLF_uniform_int_values[1]; let x_81 : i32 = x_8.x_GLF_uniform_int_values[1];
let x_84 : i32 = x_8.x_GLF_uniform_int_values[0]; let x_84 : i32 = x_8.x_GLF_uniform_int_values[0];
let x_87 : i32 = x_8.x_GLF_uniform_int_values[0]; let x_87 : i32 = x_8.x_GLF_uniform_int_values[0];

View File

@ -7,11 +7,7 @@ void main_1() {
v = float4(1.0f, 2.0f, 3.0f, 4.0f); v = float4(1.0f, 2.0f, 3.0f, 4.0f);
dist1 = distance(tanh(v), (sinh(v) / cosh(v))); dist1 = distance(tanh(v), (sinh(v) / cosh(v)));
dist2 = distance(tanh(v), float4(0.761590004f, 0.964030027f, 0.995050013f, 0.999329984f)); dist2 = distance(tanh(v), float4(0.761590004f, 0.964030027f, 0.995050013f, 0.999329984f));
bool tint_tmp = (dist1 < 0.100000001f); if (((dist1 < 0.100000001f) & (dist2 < 0.100000001f))) {
if (tint_tmp) {
tint_tmp = (dist2 < 0.100000001f);
}
if ((tint_tmp)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f); x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -21,7 +21,7 @@ void main_1(thread float4* const tint_symbol_4) {
dist2 = distance(tanh(x_38), float4(0.761590004f, 0.964030027f, 0.995050013f, 0.999329984f)); dist2 = distance(tanh(x_38), float4(0.761590004f, 0.964030027f, 0.995050013f, 0.999329984f));
float const x_41 = dist1; float const x_41 = dist1;
float const x_43 = dist2; float const x_43 = dist2;
if (((x_41 < 0.100000001f) && (x_43 < 0.100000001f))) { if (((x_41 < 0.100000001f) & (x_43 < 0.100000001f))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 67 ; Bound: 65
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
%27 = OpExtInstImport "GLSL.std.450" %27 = OpExtInstImport "GLSL.std.450"
@ -46,10 +46,10 @@
%float_0_100000001 = OpConstant %float 0.100000001 %float_0_100000001 = OpConstant %float 0.100000001
%bool = OpTypeBool %bool = OpTypeBool
%float_0 = OpConstant %float 0 %float_0 = OpConstant %float 0
%53 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %51 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%54 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %52 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%55 = OpTypeFunction %void %main_out %53 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8 %main_1 = OpFunction %void None %8
%11 = OpLabel %11 = OpLabel
%v = OpVariable %_ptr_Function_v4float Function %5 %v = OpVariable %_ptr_Function_v4float Function %5
@ -72,36 +72,31 @@
%40 = OpLoad %float %dist1 %40 = OpLoad %float %dist1
%41 = OpLoad %float %dist2 %41 = OpLoad %float %dist2
%43 = OpFOrdLessThan %bool %40 %float_0_100000001 %43 = OpFOrdLessThan %bool %40 %float_0_100000001
OpSelectionMerge %45 None %45 = OpFOrdLessThan %bool %41 %float_0_100000001
OpBranchConditional %43 %46 %45 %46 = OpLogicalAnd %bool %43 %45
%46 = OpLabel OpSelectionMerge %47 None
%47 = OpFOrdLessThan %bool %41 %float_0_100000001 OpBranchConditional %46 %48 %49
OpBranch %45 %48 = OpLabel
%45 = OpLabel OpStore %x_GLF_color %51
%48 = OpPhi %bool %43 %11 %47 %46 OpBranch %47
OpSelectionMerge %49 None
OpBranchConditional %48 %50 %51
%50 = OpLabel
OpStore %x_GLF_color %53
OpBranch %49
%51 = OpLabel
OpStore %x_GLF_color %54
OpBranch %49
%49 = OpLabel %49 = OpLabel
OpStore %x_GLF_color %52
OpBranch %47
%47 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %55 %tint_symbol_2 = OpFunction %void None %53
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%59 = OpLabel %57 = OpLabel
%60 = OpCompositeExtract %v4float %tint_symbol 0 %58 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %60 OpStore %tint_symbol_1 %58
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %8 %main = OpFunction %void None %8
%62 = OpLabel %60 = OpLabel
%63 = OpFunctionCall %void %main_1 %61 = OpFunctionCall %void %main_1
%65 = OpLoad %v4float %x_GLF_color %63 = OpLoad %v4float %x_GLF_color
%66 = OpCompositeConstruct %main_out %65 %64 = OpCompositeConstruct %main_out %63
%64 = OpFunctionCall %void %tint_symbol_2 %66 %62 = OpFunctionCall %void %tint_symbol_2 %64
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -13,7 +13,7 @@ fn main_1() {
dist2 = distance(tanh(x_38), vec4<f32>(0.761590004, 0.964030027, 0.995050013, 0.999329984)); dist2 = distance(tanh(x_38), vec4<f32>(0.761590004, 0.964030027, 0.995050013, 0.999329984));
let x_41 : f32 = dist1; let x_41 : f32 = dist1;
let x_43 : f32 = dist2; let x_43 : f32 = dist2;
if (((x_41 < 0.100000001) && (x_43 < 0.100000001))) { if (((x_41 < 0.100000001) & (x_43 < 0.100000001))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0); x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else { } else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0); x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);

View File

@ -13,11 +13,7 @@ void main_1() {
i = (i + 1); i = (i + 1);
j = (j + 1); j = (j + 1);
} }
bool tint_tmp = (i == 9); if (((i == 9) & (j == 10))) {
if (tint_tmp) {
tint_tmp = (j == 10);
}
if ((tint_tmp)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f); x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -27,7 +27,7 @@ void main_1(thread float4* const tint_symbol_4) {
} }
int const x_37 = i; int const x_37 = i;
int const x_39 = j; int const x_39 = j;
if (((x_37 == 9) && (x_39 == 10))) { if (((x_37 == 9) & (x_39 == 10))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 65 ; Bound: 63
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
%26 = OpExtInstImport "GLSL.std.450" %26 = OpExtInstImport "GLSL.std.450"
@ -40,10 +40,10 @@
%int_10 = OpConstant %int 10 %int_10 = OpConstant %int 10
%float_1 = OpConstant %float 1 %float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0 %float_0 = OpConstant %float 0
%51 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %49 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%52 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %50 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%53 = OpTypeFunction %void %main_out %51 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8 %main_1 = OpFunction %void None %8
%11 = OpLabel %11 = OpLabel
%i = OpVariable %_ptr_Function_int Function %15 %i = OpVariable %_ptr_Function_int Function %15
@ -79,36 +79,31 @@
%38 = OpLoad %int %i %38 = OpLoad %int %i
%39 = OpLoad %int %j %39 = OpLoad %int %j
%40 = OpIEqual %bool %38 %int_9 %40 = OpIEqual %bool %38 %int_9
OpSelectionMerge %41 None %42 = OpIEqual %bool %39 %int_10
OpBranchConditional %40 %42 %41 %43 = OpLogicalAnd %bool %40 %42
%42 = OpLabel OpSelectionMerge %44 None
%44 = OpIEqual %bool %39 %int_10 OpBranchConditional %43 %45 %46
OpBranch %41 %45 = OpLabel
%41 = OpLabel OpStore %x_GLF_color %49
%45 = OpPhi %bool %40 %20 %44 %42 OpBranch %44
OpSelectionMerge %46 None
OpBranchConditional %45 %47 %48
%47 = OpLabel
OpStore %x_GLF_color %51
OpBranch %46
%48 = OpLabel
OpStore %x_GLF_color %52
OpBranch %46
%46 = OpLabel %46 = OpLabel
OpStore %x_GLF_color %50
OpBranch %44
%44 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %53 %tint_symbol_2 = OpFunction %void None %51
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%57 = OpLabel %55 = OpLabel
%58 = OpCompositeExtract %v4float %tint_symbol 0 %56 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %58 OpStore %tint_symbol_1 %56
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %8 %main = OpFunction %void None %8
%60 = OpLabel %58 = OpLabel
%61 = OpFunctionCall %void %main_1 %59 = OpFunctionCall %void %main_1
%63 = OpLoad %v4float %x_GLF_color %61 = OpLoad %v4float %x_GLF_color
%64 = OpCompositeConstruct %main_out %63 %62 = OpCompositeConstruct %main_out %61
%62 = OpFunctionCall %void %tint_symbol_2 %64 %60 = OpFunctionCall %void %tint_symbol_2 %62
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -19,7 +19,7 @@ fn main_1() {
} }
let x_37 : i32 = i; let x_37 : i32 = i;
let x_39 : i32 = j; let x_39 : i32 = j;
if (((x_37 == 9) && (x_39 == 10))) { if (((x_37 == 9) & (x_39 == 10))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0); x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else { } else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0); x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);

View File

@ -3,11 +3,7 @@ static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void main_1() { void main_1() {
float f = 0.0f; float f = 0.0f;
f = atan2(1.0f, tanh(1.0f)); f = atan2(1.0f, tanh(1.0f));
bool tint_tmp = (f > 0.910000026f); if (((f > 0.910000026f) & (f < 0.930000007f))) {
if (tint_tmp) {
tint_tmp = (f < 0.930000007f);
}
if ((tint_tmp)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f); x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -13,7 +13,7 @@ void main_1(thread float4* const tint_symbol_4) {
f = atan2(1.0f, tanh(1.0f)); f = atan2(1.0f, tanh(1.0f));
float const x_21 = f; float const x_21 = f;
float const x_23 = f; float const x_23 = f;
if (((x_21 > 0.910000026f) && (x_23 < 0.930000007f))) { if (((x_21 > 0.910000026f) & (x_23 < 0.930000007f))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 47 ; Bound: 45
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
%16 = OpExtInstImport "GLSL.std.450" %16 = OpExtInstImport "GLSL.std.450"
@ -35,10 +35,10 @@
%bool = OpTypeBool %bool = OpTypeBool
%float_0_930000007 = OpConstant %float 0.930000007 %float_0_930000007 = OpConstant %float 0.930000007
%float_0 = OpConstant %float 0 %float_0 = OpConstant %float 0
%33 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %31 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%34 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %32 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%35 = OpTypeFunction %void %main_out %33 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8 %main_1 = OpFunction %void None %8
%11 = OpLabel %11 = OpLabel
%f = OpVariable %_ptr_Function_float Function %14 %f = OpVariable %_ptr_Function_float Function %14
@ -48,36 +48,31 @@
%19 = OpLoad %float %f %19 = OpLoad %float %f
%20 = OpLoad %float %f %20 = OpLoad %float %f
%22 = OpFOrdGreaterThan %bool %19 %float_0_910000026 %22 = OpFOrdGreaterThan %bool %19 %float_0_910000026
OpSelectionMerge %24 None %25 = OpFOrdLessThan %bool %20 %float_0_930000007
OpBranchConditional %22 %25 %24 %26 = OpLogicalAnd %bool %22 %25
%25 = OpLabel OpSelectionMerge %27 None
%27 = OpFOrdLessThan %bool %20 %float_0_930000007 OpBranchConditional %26 %28 %29
OpBranch %24 %28 = OpLabel
%24 = OpLabel OpStore %x_GLF_color %31
%28 = OpPhi %bool %22 %11 %27 %25 OpBranch %27
OpSelectionMerge %29 None
OpBranchConditional %28 %30 %31
%30 = OpLabel
OpStore %x_GLF_color %33
OpBranch %29
%31 = OpLabel
OpStore %x_GLF_color %34
OpBranch %29
%29 = OpLabel %29 = OpLabel
OpStore %x_GLF_color %32
OpBranch %27
%27 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %35 %tint_symbol_2 = OpFunction %void None %33
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%39 = OpLabel %37 = OpLabel
%40 = OpCompositeExtract %v4float %tint_symbol 0 %38 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %40 OpStore %tint_symbol_1 %38
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %8 %main = OpFunction %void None %8
%42 = OpLabel %40 = OpLabel
%43 = OpFunctionCall %void %main_1 %41 = OpFunctionCall %void %main_1
%45 = OpLoad %v4float %x_GLF_color %43 = OpLoad %v4float %x_GLF_color
%46 = OpCompositeConstruct %main_out %45 %44 = OpCompositeConstruct %main_out %43
%44 = OpFunctionCall %void %tint_symbol_2 %46 %42 = OpFunctionCall %void %tint_symbol_2 %44
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -5,7 +5,7 @@ fn main_1() {
f = atan2(1.0, tanh(1.0)); f = atan2(1.0, tanh(1.0));
let x_21 : f32 = f; let x_21 : f32 = f;
let x_23 : f32 = f; let x_23 : f32 = f;
if (((x_21 > 0.910000026) && (x_23 < 0.930000007))) { if (((x_21 > 0.910000026) & (x_23 < 0.930000007))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0); x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else { } else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0); x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);

View File

@ -4,11 +4,7 @@ void main_1() {
float2x2 m = float2x2(0.0f, 0.0f, 0.0f, 0.0f); float2x2 m = float2x2(0.0f, 0.0f, 0.0f, 0.0f);
m = (transpose(float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))) * (1.0f / 2.0f)); m = (transpose(float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))) * (1.0f / 2.0f));
const float2x2 x_33 = m; const float2x2 x_33 = m;
bool tint_tmp = all((x_33[0u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[0u])); if ((all((x_33[0u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[0u])) & all((x_33[1u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[1u])))) {
if (tint_tmp) {
tint_tmp = all((x_33[1u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[1u]));
}
if ((tint_tmp)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f); x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -12,7 +12,7 @@ void main_1(thread float4* const tint_symbol_4) {
float2x2 m = float2x2(0.0f); float2x2 m = float2x2(0.0f);
m = (transpose(float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))) * (1.0f / 2.0f)); m = (transpose(float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))) * (1.0f / 2.0f));
float2x2 const x_33 = m; float2x2 const x_33 = m;
if ((all((x_33[0u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[0u])) && all((x_33[1u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[1u])))) { if ((all((x_33[0u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[0u])) & all((x_33[1u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[1u])))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 66 ; Bound: 64
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -48,10 +48,10 @@
%v2bool = OpTypeVector %bool 2 %v2bool = OpTypeVector %bool 2
%uint_1 = OpConstant %uint 1 %uint_1 = OpConstant %uint 1
%float_0 = OpConstant %float 0 %float_0 = OpConstant %float 0
%52 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %50 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%53 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %51 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%54 = OpTypeFunction %void %main_out %52 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8 %main_1 = OpFunction %void None %8
%11 = OpLabel %11 = OpLabel
%m = OpVariable %_ptr_Function_mat2v2float Function %16 %m = OpVariable %_ptr_Function_mat2v2float Function %16
@ -64,39 +64,34 @@
%37 = OpCompositeExtract %v2float %36 0 %37 = OpCompositeExtract %v2float %36 0
%38 = OpFOrdEqual %v2bool %32 %37 %38 = OpFOrdEqual %v2bool %32 %37
%28 = OpAll %bool %38 %28 = OpAll %bool %38
OpSelectionMerge %40 None %42 = OpCompositeExtract %v2float %27 1
OpBranchConditional %28 %41 %40 %43 = OpCompositeExtract %v2float %36 1
%41 = OpLabel %44 = OpFOrdEqual %v2bool %42 %43
%44 = OpCompositeExtract %v2float %27 1 %40 = OpAll %bool %44
%45 = OpCompositeExtract %v2float %36 1 %45 = OpLogicalAnd %bool %28 %40
%46 = OpFOrdEqual %v2bool %44 %45 OpSelectionMerge %46 None
%42 = OpAll %bool %46 OpBranchConditional %45 %47 %48
OpBranch %40 %47 = OpLabel
%40 = OpLabel OpStore %x_GLF_color %50
%47 = OpPhi %bool %28 %11 %42 %41 OpBranch %46
OpSelectionMerge %48 None
OpBranchConditional %47 %49 %50
%49 = OpLabel
OpStore %x_GLF_color %52
OpBranch %48
%50 = OpLabel
OpStore %x_GLF_color %53
OpBranch %48
%48 = OpLabel %48 = OpLabel
OpStore %x_GLF_color %51
OpBranch %46
%46 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %54 %tint_symbol_2 = OpFunction %void None %52
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%58 = OpLabel %56 = OpLabel
%59 = OpCompositeExtract %v4float %tint_symbol 0 %57 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %59 OpStore %tint_symbol_1 %57
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %8 %main = OpFunction %void None %8
%61 = OpLabel %59 = OpLabel
%62 = OpFunctionCall %void %main_1 %60 = OpFunctionCall %void %main_1
%64 = OpLoad %v4float %x_GLF_color %62 = OpLoad %v4float %x_GLF_color
%65 = OpCompositeConstruct %main_out %64 %63 = OpCompositeConstruct %main_out %62
%63 = OpFunctionCall %void %tint_symbol_2 %65 %61 = OpFunctionCall %void %tint_symbol_2 %63
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -4,7 +4,7 @@ fn main_1() {
var m : mat2x2<f32>; var m : mat2x2<f32>;
m = (transpose(mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0))) * (1.0 / 2.0)); m = (transpose(mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0))) * (1.0 / 2.0));
let x_33 : mat2x2<f32> = m; let x_33 : mat2x2<f32> = m;
if ((all((x_33[0u] == mat2x2<f32>(vec2<f32>(0.5, 1.5), vec2<f32>(1.0, 2.0))[0u])) && all((x_33[1u] == mat2x2<f32>(vec2<f32>(0.5, 1.5), vec2<f32>(1.0, 2.0))[1u])))) { if ((all((x_33[0u] == mat2x2<f32>(vec2<f32>(0.5, 1.5), vec2<f32>(1.0, 2.0))[0u])) & all((x_33[1u] == mat2x2<f32>(vec2<f32>(0.5, 1.5), vec2<f32>(1.0, 2.0))[1u])))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0); x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else { } else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0); x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);

View File

@ -3,11 +3,7 @@ static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void main_1() { void main_1() {
bool a = false; bool a = false;
a = false; a = false;
bool tint_tmp = true; if ((true & a)) {
if (tint_tmp) {
tint_tmp = a;
}
if ((tint_tmp)) {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
} else { } else {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f); x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);

View File

@ -12,7 +12,7 @@ void main_1(thread float4* const tint_symbol_4) {
bool a = false; bool a = false;
a = false; a = false;
bool const x_19 = a; bool const x_19 = a;
if ((true && x_19)) { if ((true & x_19)) {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
} else { } else {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 41 ; Bound: 39
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -33,45 +33,40 @@
%false = OpConstantFalse %bool %false = OpConstantFalse %bool
%true = OpConstantTrue %bool %true = OpConstantTrue %bool
%float_0 = OpConstant %float 0 %float_0 = OpConstant %float 0
%26 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %24 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%float_1 = OpConstant %float 1 %float_1 = OpConstant %float 1
%28 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %26 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%29 = OpTypeFunction %void %main_out %27 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8 %main_1 = OpFunction %void None %8
%11 = OpLabel %11 = OpLabel
%a = OpVariable %_ptr_Function_bool Function %15 %a = OpVariable %_ptr_Function_bool Function %15
OpStore %a %false OpStore %a %false
%17 = OpLoad %bool %a %17 = OpLoad %bool %a
OpSelectionMerge %19 None %19 = OpLogicalAnd %bool %true %17
OpBranchConditional %true %20 %19 OpSelectionMerge %20 None
%20 = OpLabel OpBranchConditional %19 %21 %22
OpBranch %19 %21 = OpLabel
%19 = OpLabel OpStore %x_GLF_color %24
%21 = OpPhi %bool %true %11 %17 %20 OpBranch %20
OpSelectionMerge %22 None
OpBranchConditional %21 %23 %24
%23 = OpLabel
OpStore %x_GLF_color %26
OpBranch %22
%24 = OpLabel
OpStore %x_GLF_color %28
OpBranch %22
%22 = OpLabel %22 = OpLabel
OpStore %x_GLF_color %26
OpBranch %20
%20 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %29 %tint_symbol_2 = OpFunction %void None %27
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%33 = OpLabel %31 = OpLabel
%34 = OpCompositeExtract %v4float %tint_symbol 0 %32 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %34 OpStore %tint_symbol_1 %32
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %8 %main = OpFunction %void None %8
%36 = OpLabel %34 = OpLabel
%37 = OpFunctionCall %void %main_1 %35 = OpFunctionCall %void %main_1
%39 = OpLoad %v4float %x_GLF_color %37 = OpLoad %v4float %x_GLF_color
%40 = OpCompositeConstruct %main_out %39 %38 = OpCompositeConstruct %main_out %37
%38 = OpFunctionCall %void %tint_symbol_2 %40 %36 = OpFunctionCall %void %tint_symbol_2 %38
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -4,7 +4,7 @@ fn main_1() {
var a : bool; var a : bool;
a = false; a = false;
let x_19 : bool = a; let x_19 : bool = a;
if ((true && x_19)) { if ((true & x_19)) {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0); x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
} else { } else {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0); x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);

View File

@ -8,11 +8,7 @@ void main_1() {
i = (i + 1); i = (i + 1);
{ {
const float x_35 = gl_FragCoord.x; const float x_35 = gl_FragCoord.x;
bool tint_tmp = (x_35 >= 0.0f); if (((x_35 >= 0.0f) & false)) {
if (tint_tmp) {
tint_tmp = false;
}
if ((tint_tmp)) {
} else { } else {
break; break;
} }

View File

@ -16,7 +16,7 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol
i = (x_6 + 1); i = (x_6 + 1);
{ {
float const x_35 = (*(tint_symbol_5)).x; float const x_35 = (*(tint_symbol_5)).x;
if (((x_35 >= 0.0f) && false)) { if (((x_35 >= 0.0f) & false)) {
} else { } else {
break; break;
} }

View File

@ -11,7 +11,7 @@ fn main_1() {
continuing { continuing {
let x_35 : f32 = gl_FragCoord.x; let x_35 : f32 = gl_FragCoord.x;
if (((x_35 >= 0.0) && false)) { if (((x_35 >= 0.0) & false)) {
} else { } else {
break; break;
} }

View File

@ -3,11 +3,7 @@ static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void main_1() { void main_1() {
const float x_22 = gl_FragCoord.x; const float x_22 = gl_FragCoord.x;
bool tint_tmp = (x_22 < 0.0f); if (((x_22 < 0.0f) | true)) {
if (!tint_tmp) {
tint_tmp = true;
}
if ((tint_tmp)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f); x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -10,7 +10,7 @@ struct tint_symbol_2 {
void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
float const x_22 = (*(tint_symbol_5)).x; float const x_22 = (*(tint_symbol_5)).x;
if (((x_22 < 0.0f) || true)) { if (((x_22 < 0.0f) | true)) {
*(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
*(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 46 ; Bound: 44
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -39,46 +39,41 @@
%bool = OpTypeBool %bool = OpTypeBool
%true = OpConstantTrue %bool %true = OpConstantTrue %bool
%float_1 = OpConstant %float 1 %float_1 = OpConstant %float 1
%31 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %29 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%32 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %30 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%33 = OpTypeFunction %void %main_out %31 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %11 %main_1 = OpFunction %void None %11
%14 = OpLabel %14 = OpLabel
%18 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0 %18 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%19 = OpLoad %float %18 %19 = OpLoad %float %18
%21 = OpFOrdLessThan %bool %19 %float_0 %21 = OpFOrdLessThan %bool %19 %float_0
OpSelectionMerge %23 None %24 = OpLogicalOr %bool %21 %true
OpBranchConditional %21 %23 %24 OpSelectionMerge %25 None
%24 = OpLabel OpBranchConditional %24 %26 %27
OpBranch %23 %26 = OpLabel
%23 = OpLabel OpStore %x_GLF_color %29
%26 = OpPhi %bool %21 %14 %true %24 OpBranch %25
OpSelectionMerge %27 None
OpBranchConditional %26 %28 %29
%28 = OpLabel
OpStore %x_GLF_color %31
OpBranch %27
%29 = OpLabel
OpStore %x_GLF_color %32
OpBranch %27
%27 = OpLabel %27 = OpLabel
OpStore %x_GLF_color %30
OpBranch %25
%25 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %33 %tint_symbol_3 = OpFunction %void None %31
%tint_symbol_1 = OpFunctionParameter %main_out %tint_symbol_1 = OpFunctionParameter %main_out
%37 = OpLabel %35 = OpLabel
%38 = OpCompositeExtract %v4float %tint_symbol_1 0 %36 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %38 OpStore %tint_symbol_2 %36
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %11 %main = OpFunction %void None %11
%40 = OpLabel %38 = OpLabel
%41 = OpLoad %v4float %tint_symbol %39 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %41 OpStore %gl_FragCoord %39
%42 = OpFunctionCall %void %main_1 %40 = OpFunctionCall %void %main_1
%44 = OpLoad %v4float %x_GLF_color %42 = OpLoad %v4float %x_GLF_color
%45 = OpCompositeConstruct %main_out %44 %43 = OpCompositeConstruct %main_out %42
%43 = OpFunctionCall %void %tint_symbol_3 %45 %41 = OpFunctionCall %void %tint_symbol_3 %43
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -4,7 +4,7 @@ var<private> x_GLF_color : vec4<f32>;
fn main_1() { fn main_1() {
let x_22 : f32 = gl_FragCoord.x; let x_22 : f32 = gl_FragCoord.x;
if (((x_22 < 0.0) || true)) { if (((x_22 < 0.0) | true)) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0); x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else { } else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0); x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);

View File

@ -40,27 +40,7 @@ void main_1() {
if ((f != 0u)) { if ((f != 0u)) {
f = 0u; f = 0u;
} }
bool tint_tmp_4 = (a == 1u); if (((((((a == 1u) & (b == 0u)) & (c == 1u)) & (d == 0u)) & (e == 1u)) & (f == 0u))) {
if (tint_tmp_4) {
tint_tmp_4 = (b == 0u);
}
bool tint_tmp_3 = (tint_tmp_4);
if (tint_tmp_3) {
tint_tmp_3 = (c == 1u);
}
bool tint_tmp_2 = (tint_tmp_3);
if (tint_tmp_2) {
tint_tmp_2 = (d == 0u);
}
bool tint_tmp_1 = (tint_tmp_2);
if (tint_tmp_1) {
tint_tmp_1 = (e == 1u);
}
bool tint_tmp = (tint_tmp_1);
if (tint_tmp) {
tint_tmp = (f == 0u);
}
if ((tint_tmp)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f); x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -60,7 +60,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
uint const x_96 = d; uint const x_96 = d;
uint const x_99 = e; uint const x_99 = e;
uint const x_102 = f; uint const x_102 = f;
if (((((((x_88 == 1u) && (x_90 == 0u)) && (x_93 == 1u)) && (x_96 == 0u)) && (x_99 == 1u)) && (x_102 == 0u))) { if (((((((x_88 == 1u) & (x_90 == 0u)) & (x_93 == 1u)) & (x_96 == 0u)) & (x_99 == 1u)) & (x_102 == 0u))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 131 ; Bound: 121
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -61,10 +61,10 @@
%bool = OpTypeBool %bool = OpTypeBool
%float_1 = OpConstant %float 1 %float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0 %float_0 = OpConstant %float 0
%117 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %107 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%118 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %108 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%119 = OpTypeFunction %void %main_out %109 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %12 %main_1 = OpFunction %void None %12
%15 = OpLabel %15 = OpLabel
%a = OpVariable %_ptr_Function_uint Function %18 %a = OpVariable %_ptr_Function_uint Function %18
@ -158,64 +158,39 @@
%89 = OpLoad %uint %e %89 = OpLoad %uint %e
%90 = OpLoad %uint %f %90 = OpLoad %uint %f
%91 = OpIEqual %bool %85 %uint_1 %91 = OpIEqual %bool %85 %uint_1
OpSelectionMerge %92 None %92 = OpIEqual %bool %86 %uint_0
OpBranchConditional %91 %93 %92 %93 = OpLogicalAnd %bool %91 %92
%93 = OpLabel %94 = OpIEqual %bool %87 %uint_1
%94 = OpIEqual %bool %86 %uint_0 %95 = OpLogicalAnd %bool %93 %94
OpBranch %92 %96 = OpIEqual %bool %88 %uint_0
%92 = OpLabel %97 = OpLogicalAnd %bool %95 %96
%95 = OpPhi %bool %91 %83 %94 %93 %98 = OpIEqual %bool %89 %uint_1
OpSelectionMerge %96 None %99 = OpLogicalAnd %bool %97 %98
OpBranchConditional %95 %97 %96 %100 = OpIEqual %bool %90 %uint_0
%97 = OpLabel %101 = OpLogicalAnd %bool %99 %100
%98 = OpIEqual %bool %87 %uint_1 OpSelectionMerge %102 None
OpBranch %96 OpBranchConditional %101 %103 %104
%96 = OpLabel %103 = OpLabel
%99 = OpPhi %bool %95 %92 %98 %97 OpStore %x_GLF_color %107
OpSelectionMerge %100 None OpBranch %102
OpBranchConditional %99 %101 %100
%101 = OpLabel
%102 = OpIEqual %bool %88 %uint_0
OpBranch %100
%100 = OpLabel
%103 = OpPhi %bool %99 %96 %102 %101
OpSelectionMerge %104 None
OpBranchConditional %103 %105 %104
%105 = OpLabel
%106 = OpIEqual %bool %89 %uint_1
OpBranch %104
%104 = OpLabel %104 = OpLabel
%107 = OpPhi %bool %103 %100 %106 %105 OpStore %x_GLF_color %108
OpSelectionMerge %108 None OpBranch %102
OpBranchConditional %107 %109 %108 %102 = OpLabel
%109 = OpLabel
%110 = OpIEqual %bool %90 %uint_0
OpBranch %108
%108 = OpLabel
%111 = OpPhi %bool %107 %104 %110 %109
OpSelectionMerge %112 None
OpBranchConditional %111 %113 %114
%113 = OpLabel
OpStore %x_GLF_color %117
OpBranch %112
%114 = OpLabel
OpStore %x_GLF_color %118
OpBranch %112
%112 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %119 %tint_symbol_2 = OpFunction %void None %109
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%123 = OpLabel %113 = OpLabel
%124 = OpCompositeExtract %v4float %tint_symbol 0 %114 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %124 OpStore %tint_symbol_1 %114
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %12 %main = OpFunction %void None %12
%126 = OpLabel %116 = OpLabel
%127 = OpFunctionCall %void %main_1 %117 = OpFunctionCall %void %main_1
%129 = OpLoad %v4float %x_GLF_color %119 = OpLoad %v4float %x_GLF_color
%130 = OpCompositeConstruct %main_out %129 %120 = OpCompositeConstruct %main_out %119
%128 = OpFunctionCall %void %tint_symbol_2 %130 %118 = OpFunctionCall %void %tint_symbol_2 %120
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -56,7 +56,7 @@ fn main_1() {
let x_96 : u32 = d; let x_96 : u32 = d;
let x_99 : u32 = e; let x_99 : u32 = e;
let x_102 : u32 = f; let x_102 : u32 = f;
if (((((((x_88 == 1u) && (x_90 == 0u)) && (x_93 == 1u)) && (x_96 == 0u)) && (x_99 == 1u)) && (x_102 == 0u))) { if (((((((x_88 == 1u) & (x_90 == 0u)) & (x_93 == 1u)) & (x_96 == 0u)) & (x_99 == 1u)) & (x_102 == 0u))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0); x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else { } else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0); x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);

View File

@ -7,11 +7,7 @@ void main_1() {
float f = 0.0f; float f = 0.0f;
const float x_28 = asfloat(x_6[0].x); const float x_28 = asfloat(x_6[0].x);
f = (4.0f / (2.0f * x_28)); f = (4.0f / (2.0f * x_28));
bool tint_tmp = (f > 1.899999976f); if (((f > 1.899999976f) & (f < 2.099999905f))) {
if (tint_tmp) {
tint_tmp = (f < 2.099999905f);
}
if ((tint_tmp)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f); x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -17,7 +17,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
f = (4.0f / (2.0f * x_28)); f = (4.0f / (2.0f * x_28));
float const x_31 = f; float const x_31 = f;
float const x_33 = f; float const x_33 = f;
if (((x_31 > 1.899999976f) && (x_33 < 2.099999905f))) { if (((x_31 > 1.899999976f) & (x_33 < 2.099999905f))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 56 ; Bound: 54
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -50,10 +50,10 @@
%float_2_0999999 = OpConstant %float 2.0999999 %float_2_0999999 = OpConstant %float 2.0999999
%float_1 = OpConstant %float 1 %float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0 %float_0 = OpConstant %float 0
%42 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %40 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%43 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %41 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%44 = OpTypeFunction %void %main_out %42 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %11 %main_1 = OpFunction %void None %11
%14 = OpLabel %14 = OpLabel
%f = OpVariable %_ptr_Function_float Function %17 %f = OpVariable %_ptr_Function_float Function %17
@ -65,36 +65,31 @@
%27 = OpLoad %float %f %27 = OpLoad %float %f
%28 = OpLoad %float %f %28 = OpLoad %float %f
%30 = OpFOrdGreaterThan %bool %27 %float_1_89999998 %30 = OpFOrdGreaterThan %bool %27 %float_1_89999998
OpSelectionMerge %32 None %33 = OpFOrdLessThan %bool %28 %float_2_0999999
OpBranchConditional %30 %33 %32 %34 = OpLogicalAnd %bool %30 %33
%33 = OpLabel OpSelectionMerge %35 None
%35 = OpFOrdLessThan %bool %28 %float_2_0999999 OpBranchConditional %34 %36 %37
OpBranch %32 %36 = OpLabel
%32 = OpLabel OpStore %x_GLF_color %40
%36 = OpPhi %bool %30 %14 %35 %33 OpBranch %35
OpSelectionMerge %37 None
OpBranchConditional %36 %38 %39
%38 = OpLabel
OpStore %x_GLF_color %42
OpBranch %37
%39 = OpLabel
OpStore %x_GLF_color %43
OpBranch %37
%37 = OpLabel %37 = OpLabel
OpStore %x_GLF_color %41
OpBranch %35
%35 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %44 %tint_symbol_2 = OpFunction %void None %42
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%48 = OpLabel %46 = OpLabel
%49 = OpCompositeExtract %v4float %tint_symbol 0 %47 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %49 OpStore %tint_symbol_1 %47
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %11 %main = OpFunction %void None %11
%51 = OpLabel %49 = OpLabel
%52 = OpFunctionCall %void %main_1 %50 = OpFunctionCall %void %main_1
%54 = OpLoad %v4float %x_GLF_color %52 = OpLoad %v4float %x_GLF_color
%55 = OpCompositeConstruct %main_out %54 %53 = OpCompositeConstruct %main_out %52
%53 = OpFunctionCall %void %tint_symbol_2 %55 %51 = OpFunctionCall %void %tint_symbol_2 %53
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -13,7 +13,7 @@ fn main_1() {
f = (4.0 / (2.0 * x_28)); f = (4.0 / (2.0 * x_28));
let x_31 : f32 = f; let x_31 : f32 = f;
let x_33 : f32 = f; let x_33 : f32 = f;
if (((x_31 > 1.899999976) && (x_33 < 2.099999905))) { if (((x_31 > 1.899999976) & (x_33 < 2.099999905))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0); x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else { } else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0); x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);

View File

@ -7,11 +7,7 @@ void main_1() {
float a = 0.0f; float a = 0.0f;
const float x_27 = asfloat(x_6[0].x); const float x_27 = asfloat(x_6[0].x);
a = (2.0f / (1.0f / x_27)); a = (2.0f / (1.0f / x_27));
bool tint_tmp = (a > 7.900000095f); if (((a > 7.900000095f) & (a < 8.100000381f))) {
if (tint_tmp) {
tint_tmp = (a < 8.100000381f);
}
if ((tint_tmp)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f); x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -17,7 +17,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
a = (2.0f / (1.0f / x_27)); a = (2.0f / (1.0f / x_27));
float const x_30 = a; float const x_30 = a;
float const x_32 = a; float const x_32 = a;
if (((x_30 > 7.900000095f) && (x_32 < 8.100000381f))) { if (((x_30 > 7.900000095f) & (x_32 < 8.100000381f))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 55 ; Bound: 53
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -49,10 +49,10 @@
%bool = OpTypeBool %bool = OpTypeBool
%float_8_10000038 = OpConstant %float 8.10000038 %float_8_10000038 = OpConstant %float 8.10000038
%float_0 = OpConstant %float 0 %float_0 = OpConstant %float 0
%41 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %39 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%42 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %40 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%43 = OpTypeFunction %void %main_out %41 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %11 %main_1 = OpFunction %void None %11
%14 = OpLabel %14 = OpLabel
%a = OpVariable %_ptr_Function_float Function %17 %a = OpVariable %_ptr_Function_float Function %17
@ -64,36 +64,31 @@
%27 = OpLoad %float %a %27 = OpLoad %float %a
%28 = OpLoad %float %a %28 = OpLoad %float %a
%30 = OpFOrdGreaterThan %bool %27 %float_7_9000001 %30 = OpFOrdGreaterThan %bool %27 %float_7_9000001
OpSelectionMerge %32 None %33 = OpFOrdLessThan %bool %28 %float_8_10000038
OpBranchConditional %30 %33 %32 %34 = OpLogicalAnd %bool %30 %33
%33 = OpLabel OpSelectionMerge %35 None
%35 = OpFOrdLessThan %bool %28 %float_8_10000038 OpBranchConditional %34 %36 %37
OpBranch %32 %36 = OpLabel
%32 = OpLabel OpStore %x_GLF_color %39
%36 = OpPhi %bool %30 %14 %35 %33 OpBranch %35
OpSelectionMerge %37 None
OpBranchConditional %36 %38 %39
%38 = OpLabel
OpStore %x_GLF_color %41
OpBranch %37
%39 = OpLabel
OpStore %x_GLF_color %42
OpBranch %37
%37 = OpLabel %37 = OpLabel
OpStore %x_GLF_color %40
OpBranch %35
%35 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %43 %tint_symbol_2 = OpFunction %void None %41
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%47 = OpLabel %45 = OpLabel
%48 = OpCompositeExtract %v4float %tint_symbol 0 %46 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %48 OpStore %tint_symbol_1 %46
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %11 %main = OpFunction %void None %11
%50 = OpLabel %48 = OpLabel
%51 = OpFunctionCall %void %main_1 %49 = OpFunctionCall %void %main_1
%53 = OpLoad %v4float %x_GLF_color %51 = OpLoad %v4float %x_GLF_color
%54 = OpCompositeConstruct %main_out %53 %52 = OpCompositeConstruct %main_out %51
%52 = OpFunctionCall %void %tint_symbol_2 %54 %50 = OpFunctionCall %void %tint_symbol_2 %52
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -13,7 +13,7 @@ fn main_1() {
a = (2.0 / (1.0 / x_27)); a = (2.0 / (1.0 / x_27));
let x_30 : f32 = a; let x_30 : f32 = a;
let x_32 : f32 = a; let x_32 : f32 = a;
if (((x_30 > 7.900000095) && (x_32 < 8.100000381))) { if (((x_30 > 7.900000095) & (x_32 < 8.100000381))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0); x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else { } else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0); x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);

View File

@ -7,11 +7,7 @@ void main_1() {
float f = 0.0f; float f = 0.0f;
const float x_28 = asfloat(x_6[0].x); const float x_28 = asfloat(x_6[0].x);
f = (4.0f * (2.0f / x_28)); f = (4.0f * (2.0f / x_28));
bool tint_tmp = (f > 7.900000095f); if (((f > 7.900000095f) & (f < 8.100000381f))) {
if (tint_tmp) {
tint_tmp = (f < 8.100000381f);
}
if ((tint_tmp)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f); x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -17,7 +17,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
f = (4.0f * (2.0f / x_28)); f = (4.0f * (2.0f / x_28));
float const x_31 = f; float const x_31 = f;
float const x_33 = f; float const x_33 = f;
if (((x_31 > 7.900000095f) && (x_33 < 8.100000381f))) { if (((x_31 > 7.900000095f) & (x_33 < 8.100000381f))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 56 ; Bound: 54
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -50,10 +50,10 @@
%float_8_10000038 = OpConstant %float 8.10000038 %float_8_10000038 = OpConstant %float 8.10000038
%float_1 = OpConstant %float 1 %float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0 %float_0 = OpConstant %float 0
%42 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %40 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%43 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %41 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%44 = OpTypeFunction %void %main_out %42 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %11 %main_1 = OpFunction %void None %11
%14 = OpLabel %14 = OpLabel
%f = OpVariable %_ptr_Function_float Function %17 %f = OpVariable %_ptr_Function_float Function %17
@ -65,36 +65,31 @@
%27 = OpLoad %float %f %27 = OpLoad %float %f
%28 = OpLoad %float %f %28 = OpLoad %float %f
%30 = OpFOrdGreaterThan %bool %27 %float_7_9000001 %30 = OpFOrdGreaterThan %bool %27 %float_7_9000001
OpSelectionMerge %32 None %33 = OpFOrdLessThan %bool %28 %float_8_10000038
OpBranchConditional %30 %33 %32 %34 = OpLogicalAnd %bool %30 %33
%33 = OpLabel OpSelectionMerge %35 None
%35 = OpFOrdLessThan %bool %28 %float_8_10000038 OpBranchConditional %34 %36 %37
OpBranch %32 %36 = OpLabel
%32 = OpLabel OpStore %x_GLF_color %40
%36 = OpPhi %bool %30 %14 %35 %33 OpBranch %35
OpSelectionMerge %37 None
OpBranchConditional %36 %38 %39
%38 = OpLabel
OpStore %x_GLF_color %42
OpBranch %37
%39 = OpLabel
OpStore %x_GLF_color %43
OpBranch %37
%37 = OpLabel %37 = OpLabel
OpStore %x_GLF_color %41
OpBranch %35
%35 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %44 %tint_symbol_2 = OpFunction %void None %42
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%48 = OpLabel %46 = OpLabel
%49 = OpCompositeExtract %v4float %tint_symbol 0 %47 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %49 OpStore %tint_symbol_1 %47
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %11 %main = OpFunction %void None %11
%51 = OpLabel %49 = OpLabel
%52 = OpFunctionCall %void %main_1 %50 = OpFunctionCall %void %main_1
%54 = OpLoad %v4float %x_GLF_color %52 = OpLoad %v4float %x_GLF_color
%55 = OpCompositeConstruct %main_out %54 %53 = OpCompositeConstruct %main_out %52
%53 = OpFunctionCall %void %tint_symbol_2 %55 %51 = OpFunctionCall %void %tint_symbol_2 %53
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -13,7 +13,7 @@ fn main_1() {
f = (4.0 * (2.0 / x_28)); f = (4.0 * (2.0 / x_28));
let x_31 : f32 = f; let x_31 : f32 = f;
let x_33 : f32 = f; let x_33 : f32 = f;
if (((x_31 > 7.900000095) && (x_33 < 8.100000381))) { if (((x_31 > 7.900000095) & (x_33 < 8.100000381))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0); x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else { } else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0); x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);

View File

@ -28,11 +28,7 @@ void main_1() {
return; return;
} }
{ {
bool tint_tmp = true; if ((true & (x_GLF_global_loop_count < 100))) {
if (tint_tmp) {
tint_tmp = (x_GLF_global_loop_count < 100);
}
if ((tint_tmp)) {
} else { } else {
break; break;
} }

View File

@ -45,7 +45,7 @@ void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4*
} }
{ {
int const x_39 = *(tint_symbol_5); int const x_39 = *(tint_symbol_5);
if ((true && (x_39 < 100))) { if ((true & (x_39 < 100))) {
} else { } else {
break; break;
} }

View File

@ -39,7 +39,7 @@ fn main_1() {
continuing { continuing {
let x_39 : i32 = x_GLF_global_loop_count; let x_39 : i32 = x_GLF_global_loop_count;
if ((true && (x_39 < 100))) { if ((true & (x_39 < 100))) {
} else { } else {
break; break;
} }

View File

@ -20,11 +20,7 @@ void main_1() {
while (true) { while (true) {
const int x_38 = b; const int x_38 = b;
const int x_40 = asint(x_6[4].x); const int x_40 = asint(x_6[4].x);
bool tint_tmp = (x_38 < x_40); if (((x_38 < x_40) & (a < 10))) {
if (tint_tmp) {
tint_tmp = (a < 10);
}
if ((tint_tmp)) {
} else { } else {
break; break;
} }

View File

@ -35,7 +35,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
int const x_38 = b; int const x_38 = b;
int const x_40 = x_6.x_GLF_uniform_int_values.arr[4].el; int const x_40 = x_6.x_GLF_uniform_int_values.arr[4].el;
int const x_42 = a; int const x_42 = a;
if (((x_38 < x_40) && (x_42 < 10))) { if (((x_38 < x_40) & (x_42 < 10))) {
} else { } else {
break; break;
} }

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 135 ; Bound: 133
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -64,7 +64,7 @@
%int_5 = OpConstant %int 5 %int_5 = OpConstant %int 5
%int_3 = OpConstant %int 3 %int_3 = OpConstant %int 3
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%123 = OpTypeFunction %void %main_out %121 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15 %main_1 = OpFunction %void None %15
%18 = OpLabel %18 = OpLabel
%a = OpVariable %_ptr_Function_int Function %21 %a = OpVariable %_ptr_Function_int Function %21
@ -91,135 +91,130 @@
%47 = OpLoad %int %46 %47 = OpLoad %int %46
%48 = OpLoad %int %a %48 = OpLoad %int %a
%49 = OpSLessThan %bool %44 %47 %49 = OpSLessThan %bool %44 %47
OpSelectionMerge %50 None %51 = OpSLessThan %bool %48 %int_10
OpBranchConditional %49 %51 %50 %52 = OpLogicalAnd %bool %49 %51
%51 = OpLabel OpSelectionMerge %53 None
%53 = OpSLessThan %bool %48 %int_10 OpBranchConditional %52 %54 %55
OpBranch %50 %54 = OpLabel
%50 = OpLabel OpBranch %53
%54 = OpPhi %bool %49 %43 %53 %51
OpSelectionMerge %55 None
OpBranchConditional %54 %56 %57
%56 = OpLabel
OpBranch %55
%57 = OpLabel
OpBranch %41
%55 = OpLabel %55 = OpLabel
%58 = OpLoad %int %c
%60 = OpSGreaterThan %bool %58 %int_5
OpSelectionMerge %61 None
OpBranchConditional %60 %62 %61
%62 = OpLabel
OpBranch %41 OpBranch %41
%61 = OpLabel %53 = OpLabel
%63 = OpLoad %int %a %56 = OpLoad %int %c
%58 = OpSGreaterThan %bool %56 %int_5
OpSelectionMerge %59 None
OpBranchConditional %58 %60 %59
%60 = OpLabel
OpBranch %41
%59 = OpLabel
%61 = OpLoad %int %a
%62 = OpIAdd %int %61 %int_1
OpStore %a %62
%63 = OpLoad %int %c
%64 = OpIAdd %int %63 %int_1 %64 = OpIAdd %int %63 %int_1
OpStore %a %64 OpStore %c %64
%65 = OpLoad %int %c %65 = OpLoad %int %b
%66 = OpIAdd %int %65 %int_1 %66 = OpIAdd %int %65 %int_1
OpStore %c %66 OpStore %b %66
%67 = OpLoad %int %b
%68 = OpIAdd %int %67 %int_1
OpStore %b %68
OpBranch %42 OpBranch %42
%42 = OpLabel %42 = OpLabel
OpBranch %40 OpBranch %40
%41 = OpLabel %41 = OpLabel
OpBranch %67
%67 = OpLabel
OpLoopMerge %68 %69 None
OpBranch %70
%70 = OpLabel
%71 = OpLoad %int %a
%72 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%73 = OpLoad %int %72
%74 = OpSLessThan %bool %71 %73
OpSelectionMerge %75 None
OpBranchConditional %74 %76 %77
%76 = OpLabel
OpBranch %75
%77 = OpLabel
OpBranch %68
%75 = OpLabel
OpBranch %69 OpBranch %69
%69 = OpLabel %69 = OpLabel
OpLoopMerge %70 %71 None %78 = OpLoad %int %a
OpBranch %72 %79 = OpIAdd %int %78 %int_1
%72 = OpLabel OpStore %a %79
%73 = OpLoad %int %a OpBranch %67
%74 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1 %68 = OpLabel
%75 = OpLoad %int %74
%76 = OpSLessThan %bool %73 %75
OpSelectionMerge %77 None
OpBranchConditional %76 %78 %79
%78 = OpLabel
OpBranch %77
%79 = OpLabel
OpBranch %70
%77 = OpLabel
OpBranch %71
%71 = OpLabel
%80 = OpLoad %int %a %80 = OpLoad %int %a
%81 = OpIAdd %int %80 %int_1 %81 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
OpStore %a %81 %82 = OpLoad %int %81
OpBranch %69 %83 = OpIEqual %bool %80 %82
%70 = OpLabel OpStore %x_77_phi %83
%82 = OpLoad %int %a OpSelectionMerge %84 None
%83 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1 OpBranchConditional %83 %85 %84
%84 = OpLoad %int %83 %85 = OpLabel
%85 = OpIEqual %bool %82 %84 %86 = OpLoad %int %b
OpStore %x_77_phi %85 %88 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
OpSelectionMerge %86 None %89 = OpLoad %int %88
OpBranchConditional %85 %87 %86 %90 = OpIEqual %bool %86 %89
%87 = OpLabel OpStore %x_76 %90
%88 = OpLoad %int %b %91 = OpLoad %bool %x_76
%90 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3 OpStore %x_77_phi %91
%91 = OpLoad %int %90 OpBranch %84
%92 = OpIEqual %bool %88 %91 %84 = OpLabel
OpStore %x_76 %92 %92 = OpLoad %bool %x_77_phi
%93 = OpLoad %bool %x_76 OpStore %x_84_phi %92
OpStore %x_77_phi %93 OpSelectionMerge %93 None
OpBranch %86 OpBranchConditional %92 %94 %93
%86 = OpLabel %94 = OpLabel
%94 = OpLoad %bool %x_77_phi %95 = OpLoad %int %c
OpStore %x_84_phi %94 %96 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
OpSelectionMerge %95 None %97 = OpLoad %int %96
OpBranchConditional %94 %96 %95 %98 = OpIEqual %bool %95 %97
%96 = OpLabel OpStore %x_83 %98
%97 = OpLoad %int %c %99 = OpLoad %bool %x_83
%98 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3 OpStore %x_84_phi %99
%99 = OpLoad %int %98 OpBranch %93
%100 = OpIEqual %bool %97 %99 %93 = OpLabel
OpStore %x_83 %100 %100 = OpLoad %bool %x_84_phi
%101 = OpLoad %bool %x_83 OpSelectionMerge %101 None
OpStore %x_84_phi %101 OpBranchConditional %100 %102 %103
OpBranch %95 %102 = OpLabel
%95 = OpLabel %104 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%102 = OpLoad %bool %x_84_phi %105 = OpLoad %int %104
OpSelectionMerge %103 None %106 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
OpBranchConditional %102 %104 %105
%104 = OpLabel
%106 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%107 = OpLoad %int %106 %107 = OpLoad %int %106
%108 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0 %108 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%109 = OpLoad %int %108 %109 = OpLoad %int %108
%110 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0 %110 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%111 = OpLoad %int %110 %111 = OpLoad %int %110
%112 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2 %112 = OpConvertSToF %float %105
%113 = OpLoad %int %112 %113 = OpConvertSToF %float %107
%114 = OpConvertSToF %float %107 %114 = OpConvertSToF %float %109
%115 = OpConvertSToF %float %109 %115 = OpConvertSToF %float %111
%116 = OpConvertSToF %float %111 %116 = OpCompositeConstruct %v4float %112 %113 %114 %115
%117 = OpConvertSToF %float %113 OpStore %x_GLF_color %116
%118 = OpCompositeConstruct %v4float %114 %115 %116 %117 OpBranch %101
OpStore %x_GLF_color %118
OpBranch %103
%105 = OpLabel
%119 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%120 = OpLoad %int %119
%121 = OpConvertSToF %float %120
%122 = OpCompositeConstruct %v4float %121 %121 %121 %121
OpStore %x_GLF_color %122
OpBranch %103
%103 = OpLabel %103 = OpLabel
%117 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%118 = OpLoad %int %117
%119 = OpConvertSToF %float %118
%120 = OpCompositeConstruct %v4float %119 %119 %119 %119
OpStore %x_GLF_color %120
OpBranch %101
%101 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %123 %tint_symbol_2 = OpFunction %void None %121
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%127 = OpLabel %125 = OpLabel
%128 = OpCompositeExtract %v4float %tint_symbol 0 %126 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %128 OpStore %tint_symbol_1 %126
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %15 %main = OpFunction %void None %15
%130 = OpLabel %128 = OpLabel
%131 = OpFunctionCall %void %main_1 %129 = OpFunctionCall %void %main_1
%133 = OpLoad %v4float %x_GLF_color %131 = OpLoad %v4float %x_GLF_color
%134 = OpCompositeConstruct %main_out %133 %132 = OpCompositeConstruct %main_out %131
%132 = OpFunctionCall %void %tint_symbol_2 %134 %130 = OpFunctionCall %void %tint_symbol_2 %132
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -26,7 +26,7 @@ fn main_1() {
let x_38 : i32 = b; let x_38 : i32 = b;
let x_40 : i32 = x_6.x_GLF_uniform_int_values[4]; let x_40 : i32 = x_6.x_GLF_uniform_int_values[4];
let x_42 : i32 = a; let x_42 : i32 = a;
if (((x_38 < x_40) && (x_42 < 10))) { if (((x_38 < x_40) & (x_42 < 10))) {
} else { } else {
break; break;
} }

View File

@ -23,11 +23,7 @@ void main_1() {
if (true) { if (true) {
const uint scalar_offset = ((16u * uint(0))) / 4; const uint scalar_offset = ((16u * uint(0))) / 4;
const int x_46 = asint(x_6[scalar_offset / 4][scalar_offset % 4]); const int x_46 = asint(x_6[scalar_offset / 4][scalar_offset % 4]);
bool tint_tmp = (x_46 == 1); x_51 = !(((x_46 == 1) & (index <= 1)));
if (tint_tmp) {
tint_tmp = (index <= 1);
}
x_51 = !((tint_tmp));
x_52_phi = x_51; x_52_phi = x_51;
} }
if (!(x_52_phi)) { if (!(x_52_phi)) {

View File

@ -41,7 +41,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) {
if (true) { if (true) {
int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el;
int const x_48 = index; int const x_48 = index;
x_51 = !(((x_46 == 1) && (x_48 <= 1))); x_51 = !(((x_46 == 1) & (x_48 <= 1)));
x_52_phi = x_51; x_52_phi = x_51;
} }
bool const x_52 = x_52_phi; bool const x_52 = x_52_phi;

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 141 ; Bound: 139
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -70,7 +70,7 @@
%int_0 = OpConstant %int 0 %int_0 = OpConstant %int 0
%int_4 = OpConstant %int 4 %int_4 = OpConstant %int 4
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%129 = OpTypeFunction %void %main_out %127 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15 %main_1 = OpFunction %void None %15
%18 = OpLabel %18 = OpLabel
%arr = OpVariable %_ptr_Function__arr_int_uint_3 Function %23 %arr = OpVariable %_ptr_Function__arr_int_uint_3 Function %23
@ -103,122 +103,117 @@
%58 = OpLoad %int %57 %58 = OpLoad %int %57
%59 = OpLoad %int %index %59 = OpLoad %int %index
%61 = OpIEqual %bool %58 %int_1 %61 = OpIEqual %bool %58 %int_1
OpSelectionMerge %62 None %62 = OpSLessThanEqual %bool %59 %int_1
OpBranchConditional %61 %63 %62 %63 = OpLogicalAnd %bool %61 %62
%63 = OpLabel %60 = OpLogicalNot %bool %63
%64 = OpSLessThanEqual %bool %59 %int_1
OpBranch %62
%62 = OpLabel
%65 = OpPhi %bool %61 %55 %64 %63
%60 = OpLogicalNot %bool %65
OpStore %x_51 %60 OpStore %x_51 %60
%66 = OpLoad %bool %x_51 %64 = OpLoad %bool %x_51
OpStore %x_52_phi %66 OpStore %x_52_phi %64
OpBranch %54 OpBranch %54
%54 = OpLabel %54 = OpLabel
%67 = OpLoad %bool %x_52_phi %65 = OpLoad %bool %x_52_phi
%68 = OpLogicalNot %bool %67 %66 = OpLogicalNot %bool %65
OpSelectionMerge %69 None OpSelectionMerge %67 None
OpBranchConditional %68 %70 %71 OpBranchConditional %66 %68 %69
%70 = OpLabel %68 = OpLabel
OpBranch %69 OpBranch %67
%71 = OpLabel
OpBranch %48
%69 = OpLabel %69 = OpLabel
%72 = OpLoad %int %index OpBranch %48
%73 = OpAccessChain %_ptr_Function_int %arr %72 %67 = OpLabel
%74 = OpLoad %int %73 %70 = OpLoad %int %index
%75 = OpAccessChain %_ptr_Function_int %arr %72 %71 = OpAccessChain %_ptr_Function_int %arr %70
%76 = OpIAdd %int %74 %int_1 %72 = OpLoad %int %71
OpStore %75 %76 %73 = OpAccessChain %_ptr_Function_int %arr %70
%77 = OpLoad %int %index %74 = OpIAdd %int %72 %int_1
%78 = OpIAdd %int %77 %int_1 OpStore %73 %74
OpStore %index %78 %75 = OpLoad %int %index
%76 = OpIAdd %int %75 %int_1
OpStore %index %76
OpBranch %49 OpBranch %49
%49 = OpLabel %49 = OpLabel
OpBranch %47 OpBranch %47
%48 = OpLabel %48 = OpLabel
%79 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1 %77 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%78 = OpLoad %int %77
%79 = OpAccessChain %_ptr_Function_int %arr %78
%80 = OpLoad %int %79 %80 = OpLoad %int %79
%81 = OpAccessChain %_ptr_Function_int %arr %80 %81 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%82 = OpLoad %int %81 %82 = OpLoad %int %81
%83 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3 %83 = OpIEqual %bool %80 %82
%84 = OpLoad %int %83 OpStore %x_77_phi %83
%85 = OpIEqual %bool %82 %84 OpSelectionMerge %84 None
OpStore %x_77_phi %85 OpBranchConditional %83 %85 %84
OpSelectionMerge %86 None %85 = OpLabel
OpBranchConditional %85 %87 %86 %86 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%87 = OpLabel %87 = OpLoad %int %86
%88 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0 %88 = OpAccessChain %_ptr_Function_int %arr %87
%89 = OpLoad %int %88 %89 = OpLoad %int %88
%90 = OpAccessChain %_ptr_Function_int %arr %89 %91 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
%91 = OpLoad %int %90 %92 = OpLoad %int %91
%93 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4 %93 = OpIEqual %bool %89 %92
%94 = OpLoad %int %93 OpStore %x_76 %93
%95 = OpIEqual %bool %91 %94 %94 = OpLoad %bool %x_76
OpStore %x_76 %95 OpStore %x_77_phi %94
%96 = OpLoad %bool %x_76 OpBranch %84
OpStore %x_77_phi %96 %84 = OpLabel
OpBranch %86 %95 = OpLoad %bool %x_77_phi
%86 = OpLabel OpStore %x_87_phi %95
%97 = OpLoad %bool %x_77_phi OpSelectionMerge %96 None
OpStore %x_87_phi %97 OpBranchConditional %95 %97 %96
OpSelectionMerge %98 None %97 = OpLabel
OpBranchConditional %97 %99 %98 %98 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%99 = OpLabel %99 = OpLoad %int %98
%100 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3 %100 = OpAccessChain %_ptr_Function_int %arr %99
%101 = OpLoad %int %100 %101 = OpLoad %int %100
%102 = OpAccessChain %_ptr_Function_int %arr %101 %102 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%103 = OpLoad %int %102 %103 = OpLoad %int %102
%104 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2 %104 = OpIEqual %bool %101 %103
%105 = OpLoad %int %104 OpStore %x_86 %104
%106 = OpIEqual %bool %103 %105 %105 = OpLoad %bool %x_86
OpStore %x_86 %106 OpStore %x_87_phi %105
%107 = OpLoad %bool %x_86 OpBranch %96
OpStore %x_87_phi %107 %96 = OpLabel
OpBranch %98 %106 = OpLoad %bool %x_87_phi
%98 = OpLabel OpSelectionMerge %107 None
%108 = OpLoad %bool %x_87_phi OpBranchConditional %106 %108 %109
OpSelectionMerge %109 None %108 = OpLabel
OpBranchConditional %108 %110 %111 %110 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%110 = OpLabel %111 = OpLoad %int %110
%112 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0 %112 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%113 = OpLoad %int %112 %113 = OpLoad %int %112
%114 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1 %114 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%115 = OpLoad %int %114 %115 = OpLoad %int %114
%116 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1 %116 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%117 = OpLoad %int %116 %117 = OpLoad %int %116
%118 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0 %118 = OpConvertSToF %float %111
%119 = OpLoad %int %118 %119 = OpConvertSToF %float %113
%120 = OpConvertSToF %float %113 %120 = OpConvertSToF %float %115
%121 = OpConvertSToF %float %115 %121 = OpConvertSToF %float %117
%122 = OpConvertSToF %float %117 %122 = OpCompositeConstruct %v4float %118 %119 %120 %121
%123 = OpConvertSToF %float %119 OpStore %x_GLF_color %122
%124 = OpCompositeConstruct %v4float %120 %121 %122 %123 OpBranch %107
OpStore %x_GLF_color %124
OpBranch %109
%111 = OpLabel
%125 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%126 = OpLoad %int %125
%127 = OpConvertSToF %float %126
%128 = OpCompositeConstruct %v4float %127 %127 %127 %127
OpStore %x_GLF_color %128
OpBranch %109
%109 = OpLabel %109 = OpLabel
%123 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%124 = OpLoad %int %123
%125 = OpConvertSToF %float %124
%126 = OpCompositeConstruct %v4float %125 %125 %125 %125
OpStore %x_GLF_color %126
OpBranch %107
%107 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %129 %tint_symbol_2 = OpFunction %void None %127
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%133 = OpLabel %131 = OpLabel
%134 = OpCompositeExtract %v4float %tint_symbol 0 %132 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %134 OpStore %tint_symbol_1 %132
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %15 %main = OpFunction %void None %15
%136 = OpLabel %134 = OpLabel
%137 = OpFunctionCall %void %main_1 %135 = OpFunctionCall %void %main_1
%139 = OpLoad %v4float %x_GLF_color %137 = OpLoad %v4float %x_GLF_color
%140 = OpCompositeConstruct %main_out %139 %138 = OpCompositeConstruct %main_out %137
%138 = OpFunctionCall %void %tint_symbol_2 %140 %136 = OpFunctionCall %void %tint_symbol_2 %138
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -28,7 +28,7 @@ fn main_1() {
if (true) { if (true) {
let x_46 : i32 = x_6.x_GLF_uniform_int_values[0]; let x_46 : i32 = x_6.x_GLF_uniform_int_values[0];
let x_48 : i32 = index; let x_48 : i32 = index;
x_51 = !(((x_46 == 1) && (x_48 <= 1))); x_51 = !(((x_46 == 1) & (x_48 <= 1)));
x_52_phi = x_51; x_52_phi = x_51;
} }
let x_52 : bool = x_52_phi; let x_52 : bool = x_52_phi;

View File

@ -60,11 +60,7 @@ void main_1() {
const uint scalar_offset_3 = ((16u * uint(0))) / 4; const uint scalar_offset_3 = ((16u * uint(0))) / 4;
const int x_104 = asint(x_10[scalar_offset_3 / 4][scalar_offset_3 % 4]); const int x_104 = asint(x_10[scalar_offset_3 / 4][scalar_offset_3 % 4]);
const float2x3 x_108 = float2x3(float3(float(x_89), float(x_92), float(x_95)), float3(float(x_98), float(x_101), float(x_104))); const float2x3 x_108 = float2x3(float3(float(x_89), float(x_92), float(x_95)), float3(float(x_98), float(x_101), float(x_104)));
bool tint_tmp = all((x_87[0u] == x_108[0u])); if ((all((x_87[0u] == x_108[0u])) & all((x_87[1u] == x_108[1u])))) {
if (tint_tmp) {
tint_tmp = all((x_87[1u] == x_108[1u]));
}
if ((tint_tmp)) {
const uint scalar_offset_4 = ((16u * uint(0))) / 4; const uint scalar_offset_4 = ((16u * uint(0))) / 4;
const int x_122 = asint(x_10[scalar_offset_4 / 4][scalar_offset_4 % 4]); const int x_122 = asint(x_10[scalar_offset_4 / 4][scalar_offset_4 % 4]);
const int x_125 = asint(x_10[1].x); const int x_125 = asint(x_10[1].x);

View File

@ -75,7 +75,7 @@ void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_s
int const x_101 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_101 = x_10.x_GLF_uniform_int_values.arr[1].el;
int const x_104 = x_10.x_GLF_uniform_int_values.arr[0].el; int const x_104 = x_10.x_GLF_uniform_int_values.arr[0].el;
float2x3 const x_108 = float2x3(float3(float(x_89), float(x_92), float(x_95)), float3(float(x_98), float(x_101), float(x_104))); float2x3 const x_108 = float2x3(float3(float(x_89), float(x_92), float(x_95)), float3(float(x_98), float(x_101), float(x_104)));
if ((all((x_87[0u] == x_108[0u])) && all((x_87[1u] == x_108[1u])))) { if ((all((x_87[0u] == x_108[0u])) & all((x_87[1u] == x_108[1u])))) {
int const x_122 = x_10.x_GLF_uniform_int_values.arr[0].el; int const x_122 = x_10.x_GLF_uniform_int_values.arr[0].el;
int const x_125 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_125 = x_10.x_GLF_uniform_int_values.arr[1].el;
int const x_128 = x_10.x_GLF_uniform_int_values.arr[1].el; int const x_128 = x_10.x_GLF_uniform_int_values.arr[1].el;

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 164 ; Bound: 162
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -89,7 +89,7 @@
%true = OpConstantTrue %bool %true = OpConstantTrue %bool
%v3bool = OpTypeVector %bool 3 %v3bool = OpTypeVector %bool 3
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%151 = OpTypeFunction %void %main_out %149 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %23 %main_1 = OpFunction %void None %23
%26 = OpLabel %26 = OpLabel
%m23 = OpVariable %_ptr_Function_mat2v3float Function %31 %m23 = OpVariable %_ptr_Function_mat2v3float Function %31
@ -192,58 +192,53 @@
%121 = OpCompositeExtract %v3float %118 0 %121 = OpCompositeExtract %v3float %118 0
%122 = OpFOrdEqual %v3bool %120 %121 %122 = OpFOrdEqual %v3bool %120 %121
%119 = OpAll %bool %122 %119 = OpAll %bool %122
OpSelectionMerge %124 None %125 = OpCompositeExtract %v3float %97 1
OpBranchConditional %119 %125 %124 %126 = OpCompositeExtract %v3float %118 1
%125 = OpLabel %127 = OpFOrdEqual %v3bool %125 %126
%127 = OpCompositeExtract %v3float %97 1 %124 = OpAll %bool %127
%128 = OpCompositeExtract %v3float %118 1 %128 = OpLogicalAnd %bool %119 %124
%129 = OpFOrdEqual %v3bool %127 %128 OpSelectionMerge %129 None
%126 = OpAll %bool %129 OpBranchConditional %128 %130 %131
OpBranch %124 %130 = OpLabel
%124 = OpLabel %132 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%130 = OpPhi %bool %119 %45 %126 %125 %133 = OpLoad %int %132
OpSelectionMerge %131 None %134 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
OpBranchConditional %130 %132 %133
%132 = OpLabel
%134 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%135 = OpLoad %int %134 %135 = OpLoad %int %134
%136 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1 %136 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%137 = OpLoad %int %136 %137 = OpLoad %int %136
%138 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1 %138 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%139 = OpLoad %int %138 %139 = OpLoad %int %138
%140 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0 %140 = OpConvertSToF %float %133
%141 = OpLoad %int %140 %141 = OpConvertSToF %float %135
%142 = OpConvertSToF %float %135 %142 = OpConvertSToF %float %137
%143 = OpConvertSToF %float %137 %143 = OpConvertSToF %float %139
%144 = OpConvertSToF %float %139 %144 = OpCompositeConstruct %v4float %140 %141 %142 %143
%145 = OpConvertSToF %float %141 OpStore %x_GLF_color %144
%146 = OpCompositeConstruct %v4float %142 %143 %144 %145 OpBranch %129
OpStore %x_GLF_color %146
OpBranch %131
%133 = OpLabel
%147 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%148 = OpLoad %int %147
%149 = OpConvertSToF %float %148
%150 = OpCompositeConstruct %v4float %149 %149 %149 %149
OpStore %x_GLF_color %150
OpBranch %131
%131 = OpLabel %131 = OpLabel
%145 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%146 = OpLoad %int %145
%147 = OpConvertSToF %float %146
%148 = OpCompositeConstruct %v4float %147 %147 %147 %147
OpStore %x_GLF_color %148
OpBranch %129
%129 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %151 %tint_symbol_3 = OpFunction %void None %149
%tint_symbol_1 = OpFunctionParameter %main_out %tint_symbol_1 = OpFunctionParameter %main_out
%155 = OpLabel %153 = OpLabel
%156 = OpCompositeExtract %v4float %tint_symbol_1 0 %154 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %156 OpStore %tint_symbol_2 %154
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %23 %main = OpFunction %void None %23
%158 = OpLabel %156 = OpLabel
%159 = OpLoad %v4float %tint_symbol %157 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %159 OpStore %gl_FragCoord %157
%160 = OpFunctionCall %void %main_1 %158 = OpFunctionCall %void %main_1
%162 = OpLoad %v4float %x_GLF_color %160 = OpLoad %v4float %x_GLF_color
%163 = OpCompositeConstruct %main_out %162 %161 = OpCompositeConstruct %main_out %160
%161 = OpFunctionCall %void %tint_symbol_3 %163 %159 = OpFunctionCall %void %tint_symbol_3 %161
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -68,7 +68,7 @@ fn main_1() {
let x_101 : i32 = x_10.x_GLF_uniform_int_values[1]; let x_101 : i32 = x_10.x_GLF_uniform_int_values[1];
let x_104 : i32 = x_10.x_GLF_uniform_int_values[0]; let x_104 : i32 = x_10.x_GLF_uniform_int_values[0];
let x_108 : mat2x3<f32> = mat2x3<f32>(vec3<f32>(f32(x_89), f32(x_92), f32(x_95)), vec3<f32>(f32(x_98), f32(x_101), f32(x_104))); let x_108 : mat2x3<f32> = mat2x3<f32>(vec3<f32>(f32(x_89), f32(x_92), f32(x_95)), vec3<f32>(f32(x_98), f32(x_101), f32(x_104)));
if ((all((x_87[0u] == x_108[0u])) && all((x_87[1u] == x_108[1u])))) { if ((all((x_87[0u] == x_108[0u])) & all((x_87[1u] == x_108[1u])))) {
let x_122 : i32 = x_10.x_GLF_uniform_int_values[0]; let x_122 : i32 = x_10.x_GLF_uniform_int_values[0];
let x_125 : i32 = x_10.x_GLF_uniform_int_values[1]; let x_125 : i32 = x_10.x_GLF_uniform_int_values[1];
let x_128 : i32 = x_10.x_GLF_uniform_int_values[1]; let x_128 : i32 = x_10.x_GLF_uniform_int_values[1];

View File

@ -14,11 +14,7 @@ void main_1() {
const int x_38 = asint(x_6[scalar_offset_1 / 4][scalar_offset_1 % 4]); const int x_38 = asint(x_6[scalar_offset_1 / 4][scalar_offset_1 % 4]);
const float x_39 = float(x_38); const float x_39 = float(x_38);
const float2x2 x_42 = float2x2(float2(x_39, 0.0f), float2(0.0f, x_39)); const float2x2 x_42 = float2x2(float2(x_39, 0.0f), float2(0.0f, x_39));
bool tint_tmp = all((x_36[0u] == x_42[0u])); if ((all((x_36[0u] == x_42[0u])) & all((x_36[1u] == x_42[1u])))) {
if (tint_tmp) {
tint_tmp = all((x_36[1u] == x_42[1u]));
}
if ((tint_tmp)) {
const uint scalar_offset_2 = ((16u * uint(0))) / 4; const uint scalar_offset_2 = ((16u * uint(0))) / 4;
const int x_56 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]); const int x_56 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
const int x_59 = asint(x_6[1].x); const int x_59 = asint(x_6[1].x);

View File

@ -27,7 +27,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) {
int const x_38 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_38 = x_6.x_GLF_uniform_int_values.arr[0].el;
float const x_39 = float(x_38); float const x_39 = float(x_38);
float2x2 const x_42 = float2x2(float2(x_39, 0.0f), float2(0.0f, x_39)); float2x2 const x_42 = float2x2(float2(x_39, 0.0f), float2(0.0f, x_39));
if ((all((x_36[0u] == x_42[0u])) && all((x_36[1u] == x_42[1u])))) { if ((all((x_36[0u] == x_42[0u])) & all((x_36[1u] == x_42[1u])))) {
int const x_56 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_56 = x_6.x_GLF_uniform_int_values.arr[0].el;
int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el;
int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el;

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 90 ; Bound: 88
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -56,7 +56,7 @@
%uint_1 = OpConstant %uint 1 %uint_1 = OpConstant %uint 1
%int_1 = OpConstant %int 1 %int_1 = OpConstant %int 1
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%78 = OpTypeFunction %void %main_out %76 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15 %main_1 = OpFunction %void None %15
%18 = OpLabel %18 = OpLabel
%m = OpVariable %_ptr_Function_mat2v2float Function %23 %m = OpVariable %_ptr_Function_mat2v2float Function %23
@ -80,56 +80,51 @@
%46 = OpCompositeExtract %v2float %42 0 %46 = OpCompositeExtract %v2float %42 0
%47 = OpFOrdEqual %v2bool %45 %46 %47 = OpFOrdEqual %v2bool %45 %46
%43 = OpAll %bool %47 %43 = OpAll %bool %47
OpSelectionMerge %49 None %51 = OpCompositeExtract %v2float %36 1
OpBranchConditional %43 %50 %49 %52 = OpCompositeExtract %v2float %42 1
%50 = OpLabel %53 = OpFOrdEqual %v2bool %51 %52
%53 = OpCompositeExtract %v2float %36 1 %49 = OpAll %bool %53
%54 = OpCompositeExtract %v2float %42 1 %54 = OpLogicalAnd %bool %43 %49
%55 = OpFOrdEqual %v2bool %53 %54 OpSelectionMerge %55 None
%51 = OpAll %bool %55 OpBranchConditional %54 %56 %57
OpBranch %49 %56 = OpLabel
%49 = OpLabel %58 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%56 = OpPhi %bool %43 %18 %51 %50 %59 = OpLoad %int %58
OpSelectionMerge %57 None %61 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
OpBranchConditional %56 %58 %59 %62 = OpLoad %int %61
%58 = OpLabel
%60 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%61 = OpLoad %int %60
%63 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1 %63 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%64 = OpLoad %int %63 %64 = OpLoad %int %63
%65 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1 %65 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%66 = OpLoad %int %65 %66 = OpLoad %int %65
%67 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0 %67 = OpConvertSToF %float %59
%68 = OpLoad %int %67 %68 = OpConvertSToF %float %62
%69 = OpConvertSToF %float %61 %69 = OpConvertSToF %float %64
%70 = OpConvertSToF %float %64 %70 = OpConvertSToF %float %66
%71 = OpConvertSToF %float %66 %71 = OpCompositeConstruct %v4float %67 %68 %69 %70
%72 = OpConvertSToF %float %68 OpStore %x_GLF_color %71
%73 = OpCompositeConstruct %v4float %69 %70 %71 %72 OpBranch %55
OpStore %x_GLF_color %73
OpBranch %57
%59 = OpLabel
%74 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%75 = OpLoad %int %74
%76 = OpConvertSToF %float %75
%77 = OpCompositeConstruct %v4float %76 %76 %76 %76
OpStore %x_GLF_color %77
OpBranch %57
%57 = OpLabel %57 = OpLabel
%72 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%73 = OpLoad %int %72
%74 = OpConvertSToF %float %73
%75 = OpCompositeConstruct %v4float %74 %74 %74 %74
OpStore %x_GLF_color %75
OpBranch %55
%55 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %78 %tint_symbol_2 = OpFunction %void None %76
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%82 = OpLabel %80 = OpLabel
%83 = OpCompositeExtract %v4float %tint_symbol 0 %81 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %83 OpStore %tint_symbol_1 %81
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %15 %main = OpFunction %void None %15
%85 = OpLabel %83 = OpLabel
%86 = OpFunctionCall %void %main_1 %84 = OpFunctionCall %void %main_1
%88 = OpLoad %v4float %x_GLF_color %86 = OpLoad %v4float %x_GLF_color
%89 = OpCompositeConstruct %main_out %88 %87 = OpCompositeConstruct %main_out %86
%87 = OpFunctionCall %void %tint_symbol_2 %89 %85 = OpFunctionCall %void %tint_symbol_2 %87
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -18,7 +18,7 @@ fn main_1() {
let x_38 : i32 = x_6.x_GLF_uniform_int_values[0]; let x_38 : i32 = x_6.x_GLF_uniform_int_values[0];
let x_39 : f32 = f32(x_38); let x_39 : f32 = f32(x_38);
let x_42 : mat2x2<f32> = mat2x2<f32>(vec2<f32>(x_39, 0.0), vec2<f32>(0.0, x_39)); let x_42 : mat2x2<f32> = mat2x2<f32>(vec2<f32>(x_39, 0.0), vec2<f32>(0.0, x_39));
if ((all((x_36[0u] == x_42[0u])) && all((x_36[1u] == x_42[1u])))) { if ((all((x_36[0u] == x_42[0u])) & all((x_36[1u] == x_42[1u])))) {
let x_56 : i32 = x_6.x_GLF_uniform_int_values[0]; let x_56 : i32 = x_6.x_GLF_uniform_int_values[0];
let x_59 : i32 = x_6.x_GLF_uniform_int_values[1]; let x_59 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_62 : i32 = x_6.x_GLF_uniform_int_values[1]; let x_62 : i32 = x_6.x_GLF_uniform_int_values[1];

View File

@ -97,19 +97,7 @@ void main_1() {
const uint scalar_offset_8 = ((16u * uint(0))) / 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 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))); 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 ((((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])))) {
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 int x_107 = asint(x_16[3].x);
const uint scalar_offset_9 = ((16u * uint(0))) / 4; 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 int x_110 = asint(x_16[scalar_offset_9 / 4][scalar_offset_9 % 4]);

View File

@ -107,7 +107,7 @@ void main_1(constant buf2& x_10, constant buf0& x_12, constant buf1& x_16, threa
int const x_74 = 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; 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))); 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])))) { 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_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_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_113 = x_16.x_GLF_uniform_int_values.arr[0].el;

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 214 ; Bound: 208
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
%92 = OpExtInstImport "GLSL.std.450" %92 = OpExtInstImport "GLSL.std.450"
@ -110,7 +110,7 @@
%uint_2 = OpConstant %uint 2 %uint_2 = OpConstant %uint 2
%uint_3 = OpConstant %uint 3 %uint_3 = OpConstant %uint 3
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%201 = OpTypeFunction %void %main_out %195 = OpTypeFunction %void %main_out
%func0_i1_ = OpFunction %void None %31 %func0_i1_ = OpFunction %void None %31
%x = OpFunctionParameter %_ptr_Function_int %x = OpFunctionParameter %_ptr_Function_int
%36 = OpLabel %36 = OpLabel
@ -252,78 +252,63 @@
%155 = OpCompositeExtract %v2float %152 0 %155 = OpCompositeExtract %v2float %152 0
%156 = OpFOrdEqual %v2bool %154 %155 %156 = OpFOrdEqual %v2bool %154 %155
%153 = OpAll %bool %156 %153 = OpAll %bool %156
OpSelectionMerge %158 None %159 = OpCompositeExtract %v2float %122 1
OpBranchConditional %153 %159 %158 %160 = OpCompositeExtract %v2float %152 1
%159 = OpLabel %161 = OpFOrdEqual %v2bool %159 %160
%161 = OpCompositeExtract %v2float %122 1 %158 = OpAll %bool %161
%162 = OpCompositeExtract %v2float %152 1 %162 = OpLogicalAnd %bool %153 %158
%163 = OpFOrdEqual %v2bool %161 %162 %165 = OpCompositeExtract %v2float %122 2
%160 = OpAll %bool %163 %166 = OpCompositeExtract %v2float %152 2
OpBranch %158 %167 = OpFOrdEqual %v2bool %165 %166
%158 = OpLabel %163 = OpAll %bool %167
%164 = OpPhi %bool %153 %117 %160 %159 %168 = OpLogicalAnd %bool %162 %163
OpSelectionMerge %165 None %171 = OpCompositeExtract %v2float %122 3
OpBranchConditional %164 %166 %165 %172 = OpCompositeExtract %v2float %152 3
%166 = OpLabel %173 = OpFOrdEqual %v2bool %171 %172
%169 = OpCompositeExtract %v2float %122 2 %169 = OpAll %bool %173
%170 = OpCompositeExtract %v2float %152 2 %174 = OpLogicalAnd %bool %168 %169
%171 = OpFOrdEqual %v2bool %169 %170 OpSelectionMerge %175 None
%167 = OpAll %bool %171 OpBranchConditional %174 %176 %177
OpBranch %165 %176 = OpLabel
%165 = OpLabel %178 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_3
%172 = OpPhi %bool %164 %158 %167 %166 %179 = OpLoad %int %178
OpSelectionMerge %173 None %180 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
OpBranchConditional %172 %174 %173 %181 = OpLoad %int %180
%174 = OpLabel %182 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
%177 = OpCompositeExtract %v2float %122 3 %183 = OpLoad %int %182
%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 %184 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_3
%185 = OpLoad %int %184 %185 = OpLoad %int %184
%186 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0 %186 = OpConvertSToF %float %179
%187 = OpLoad %int %186 %187 = OpConvertSToF %float %181
%188 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0 %188 = OpConvertSToF %float %183
%189 = OpLoad %int %188 %189 = OpConvertSToF %float %185
%190 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_3 %190 = OpCompositeConstruct %v4float %186 %187 %188 %189
%191 = OpLoad %int %190 OpStore %x_GLF_color %190
%192 = OpConvertSToF %float %185 OpBranch %175
%193 = OpConvertSToF %float %187 %177 = OpLabel
%194 = OpConvertSToF %float %189 %191 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
%195 = OpConvertSToF %float %191 %192 = OpLoad %int %191
%196 = OpCompositeConstruct %v4float %192 %193 %194 %195 %193 = OpConvertSToF %float %192
OpStore %x_GLF_color %196 %194 = OpCompositeConstruct %v4float %193 %193 %193 %193
OpBranch %181 OpStore %x_GLF_color %194
%183 = OpLabel OpBranch %175
%197 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0 %175 = OpLabel
%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 OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %201 %tint_symbol_3 = OpFunction %void None %195
%tint_symbol_1 = OpFunctionParameter %main_out %tint_symbol_1 = OpFunctionParameter %main_out
%205 = OpLabel %199 = OpLabel
%206 = OpCompositeExtract %v4float %tint_symbol_1 0 %200 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %206 OpStore %tint_symbol_2 %200
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %104 %main = OpFunction %void None %104
%208 = OpLabel %202 = OpLabel
%209 = OpLoad %v4float %tint_symbol %203 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %209 OpStore %gl_FragCoord %203
%210 = OpFunctionCall %void %main_1 %204 = OpFunctionCall %void %main_1
%212 = OpLoad %v4float %x_GLF_color %206 = OpLoad %v4float %x_GLF_color
%213 = OpCompositeConstruct %main_out %212 %207 = OpCompositeConstruct %main_out %206
%211 = OpFunctionCall %void %tint_symbol_3 %213 %205 = OpFunctionCall %void %tint_symbol_3 %207
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -106,7 +106,7 @@ fn main_1() {
let x_74 : 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_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))); 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])))) { 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_107 : i32 = x_16.x_GLF_uniform_int_values[3];
let x_110 : i32 = x_16.x_GLF_uniform_int_values[0]; 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_113 : i32 = x_16.x_GLF_uniform_int_values[0];

View File

@ -12,11 +12,7 @@ void main_1() {
c = pow(a, b); c = pow(a, b);
const float x_30 = c; const float x_30 = c;
x_GLF_color = float4(x_30, x_30, x_30, x_30); x_GLF_color = float4(x_30, x_30, x_30, x_30);
bool tint_tmp = (a == -1.0f); if (((a == -1.0f) & (b == 1.700000048f))) {
if (tint_tmp) {
tint_tmp = (b == 1.700000048f);
}
if ((tint_tmp)) {
const uint scalar_offset = ((16u * uint(0))) / 4; const uint scalar_offset = ((16u * uint(0))) / 4;
const float x_41 = asfloat(x_8[scalar_offset / 4][scalar_offset % 4]); const float x_41 = asfloat(x_8[scalar_offset / 4][scalar_offset % 4]);
const float x_43 = asfloat(x_8[1].x); const float x_43 = asfloat(x_8[1].x);

View File

@ -31,7 +31,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
*(tint_symbol_4) = float4(x_30, x_30, x_30, x_30); *(tint_symbol_4) = float4(x_30, x_30, x_30, x_30);
float const x_32 = a; float const x_32 = a;
float const x_34 = b; float const x_34 = b;
if (((x_32 == -1.0f) && (x_34 == 1.700000048f))) { if (((x_32 == -1.0f) & (x_34 == 1.700000048f))) {
float const x_41 = x_8.x_GLF_uniform_float_values.arr[0].el; float const x_41 = x_8.x_GLF_uniform_float_values.arr[0].el;
float const x_43 = x_8.x_GLF_uniform_float_values.arr[1].el; float const x_43 = x_8.x_GLF_uniform_float_values.arr[1].el;
float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el; float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el;

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 71 ; Bound: 69
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
%28 = OpExtInstImport "GLSL.std.450" %28 = OpExtInstImport "GLSL.std.450"
@ -56,7 +56,7 @@
%_ptr_Uniform_float = OpTypePointer Uniform %float %_ptr_Uniform_float = OpTypePointer Uniform %float
%int_1 = OpConstant %int 1 %int_1 = OpConstant %int 1
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%59 = OpTypeFunction %void %main_out %57 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %14 %main_1 = OpFunction %void None %14
%17 = OpLabel %17 = OpLabel
%a = OpVariable %_ptr_Function_float Function %20 %a = OpVariable %_ptr_Function_float Function %20
@ -74,48 +74,43 @@
%31 = OpLoad %float %a %31 = OpLoad %float %a
%32 = OpLoad %float %b %32 = OpLoad %float %b
%33 = OpFOrdEqual %bool %31 %float_n1 %33 = OpFOrdEqual %bool %31 %float_n1
OpSelectionMerge %35 None %35 = OpFOrdEqual %bool %32 %float_1_70000005
OpBranchConditional %33 %36 %35 %36 = OpLogicalAnd %bool %33 %35
%36 = OpLabel OpSelectionMerge %37 None
%37 = OpFOrdEqual %bool %32 %float_1_70000005 OpBranchConditional %36 %38 %39
OpBranch %35 %38 = OpLabel
%35 = OpLabel %44 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%38 = OpPhi %bool %33 %17 %37 %36 %45 = OpLoad %float %44
OpSelectionMerge %39 None %47 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
OpBranchConditional %38 %40 %41 %48 = OpLoad %float %47
%40 = OpLabel
%46 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%47 = OpLoad %float %46
%49 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1 %49 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
%50 = OpLoad %float %49 %50 = OpLoad %float %49
%51 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1 %51 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%52 = OpLoad %float %51 %52 = OpLoad %float %51
%53 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0 %53 = OpCompositeConstruct %v4float %45 %48 %50 %52
%54 = OpLoad %float %53 OpStore %x_GLF_color %53
%55 = OpCompositeConstruct %v4float %47 %50 %52 %54 OpBranch %37
OpStore %x_GLF_color %55
OpBranch %39
%41 = OpLabel
%56 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%57 = OpLoad %float %56
%58 = OpCompositeConstruct %v4float %57 %57 %57 %57
OpStore %x_GLF_color %58
OpBranch %39
%39 = OpLabel %39 = OpLabel
%54 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%55 = OpLoad %float %54
%56 = OpCompositeConstruct %v4float %55 %55 %55 %55
OpStore %x_GLF_color %56
OpBranch %37
%37 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %59 %tint_symbol_2 = OpFunction %void None %57
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%63 = OpLabel %61 = OpLabel
%64 = OpCompositeExtract %v4float %tint_symbol 0 %62 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %64 OpStore %tint_symbol_1 %62
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %14 %main = OpFunction %void None %14
%66 = OpLabel %64 = OpLabel
%67 = OpFunctionCall %void %main_1 %65 = OpFunctionCall %void %main_1
%69 = OpLoad %v4float %x_GLF_color %67 = OpLoad %v4float %x_GLF_color
%70 = OpCompositeConstruct %main_out %69 %68 = OpCompositeConstruct %main_out %67
%68 = OpFunctionCall %void %tint_symbol_2 %70 %66 = OpFunctionCall %void %tint_symbol_2 %68
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -22,7 +22,7 @@ fn main_1() {
x_GLF_color = vec4<f32>(x_30, x_30, x_30, x_30); x_GLF_color = vec4<f32>(x_30, x_30, x_30, x_30);
let x_32 : f32 = a; let x_32 : f32 = a;
let x_34 : f32 = b; let x_34 : f32 = b;
if (((x_32 == -1.0) && (x_34 == 1.700000048))) { if (((x_32 == -1.0) & (x_34 == 1.700000048))) {
let x_41 : f32 = x_8.x_GLF_uniform_float_values[0]; let x_41 : f32 = x_8.x_GLF_uniform_float_values[0];
let x_43 : f32 = x_8.x_GLF_uniform_float_values[1]; let x_43 : f32 = x_8.x_GLF_uniform_float_values[1];
let x_45 : f32 = x_8.x_GLF_uniform_float_values[1]; let x_45 : f32 = x_8.x_GLF_uniform_float_values[1];

View File

@ -19,11 +19,7 @@ void main_1() {
break; break;
} }
const int x_10 = x_10_phi; const int x_10 = x_10_phi;
bool tint_tmp = (x_10 == 1); if (((x_10 == 1) | (x_10 == 2))) {
if (!tint_tmp) {
tint_tmp = (x_10 == 2);
}
if ((tint_tmp)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f); x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -31,7 +31,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
break; break;
} }
int const x_10 = x_10_phi; int const x_10 = x_10_phi;
if (((x_10 == 1) || (x_10 == 2))) { if (((x_10 == 1) | (x_10 == 2))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 68 ; Bound: 66
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -56,9 +56,9 @@
%int_1 = OpConstant %int 1 %int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2 %int_2 = OpConstant %int 2
%float_1 = OpConstant %float 1 %float_1 = OpConstant %float 1
%55 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %53 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%56 = OpTypeFunction %void %main_out %54 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %12 %main_1 = OpFunction %void None %12
%15 = OpLabel %15 = OpLabel
%x_9 = OpVariable %_ptr_Function__arr_int_uint_1 Function %21 %x_9 = OpVariable %_ptr_Function__arr_int_uint_1 Function %21
@ -89,36 +89,31 @@
%29 = OpLabel %29 = OpLabel
%45 = OpLoad %int %x_10_phi %45 = OpLoad %int %x_10_phi
%46 = OpIEqual %bool %45 %int_1 %46 = OpIEqual %bool %45 %int_1
OpSelectionMerge %47 None %47 = OpIEqual %bool %45 %int_2
OpBranchConditional %46 %47 %48 %48 = OpLogicalOr %bool %46 %47
%48 = OpLabel OpSelectionMerge %49 None
%49 = OpIEqual %bool %45 %int_2 OpBranchConditional %48 %50 %51
OpBranch %47 %50 = OpLabel
%47 = OpLabel OpStore %x_GLF_color %53
%50 = OpPhi %bool %46 %29 %49 %48 OpBranch %49
OpSelectionMerge %51 None
OpBranchConditional %50 %52 %53
%52 = OpLabel
OpStore %x_GLF_color %55
OpBranch %51
%53 = OpLabel
OpStore %x_GLF_color %33
OpBranch %51
%51 = OpLabel %51 = OpLabel
OpStore %x_GLF_color %33
OpBranch %49
%49 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %56 %tint_symbol_2 = OpFunction %void None %54
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%60 = OpLabel %58 = OpLabel
%61 = OpCompositeExtract %v4float %tint_symbol 0 %59 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %61 OpStore %tint_symbol_1 %59
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %12 %main = OpFunction %void None %12
%63 = OpLabel %61 = OpLabel
%64 = OpFunctionCall %void %main_1 %62 = OpFunctionCall %void %main_1
%66 = OpLoad %v4float %x_GLF_color %64 = OpLoad %v4float %x_GLF_color
%67 = OpCompositeConstruct %main_out %66 %65 = OpCompositeConstruct %main_out %64
%65 = OpFunctionCall %void %tint_symbol_2 %67 %63 = OpFunctionCall %void %tint_symbol_2 %65
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -24,7 +24,7 @@ fn main_1() {
break; break;
} }
let x_10 : i32 = x_10_phi; let x_10 : i32 = x_10_phi;
if (((x_10 == 1) || (x_10 == 2))) { if (((x_10 == 1) | (x_10 == 2))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0); x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else { } else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0); x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);

View File

@ -58,11 +58,7 @@ void main_1() {
const int x_88 = asint(x_5[scalar_offset_3 / 4][scalar_offset_3 % 4]); const int x_88 = asint(x_5[scalar_offset_3 / 4][scalar_offset_3 % 4]);
const int x_91 = asint(x_5[3].x); const int x_91 = asint(x_5[3].x);
const float2x2 x_95 = float2x2(float2(float(x_82), float(x_85)), float2(float(x_88), float(x_91))); const float2x2 x_95 = float2x2(float2(float(x_82), float(x_85)), float2(float(x_88), float(x_91)));
bool tint_tmp = all((x_80[0u] == x_95[0u])); if ((all((x_80[0u] == x_95[0u])) & all((x_80[1u] == x_95[1u])))) {
if (tint_tmp) {
tint_tmp = all((x_80[1u] == x_95[1u]));
}
if ((tint_tmp)) {
const int x_109 = asint(x_5[2].x); const int x_109 = asint(x_5[2].x);
const int x_112 = asint(x_5[1].x); const int x_112 = asint(x_5[1].x);
const int x_115 = asint(x_5[1].x); const int x_115 = asint(x_5[1].x);

View File

@ -68,7 +68,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
int const x_88 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_88 = x_5.x_GLF_uniform_int_values.arr[0].el;
int const x_91 = x_5.x_GLF_uniform_int_values.arr[3].el; int const x_91 = x_5.x_GLF_uniform_int_values.arr[3].el;
float2x2 const x_95 = float2x2(float2(float(x_82), float(x_85)), float2(float(x_88), float(x_91))); float2x2 const x_95 = float2x2(float2(float(x_82), float(x_85)), float2(float(x_88), float(x_91)));
if ((all((x_80[0u] == x_95[0u])) && all((x_80[1u] == x_95[1u])))) { if ((all((x_80[0u] == x_95[0u])) & all((x_80[1u] == x_95[1u])))) {
int const x_109 = x_5.x_GLF_uniform_int_values.arr[2].el; int const x_109 = x_5.x_GLF_uniform_int_values.arr[2].el;
int const x_112 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_112 = x_5.x_GLF_uniform_int_values.arr[1].el;
int const x_115 = x_5.x_GLF_uniform_int_values.arr[1].el; int const x_115 = x_5.x_GLF_uniform_int_values.arr[1].el;

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 149 ; Bound: 147
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -65,7 +65,7 @@
%v2bool = OpTypeVector %bool 2 %v2bool = OpTypeVector %bool 2
%uint_1 = OpConstant %uint 1 %uint_1 = OpConstant %uint 1
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%137 = OpTypeFunction %void %main_out %135 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15 %main_1 = OpFunction %void None %15
%18 = OpLabel %18 = OpLabel
%m = OpVariable %_ptr_Function_mat2v2float Function %23 %m = OpVariable %_ptr_Function_mat2v2float Function %23
@ -168,56 +168,51 @@
%106 = OpCompositeExtract %v2float %103 0 %106 = OpCompositeExtract %v2float %103 0
%107 = OpFOrdEqual %v2bool %105 %106 %107 = OpFOrdEqual %v2bool %105 %106
%104 = OpAll %bool %107 %104 = OpAll %bool %107
OpSelectionMerge %109 None %111 = OpCompositeExtract %v2float %86 1
OpBranchConditional %104 %110 %109 %112 = OpCompositeExtract %v2float %103 1
%110 = OpLabel %113 = OpFOrdEqual %v2bool %111 %112
%113 = OpCompositeExtract %v2float %86 1 %109 = OpAll %bool %113
%114 = OpCompositeExtract %v2float %103 1 %114 = OpLogicalAnd %bool %104 %109
%115 = OpFOrdEqual %v2bool %113 %114 OpSelectionMerge %115 None
%111 = OpAll %bool %115 OpBranchConditional %114 %116 %117
OpBranch %109 %116 = OpLabel
%109 = OpLabel %118 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_2
%116 = OpPhi %bool %104 %48 %111 %110 %119 = OpLoad %int %118
OpSelectionMerge %117 None %120 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
OpBranchConditional %116 %118 %119
%118 = OpLabel
%120 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_2
%121 = OpLoad %int %120 %121 = OpLoad %int %120
%122 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1 %122 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
%123 = OpLoad %int %122 %123 = OpLoad %int %122
%124 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1 %124 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_2
%125 = OpLoad %int %124 %125 = OpLoad %int %124
%126 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_2 %126 = OpConvertSToF %float %119
%127 = OpLoad %int %126 %127 = OpConvertSToF %float %121
%128 = OpConvertSToF %float %121 %128 = OpConvertSToF %float %123
%129 = OpConvertSToF %float %123 %129 = OpConvertSToF %float %125
%130 = OpConvertSToF %float %125 %130 = OpCompositeConstruct %v4float %126 %127 %128 %129
%131 = OpConvertSToF %float %127 OpStore %x_GLF_color %130
%132 = OpCompositeConstruct %v4float %128 %129 %130 %131 OpBranch %115
OpStore %x_GLF_color %132
OpBranch %117
%119 = OpLabel
%133 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
%134 = OpLoad %int %133
%135 = OpConvertSToF %float %134
%136 = OpCompositeConstruct %v4float %135 %135 %135 %135
OpStore %x_GLF_color %136
OpBranch %117
%117 = OpLabel %117 = OpLabel
%131 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
%132 = OpLoad %int %131
%133 = OpConvertSToF %float %132
%134 = OpCompositeConstruct %v4float %133 %133 %133 %133
OpStore %x_GLF_color %134
OpBranch %115
%115 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %137 %tint_symbol_2 = OpFunction %void None %135
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%141 = OpLabel %139 = OpLabel
%142 = OpCompositeExtract %v4float %tint_symbol 0 %140 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %142 OpStore %tint_symbol_1 %140
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %15 %main = OpFunction %void None %15
%144 = OpLabel %142 = OpLabel
%145 = OpFunctionCall %void %main_1 %143 = OpFunctionCall %void %main_1
%147 = OpLoad %v4float %x_GLF_color %145 = OpLoad %v4float %x_GLF_color
%148 = OpCompositeConstruct %main_out %147 %146 = OpCompositeConstruct %main_out %145
%146 = OpFunctionCall %void %tint_symbol_2 %148 %144 = OpFunctionCall %void %tint_symbol_2 %146
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -61,7 +61,7 @@ fn main_1() {
let x_88 : i32 = x_5.x_GLF_uniform_int_values[0]; let x_88 : i32 = x_5.x_GLF_uniform_int_values[0];
let x_91 : i32 = x_5.x_GLF_uniform_int_values[3]; let x_91 : i32 = x_5.x_GLF_uniform_int_values[3];
let x_95 : mat2x2<f32> = mat2x2<f32>(vec2<f32>(f32(x_82), f32(x_85)), vec2<f32>(f32(x_88), f32(x_91))); let x_95 : mat2x2<f32> = mat2x2<f32>(vec2<f32>(f32(x_82), f32(x_85)), vec2<f32>(f32(x_88), f32(x_91)));
if ((all((x_80[0u] == x_95[0u])) && all((x_80[1u] == x_95[1u])))) { if ((all((x_80[0u] == x_95[0u])) & all((x_80[1u] == x_95[1u])))) {
let x_109 : i32 = x_5.x_GLF_uniform_int_values[2]; let x_109 : i32 = x_5.x_GLF_uniform_int_values[2];
let x_112 : i32 = x_5.x_GLF_uniform_int_values[1]; let x_112 : i32 = x_5.x_GLF_uniform_int_values[1];
let x_115 : i32 = x_5.x_GLF_uniform_int_values[1]; let x_115 : i32 = x_5.x_GLF_uniform_int_values[1];

View File

@ -11,11 +11,7 @@ void main_1() {
a = ddx(cos(x_33)); a = ddx(cos(x_33));
const float x_37 = asfloat(x_8[0].x); const float x_37 = asfloat(x_8[0].x);
b = lerp(2.0f, x_37, a); b = lerp(2.0f, x_37, a);
bool tint_tmp = (b >= 1.899999976f); if (((b >= 1.899999976f) & (b <= 2.099999905f))) {
if (tint_tmp) {
tint_tmp = (b <= 2.099999905f);
}
if ((tint_tmp)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f); x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -21,7 +21,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float
b = mix(2.0f, x_37, x_38); b = mix(2.0f, x_37, x_38);
float const x_40 = b; float const x_40 = b;
float const x_42 = b; float const x_42 = b;
if (((x_40 >= 1.899999976f) && (x_42 <= 2.099999905f))) { if (((x_40 >= 1.899999976f) & (x_42 <= 2.099999905f))) {
*(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f); *(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
*(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f); *(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 66 ; Bound: 64
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
%29 = OpExtInstImport "GLSL.std.450" %29 = OpExtInstImport "GLSL.std.450"
@ -58,10 +58,10 @@
%float_2_0999999 = OpConstant %float 2.0999999 %float_2_0999999 = OpConstant %float 2.0999999
%float_1 = OpConstant %float 1 %float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0 %float_0 = OpConstant %float 0
%51 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %49 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%52 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %50 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%53 = OpTypeFunction %void %main_out %51 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %14 %main_1 = OpFunction %void None %14
%17 = OpLabel %17 = OpLabel
%a = OpVariable %_ptr_Function_float Function %20 %a = OpVariable %_ptr_Function_float Function %20
@ -79,38 +79,33 @@
%36 = OpLoad %float %b %36 = OpLoad %float %b
%37 = OpLoad %float %b %37 = OpLoad %float %b
%39 = OpFOrdGreaterThanEqual %bool %36 %float_1_89999998 %39 = OpFOrdGreaterThanEqual %bool %36 %float_1_89999998
OpSelectionMerge %41 None %42 = OpFOrdLessThanEqual %bool %37 %float_2_0999999
OpBranchConditional %39 %42 %41 %43 = OpLogicalAnd %bool %39 %42
%42 = OpLabel OpSelectionMerge %44 None
%44 = OpFOrdLessThanEqual %bool %37 %float_2_0999999 OpBranchConditional %43 %45 %46
OpBranch %41 %45 = OpLabel
%41 = OpLabel OpStore %x_GLF_color %49
%45 = OpPhi %bool %39 %17 %44 %42 OpBranch %44
OpSelectionMerge %46 None
OpBranchConditional %45 %47 %48
%47 = OpLabel
OpStore %x_GLF_color %51
OpBranch %46
%48 = OpLabel
OpStore %x_GLF_color %52
OpBranch %46
%46 = OpLabel %46 = OpLabel
OpStore %x_GLF_color %50
OpBranch %44
%44 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %53 %tint_symbol_3 = OpFunction %void None %51
%tint_symbol_1 = OpFunctionParameter %main_out %tint_symbol_1 = OpFunctionParameter %main_out
%57 = OpLabel %55 = OpLabel
%58 = OpCompositeExtract %v4float %tint_symbol_1 0 %56 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %58 OpStore %tint_symbol_2 %56
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %14 %main = OpFunction %void None %14
%60 = OpLabel %58 = OpLabel
%61 = OpLoad %v4float %tint_symbol %59 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %61 OpStore %gl_FragCoord %59
%62 = OpFunctionCall %void %main_1 %60 = OpFunctionCall %void %main_1
%64 = OpLoad %v4float %x_GLF_color %62 = OpLoad %v4float %x_GLF_color
%65 = OpCompositeConstruct %main_out %64 %63 = OpCompositeConstruct %main_out %62
%63 = OpFunctionCall %void %tint_symbol_3 %65 %61 = OpFunctionCall %void %tint_symbol_3 %63
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -19,7 +19,7 @@ fn main_1() {
b = mix(2.0, x_37, x_38); b = mix(2.0, x_37, x_38);
let x_40 : f32 = b; let x_40 : f32 = b;
let x_42 : f32 = b; let x_42 : f32 = b;
if (((x_40 >= 1.899999976) && (x_42 <= 2.099999905))) { if (((x_40 >= 1.899999976) & (x_42 <= 2.099999905))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0); x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else { } else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0); x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);

View File

@ -5,11 +5,7 @@ void main_1() {
m = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)); m = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f));
const float2x2 x_30 = mul(transpose(m), transpose(m)); const float2x2 x_30 = mul(transpose(m), transpose(m));
const float2x2 x_34 = transpose(mul(m, m)); const float2x2 x_34 = transpose(mul(m, m));
bool tint_tmp = all((x_30[0u] == x_34[0u])); if ((all((x_30[0u] == x_34[0u])) & all((x_30[1u] == x_34[1u])))) {
if (tint_tmp) {
tint_tmp = all((x_30[1u] == x_34[1u]));
}
if ((tint_tmp)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f); x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -17,7 +17,7 @@ void main_1(thread float4* const tint_symbol_4) {
float2x2 const x_31 = m; float2x2 const x_31 = m;
float2x2 const x_32 = m; float2x2 const x_32 = m;
float2x2 const x_34 = transpose((x_31 * x_32)); float2x2 const x_34 = transpose((x_31 * x_32));
if ((all((x_30[0u] == x_34[0u])) && all((x_30[1u] == x_34[1u])))) { if ((all((x_30[0u] == x_34[0u])) & all((x_30[1u] == x_34[1u])))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else { } else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 67 ; Bound: 65
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -44,10 +44,10 @@
%v2bool = OpTypeVector %bool 2 %v2bool = OpTypeVector %bool 2
%uint_1 = OpConstant %uint 1 %uint_1 = OpConstant %uint 1
%float_0 = OpConstant %float 0 %float_0 = OpConstant %float 0
%53 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %51 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%54 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %52 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%55 = OpTypeFunction %void %main_out %53 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8 %main_1 = OpFunction %void None %8
%11 = OpLabel %11 = OpLabel
%m = OpVariable %_ptr_Function_mat2v2float Function %16 %m = OpVariable %_ptr_Function_mat2v2float Function %16
@ -65,39 +65,34 @@
%38 = OpCompositeExtract %v2float %31 0 %38 = OpCompositeExtract %v2float %31 0
%39 = OpFOrdEqual %v2bool %37 %38 %39 = OpFOrdEqual %v2bool %37 %38
%33 = OpAll %bool %39 %33 = OpAll %bool %39
OpSelectionMerge %41 None %43 = OpCompositeExtract %v2float %28 1
OpBranchConditional %33 %42 %41 %44 = OpCompositeExtract %v2float %31 1
%42 = OpLabel %45 = OpFOrdEqual %v2bool %43 %44
%45 = OpCompositeExtract %v2float %28 1 %41 = OpAll %bool %45
%46 = OpCompositeExtract %v2float %31 1 %46 = OpLogicalAnd %bool %33 %41
%47 = OpFOrdEqual %v2bool %45 %46 OpSelectionMerge %47 None
%43 = OpAll %bool %47 OpBranchConditional %46 %48 %49
OpBranch %41 %48 = OpLabel
%41 = OpLabel OpStore %x_GLF_color %51
%48 = OpPhi %bool %33 %11 %43 %42 OpBranch %47
OpSelectionMerge %49 None
OpBranchConditional %48 %50 %51
%50 = OpLabel
OpStore %x_GLF_color %53
OpBranch %49
%51 = OpLabel
OpStore %x_GLF_color %54
OpBranch %49
%49 = OpLabel %49 = OpLabel
OpStore %x_GLF_color %52
OpBranch %47
%47 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %55 %tint_symbol_2 = OpFunction %void None %53
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%59 = OpLabel %57 = OpLabel
%60 = OpCompositeExtract %v4float %tint_symbol 0 %58 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %60 OpStore %tint_symbol_1 %58
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %8 %main = OpFunction %void None %8
%62 = OpLabel %60 = OpLabel
%63 = OpFunctionCall %void %main_1 %61 = OpFunctionCall %void %main_1
%65 = OpLoad %v4float %x_GLF_color %63 = OpLoad %v4float %x_GLF_color
%66 = OpCompositeConstruct %main_out %65 %64 = OpCompositeConstruct %main_out %63
%64 = OpFunctionCall %void %tint_symbol_2 %66 %62 = OpFunctionCall %void %tint_symbol_2 %64
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -9,7 +9,7 @@ fn main_1() {
let x_31 : mat2x2<f32> = m; let x_31 : mat2x2<f32> = m;
let x_32 : mat2x2<f32> = m; let x_32 : mat2x2<f32> = m;
let x_34 : mat2x2<f32> = transpose((x_31 * x_32)); let x_34 : mat2x2<f32> = transpose((x_31 * x_32));
if ((all((x_30[0u] == x_34[0u])) && all((x_30[1u] == x_34[1u])))) { if ((all((x_30[0u] == x_34[0u])) & all((x_30[1u] == x_34[1u])))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0); x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else { } else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0); x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);

View File

@ -62,19 +62,7 @@ void main_1() {
const int x_123 = asint(x_6[1].x); const int x_123 = asint(x_6[1].x);
const int x_126 = asint(x_6[1].x); const int x_126 = asint(x_6[1].x);
const float4x4 x_132 = float4x4(float4(float(x_81), float(x_84), float(x_87), float(x_90)), float4(float(x_93), float(x_96), float(x_99), float(x_102)), float4(float(x_105), float(x_108), float(x_111), float(x_114)), float4(float(x_117), float(x_120), float(x_123), float(x_126))); const float4x4 x_132 = float4x4(float4(float(x_81), float(x_84), float(x_87), float(x_90)), float4(float(x_93), float(x_96), float(x_99), float(x_102)), float4(float(x_105), float(x_108), float(x_111), float(x_114)), float4(float(x_117), float(x_120), float(x_123), float(x_126)));
bool tint_tmp_2 = all((x_79[0u] == x_132[0u])); if ((((all((x_79[0u] == x_132[0u])) & all((x_79[1u] == x_132[1u]))) & all((x_79[2u] == x_132[2u]))) & all((x_79[3u] == x_132[3u])))) {
if (tint_tmp_2) {
tint_tmp_2 = all((x_79[1u] == x_132[1u]));
}
bool tint_tmp_1 = (tint_tmp_2);
if (tint_tmp_1) {
tint_tmp_1 = all((x_79[2u] == x_132[2u]));
}
bool tint_tmp = (tint_tmp_1);
if (tint_tmp) {
tint_tmp = all((x_79[3u] == x_132[3u]));
}
if ((tint_tmp)) {
const int x_156 = asint(x_6[2].x); const int x_156 = asint(x_6[2].x);
const int x_159 = asint(x_6[1].x); const int x_159 = asint(x_6[1].x);
const int x_162 = asint(x_6[1].x); const int x_162 = asint(x_6[1].x);

View File

@ -79,7 +79,7 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s
int const x_123 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_123 = x_6.x_GLF_uniform_int_values.arr[1].el;
int const x_126 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_126 = x_6.x_GLF_uniform_int_values.arr[1].el;
float4x4 const x_132 = float4x4(float4(float(x_81), float(x_84), float(x_87), float(x_90)), float4(float(x_93), float(x_96), float(x_99), float(x_102)), float4(float(x_105), float(x_108), float(x_111), float(x_114)), float4(float(x_117), float(x_120), float(x_123), float(x_126))); float4x4 const x_132 = float4x4(float4(float(x_81), float(x_84), float(x_87), float(x_90)), float4(float(x_93), float(x_96), float(x_99), float(x_102)), float4(float(x_105), float(x_108), float(x_111), float(x_114)), float4(float(x_117), float(x_120), float(x_123), float(x_126)));
if ((((all((x_79[0u] == x_132[0u])) && all((x_79[1u] == x_132[1u]))) && all((x_79[2u] == x_132[2u]))) && all((x_79[3u] == x_132[3u])))) { if ((((all((x_79[0u] == x_132[0u])) & all((x_79[1u] == x_132[1u]))) & all((x_79[2u] == x_132[2u]))) & all((x_79[3u] == x_132[3u])))) {
int const x_156 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_156 = x_6.x_GLF_uniform_int_values.arr[2].el;
int const x_159 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_159 = x_6.x_GLF_uniform_int_values.arr[1].el;
int const x_162 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_162 = x_6.x_GLF_uniform_int_values.arr[1].el;

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 198 ; Bound: 192
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -78,7 +78,7 @@
%uint_2 = OpConstant %uint 2 %uint_2 = OpConstant %uint 2
%uint_3 = OpConstant %uint 3 %uint_3 = OpConstant %uint 3
%main_out = OpTypeStruct %v4float %main_out = OpTypeStruct %v4float
%186 = OpTypeFunction %void %main_out %180 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20 %main_1 = OpFunction %void None %20
%23 = OpLabel %23 = OpLabel
%m0 = OpVariable %_ptr_Function_mat4v4float Function %27 %m0 = OpVariable %_ptr_Function_mat4v4float Function %27
@ -199,76 +199,61 @@
%140 = OpCompositeExtract %v4float %137 0 %140 = OpCompositeExtract %v4float %137 0
%141 = OpFOrdEqual %v4bool %139 %140 %141 = OpFOrdEqual %v4bool %139 %140
%138 = OpAll %bool %141 %138 = OpAll %bool %141
OpSelectionMerge %143 None %144 = OpCompositeExtract %v4float %84 1
OpBranchConditional %138 %144 %143 %145 = OpCompositeExtract %v4float %137 1
%144 = OpLabel %146 = OpFOrdEqual %v4bool %144 %145
%146 = OpCompositeExtract %v4float %84 1 %143 = OpAll %bool %146
%147 = OpCompositeExtract %v4float %137 1 %147 = OpLogicalAnd %bool %138 %143
%148 = OpFOrdEqual %v4bool %146 %147 %150 = OpCompositeExtract %v4float %84 2
%145 = OpAll %bool %148 %151 = OpCompositeExtract %v4float %137 2
OpBranch %143 %152 = OpFOrdEqual %v4bool %150 %151
%143 = OpLabel %148 = OpAll %bool %152
%149 = OpPhi %bool %138 %48 %145 %144 %153 = OpLogicalAnd %bool %147 %148
OpSelectionMerge %150 None %156 = OpCompositeExtract %v4float %84 3
OpBranchConditional %149 %151 %150 %157 = OpCompositeExtract %v4float %137 3
%151 = OpLabel %158 = OpFOrdEqual %v4bool %156 %157
%154 = OpCompositeExtract %v4float %84 2 %154 = OpAll %bool %158
%155 = OpCompositeExtract %v4float %137 2 %159 = OpLogicalAnd %bool %153 %154
%156 = OpFOrdEqual %v4bool %154 %155 OpSelectionMerge %160 None
%152 = OpAll %bool %156 OpBranchConditional %159 %161 %162
OpBranch %150 %161 = OpLabel
%150 = OpLabel %163 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%157 = OpPhi %bool %149 %143 %152 %151 %164 = OpLoad %int %163
OpSelectionMerge %158 None %165 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
OpBranchConditional %157 %159 %158 %166 = OpLoad %int %165
%159 = OpLabel %167 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%162 = OpCompositeExtract %v4float %84 3 %168 = OpLoad %int %167
%163 = OpCompositeExtract %v4float %137 3
%164 = OpFOrdEqual %v4bool %162 %163
%160 = OpAll %bool %164
OpBranch %158
%158 = OpLabel
%165 = OpPhi %bool %157 %150 %160 %159
OpSelectionMerge %166 None
OpBranchConditional %165 %167 %168
%167 = OpLabel
%169 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2 %169 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%170 = OpLoad %int %169 %170 = OpLoad %int %169
%171 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1 %171 = OpConvertSToF %float %164
%172 = OpLoad %int %171 %172 = OpConvertSToF %float %166
%173 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1 %173 = OpConvertSToF %float %168
%174 = OpLoad %int %173 %174 = OpConvertSToF %float %170
%175 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2 %175 = OpCompositeConstruct %v4float %171 %172 %173 %174
%176 = OpLoad %int %175 OpStore %x_GLF_color %175
%177 = OpConvertSToF %float %170 OpBranch %160
%178 = OpConvertSToF %float %172 %162 = OpLabel
%179 = OpConvertSToF %float %174 %176 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%180 = OpConvertSToF %float %176 %177 = OpLoad %int %176
%181 = OpCompositeConstruct %v4float %177 %178 %179 %180 %178 = OpConvertSToF %float %177
OpStore %x_GLF_color %181 %179 = OpCompositeConstruct %v4float %178 %178 %178 %178
OpBranch %166 OpStore %x_GLF_color %179
%168 = OpLabel OpBranch %160
%182 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1 %160 = OpLabel
%183 = OpLoad %int %182
%184 = OpConvertSToF %float %183
%185 = OpCompositeConstruct %v4float %184 %184 %184 %184
OpStore %x_GLF_color %185
OpBranch %166
%166 = OpLabel
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %186 %tint_symbol_2 = OpFunction %void None %180
%tint_symbol = OpFunctionParameter %main_out %tint_symbol = OpFunctionParameter %main_out
%190 = OpLabel %184 = OpLabel
%191 = OpCompositeExtract %v4float %tint_symbol 0 %185 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %191 OpStore %tint_symbol_1 %185
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%main = OpFunction %void None %20 %main = OpFunction %void None %20
%193 = OpLabel %187 = OpLabel
%194 = OpFunctionCall %void %main_1 %188 = OpFunctionCall %void %main_1
%196 = OpLoad %v4float %x_GLF_color %190 = OpLoad %v4float %x_GLF_color
%197 = OpCompositeConstruct %main_out %196 %191 = OpCompositeConstruct %main_out %190
%195 = OpFunctionCall %void %tint_symbol_2 %197 %189 = OpFunctionCall %void %tint_symbol_2 %191
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

Some files were not shown because too many files have changed in this diff Show More