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:
return ast::BinaryOp::kXor;
case SpvOpLogicalAnd:
return ast::BinaryOp::kLogicalAnd;
return ast::BinaryOp::kAnd;
case SpvOpLogicalOr:
return ast::BinaryOp::kLogicalOr;
return ast::BinaryOp::kOr;
case SpvOpUGreaterThan:
case SpvOpSGreaterThan:
case SpvOpFOrdGreaterThan:

View File

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

View File

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

View File

@ -102,27 +102,11 @@ float3 drawShape_vf2_(inout float2 pos) {
break;
}
GLF_live7_looplimiter0 = (GLF_live7_looplimiter0 + 1);
bool tint_tmp = (GLF_live7c >= 0);
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);
set_float3(GLF_live7m33[(((GLF_live7c >= 0) & (GLF_live7c < 3)) ? GLF_live7c : 0)], (((GLF_live7r >= 0) & (GLF_live7r < 3)) ? GLF_live7r : 0), 1.0f);
const float x_267 = asfloat(x_25[0].y);
if ((0.0f > x_267)) {
} else {
bool tint_tmp_2 = (GLF_live7c >= 0);
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);
set_float2(GLF_live7m42[(((GLF_live7c >= 0) & (GLF_live7c < 4)) ? GLF_live7c : 0)], (((GLF_live7r >= 0) & (GLF_live7r < 2)) ? GLF_live7r : 0), 1.0f);
}
}
}
@ -142,22 +126,14 @@ float3 drawShape_vf2_(inout float2 pos) {
}
GLF_live7_looplimiter7 = (GLF_live7_looplimiter7 + 1);
GLF_live7rows_1 = 2;
bool tint_tmp_4 = (GLF_live7sum_index >= 0);
if (tint_tmp_4) {
tint_tmp_4 = (GLF_live7sum_index < 9);
}
GLF_live7sums[((tint_tmp_4) ? GLF_live7sum_index : 0)] = 0.0f;
GLF_live7sums[(((GLF_live7sum_index >= 0) & (GLF_live7sum_index < 9)) ? GLF_live7sum_index : 0)] = 0.0f;
GLF_live7c_1 = 0;
{
for(; (GLF_live7c_1 < 1); GLF_live7c_1 = (GLF_live7c_1 + 1)) {
GLF_live7r_1 = 0;
{
for(; (GLF_live7r_1 < GLF_live7rows_1); GLF_live7r_1 = (GLF_live7r_1 + 1)) {
bool tint_tmp_5 = (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 int x_310 = (((GLF_live7sum_index >= 0) & (GLF_live7sum_index < 9)) ? GLF_live7sum_index : 0);
const float3x3 x_312 = transpose(GLF_live7m33);
if ((GLF_live7c_1 < 3)) {
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_326 = GLF_live7sums[x_310];
GLF_live7sums[x_310] = (x_326 + x_324);
bool tint_tmp_6 = (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 int x_332 = (((GLF_live7sum_index >= 0) & (GLF_live7sum_index < 9)) ? GLF_live7sum_index : 0);
const float x_334 = GLF_live7m42[1][GLF_live7r_1];
const float x_336 = GLF_live7sums[x_332];
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_63 = 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;
if ((0.0f > x_267)) {
} 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_69 = 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;
@ -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_84 = 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;
while (true) {
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_90 = 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_312 = transpose(x_311);
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_95 = 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;
float const x_334 = GLF_live7m42[1][x_97];
float const x_336 = GLF_live7sums.arr[x_332];

View File

@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 403
; Bound: 389
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@ -119,13 +119,13 @@
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_9 = OpConstant %int 9
%void = OpTypeVoid
%348 = OpTypeFunction %void
%353 = OpConstantNull %v2float
%334 = OpTypeFunction %void
%339 = OpConstantNull %v2float
%float_2 = OpConstant %float 2
%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
%390 = OpTypeFunction %void %main_out
%376 = OpTypeFunction %void %main_out
%drawShape_vf2_ = OpFunction %v3float None %15
%pos = OpFunctionParameter %_ptr_Function_v2float
%20 = OpLabel
@ -341,323 +341,288 @@
%199 = OpLoad %int %GLF_live7r
%200 = OpLoad %int %GLF_live7r
%202 = OpSGreaterThanEqual %bool %195 %int_0
OpSelectionMerge %203 None
OpBranchConditional %202 %204 %203
%204 = OpLabel
%205 = OpSLessThan %bool %196 %int_3
OpBranch %203
%203 = OpLabel
%206 = OpPhi %bool %202 %191 %205 %204
%201 = OpSelect %int %206 %197 %int_0
%208 = OpSGreaterThanEqual %bool %198 %int_0
OpSelectionMerge %209 None
OpBranchConditional %208 %210 %209
%210 = OpLabel
%211 = OpSLessThan %bool %199 %int_3
OpBranch %209
%209 = OpLabel
%212 = OpPhi %bool %208 %203 %211 %210
%207 = OpSelect %int %212 %200 %int_0
%213 = OpAccessChain %_ptr_Function_float %GLF_live7m33 %201 %207
OpStore %213 %float_1
%215 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_1
%216 = OpLoad %float %215
%217 = OpFOrdGreaterThan %bool %float_0 %216
OpSelectionMerge %218 None
OpBranchConditional %217 %219 %220
%219 = OpLabel
OpBranch %218
%220 = OpLabel
%221 = OpLoad %int %GLF_live7c
%222 = OpLoad %int %GLF_live7c
%223 = OpLoad %int %GLF_live7c
%224 = OpLoad %int %GLF_live7r
%225 = OpLoad %int %GLF_live7r
%226 = OpLoad %int %GLF_live7r
%228 = OpSGreaterThanEqual %bool %221 %int_0
OpSelectionMerge %229 None
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
%203 = OpSLessThan %bool %196 %int_3
%204 = OpLogicalAnd %bool %202 %203
%201 = OpSelect %int %204 %197 %int_0
%206 = OpSGreaterThanEqual %bool %198 %int_0
%207 = OpSLessThan %bool %199 %int_3
%208 = OpLogicalAnd %bool %206 %207
%205 = OpSelect %int %208 %200 %int_0
%209 = OpAccessChain %_ptr_Function_float %GLF_live7m33 %201 %205
OpStore %209 %float_1
%211 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_1
%212 = OpLoad %float %211
%213 = OpFOrdGreaterThan %bool %float_0 %212
OpSelectionMerge %214 None
OpBranchConditional %213 %215 %216
%215 = OpLabel
OpBranch %214
%216 = OpLabel
%217 = OpLoad %int %GLF_live7c
%218 = OpLoad %int %GLF_live7c
%219 = OpLoad %int %GLF_live7c
%220 = OpLoad %int %GLF_live7r
%221 = OpLoad %int %GLF_live7r
%222 = OpLoad %int %GLF_live7r
%224 = OpSGreaterThanEqual %bool %217 %int_0
%225 = OpSLessThan %bool %218 %int_4
%226 = OpLogicalAnd %bool %224 %225
%223 = OpSelect %int %226 %219 %int_0
%228 = OpSGreaterThanEqual %bool %220 %int_0
%229 = OpSLessThan %bool %221 %int_2
%230 = OpLogicalAnd %bool %228 %229
%227 = OpSelect %int %230 %222 %int_0
%231 = OpAccessChain %_ptr_Function_float %GLF_live7m42 %223 %227
OpStore %231 %float_1
OpBranch %214
%214 = OpLabel
OpBranch %182
%182 = OpLabel
%240 = OpLoad %int %GLF_live7r
%241 = OpIAdd %int %240 %int_1
OpStore %GLF_live7r %241
%232 = OpLoad %int %GLF_live7r
%233 = OpIAdd %int %232 %int_1
OpStore %GLF_live7r %233
OpBranch %180
%181 = OpLabel
OpBranch %166
%166 = OpLabel
%242 = OpLoad %int %GLF_live7c
%243 = OpIAdd %int %242 %int_1
OpStore %GLF_live7c %243
%234 = OpLoad %int %GLF_live7c
%235 = OpIAdd %int %234 %int_1
OpStore %GLF_live7c %235
OpBranch %164
%165 = OpLabel
OpBranch %151
%151 = OpLabel
%244 = OpLoad %int %GLF_live7rows
%245 = OpIAdd %int %244 %int_1
OpStore %GLF_live7rows %245
%236 = OpLoad %int %GLF_live7rows
%237 = OpIAdd %int %236 %int_1
OpStore %GLF_live7rows %237
OpBranch %149
%150 = OpLabel
OpBranch %136
%136 = OpLabel
%246 = OpLoad %int %GLF_live7cols
%247 = OpIAdd %int %246 %int_1
OpStore %GLF_live7cols %247
%238 = OpLoad %int %GLF_live7cols
%239 = OpIAdd %int %238 %int_1
OpStore %GLF_live7cols %239
OpBranch %134
%135 = OpLabel
OpStore %GLF_live7sum_index %int_0
OpStore %GLF_live7_looplimiter7 %int_0
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
OpLoopMerge %249 %250 None
OpBranch %251
OpBranch %241
%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
%252 = OpLoad %int %GLF_live7cols_1
%253 = OpSLessThan %bool %252 %int_4
OpSelectionMerge %254 None
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
%253 = OpLoad %int %GLF_live7_looplimiter7
%254 = OpIAdd %int %253 %int_1
OpStore %GLF_live7_looplimiter7 %254
OpStore %GLF_live7rows_1 %int_2
%263 = OpLoad %int %GLF_live7sum_index
%264 = OpLoad %int %GLF_live7sum_index
%265 = OpLoad %int %GLF_live7sum_index
%267 = OpSGreaterThanEqual %bool %263 %int_0
OpSelectionMerge %268 None
OpBranchConditional %267 %269 %268
%269 = OpLabel
%271 = OpSLessThan %bool %264 %int_9
OpBranch %268
%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
%255 = OpLoad %int %GLF_live7sum_index
%256 = OpLoad %int %GLF_live7sum_index
%257 = OpLoad %int %GLF_live7sum_index
%259 = OpSGreaterThanEqual %bool %255 %int_0
%261 = OpSLessThan %bool %256 %int_9
%262 = OpLogicalAnd %bool %259 %261
%258 = OpSelect %int %262 %257 %int_0
%263 = OpAccessChain %_ptr_Function_float %GLF_live7sums %258
OpStore %263 %float_0
OpStore %GLF_live7c_1 %int_0
OpBranch %274
%274 = OpLabel
OpLoopMerge %275 %276 None
OpBranch %277
%277 = OpLabel
%278 = OpLoad %int %GLF_live7c_1
%279 = OpSLessThan %bool %278 %int_1
OpBranch %264
%264 = OpLabel
OpLoopMerge %265 %266 None
OpBranch %267
%267 = OpLabel
%268 = OpLoad %int %GLF_live7c_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
OpBranchConditional %279 %281 %282
%281 = OpLabel
OpBranch %280
%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
%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
%342 = OpLoad %int %GLF_live7sum_index
%343 = OpIAdd %int %342 %int_1
OpStore %GLF_live7sum_index %343
OpBranch %250
%250 = OpLabel
%344 = OpLoad %int %GLF_live7cols_1
%345 = OpIAdd %int %344 %int_1
OpStore %GLF_live7cols_1 %345
OpBranch %248
%249 = OpLabel
%324 = OpLoad %int %GLF_live7r_1
%325 = OpIAdd %int %324 %int_1
OpStore %GLF_live7r_1 %325
OpBranch %273
%274 = OpLabel
OpBranch %266
%266 = OpLabel
%326 = OpLoad %int %GLF_live7c_1
%327 = OpIAdd %int %326 %int_1
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
%108 = OpLabel
%346 = OpLoad %int %GLF_live4i
%347 = OpIAdd %int %346 %int_1
OpStore %GLF_live4i %347
%332 = OpLoad %int %GLF_live4i
%333 = OpIAdd %int %332 %int_1
OpStore %GLF_live4i %333
OpBranch %106
%107 = OpLabel
OpReturnValue %74
OpFunctionEnd
%main_1 = OpFunction %void None %348
%351 = OpLabel
%position = OpVariable %_ptr_Function_v2float Function %353
%param = OpVariable %_ptr_Function_v2float Function %353
%param_1 = OpVariable %_ptr_Function_v2float Function %353
%main_1 = OpFunction %void None %334
%337 = OpLabel
%position = OpVariable %_ptr_Function_v2float Function %339
%param = OpVariable %_ptr_Function_v2float Function %339
%param_1 = OpVariable %_ptr_Function_v2float Function %339
%i = OpVariable %_ptr_Function_int Function %32
%param_2 = OpVariable %_ptr_Function_v2float Function %353
%358 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_0
%359 = OpLoad %float %358
%361 = OpFOrdGreaterThanEqual %bool %359 %float_2
OpSelectionMerge %362 None
OpBranchConditional %361 %363 %362
%363 = OpLabel
%364 = OpLoad %v4float %gl_FragCoord
%365 = OpCompositeExtract %float %364 0
%366 = OpCompositeExtract %float %364 1
%367 = OpCompositeConstruct %v2float %365 %366
OpStore %position %367
%368 = OpLoad %v2float %position
OpStore %param %368
%369 = OpFunctionCall %v3float %drawShape_vf2_ %param
%371 = OpLoad %v2float %position
OpStore %param_1 %371
%372 = OpFunctionCall %v3float %drawShape_vf2_ %param_1
%param_2 = OpVariable %_ptr_Function_v2float Function %339
%344 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_0
%345 = OpLoad %float %344
%347 = OpFOrdGreaterThanEqual %bool %345 %float_2
OpSelectionMerge %348 None
OpBranchConditional %347 %349 %348
%349 = OpLabel
%350 = OpLoad %v4float %gl_FragCoord
%351 = OpCompositeExtract %float %350 0
%352 = OpCompositeExtract %float %350 1
%353 = OpCompositeConstruct %v2float %351 %352
OpStore %position %353
%354 = OpLoad %v2float %position
OpStore %param %354
%355 = OpFunctionCall %v3float %drawShape_vf2_ %param
%357 = OpLoad %v2float %position
OpStore %param_1 %357
%358 = OpFunctionCall %v3float %drawShape_vf2_ %param_1
OpStore %i %int_25
OpBranch %375
%375 = OpLabel
OpLoopMerge %376 %377 None
OpBranch %378
%378 = OpLabel
%379 = OpLoad %int %i
%380 = OpSGreaterThan %bool %379 %int_0
OpSelectionMerge %381 None
OpBranchConditional %380 %382 %383
%382 = OpLabel
OpBranch %381
%383 = 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 %361
%361 = OpLabel
OpLoopMerge %362 %363 None
OpBranch %364
%364 = OpLabel
%365 = OpLoad %int %i
%366 = OpSGreaterThan %bool %365 %int_0
OpSelectionMerge %367 None
OpBranchConditional %366 %368 %369
%368 = OpLabel
OpBranch %367
%369 = OpLabel
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
OpStore %x_GLF_color %389
OpBranch %348
%348 = OpLabel
OpStore %x_GLF_color %375
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %390
%tint_symbol_3 = OpFunction %void None %376
%tint_symbol_1 = OpFunctionParameter %main_out
%394 = OpLabel
%395 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %395
%380 = OpLabel
%381 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %381
OpReturn
OpFunctionEnd
%main = OpFunction %void None %348
%397 = OpLabel
%398 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %398
%399 = OpFunctionCall %void %main_1
%401 = OpLoad %v4float %x_GLF_color
%402 = OpCompositeConstruct %main_out %401
%400 = OpFunctionCall %void %tint_symbol_3 %402
%main = OpFunction %void None %334
%383 = OpLabel
%384 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %384
%385 = OpFunctionCall %void %main_1
%387 = OpLoad %v4float %x_GLF_color
%388 = OpCompositeConstruct %main_out %387
%386 = OpFunctionCall %void %tint_symbol_3 %388
OpReturn
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_63 : 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;
if ((0.0 > x_267)) {
} else {
@ -150,7 +150,7 @@ fn drawShape_vf2_(pos : ptr<function, vec2<f32>>) -> vec3<f32> {
let x_68 : i32 = GLF_live7r;
let x_69 : 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 {
@ -195,7 +195,7 @@ fn drawShape_vf2_(pos : ptr<function, vec2<f32>>) -> vec3<f32> {
let x_83 : i32 = GLF_live7sum_index;
let x_84 : 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;
loop {
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_90 : 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_312 : mat3x3<f32> = transpose(x_311);
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_95 : 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_334 : f32 = GLF_live7m42[1][x_97];
let x_336 : f32 = GLF_live7sums[x_332];

View File

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

View File

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

View File

@ -38,7 +38,7 @@ fn main_1() {
f1 = (10.0 - (x_42 * floor((10.0 / x_42))));
let x_44 : f32 = f1;
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;
if (!(x_48)) {
let x_52 : f32 = f0;
@ -48,7 +48,7 @@ fn main_1() {
if (!(x_54)) {
let x_58 : 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;
}
let x_63 : bool = x_63_phi;
@ -56,7 +56,7 @@ fn main_1() {
if (!(x_63)) {
let x_67 : 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 = x_72_phi;
@ -64,7 +64,7 @@ fn main_1() {
}
let x_73 : bool = x_73_phi;
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_84 : 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);
dist1 = distance(tanh(v), (sinh(v) / cosh(v)));
dist2 = distance(tanh(v), float4(0.761590004f, 0.964030027f, 0.995050013f, 0.999329984f));
bool tint_tmp = (dist1 < 0.100000001f);
if (tint_tmp) {
tint_tmp = (dist2 < 0.100000001f);
}
if ((tint_tmp)) {
if (((dist1 < 0.100000001f) & (dist2 < 0.100000001f))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

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));
float const x_41 = dist1;
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);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

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

View File

@ -27,7 +27,7 @@ void main_1(thread float4* const tint_symbol_4) {
}
int const x_37 = i;
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);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

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

View File

@ -19,7 +19,7 @@ fn main_1() {
}
let x_37 : i32 = i;
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);
} else {
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() {
float f = 0.0f;
f = atan2(1.0f, tanh(1.0f));
bool tint_tmp = (f > 0.910000026f);
if (tint_tmp) {
tint_tmp = (f < 0.930000007f);
}
if ((tint_tmp)) {
if (((f > 0.910000026f) & (f < 0.930000007f))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -13,7 +13,7 @@ void main_1(thread float4* const tint_symbol_4) {
f = atan2(1.0f, tanh(1.0f));
float const x_21 = 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);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

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

View File

@ -5,7 +5,7 @@ fn main_1() {
f = atan2(1.0, tanh(1.0));
let x_21 : 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);
} else {
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);
m = (transpose(float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))) * (1.0f / 2.0f));
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 (tint_tmp) {
tint_tmp = all((x_33[1u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[1u]));
}
if ((tint_tmp)) {
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])))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -12,7 +12,7 @@ void main_1(thread float4* const tint_symbol_4) {
float2x2 m = float2x2(0.0f);
m = (transpose(float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))) * (1.0f / 2.0f));
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);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

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

View File

@ -4,7 +4,7 @@ fn main_1() {
var m : mat2x2<f32>;
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;
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);
} else {
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() {
bool a = false;
a = false;
bool tint_tmp = true;
if (tint_tmp) {
tint_tmp = a;
}
if ((tint_tmp)) {
if ((true & a)) {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
} else {
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;
a = false;
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);
} else {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);

View File

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

View File

@ -4,7 +4,7 @@ fn main_1() {
var a : bool;
a = false;
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);
} else {
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);
{
const float x_35 = gl_FragCoord.x;
bool tint_tmp = (x_35 >= 0.0f);
if (tint_tmp) {
tint_tmp = false;
}
if ((tint_tmp)) {
if (((x_35 >= 0.0f) & false)) {
} else {
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);
{
float const x_35 = (*(tint_symbol_5)).x;
if (((x_35 >= 0.0f) && false)) {
if (((x_35 >= 0.0f) & false)) {
} else {
break;
}

View File

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

View File

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

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) {
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);
} else {
*(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

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

View File

@ -4,7 +4,7 @@ var<private> x_GLF_color : vec4<f32>;
fn main_1() {
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);
} else {
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)) {
f = 0u;
}
bool tint_tmp_4 = (a == 1u);
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)) {
if (((((((a == 1u) & (b == 0u)) & (c == 1u)) & (d == 0u)) & (e == 1u)) & (f == 0u))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

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_99 = e;
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);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

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

View File

@ -56,7 +56,7 @@ fn main_1() {
let x_96 : u32 = d;
let x_99 : u32 = e;
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);
} else {
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;
const float x_28 = asfloat(x_6[0].x);
f = (4.0f / (2.0f * x_28));
bool tint_tmp = (f > 1.899999976f);
if (tint_tmp) {
tint_tmp = (f < 2.099999905f);
}
if ((tint_tmp)) {
if (((f > 1.899999976f) & (f < 2.099999905f))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

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));
float const x_31 = 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);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

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

View File

@ -13,7 +13,7 @@ fn main_1() {
f = (4.0 / (2.0 * x_28));
let x_31 : 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);
} else {
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;
const float x_27 = asfloat(x_6[0].x);
a = (2.0f / (1.0f / x_27));
bool tint_tmp = (a > 7.900000095f);
if (tint_tmp) {
tint_tmp = (a < 8.100000381f);
}
if ((tint_tmp)) {
if (((a > 7.900000095f) & (a < 8.100000381f))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

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));
float const x_30 = 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);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

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

View File

@ -13,7 +13,7 @@ fn main_1() {
a = (2.0 / (1.0 / x_27));
let x_30 : 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);
} else {
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;
const float x_28 = asfloat(x_6[0].x);
f = (4.0f * (2.0f / x_28));
bool tint_tmp = (f > 7.900000095f);
if (tint_tmp) {
tint_tmp = (f < 8.100000381f);
}
if ((tint_tmp)) {
if (((f > 7.900000095f) & (f < 8.100000381f))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

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));
float const x_31 = 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);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

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

View File

@ -13,7 +13,7 @@ fn main_1() {
f = (4.0 * (2.0 / x_28));
let x_31 : 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);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);

View File

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

View File

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

View File

@ -20,11 +20,7 @@ void main_1() {
while (true) {
const int x_38 = b;
const int x_40 = asint(x_6[4].x);
bool tint_tmp = (x_38 < x_40);
if (tint_tmp) {
tint_tmp = (a < 10);
}
if ((tint_tmp)) {
if (((x_38 < x_40) & (a < 10))) {
} else {
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_40 = x_6.x_GLF_uniform_int_values.arr[4].el;
int const x_42 = a;
if (((x_38 < x_40) && (x_42 < 10))) {
if (((x_38 < x_40) & (x_42 < 10))) {
} else {
break;
}

View File

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

View File

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

View File

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

View File

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

View File

@ -28,7 +28,7 @@ fn main_1() {
if (true) {
let x_46 : i32 = x_6.x_GLF_uniform_int_values[0];
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;
}
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 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)));
bool tint_tmp = all((x_87[0u] == x_108[0u]));
if (tint_tmp) {
tint_tmp = all((x_87[1u] == x_108[1u]));
}
if ((tint_tmp)) {
if ((all((x_87[0u] == x_108[0u])) & all((x_87[1u] == x_108[1u])))) {
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_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_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)));
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_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;

View File

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

View File

@ -68,7 +68,7 @@ fn main_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_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_125 : 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 float x_39 = float(x_38);
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 (tint_tmp) {
tint_tmp = all((x_36[1u] == x_42[1u]));
}
if ((tint_tmp)) {
if ((all((x_36[0u] == x_42[0u])) & all((x_36[1u] == x_42[1u])))) {
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_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;
float const x_39 = float(x_38);
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_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;

View File

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

View File

@ -18,7 +18,7 @@ fn main_1() {
let x_38 : i32 = x_6.x_GLF_uniform_int_values[0];
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));
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_59 : 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 int x_77 = asint(x_16[scalar_offset_8 / 4][scalar_offset_8 % 4]);
const float4x2 x_83 = float4x2(float2(float(x_56), float(x_59)), float2(float(x_62), float(x_65)), float2(float(x_68), float(x_71)), float2(float(x_74), float(x_77)));
bool tint_tmp_2 = all((x_54[0u] == x_83[0u]));
if (tint_tmp_2) {
tint_tmp_2 = all((x_54[1u] == x_83[1u]));
}
bool tint_tmp_1 = (tint_tmp_2);
if (tint_tmp_1) {
tint_tmp_1 = all((x_54[2u] == x_83[2u]));
}
bool tint_tmp = (tint_tmp_1);
if (tint_tmp) {
tint_tmp = all((x_54[3u] == x_83[3u]));
}
if ((tint_tmp)) {
if ((((all((x_54[0u] == x_83[0u])) & all((x_54[1u] == x_83[1u]))) & all((x_54[2u] == x_83[2u]))) & all((x_54[3u] == x_83[3u])))) {
const int x_107 = asint(x_16[3].x);
const uint scalar_offset_9 = ((16u * uint(0))) / 4;
const int x_110 = asint(x_16[scalar_offset_9 / 4][scalar_offset_9 % 4]);

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_77 = x_16.x_GLF_uniform_int_values.arr[0].el;
float4x2 const x_83 = float4x2(float2(float(x_56), float(x_59)), float2(float(x_62), float(x_65)), float2(float(x_68), float(x_71)), float2(float(x_74), float(x_77)));
if ((((all((x_54[0u] == x_83[0u])) && all((x_54[1u] == x_83[1u]))) && all((x_54[2u] == x_83[2u]))) && all((x_54[3u] == x_83[3u])))) {
if ((((all((x_54[0u] == x_83[0u])) & all((x_54[1u] == x_83[1u]))) & all((x_54[2u] == x_83[2u]))) & all((x_54[3u] == x_83[3u])))) {
int const x_107 = x_16.x_GLF_uniform_int_values.arr[3].el;
int const x_110 = x_16.x_GLF_uniform_int_values.arr[0].el;
int const x_113 = x_16.x_GLF_uniform_int_values.arr[0].el;

View File

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

View File

@ -106,7 +106,7 @@ fn main_1() {
let x_74 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_77 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_83 : mat4x2<f32> = mat4x2<f32>(vec2<f32>(f32(x_56), f32(x_59)), vec2<f32>(f32(x_62), f32(x_65)), vec2<f32>(f32(x_68), f32(x_71)), vec2<f32>(f32(x_74), f32(x_77)));
if ((((all((x_54[0u] == x_83[0u])) && all((x_54[1u] == x_83[1u]))) && all((x_54[2u] == x_83[2u]))) && all((x_54[3u] == x_83[3u])))) {
if ((((all((x_54[0u] == x_83[0u])) & all((x_54[1u] == x_83[1u]))) & all((x_54[2u] == x_83[2u]))) & all((x_54[3u] == x_83[3u])))) {
let x_107 : i32 = x_16.x_GLF_uniform_int_values[3];
let x_110 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_113 : i32 = x_16.x_GLF_uniform_int_values[0];

View File

@ -12,11 +12,7 @@ void main_1() {
c = pow(a, b);
const float x_30 = c;
x_GLF_color = float4(x_30, x_30, x_30, x_30);
bool tint_tmp = (a == -1.0f);
if (tint_tmp) {
tint_tmp = (b == 1.700000048f);
}
if ((tint_tmp)) {
if (((a == -1.0f) & (b == 1.700000048f))) {
const uint scalar_offset = ((16u * uint(0))) / 4;
const float x_41 = asfloat(x_8[scalar_offset / 4][scalar_offset % 4]);
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);
float const x_32 = a;
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_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;

View File

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

View File

@ -22,7 +22,7 @@ fn main_1() {
x_GLF_color = vec4<f32>(x_30, x_30, x_30, x_30);
let x_32 : f32 = a;
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_43 : 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;
}
const int x_10 = x_10_phi;
bool tint_tmp = (x_10 == 1);
if (!tint_tmp) {
tint_tmp = (x_10 == 2);
}
if ((tint_tmp)) {
if (((x_10 == 1) | (x_10 == 2))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -31,7 +31,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
break;
}
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);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

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

View File

@ -24,7 +24,7 @@ fn main_1() {
break;
}
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);
} else {
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_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)));
bool tint_tmp = all((x_80[0u] == x_95[0u]));
if (tint_tmp) {
tint_tmp = all((x_80[1u] == x_95[1u]));
}
if ((tint_tmp)) {
if ((all((x_80[0u] == x_95[0u])) & all((x_80[1u] == x_95[1u])))) {
const int x_109 = asint(x_5[2].x);
const int x_112 = 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_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)));
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_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;

View File

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

View File

@ -61,7 +61,7 @@ fn main_1() {
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_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_112 : 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));
const float x_37 = asfloat(x_8[0].x);
b = lerp(2.0f, x_37, a);
bool tint_tmp = (b >= 1.899999976f);
if (tint_tmp) {
tint_tmp = (b <= 2.099999905f);
}
if ((tint_tmp)) {
if (((b >= 1.899999976f) & (b <= 2.099999905f))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

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);
float const x_40 = 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);
} else {
*(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

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

View File

@ -19,7 +19,7 @@ fn main_1() {
b = mix(2.0, x_37, x_38);
let x_40 : 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);
} else {
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));
const float2x2 x_30 = mul(transpose(m), transpose(m));
const float2x2 x_34 = transpose(mul(m, m));
bool tint_tmp = all((x_30[0u] == x_34[0u]));
if (tint_tmp) {
tint_tmp = all((x_30[1u] == x_34[1u]));
}
if ((tint_tmp)) {
if ((all((x_30[0u] == x_34[0u])) & all((x_30[1u] == x_34[1u])))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -17,7 +17,7 @@ void main_1(thread float4* const tint_symbol_4) {
float2x2 const x_31 = m;
float2x2 const x_32 = m;
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);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);

View File

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

View File

@ -9,7 +9,7 @@ fn main_1() {
let x_31 : mat2x2<f32> = m;
let x_32 : mat2x2<f32> = m;
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);
} else {
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_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)));
bool tint_tmp_2 = all((x_79[0u] == x_132[0u]));
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)) {
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])))) {
const int x_156 = asint(x_6[2].x);
const int x_159 = 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_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)));
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_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;

View File

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

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