diff --git a/src/tint/reader/spirv/function.cc b/src/tint/reader/spirv/function.cc index b16d08dc80..59a98e183e 100644 --- a/src/tint/reader/spirv/function.cc +++ b/src/tint/reader/spirv/function.cc @@ -37,6 +37,8 @@ #include "src/tint/sem/depth_texture.h" #include "src/tint/sem/sampled_texture.h" #include "src/tint/transform/spirv_atomic.h" +#include "src/tint/utils/hashmap.h" +#include "src/tint/utils/hashset.h" // Terms: // CFG: the control flow graph of the function, where basic blocks are the @@ -3356,16 +3358,6 @@ bool FunctionEmitter::EmitStatementsInBasicBlock(const BlockInfo& block_info, auto* type = ty_.Reference(storage_type, ast::StorageClass::kNone); identifier_types_.emplace(id, type); } - // Emit declarations of phi state variables, in index order. - for (auto id : sorted_by_index(block_info.phis_needing_state_vars)) { - const auto* def_inst = def_use_mgr_->GetDef(id); - TINT_ASSERT(Reader, def_inst); - const auto phi_var_name = GetDefInfo(id)->phi_var; - TINT_ASSERT(Reader, !phi_var_name.empty()); - auto* var = builder_.Var(phi_var_name, - parser_impl_.ConvertType(def_inst->type_id())->Build(builder_)); - AddStatement(create(Source{}, var)); - } // Emit regular statements. const spvtools::opt::BasicBlock& bb = *(block_info.basic_block); @@ -3384,22 +3376,55 @@ bool FunctionEmitter::EmitStatementsInBasicBlock(const BlockInfo& block_info, // Emit assignments to carry values to phi nodes in potential destinations. // Do it in index order. if (!block_info.phi_assignments.IsEmpty()) { - auto sorted = block_info.phi_assignments; + // Keep only the phis that are used. + utils::Vector worklist; + worklist.Reserve(block_info.phi_assignments.Length()); + for (const auto assignment : block_info.phi_assignments) { + if (GetDefInfo(assignment.phi_id)->num_uses > 0) { + worklist.Push(assignment); + } + } + // Sort them. std::stable_sort( - sorted.begin(), sorted.end(), + worklist.begin(), worklist.end(), [this](const BlockInfo::PhiAssignment& lhs, const BlockInfo::PhiAssignment& rhs) { return GetDefInfo(lhs.phi_id)->index < GetDefInfo(rhs.phi_id)->index; }); - for (auto assignment : block_info.phi_assignments) { - const auto var_name = GetDefInfo(assignment.phi_id)->phi_var; - auto expr = MakeExpression(assignment.value); - if (!expr) { - return false; + + // Generate assignments to the phi variables being fed by this + // block. It must act as a parallel assignment. So first capture the + // current value of any value that will be overwritten, then generate + // the assignments. + + // The set of IDs that are read by the assignments. + utils::Hashset read_set; + for (const auto assignment : worklist) { + read_set.Add(assignment.value_id); + } + // Generate a let-declaration to capture the current value of each phi + // that will be both read and written. + utils::Hashmap copied_phis; + for (const auto assignment : worklist) { + const auto phi_id = assignment.phi_id; + if (read_set.Find(phi_id)) { + auto copy_name = namer_.MakeDerivedName(namer_.Name(phi_id) + "_c" + + std::to_string(block_info.id)); + auto copy_sym = builder_.Symbols().Register(copy_name); + copied_phis.GetOrCreate(phi_id, [copy_sym]() { return copy_sym; }); + AddStatement(builder_.WrapInStatement( + builder_.Let(copy_sym, builder_.Expr(namer_.Name(phi_id))))); } - AddStatement(create( - Source{}, - create(Source{}, builder_.Symbols().Register(var_name)), - expr.expr)); + } + + // Generate assignments to the phi vars. + for (const auto assignment : worklist) { + const auto phi_id = assignment.phi_id; + auto* const lhs_expr = builder_.Expr(namer_.Name(phi_id)); + // If RHS value is actually a phi we just cpatured, then use it. + auto* const copy_sym = copied_phis.Find(assignment.value_id); + auto* const rhs_expr = + copy_sym ? builder_.Expr(*copy_sym) : MakeExpression(assignment.value_id).expr; + AddStatement(builder_.Assign(lhs_expr, rhs_expr)); } } @@ -3692,11 +3717,8 @@ bool FunctionEmitter::EmitStatement(const spvtools::opt::Instruction& inst) { } case SpvOpPhi: { - // Emit a read from the associated state variable. - TypedExpression expr{parser_impl_.ConvertType(inst.type_id()), - create( - Source{}, builder_.Symbols().Register(def_info->phi_var))}; - return EmitConstDefOrWriteToHoistedVar(inst, expr); + // The value will be in scope, available for reading from the phi ID. + return true; } case SpvOpOuterProduct: @@ -4884,60 +4906,80 @@ void FunctionEmitter::FindValuesNeedingNamedOrHoistedDefinition() { } } - // Scan uses of locally defined IDs, in function block order. + // Scan uses of locally defined IDs, finding their first and last uses, in + // block order. + + // Updates the span of block positions that this value is used in. + // Ignores values defined outside this function. + auto record_value_use = [this](uint32_t id, const BlockInfo* block_info) { + if (auto* def_info = GetDefInfo(id)) { + // Update usage count. + def_info->num_uses++; + // Update usage span. + def_info->first_use_pos = std::min(def_info->first_use_pos, block_info->pos); + def_info->last_use_pos = std::max(def_info->last_use_pos, block_info->pos); + + // Determine whether this ID is defined in a different construct + // from this use. + const auto defining_block = block_order_[def_info->block_pos]; + const auto* def_in_construct = GetBlockInfo(defining_block)->construct; + if (def_in_construct != block_info->construct) { + def_info->used_in_another_construct = true; + } + } + }; for (auto block_id : block_order_) { const auto* block_info = GetBlockInfo(block_id); - const auto block_pos = block_info->pos; for (const auto& inst : *(block_info->basic_block)) { // Update bookkeeping for locally-defined IDs used by this instruction. - inst.ForEachInId([this, block_pos, block_info](const uint32_t* id_ptr) { - auto* def_info = GetDefInfo(*id_ptr); - if (def_info) { - // Update usage count. - def_info->num_uses++; - // Update usage span. - def_info->last_use_pos = std::max(def_info->last_use_pos, block_pos); - - // Determine whether this ID is defined in a different construct - // from this use. - const auto defining_block = block_order_[def_info->block_pos]; - const auto* def_in_construct = GetBlockInfo(defining_block)->construct; - if (def_in_construct != block_info->construct) { - def_info->used_in_another_construct = true; - } - } - }); - if (inst.opcode() == SpvOpPhi) { - // Declare a name for the variable used to carry values to a phi. + // For an OpPhi defining value P, an incoming value V from parent block B is + // counted as being "used" at block B, not at the block containing the Phi. + // That's because we will create a variable PHI_P to hold the phi value, and + // in the code generated for block B, create assignment `PHI_P = V`. + // To make the WGSL scopes work, both P and V are counted as being "used" + // in the parent block B. + const auto phi_id = inst.result_id(); auto* phi_def_info = GetDefInfo(phi_id); - phi_def_info->phi_var = namer_.MakeDerivedName(namer_.Name(phi_id) + "_phi"); + phi_def_info->is_phi = true; + // Track all the places where we need to mention the variable, // so we can place its declaration. First, record the location of // the read from the variable. - uint32_t first_pos = block_pos; - uint32_t last_pos = block_pos; // Record the assignments that will propagate values from predecessor // blocks. for (uint32_t i = 0; i + 1 < inst.NumInOperands(); i += 2) { - const uint32_t value_id = inst.GetSingleWordInOperand(i); + const uint32_t incoming_value_id = inst.GetSingleWordInOperand(i); const uint32_t pred_block_id = inst.GetSingleWordInOperand(i + 1); auto* pred_block_info = GetBlockInfo(pred_block_id); // The predecessor might not be in the block order at all, so we // need this guard. if (IsInBlockOrder(pred_block_info)) { + // Track where the incoming value needs to be in scope. + record_value_use(incoming_value_id, block_info); + + // Track where P needs to be in scope. It's not an ordinary use, so don't + // count it as one. + const auto pred_pos = pred_block_info->pos; + phi_def_info->first_use_pos = + std::min(phi_def_info->first_use_pos, pred_pos); + phi_def_info->last_use_pos = std::max(phi_def_info->last_use_pos, pred_pos); + // Record the assignment that needs to occur at the end // of the predecessor block. - pred_block_info->phi_assignments.Push({phi_id, value_id}); - first_pos = std::min(first_pos, pred_block_info->pos); - last_pos = std::max(last_pos, pred_block_info->pos); + pred_block_info->phi_assignments.Push({phi_id, incoming_value_id}); } } // Schedule the declaration of the state variable. - const auto* enclosing_construct = GetEnclosingScope(first_pos, last_pos); + const auto* enclosing_construct = + GetEnclosingScope(phi_def_info->first_use_pos, phi_def_info->last_use_pos); GetBlockInfo(enclosing_construct->begin_id)->phis_needing_state_vars.Push(phi_id); + } else { + inst.ForEachInId([block_info, &record_value_use](const uint32_t* id_ptr) { + record_value_use(*id_ptr, block_info); + }); } } } @@ -4967,41 +5009,47 @@ void FunctionEmitter::FindValuesNeedingNamedOrHoistedDefinition() { continue; } - // The first use must be the at the SSA definition, because block order - // respects dominance. - const auto first_pos = def_info->block_pos; - const auto last_use_pos = def_info->last_use_pos; - - const auto* def_in_construct = GetBlockInfo(block_order_[first_pos])->construct; + const auto* def_in_construct = GetBlockInfo(block_order_[def_info->block_pos])->construct; // A definition in the first block of an kIfSelection or kSwitchSelection // occurs before the branch, and so that definition should count as // having been defined at the scope of the parent construct. - if (first_pos == def_in_construct->begin_pos) { + if (def_info->block_pos == def_in_construct->begin_pos) { if ((def_in_construct->kind == Construct::kIfSelection) || (def_in_construct->kind == Construct::kSwitchSelection)) { def_in_construct = def_in_construct->parent; } } - bool should_hoist = false; - if (!def_in_construct->ContainsPos(last_use_pos)) { + // We care about the earliest between the place of definition, and the first + // use of the value. + const auto first_pos = std::min(def_info->block_pos, def_info->first_use_pos); + const auto last_use_pos = def_info->last_use_pos; + + bool should_hoist_to_let = false; + bool should_hoist_to_var = false; + if (def_info->is_phi) { + // We need to generate a variable, and assignments to that variable in + // all the phi parent blocks. + should_hoist_to_var = true; + } else if (!def_in_construct->ContainsPos(first_pos) || + !def_in_construct->ContainsPos(last_use_pos)) { // To satisfy scoping, we have to hoist the definition out to an enclosing // construct. - should_hoist = true; + should_hoist_to_var = true; } else { // Avoid moving combinatorial values across constructs. This is a // simple heuristic to avoid changing the cost of an operation // by moving it into or out of a loop, for example. if ((def_info->storage_class == ast::StorageClass::kInvalid) && def_info->used_in_another_construct) { - should_hoist = true; + should_hoist_to_let = true; } } - if (should_hoist) { + if (should_hoist_to_var || should_hoist_to_let) { const auto* enclosing_construct = GetEnclosingScope(first_pos, last_use_pos); - if (enclosing_construct == def_in_construct) { - // We can use a plain 'const' definition. + if (should_hoist_to_let && (enclosing_construct == def_in_construct)) { + // We can use a plain 'let' declaration. def_info->requires_named_const_def = true; } else { // We need to make a hoisted variable definition. diff --git a/src/tint/reader/spirv/function.h b/src/tint/reader/spirv/function.h index d779c93899..ff7336e4d1 100644 --- a/src/tint/reader/spirv/function.h +++ b/src/tint/reader/spirv/function.h @@ -15,6 +15,7 @@ #ifndef SRC_TINT_READER_SPIRV_FUNCTION_H_ #define SRC_TINT_READER_SPIRV_FUNCTION_H_ +#include #include #include #include @@ -166,8 +167,8 @@ struct BlockInfo { struct PhiAssignment { /// The ID of an OpPhi receiving a value from this basic block. uint32_t phi_id; - /// The the value carried to the given OpPhi. - uint32_t value; + /// The ID of the value carried to the given OpPhi. + uint32_t value_id; }; /// If this basic block branches to a visited basic block containing phis, /// then this is the list of writes to the variables associated those phis. @@ -258,10 +259,9 @@ struct DefInfo { /// True if the definition of this ID is inside the function. const bool locally_defined = true; - /// The position of the first block in which this ID is visible, in function - /// block order. For IDs defined outside of the function, it is 0. - /// For IDs defined in the function, it is the position of the block - /// containing the definition of the ID. + /// For IDs defined in the function, this is the position of the block + /// containing the definition of the ID, in function block order. + /// For IDs defined outside of the function, it is 0. /// See method `FunctionEmitter::ComputeBlockOrderAndPositions` const uint32_t block_pos = 0; @@ -272,8 +272,17 @@ struct DefInfo { /// The number of uses of this ID. uint32_t num_uses = 0; + /// The block position of the first use of this ID, or MAX_UINT if it is not + /// used at all. The "first" ordering is determined by the function block + /// order. The first use of an ID might be in an OpPhi that precedes the + /// definition of the ID. + /// The ID defined by an OpPhi is counted as being "used" in each of its + /// parent blocks. + uint32_t first_use_pos = std::numeric_limits::max(); /// The block position of the last use of this ID, or 0 if it is not used /// at all. The "last" ordering is determined by the function block order. + /// The ID defined by an OpPhi is counted as being "used" in each of its + /// parent blocks. uint32_t last_use_pos = 0; /// Is this value used in a construct other than the one in which it was @@ -288,8 +297,8 @@ struct DefInfo { /// corresponding position of the ID definition in SPIR-V. This compensates /// for the difference between dominance and scoping. An SSA definition can /// dominate all its uses, but the construct where it is defined does not - /// enclose all the uses, and so if it were declared as a WGSL constant - /// definition at the point of its SPIR-V definition, then the WGSL name + /// enclose all the uses, and so if it were declared as a WGSL let- + /// declaration at the point of its SPIR-V definition, then the WGSL name /// would go out of scope too early. Fix that by creating a variable at the /// top of the smallest construct that encloses both the definition and all /// its uses. Then the original SPIR-V definition maps to a WGSL assignment @@ -299,10 +308,8 @@ struct DefInfo { /// example, pointers. crbug.com/tint/98 bool requires_hoisted_def = false; - /// If the definition is an OpPhi, then `phi_var` is the name of the - /// variable that stores the value carried from parent basic blocks into - /// the basic block containing the OpPhi. Otherwise this is the empty string. - std::string phi_var; + /// Is this ID an OpPhi? + bool is_phi = false; /// The storage class to use for this value, if it is of pointer type. /// This is required to carry a storage class override from a storage @@ -332,11 +339,11 @@ inline std::ostream& operator<<(std::ostream& o, const DefInfo& di) { << " inst.result_id: " << di.inst.result_id() << " locally_defined: " << (di.locally_defined ? "true" : "false") << " block_pos: " << di.block_pos << " num_uses: " << di.num_uses - << " last_use_pos: " << di.last_use_pos + << " first_use_pos: " << di.first_use_pos << " last_use_pos: " << di.last_use_pos << " used_in_another_construct: " << (di.used_in_another_construct ? "true" : "false") << " requires_named_const_def: " << (di.requires_named_const_def ? "true" : "false") - << " requires_hoisted_def: " << (di.requires_hoisted_def ? "true" : "false") << " phi_var: '" - << di.phi_var << "'"; + << " requires_hoisted_def: " << (di.requires_hoisted_def ? "true" : "false") + << " is_phi: " << (di.is_phi ? "true" : "false") << ""; if (di.storage_class != ast::StorageClass::kNone) { o << " sc:" << int(di.storage_class); } @@ -603,7 +610,7 @@ class FunctionEmitter { /// @returns an possibly updated type const Type* RemapStorageClass(const Type* type, uint32_t result_id); - /// Marks locally defined values when they should get a 'const' + /// Marks locally defined values when they should get a 'let' /// definition in WGSL, or a 'var' definition at an outer scope. /// This occurs in several cases: /// - When a SPIR-V instruction might use the dynamically computed value diff --git a/src/tint/reader/spirv/function_var_test.cc b/src/tint/reader/spirv/function_var_test.cc index ff282990df..5d156eb697 100644 --- a/src/tint/reader/spirv/function_var_test.cc +++ b/src/tint/reader/spirv/function_var_test.cc @@ -922,6 +922,52 @@ return; EXPECT_EQ(expect, got); } +TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_SimultaneousAssignment) { + // Phis must act as if they are simutaneously assigned. + // %101 and %102 should exchange values on each iteration, and never have + // the same value. + auto assembly = Preamble() + R"( +%100 = OpFunction %void None %voidfn + +%10 = OpLabel +OpBranch %20 + +%20 = OpLabel +%101 = OpPhi %bool %true %10 %102 %20 +%102 = OpPhi %bool %false %10 %101 %20 +OpLoopMerge %99 %20 None +OpBranchConditional %true %99 %20 + +%99 = OpLabel +OpReturn + +OpFunctionEnd + )"; + auto p = parser(test::Assemble(assembly)); + ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()) << assembly; + auto fe = p->function_emitter(100); + EXPECT_TRUE(fe.EmitBody()) << p->error(); + + auto ast_body = fe.ast_body(); + auto got = test::ToString(p->program(), ast_body); + auto* expect = R"(var x_101 : bool; +var x_102 : bool; +x_101 = true; +x_102 = false; +loop { + let x_101_c20 = x_101; + let x_102_c20 = x_102; + x_101 = x_102_c20; + x_102 = x_101_c20; + if (true) { + break; + } +} +return; +)"; + EXPECT_EQ(expect, got); +} + TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_SingleBlockLoopIndex) { auto assembly = Preamble() + R"( %pty = OpTypePointer Private %uint @@ -969,20 +1015,19 @@ TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_SingleBlockLoopIndex) { auto ast_body = fe.ast_body(); auto got = test::ToString(p->program(), ast_body); auto* expect = R"(loop { - var x_2_phi : u32; - var x_3_phi : u32; + var x_2 : u32; + var x_3 : u32; let x_101 : bool = x_7; let x_102 : bool = x_8; - x_2_phi = 0u; - x_3_phi = 1u; + x_2 = 0u; + x_3 = 1u; if (x_101) { break; } loop { - let x_2 : u32 = x_2_phi; - let x_3 : u32 = x_3_phi; - x_2_phi = (x_2 + 1u); - x_3_phi = x_3; + let x_3_c20 = x_3; + x_2 = (x_2 + 1u); + x_3 = x_3_c20; if (x_102) { break; } @@ -1043,27 +1088,26 @@ TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_MultiBlockLoopIndex) { auto ast_body = fe.ast_body(); auto got = test::ToString(p->program(), ast_body); auto* expect = R"(loop { - var x_2_phi : u32; - var x_3_phi : u32; + var x_2 : u32; + var x_3 : u32; let x_101 : bool = x_7; let x_102 : bool = x_8; - x_2_phi = 0u; - x_3_phi = 1u; + x_2 = 0u; + x_3 = 1u; if (x_101) { break; } loop { var x_4 : u32; - let x_2 : u32 = x_2_phi; - let x_3 : u32 = x_3_phi; if (x_102) { break; } continuing { x_4 = (x_2 + 1u); - x_2_phi = x_4; - x_3_phi = x_3; + let x_3_c30 = x_3; + x_2 = x_4; + x_3 = x_3_c30; } } } @@ -1101,6 +1145,7 @@ TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_ValueFromLoopBodyAndContinuin %30 = OpLabel %7 = OpIAdd %uint %4 %6 ; use %4 again + %8 = OpCopyObject %uint %5 ; use %5 OpBranch %20 %79 = OpLabel @@ -1123,24 +1168,25 @@ TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_ValueFromLoopBodyAndContinuin auto got = test::ToString(p->program(), ast_body); auto* expect = R"(let x_101 : bool = x_17; loop { - var x_2_phi : u32; - var x_5_phi : u32; - x_2_phi = 0u; - x_5_phi = 1u; + var x_2 : u32; + var x_5 : u32; + x_2 = 0u; + x_5 = 1u; loop { + var x_4 : u32; + var x_6 : u32; var x_7 : u32; - let x_2 : u32 = x_2_phi; - let x_5 : u32 = x_5_phi; - let x_4 : u32 = (x_2 + 1u); - let x_6 : u32 = (x_4 + 1u); + x_4 = (x_2 + 1u); + x_6 = (x_4 + 1u); if (x_101) { break; } continuing { x_7 = (x_4 + x_6); - x_2_phi = x_4; - x_5_phi = x_7; + let x_8 : u32 = x_5; + x_2 = x_4; + x_5 = x_7; } } } @@ -1203,21 +1249,20 @@ TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_FromElseAndThen) { auto* expect = R"(let x_101 : bool = x_7; let x_102 : bool = x_8; loop { - var x_2_phi : u32; + var x_2 : u32; if (x_101) { break; } if (x_102) { - x_2_phi = 0u; + x_2 = 0u; continue; } else { - x_2_phi = 1u; + x_2 = 1u; continue; } - x_2_phi = 0u; + x_2 = 0u; continuing { - let x_2 : u32 = x_2_phi; x_1 = x_2; } } @@ -1277,13 +1322,13 @@ TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_FromHeaderAndThen) { auto* expect = R"(let x_101 : bool = x_7; let x_102 : bool = x_8; loop { - var x_2_phi : u32; + var x_2 : u32; if (x_101) { break; } - x_2_phi = 0u; + x_2 = 0u; if (x_102) { - x_2_phi = 1u; + x_2 = 1u; continue; } else { continue; @@ -1291,7 +1336,6 @@ loop { return; continuing { - let x_2 : u32 = x_2_phi; x_1 = x_2; } } @@ -1334,7 +1378,8 @@ TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_InMerge_PredecessorsDominatdB %99 = OpLabel ; predecessors are all dominated by case construct head at %30 - %phi = OpPhi %uint %uint_0 %45 %uint_1 %50 + %41 = OpPhi %uint %uint_0 %45 %uint_1 %50 + %101 = OpCopyObject %uint %41 ; give it a use so it's emitted OpReturn OpFunctionEnd @@ -1346,7 +1391,7 @@ TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_InMerge_PredecessorsDominatdB auto ast_body = fe.ast_body(); auto got = test::ToString(p->program(), ast_body); - auto* expect = R"(var x_41_phi : u32; + auto* expect = R"(var x_41 : u32; switch(1u) { default: { fallthrough; @@ -1357,19 +1402,19 @@ switch(1u) { case 1u: { if (true) { } else { - x_41_phi = 0u; + x_41 = 0u; break; } - x_41_phi = 1u; + x_41 = 1u; } } -let x_41 : u32 = x_41_phi; +let x_101 : u32 = x_41; return; )"; EXPECT_EQ(expect, got) << got << assembly; } -TEST_F(SpvParserFunctionVarTest, EmitStatement_UseInPhiCountsAsUse) { +TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_UseInPhiCountsAsUse) { // From crbug.com/215 // If the only use of a combinatorially computed ID is as the value // in an OpPhi, then we still have to emit it. The algorithm fix @@ -1393,6 +1438,7 @@ TEST_F(SpvParserFunctionVarTest, EmitStatement_UseInPhiCountsAsUse) { %99 = OpLabel %101 = OpPhi %bool %11 %10 %12 %20 + %102 = OpCopyObject %bool %101 ;; ensure a use of %101 OpReturn OpFunctionEnd @@ -1405,14 +1451,330 @@ TEST_F(SpvParserFunctionVarTest, EmitStatement_UseInPhiCountsAsUse) { auto ast_body = fe.ast_body(); auto got = test::ToString(p->program(), ast_body); - auto* expect = R"(var x_101_phi : bool; + auto* expect = R"(var x_101 : bool; let x_11 : bool = (true & true); let x_12 : bool = !(x_11); -x_101_phi = x_11; +x_101 = x_11; if (true) { - x_101_phi = x_12; + x_101 = x_12; } -let x_101 : bool = x_101_phi; +let x_102 : bool = x_101; +return; +)"; + EXPECT_EQ(expect, got); +} + +TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_PhiInLoopHeader_FedByHoistedVar_PhiUnused) { + // From investigation into crbug.com/1649 + // + // Value %999 is defined deep in control flow, then we arrange for + // it to dominate the backedge of the outer loop. The %999 value is then + // fed back into the phi in the loop header. So %999 needs to be hoisted + // out of the loop. The phi assignment needs to use the hoisted variable. + // The hoisted variable needs to be placed such that its scope encloses + // that phi in the header of the outer loop. The compiler needs + // to "see" that there is an implicit use of %999 in the backedge block + // of that outer loop. + auto assembly = Preamble() + R"( +%100 = OpFunction %void None %voidfn + +%10 = OpLabel +OpBranch %20 + +%20 = OpLabel +%101 = OpPhi %bool %true %10 %999 %80 +OpLoopMerge %99 %80 None +OpBranchConditional %true %30 %99 + + %30 = OpLabel + OpSelectionMerge %50 None + OpBranchConditional %true %40 %50 + + %40 = OpLabel + %999 = OpCopyObject %bool %true + OpBranch %60 + + %50 = OpLabel + OpReturn + + %60 = OpLabel ; if merge + OpBranch %80 + + %80 = OpLabel ; continue target + OpBranch %20 + +%99 = OpLabel +OpReturn + +OpFunctionEnd + + )"; + auto p = parser(test::Assemble(assembly)); + ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()) << assembly; + auto fe = p->function_emitter(100); + EXPECT_TRUE(fe.EmitBody()) << p->error(); + + auto ast_body = fe.ast_body(); + auto got = test::ToString(p->program(), ast_body); + auto* expect = R"(loop { + var x_999 : bool; + if (true) { + } else { + break; + } + if (true) { + x_999 = true; + continue; + } + return; +} +return; +)"; + EXPECT_EQ(expect, got); +} + +TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_PhiInLoopHeader_FedByHoistedVar_PhiUsed) { + // From investigation into crbug.com/1649 + // + // Value %999 is defined deep in control flow, then we arrange for + // it to dominate the backedge of the outer loop. The %999 value is then + // fed back into the phi in the loop header. So %999 needs to be hoisted + // out of the loop. The phi assignment needs to use the hoisted variable. + // The hoisted variable needs to be placed such that its scope encloses + // that phi in the header of the outer loop. The compiler needs + // to "see" that there is an implicit use of %999 in the backedge block + // of that outer loop. + auto assembly = Preamble() + R"( +%100 = OpFunction %void None %voidfn + +%10 = OpLabel +OpBranch %20 + +%20 = OpLabel +%101 = OpPhi %bool %true %10 %999 %80 +OpLoopMerge %99 %80 None +OpBranchConditional %true %30 %99 + + %30 = OpLabel + OpSelectionMerge %50 None + OpBranchConditional %true %40 %50 + + %40 = OpLabel + %999 = OpCopyObject %bool %true + OpBranch %60 + + %50 = OpLabel + OpReturn + + %60 = OpLabel ; if merge + OpBranch %80 + + %80 = OpLabel ; continue target + OpBranch %20 + +%99 = OpLabel +%1000 = OpCopyObject %bool %101 +OpReturn + +OpFunctionEnd + + )"; + auto p = parser(test::Assemble(assembly)); + ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()) << assembly; + auto fe = p->function_emitter(100); + EXPECT_TRUE(fe.EmitBody()) << p->error(); + + auto ast_body = fe.ast_body(); + auto got = test::ToString(p->program(), ast_body); + auto* expect = R"(var x_101 : bool; +x_101 = true; +loop { + var x_999 : bool; + if (true) { + } else { + break; + } + if (true) { + x_999 = true; + continue; + } + return; + + continuing { + x_101 = x_999; + } +} +let x_1000 : bool = x_101; +return; +)"; + EXPECT_EQ(expect, got); +} + +TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_PhiInLoopHeader_FedByPhi_PhiUnused) { + // From investigation into crbug.com/1649 + // + // This is a reduction of one of the hard parts of test case + // vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.spvasm + // In particular, see the data flow around %114 in that case. + // + // Here value %999 is is a *phi* defined deep in control flow, then we + // arrange for it to dominate the backedge of the outer loop. The %999 + // value is then fed back into the phi in the loop header. The variable + // generated to hold the %999 value needs to be placed such that its scope + // encloses that phi in the header of the outer loop. The compiler needs + // to "see" that there is an implicit use of %999 in the backedge block + // of that outer loop. + auto assembly = Preamble() + R"( +%100 = OpFunction %void None %voidfn + +%10 = OpLabel +OpBranch %20 + +%20 = OpLabel +%101 = OpPhi %bool %true %10 %999 %80 +OpLoopMerge %99 %80 None +OpBranchConditional %true %99 %30 + + %30 = OpLabel + OpLoopMerge %70 %60 None + OpBranch %40 + + %40 = OpLabel + OpBranchConditional %true %60 %50 + + %50 = OpLabel + OpBranch %60 + + %60 = OpLabel ; inner continue + %999 = OpPhi %bool %true %40 %false %50 + OpBranchConditional %true %70 %30 + + %70 = OpLabel ; inner merge + OpBranch %80 + + %80 = OpLabel ; outer continue target + OpBranch %20 + +%99 = OpLabel +OpReturn + +OpFunctionEnd + )"; + auto p = parser(test::Assemble(assembly)); + ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()) << assembly; + auto fe = p->function_emitter(100); + EXPECT_TRUE(fe.EmitBody()) << p->error(); + + auto ast_body = fe.ast_body(); + auto got = test::ToString(p->program(), ast_body); + auto* expect = R"(loop { + var x_999 : bool; + if (true) { + break; + } + loop { + x_999 = true; + if (true) { + continue; + } + x_999 = false; + + continuing { + if (true) { + break; + } + } + } +} +return; +)"; + EXPECT_EQ(expect, got); +} + +TEST_F(SpvParserFunctionVarTest, EmitStatement_Phi_PhiInLoopHeader_FedByPhi_PhiUsed) { + // From investigation into crbug.com/1649 + // + // This is a reduction of one of the hard parts of test case + // vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.spvasm + // In particular, see the data flow around %114 in that case. + // + // Here value %999 is is a *phi* defined deep in control flow, then we + // arrange for it to dominate the backedge of the outer loop. The %999 + // value is then fed back into the phi in the loop header. The variable + // generated to hold the %999 value needs to be placed such that its scope + // encloses that phi in the header of the outer loop. The compiler needs + // to "see" that there is an implicit use of %999 in the backedge block + // of that outer loop. + auto assembly = Preamble() + R"( +%100 = OpFunction %void None %voidfn + +%10 = OpLabel +OpBranch %20 + +%20 = OpLabel +%101 = OpPhi %bool %true %10 %999 %80 +OpLoopMerge %99 %80 None +OpBranchConditional %true %99 %30 + + %30 = OpLabel + OpLoopMerge %70 %60 None + OpBranch %40 + + %40 = OpLabel + OpBranchConditional %true %60 %50 + + %50 = OpLabel + OpBranch %60 + + %60 = OpLabel ; inner continue + %999 = OpPhi %bool %true %40 %false %50 + OpBranchConditional %true %70 %30 + + %70 = OpLabel ; inner merge + OpBranch %80 + + %80 = OpLabel ; outer continue target + OpBranch %20 + +%99 = OpLabel +%1000 = OpCopyObject %bool %101 +OpReturn + +OpFunctionEnd + )"; + auto p = parser(test::Assemble(assembly)); + ASSERT_TRUE(p->BuildAndParseInternalModuleExceptFunctions()) << assembly; + auto fe = p->function_emitter(100); + EXPECT_TRUE(fe.EmitBody()) << p->error(); + + auto ast_body = fe.ast_body(); + auto got = test::ToString(p->program(), ast_body); + auto* expect = R"(var x_101 : bool; +x_101 = true; +loop { + var x_999 : bool; + if (true) { + break; + } + loop { + x_999 = true; + if (true) { + continue; + } + x_999 = false; + + continuing { + if (true) { + break; + } + } + } + + continuing { + x_101 = x_999; + } +} +let x_1000 : bool = x_101; return; )"; EXPECT_EQ(expect, got); diff --git a/src/tint/reader/spirv/parser_impl.cc b/src/tint/reader/spirv/parser_impl.cc index caa2c69173..683dd59cde 100644 --- a/src/tint/reader/spirv/parser_impl.cc +++ b/src/tint/reader/spirv/parser_impl.cc @@ -2053,7 +2053,8 @@ TypedExpression ParserImpl::RectifyOperandSignedness(const spvtools::opt::Instru Fail() << "internal error: RectifyOperandSignedness given a null expr\n"; return {}; } - auto* type = expr.type; + // TODO(crbug.com/tint/1669) should this unpack aliases too? + auto* type = expr.type->UnwrapRef(); if (!type) { Fail() << "internal error: unmapped type for: " << expr.expr->TypeInfo().name << "\n"; return {}; @@ -2078,12 +2079,12 @@ TypedExpression ParserImpl::RectifyOperandSignedness(const spvtools::opt::Instru TypedExpression ParserImpl::RectifySecondOperandSignedness(const spvtools::opt::Instruction& inst, const Type* first_operand_type, TypedExpression&& second_operand_expr) { - if ((first_operand_type != second_operand_expr.type) && + const Type* target_type = first_operand_type->UnwrapRef(); + if ((target_type != second_operand_expr.type->UnwrapRef()) && AssumesSecondOperandSignednessMatchesFirstOperand(inst.opcode())) { // Conversion is required. - return {first_operand_type, - create(Source{}, first_operand_type->Build(builder_), - second_operand_expr.expr)}; + return {target_type, create(Source{}, target_type->Build(builder_), + second_operand_expr.expr)}; } // No conversion necessary. return std::move(second_operand_expr); @@ -2091,6 +2092,7 @@ TypedExpression ParserImpl::RectifySecondOperandSignedness(const spvtools::opt:: const Type* ParserImpl::ForcedResultType(const spvtools::opt::Instruction& inst, const Type* first_operand_type) { + first_operand_type = first_operand_type->UnwrapRef(); const auto opcode = inst.opcode(); if (AssumesResultSignednessMatchesFirstOperand(opcode)) { return first_operand_type; diff --git a/src/tint/reader/spirv/parser_impl_handle_test.cc b/src/tint/reader/spirv/parser_impl_handle_test.cc index a165f7b6d6..cbad954ec1 100644 --- a/src/tint/reader/spirv/parser_impl_handle_test.cc +++ b/src/tint/reader/spirv/parser_impl_handle_test.cc @@ -3984,14 +3984,11 @@ TEST_F(SpvParserHandleTest, TexelTypeWhenLoop) { auto ast_body = fe.ast_body(); const auto got = test::ToString(p->program(), ast_body); auto* expect = R"(var x_24 : vec2; -var x_24_phi_1 : vec2; -var x_26_phi_1 : i32; -x_24_phi_1 = vec2(0.0f, 0.0f); -x_26_phi_1 = 0i; +var x_26 : i32; +x_24 = vec2(0.0f, 0.0f); +x_26 = 0i; loop { var x_27 : i32; - x_24 = x_24_phi_1; - let x_26 : i32 = x_26_phi_1; if ((x_26 < 2i)) { } else { break; @@ -3999,8 +3996,8 @@ loop { continuing { x_27 = (x_26 + 1i); - x_24_phi_1 = vec2(1.0f, 1.0f); - x_26_phi_1 = x_27; + x_24 = vec2(1.0f, 1.0f); + x_26 = x_27; } } textureStore(Output2Texture2D, vec2(vec2(1u, 1u)), vec4(x_24, 0.0f, 0.0f)); @@ -4060,14 +4057,11 @@ TEST_F(SpvParserHandleTest, SimpleSelectCanSelectFromHoistedConstant) { auto ast_body = fe.ast_body(); const auto got = test::ToString(p->program(), ast_body); auto* expect = R"(var x_14 : f32; -var x_14_phi_1 : f32; -var x_15_phi_1 : f32; -x_14_phi_1 = 0.0f; -x_15_phi_1 = 0.0f; +var x_15 : f32; +x_14 = 0.0f; +x_15 = 0.0f; loop { var x_17 : f32; - x_14 = x_14_phi_1; - let x_15 : f32 = x_15_phi_1; if ((x_15 < 1.0f)) { } else { break; @@ -4075,8 +4069,9 @@ loop { continuing { x_17 = (x_15 + 1.0f); - x_14_phi_1 = x_15; - x_15_phi_1 = x_17; + let x_15_c16_1 = x_15; + x_14 = x_15_c16_1; + x_15 = x_17; } } let x_21 : f32 = select(0.0f, x_14, (x_14 > 1.0f)); diff --git a/test/tint/bug/tint/1520.spvasm.expected.dxc.hlsl b/test/tint/bug/tint/1520.spvasm.expected.dxc.hlsl index 3e2d65fd8c..cbb1d391c8 100644 --- a/test/tint/bug/tint/1520.spvasm.expected.dxc.hlsl +++ b/test/tint/bug/tint/1520.spvasm.expected.dxc.hlsl @@ -14,21 +14,20 @@ bool test_int_S1_c0_b() { bool ok = false; int4 val = int4(0, 0, 0, 0); bool x_40 = false; + bool x_41 = false; bool x_54 = false; + bool x_55 = false; bool x_65 = false; - bool x_41_phi = false; - bool x_55_phi = false; - bool x_66_phi = false; + bool x_66 = false; const float x_26 = asfloat(x_4[1].x); const int x_27 = int(x_26); unknown = x_27; ok = true; - x_41_phi = false; + x_41 = false; if (true) { x_40 = all((((0).xxxx / value_or_one_if_zero_int4(int4(x_27, x_27, x_27, x_27))) == (0).xxxx)); - x_41_phi = x_40; + x_41 = x_40; } - const bool x_41 = x_41_phi; ok = x_41; const int4 x_44 = int4(x_27, x_27, x_27, x_27); val = x_44; @@ -40,12 +39,11 @@ bool test_int_S1_c0_b() { val = x_49; const int4 x_50 = (x_49 - (1).xxxx); val = x_50; - x_55_phi = false; + x_55 = false; if (x_41) { x_54 = all((x_50 == x_44)); - x_55_phi = x_54; + x_55 = x_54; } - const bool x_55 = x_55_phi; ok = x_55; const int4 x_58 = (x_50 * (2).xxxx); val = x_58; @@ -55,12 +53,11 @@ bool test_int_S1_c0_b() { val = x_60; const int4 x_61 = (x_60 / (2).xxxx); val = x_61; - x_66_phi = false; + x_66 = false; if (x_55) { x_65 = all((x_61 == x_44)); - x_66_phi = x_65; + x_66 = x_65; } - const bool x_66 = x_66_phi; ok = x_66; return x_66; } @@ -73,23 +70,22 @@ void main_1() { float4 x_10_val = float4(0.0f, 0.0f, 0.0f, 0.0f); float4 x_116 = float4(0.0f, 0.0f, 0.0f, 0.0f); bool x_86 = false; + bool x_87 = false; bool x_99 = false; + bool x_100 = false; bool x_110 = false; + bool x_111 = false; bool x_114 = false; - bool x_87_phi = false; - bool x_100_phi = false; - bool x_111_phi = false; - bool x_115_phi = false; + bool x_115 = false; outputColor_S0 = vcolor_S0; const float x_77 = asfloat(x_4[1].x); x_8_unknown = x_77; x_9_ok = true; - x_87_phi = false; + x_87 = false; if (true) { x_86 = all((((0.0f).xxxx / float4(x_77, x_77, x_77, x_77)) == (0.0f).xxxx)); - x_87_phi = x_86; + x_87 = x_86; } - const bool x_87 = x_87_phi; x_9_ok = x_87; const float4 x_89 = float4(x_77, x_77, x_77, x_77); x_10_val = x_89; @@ -101,12 +97,11 @@ void main_1() { x_10_val = x_94; const float4 x_95 = (x_94 - (1.0f).xxxx); x_10_val = x_95; - x_100_phi = false; + x_100 = false; if (x_87) { x_99 = all((x_95 == x_89)); - x_100_phi = x_99; + x_100 = x_99; } - const bool x_100 = x_100_phi; x_9_ok = x_100; const float4 x_103 = (x_95 * (2.0f).xxxx); x_10_val = x_103; @@ -116,19 +111,18 @@ void main_1() { x_10_val = x_105; const float4 x_106 = (x_105 / (2.0f).xxxx); x_10_val = x_106; - x_111_phi = false; + x_111 = false; if (x_100) { x_110 = all((x_106 == x_89)); - x_111_phi = x_110; + x_111 = x_110; } - const bool x_111 = x_111_phi; x_9_ok = x_111; - x_115_phi = false; + x_115 = false; if (x_111) { x_114 = test_int_S1_c0_b(); - x_115_phi = x_114; + x_115 = x_114; } - if (x_115_phi) { + if (x_115) { const float4 x_122 = asfloat(x_4[3]); x_116 = x_122; } else { diff --git a/test/tint/bug/tint/1520.spvasm.expected.fxc.hlsl b/test/tint/bug/tint/1520.spvasm.expected.fxc.hlsl index 3e2d65fd8c..cbb1d391c8 100644 --- a/test/tint/bug/tint/1520.spvasm.expected.fxc.hlsl +++ b/test/tint/bug/tint/1520.spvasm.expected.fxc.hlsl @@ -14,21 +14,20 @@ bool test_int_S1_c0_b() { bool ok = false; int4 val = int4(0, 0, 0, 0); bool x_40 = false; + bool x_41 = false; bool x_54 = false; + bool x_55 = false; bool x_65 = false; - bool x_41_phi = false; - bool x_55_phi = false; - bool x_66_phi = false; + bool x_66 = false; const float x_26 = asfloat(x_4[1].x); const int x_27 = int(x_26); unknown = x_27; ok = true; - x_41_phi = false; + x_41 = false; if (true) { x_40 = all((((0).xxxx / value_or_one_if_zero_int4(int4(x_27, x_27, x_27, x_27))) == (0).xxxx)); - x_41_phi = x_40; + x_41 = x_40; } - const bool x_41 = x_41_phi; ok = x_41; const int4 x_44 = int4(x_27, x_27, x_27, x_27); val = x_44; @@ -40,12 +39,11 @@ bool test_int_S1_c0_b() { val = x_49; const int4 x_50 = (x_49 - (1).xxxx); val = x_50; - x_55_phi = false; + x_55 = false; if (x_41) { x_54 = all((x_50 == x_44)); - x_55_phi = x_54; + x_55 = x_54; } - const bool x_55 = x_55_phi; ok = x_55; const int4 x_58 = (x_50 * (2).xxxx); val = x_58; @@ -55,12 +53,11 @@ bool test_int_S1_c0_b() { val = x_60; const int4 x_61 = (x_60 / (2).xxxx); val = x_61; - x_66_phi = false; + x_66 = false; if (x_55) { x_65 = all((x_61 == x_44)); - x_66_phi = x_65; + x_66 = x_65; } - const bool x_66 = x_66_phi; ok = x_66; return x_66; } @@ -73,23 +70,22 @@ void main_1() { float4 x_10_val = float4(0.0f, 0.0f, 0.0f, 0.0f); float4 x_116 = float4(0.0f, 0.0f, 0.0f, 0.0f); bool x_86 = false; + bool x_87 = false; bool x_99 = false; + bool x_100 = false; bool x_110 = false; + bool x_111 = false; bool x_114 = false; - bool x_87_phi = false; - bool x_100_phi = false; - bool x_111_phi = false; - bool x_115_phi = false; + bool x_115 = false; outputColor_S0 = vcolor_S0; const float x_77 = asfloat(x_4[1].x); x_8_unknown = x_77; x_9_ok = true; - x_87_phi = false; + x_87 = false; if (true) { x_86 = all((((0.0f).xxxx / float4(x_77, x_77, x_77, x_77)) == (0.0f).xxxx)); - x_87_phi = x_86; + x_87 = x_86; } - const bool x_87 = x_87_phi; x_9_ok = x_87; const float4 x_89 = float4(x_77, x_77, x_77, x_77); x_10_val = x_89; @@ -101,12 +97,11 @@ void main_1() { x_10_val = x_94; const float4 x_95 = (x_94 - (1.0f).xxxx); x_10_val = x_95; - x_100_phi = false; + x_100 = false; if (x_87) { x_99 = all((x_95 == x_89)); - x_100_phi = x_99; + x_100 = x_99; } - const bool x_100 = x_100_phi; x_9_ok = x_100; const float4 x_103 = (x_95 * (2.0f).xxxx); x_10_val = x_103; @@ -116,19 +111,18 @@ void main_1() { x_10_val = x_105; const float4 x_106 = (x_105 / (2.0f).xxxx); x_10_val = x_106; - x_111_phi = false; + x_111 = false; if (x_100) { x_110 = all((x_106 == x_89)); - x_111_phi = x_110; + x_111 = x_110; } - const bool x_111 = x_111_phi; x_9_ok = x_111; - x_115_phi = false; + x_115 = false; if (x_111) { x_114 = test_int_S1_c0_b(); - x_115_phi = x_114; + x_115 = x_114; } - if (x_115_phi) { + if (x_115) { const float4 x_122 = asfloat(x_4[3]); x_116 = x_122; } else { diff --git a/test/tint/bug/tint/1520.spvasm.expected.glsl b/test/tint/bug/tint/1520.spvasm.expected.glsl index cfdecf1103..af6bb06fac 100644 --- a/test/tint/bug/tint/1520.spvasm.expected.glsl +++ b/test/tint/bug/tint/1520.spvasm.expected.glsl @@ -25,21 +25,20 @@ bool test_int_S1_c0_b() { bool ok = false; ivec4 val = ivec4(0, 0, 0, 0); bool x_40 = false; + bool x_41 = false; bool x_54 = false; + bool x_55 = false; bool x_65 = false; - bool x_41_phi = false; - bool x_55_phi = false; - bool x_66_phi = false; + bool x_66 = false; float x_26 = x_4.unknownInput_S1_c0; int x_27 = int(x_26); unknown = x_27; ok = true; - x_41_phi = false; + x_41 = false; if (true) { x_40 = all(equal((ivec4(0) / ivec4(x_27, x_27, x_27, x_27)), ivec4(0))); - x_41_phi = x_40; + x_41 = x_40; } - bool x_41 = x_41_phi; ok = x_41; ivec4 x_44 = ivec4(x_27, x_27, x_27, x_27); val = x_44; @@ -51,12 +50,11 @@ bool test_int_S1_c0_b() { val = x_49; ivec4 x_50 = (x_49 - ivec4(1)); val = x_50; - x_55_phi = false; + x_55 = false; if (x_41) { x_54 = all(equal(x_50, x_44)); - x_55_phi = x_54; + x_55 = x_54; } - bool x_55 = x_55_phi; ok = x_55; ivec4 x_58 = (x_50 * ivec4(2)); val = x_58; @@ -66,12 +64,11 @@ bool test_int_S1_c0_b() { val = x_60; ivec4 x_61 = (x_60 / ivec4(2)); val = x_61; - x_66_phi = false; + x_66 = false; if (x_55) { x_65 = all(equal(x_61, x_44)); - x_66_phi = x_65; + x_66 = x_65; } - bool x_66 = x_66_phi; ok = x_66; return x_66; } @@ -84,23 +81,22 @@ void main_1() { vec4 x_10_val = vec4(0.0f, 0.0f, 0.0f, 0.0f); vec4 x_116 = vec4(0.0f, 0.0f, 0.0f, 0.0f); bool x_86 = false; + bool x_87 = false; bool x_99 = false; + bool x_100 = false; bool x_110 = false; + bool x_111 = false; bool x_114 = false; - bool x_87_phi = false; - bool x_100_phi = false; - bool x_111_phi = false; - bool x_115_phi = false; + bool x_115 = false; outputColor_S0 = vcolor_S0; float x_77 = x_4.unknownInput_S1_c0; x_8_unknown = x_77; x_9_ok = true; - x_87_phi = false; + x_87 = false; if (true) { x_86 = all(equal((vec4(0.0f) / vec4(x_77, x_77, x_77, x_77)), vec4(0.0f))); - x_87_phi = x_86; + x_87 = x_86; } - bool x_87 = x_87_phi; x_9_ok = x_87; vec4 x_89 = vec4(x_77, x_77, x_77, x_77); x_10_val = x_89; @@ -112,12 +108,11 @@ void main_1() { x_10_val = x_94; vec4 x_95 = (x_94 - vec4(1.0f)); x_10_val = x_95; - x_100_phi = false; + x_100 = false; if (x_87) { x_99 = all(equal(x_95, x_89)); - x_100_phi = x_99; + x_100 = x_99; } - bool x_100 = x_100_phi; x_9_ok = x_100; vec4 x_103 = (x_95 * vec4(2.0f)); x_10_val = x_103; @@ -127,19 +122,18 @@ void main_1() { x_10_val = x_105; vec4 x_106 = (x_105 / vec4(2.0f)); x_10_val = x_106; - x_111_phi = false; + x_111 = false; if (x_100) { x_110 = all(equal(x_106, x_89)); - x_111_phi = x_110; + x_111 = x_110; } - bool x_111 = x_111_phi; x_9_ok = x_111; - x_115_phi = false; + x_115 = false; if (x_111) { x_114 = test_int_S1_c0_b(); - x_115_phi = x_114; + x_115 = x_114; } - if (x_115_phi) { + if (x_115) { vec4 x_122 = x_4.ucolorGreen_S1_c0; x_116 = x_122; } else { diff --git a/test/tint/bug/tint/1520.spvasm.expected.msl b/test/tint/bug/tint/1520.spvasm.expected.msl index 030f92f3b8..d9ff17cfb6 100644 --- a/test/tint/bug/tint/1520.spvasm.expected.msl +++ b/test/tint/bug/tint/1520.spvasm.expected.msl @@ -28,21 +28,20 @@ bool test_int_S1_c0_b(const constant UniformBuffer* const tint_symbol_5) { bool ok = false; int4 val = 0; bool x_40 = false; + bool x_41 = false; bool x_54 = false; + bool x_55 = false; bool x_65 = false; - bool x_41_phi = false; - bool x_55_phi = false; - bool x_66_phi = false; + bool x_66 = false; float const x_26 = (*(tint_symbol_5)).unknownInput_S1_c0; int const x_27 = int(x_26); unknown = x_27; ok = true; - x_41_phi = false; + x_41 = false; if (true) { x_40 = all(((int4(0) / int4(x_27, x_27, x_27, x_27)) == int4(0))); - x_41_phi = x_40; + x_41 = x_40; } - bool const x_41 = x_41_phi; ok = x_41; int4 const x_44 = int4(x_27, x_27, x_27, x_27); val = x_44; @@ -54,12 +53,11 @@ bool test_int_S1_c0_b(const constant UniformBuffer* const tint_symbol_5) { val = x_49; int4 const x_50 = as_type((as_type(x_49) - as_type(int4(1)))); val = x_50; - x_55_phi = false; + x_55 = false; if (x_41) { x_54 = all((x_50 == x_44)); - x_55_phi = x_54; + x_55 = x_54; } - bool const x_55 = x_55_phi; ok = x_55; int4 const x_58 = as_type((as_type(x_50) * as_type(int4(2)))); val = x_58; @@ -69,12 +67,11 @@ bool test_int_S1_c0_b(const constant UniformBuffer* const tint_symbol_5) { val = x_60; int4 const x_61 = (x_60 / int4(2)); val = x_61; - x_66_phi = false; + x_66 = false; if (x_55) { x_65 = all((x_61 == x_44)); - x_66_phi = x_65; + x_66 = x_65; } - bool const x_66 = x_66_phi; ok = x_66; return x_66; } @@ -87,24 +84,23 @@ void main_1(thread float4* const tint_symbol_6, const constant UniformBuffer* co float4 x_10_val = 0.0f; float4 x_116 = 0.0f; bool x_86 = false; + bool x_87 = false; bool x_99 = false; + bool x_100 = false; bool x_110 = false; + bool x_111 = false; bool x_114 = false; - bool x_87_phi = false; - bool x_100_phi = false; - bool x_111_phi = false; - bool x_115_phi = false; + bool x_115 = false; float4 const x_72 = *(tint_symbol_6); outputColor_S0 = x_72; float const x_77 = (*(tint_symbol_7)).unknownInput_S1_c0; x_8_unknown = x_77; x_9_ok = true; - x_87_phi = false; + x_87 = false; if (true) { x_86 = all(((float4(0.0f) / float4(x_77, x_77, x_77, x_77)) == float4(0.0f))); - x_87_phi = x_86; + x_87 = x_86; } - bool const x_87 = x_87_phi; x_9_ok = x_87; float4 const x_89 = float4(x_77, x_77, x_77, x_77); x_10_val = x_89; @@ -116,12 +112,11 @@ void main_1(thread float4* const tint_symbol_6, const constant UniformBuffer* co x_10_val = x_94; float4 const x_95 = (x_94 - float4(1.0f)); x_10_val = x_95; - x_100_phi = false; + x_100 = false; if (x_87) { x_99 = all((x_95 == x_89)); - x_100_phi = x_99; + x_100 = x_99; } - bool const x_100 = x_100_phi; x_9_ok = x_100; float4 const x_103 = (x_95 * float4(2.0f)); x_10_val = x_103; @@ -131,19 +126,17 @@ void main_1(thread float4* const tint_symbol_6, const constant UniformBuffer* co x_10_val = x_105; float4 const x_106 = (x_105 / float4(2.0f)); x_10_val = x_106; - x_111_phi = false; + x_111 = false; if (x_100) { x_110 = all((x_106 == x_89)); - x_111_phi = x_110; + x_111 = x_110; } - bool const x_111 = x_111_phi; x_9_ok = x_111; - x_115_phi = false; + x_115 = false; if (x_111) { x_114 = test_int_S1_c0_b(tint_symbol_7); - x_115_phi = x_114; + x_115 = x_114; } - bool const x_115 = x_115_phi; if (x_115) { float4 const x_122 = (*(tint_symbol_7)).ucolorGreen_S1_c0; x_116 = x_122; diff --git a/test/tint/bug/tint/1520.spvasm.expected.spvasm b/test/tint/bug/tint/1520.spvasm.expected.spvasm index b5fd273820..5dbf85a5e9 100644 --- a/test/tint/bug/tint/1520.spvasm.expected.spvasm +++ b/test/tint/bug/tint/1520.spvasm.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 170 +; Bound: 176 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -24,11 +24,11 @@ OpName %ok "ok" OpName %val "val" OpName %x_40 "x_40" + OpName %x_41 "x_41" OpName %x_54 "x_54" + OpName %x_55 "x_55" OpName %x_65 "x_65" - OpName %x_41_phi "x_41_phi" - OpName %x_55_phi "x_55_phi" - OpName %x_66_phi "x_66_phi" + OpName %x_66 "x_66" OpName %main_1 "main_1" OpName %outputColor_S0 "outputColor_S0" OpName %output_S1 "output_S1" @@ -37,13 +37,13 @@ OpName %x_10_val "x_10_val" OpName %x_116 "x_116" OpName %x_86 "x_86" + OpName %x_87 "x_87" OpName %x_99 "x_99" + OpName %x_100 "x_100" OpName %x_110 "x_110" + OpName %x_111 "x_111" OpName %x_114 "x_114" - OpName %x_87_phi "x_87_phi" - OpName %x_100_phi "x_100_phi" - OpName %x_111_phi "x_111_phi" - OpName %x_115_phi "x_115_phi" + OpName %x_115 "x_115" OpName %main_out "main_out" OpMemberName %main_out 0 "sk_FragColor_1" OpName %main_inner "main_inner" @@ -101,38 +101,38 @@ %int_1 = OpConstant %int 1 %59 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %int_2 = OpConstant %int 2 - %71 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2 + %72 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2 %void = OpTypeVoid - %82 = OpTypeFunction %void + %85 = OpTypeFunction %void %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Function_float = OpTypePointer Function %float - %91 = OpConstantNull %float + %94 = OpConstantNull %float %float_1 = OpConstant %float 1 - %116 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %119 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %float_2 = OpConstant %float 2 - %128 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 + %132 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 %uint_2 = OpConstant %uint 2 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %uint_1 = OpConstant %uint 1 %main_out = OpTypeStruct %v4float - %155 = OpTypeFunction %main_out %bool %v4float + %161 = OpTypeFunction %main_out %bool %v4float %test_int_S1_c0_b = OpFunction %bool None %22 %24 = OpLabel %unknown = OpVariable %_ptr_Function_int Function %28 %ok = OpVariable %_ptr_Function_bool Function %20 %val = OpVariable %_ptr_Function_v4int Function %34 %x_40 = OpVariable %_ptr_Function_bool Function %20 + %x_41 = OpVariable %_ptr_Function_bool Function %20 %x_54 = OpVariable %_ptr_Function_bool Function %20 + %x_55 = OpVariable %_ptr_Function_bool Function %20 %x_65 = OpVariable %_ptr_Function_bool Function %20 - %x_41_phi = OpVariable %_ptr_Function_bool Function %20 - %x_55_phi = OpVariable %_ptr_Function_bool Function %20 - %x_66_phi = OpVariable %_ptr_Function_bool Function %20 + %x_66 = OpVariable %_ptr_Function_bool Function %20 %44 = OpAccessChain %_ptr_Uniform_float %x_4 %uint_0 %45 = OpLoad %float %44 %46 = OpConvertFToS %int %45 OpStore %unknown %46 OpStore %ok %true - OpStore %x_41_phi %20 + OpStore %x_41 %20 OpSelectionMerge %48 None OpBranchConditional %true %49 %48 %49 = OpLabel @@ -142,10 +142,10 @@ %50 = OpAll %bool %53 OpStore %x_40 %50 %55 = OpLoad %bool %x_40 - OpStore %x_41_phi %55 + OpStore %x_41 %55 OpBranch %48 %48 = OpLabel - %56 = OpLoad %bool %x_41_phi + %56 = OpLoad %bool %x_41 OpStore %ok %56 %57 = OpCompositeConstruct %v4int %46 %46 %46 %46 OpStore %val %57 @@ -157,169 +157,175 @@ OpStore %val %62 %63 = OpISub %v4int %62 %59 OpStore %val %63 - OpStore %x_55_phi %20 - OpSelectionMerge %64 None - OpBranchConditional %56 %65 %64 + OpStore %x_55 %20 + %64 = OpLoad %bool %x_41 + OpSelectionMerge %65 None + OpBranchConditional %64 %66 %65 + %66 = OpLabel + %68 = OpIEqual %v4bool %63 %57 + %67 = OpAll %bool %68 + OpStore %x_54 %67 + %69 = OpLoad %bool %x_54 + OpStore %x_55 %69 + OpBranch %65 %65 = OpLabel - %67 = OpIEqual %v4bool %63 %57 - %66 = OpAll %bool %67 - OpStore %x_54 %66 - %68 = OpLoad %bool %x_54 - OpStore %x_55_phi %68 - OpBranch %64 - %64 = OpLabel - %69 = OpLoad %bool %x_55_phi - OpStore %ok %69 - %72 = OpIMul %v4int %63 %71 - OpStore %val %72 - %73 = OpSDiv %v4int %72 %71 + %70 = OpLoad %bool %x_55 + OpStore %ok %70 + %73 = OpIMul %v4int %63 %72 OpStore %val %73 - %74 = OpIMul %v4int %73 %71 + %74 = OpSDiv %v4int %73 %72 OpStore %val %74 - %75 = OpSDiv %v4int %74 %71 + %75 = OpIMul %v4int %74 %72 OpStore %val %75 - OpStore %x_66_phi %20 - OpSelectionMerge %76 None - OpBranchConditional %69 %77 %76 - %77 = OpLabel - %79 = OpIEqual %v4bool %75 %57 - %78 = OpAll %bool %79 - OpStore %x_65 %78 - %80 = OpLoad %bool %x_65 - OpStore %x_66_phi %80 - OpBranch %76 - %76 = OpLabel - %81 = OpLoad %bool %x_66_phi - OpStore %ok %81 - OpReturnValue %81 + %76 = OpSDiv %v4int %75 %72 + OpStore %val %76 + OpStore %x_66 %20 + %77 = OpLoad %bool %x_55 + OpSelectionMerge %78 None + OpBranchConditional %77 %79 %78 + %79 = OpLabel + %81 = OpIEqual %v4bool %76 %57 + %80 = OpAll %bool %81 + OpStore %x_65 %80 + %82 = OpLoad %bool %x_65 + OpStore %x_66 %82 + OpBranch %78 + %78 = OpLabel + %83 = OpLoad %bool %x_66 + OpStore %ok %83 + %84 = OpLoad %bool %x_66 + OpReturnValue %84 OpFunctionEnd - %main_1 = OpFunction %void None %82 - %85 = OpLabel + %main_1 = OpFunction %void None %85 + %88 = OpLabel %outputColor_S0 = OpVariable %_ptr_Function_v4float Function %10 %output_S1 = OpVariable %_ptr_Function_v4float Function %10 -%x_8_unknown = OpVariable %_ptr_Function_float Function %91 +%x_8_unknown = OpVariable %_ptr_Function_float Function %94 %x_9_ok = OpVariable %_ptr_Function_bool Function %20 %x_10_val = OpVariable %_ptr_Function_v4float Function %10 %x_116 = OpVariable %_ptr_Function_v4float Function %10 %x_86 = OpVariable %_ptr_Function_bool Function %20 + %x_87 = OpVariable %_ptr_Function_bool Function %20 %x_99 = OpVariable %_ptr_Function_bool Function %20 + %x_100 = OpVariable %_ptr_Function_bool Function %20 %x_110 = OpVariable %_ptr_Function_bool Function %20 + %x_111 = OpVariable %_ptr_Function_bool Function %20 %x_114 = OpVariable %_ptr_Function_bool Function %20 - %x_87_phi = OpVariable %_ptr_Function_bool Function %20 - %x_100_phi = OpVariable %_ptr_Function_bool Function %20 - %x_111_phi = OpVariable %_ptr_Function_bool Function %20 - %x_115_phi = OpVariable %_ptr_Function_bool Function %20 - %103 = OpLoad %v4float %vcolor_S0 - OpStore %outputColor_S0 %103 - %104 = OpAccessChain %_ptr_Uniform_float %x_4 %uint_0 - %105 = OpLoad %float %104 - OpStore %x_8_unknown %105 + %x_115 = OpVariable %_ptr_Function_bool Function %20 + %106 = OpLoad %v4float %vcolor_S0 + OpStore %outputColor_S0 %106 + %107 = OpAccessChain %_ptr_Uniform_float %x_4 %uint_0 + %108 = OpLoad %float %107 + OpStore %x_8_unknown %108 OpStore %x_9_ok %true - OpStore %x_87_phi %20 - OpSelectionMerge %106 None - OpBranchConditional %true %107 %106 - %107 = OpLabel - %109 = OpCompositeConstruct %v4float %105 %105 %105 %105 - %110 = OpFDiv %v4float %10 %109 - %111 = OpFOrdEqual %v4bool %110 %10 - %108 = OpAll %bool %111 - OpStore %x_86 %108 - %112 = OpLoad %bool %x_86 - OpStore %x_87_phi %112 - OpBranch %106 - %106 = OpLabel - %113 = OpLoad %bool %x_87_phi - OpStore %x_9_ok %113 - %114 = OpCompositeConstruct %v4float %105 %105 %105 %105 - OpStore %x_10_val %114 - %117 = OpFAdd %v4float %114 %116 + OpStore %x_87 %20 + OpSelectionMerge %109 None + OpBranchConditional %true %110 %109 + %110 = OpLabel + %112 = OpCompositeConstruct %v4float %108 %108 %108 %108 + %113 = OpFDiv %v4float %10 %112 + %114 = OpFOrdEqual %v4bool %113 %10 + %111 = OpAll %bool %114 + OpStore %x_86 %111 + %115 = OpLoad %bool %x_86 + OpStore %x_87 %115 + OpBranch %109 + %109 = OpLabel + %116 = OpLoad %bool %x_87 + OpStore %x_9_ok %116 + %117 = OpCompositeConstruct %v4float %108 %108 %108 %108 OpStore %x_10_val %117 - %118 = OpFSub %v4float %117 %116 - OpStore %x_10_val %118 - %119 = OpFAdd %v4float %118 %116 - OpStore %x_10_val %119 - %120 = OpFSub %v4float %119 %116 + %120 = OpFAdd %v4float %117 %119 OpStore %x_10_val %120 - OpStore %x_100_phi %20 - OpSelectionMerge %121 None - OpBranchConditional %113 %122 %121 - %122 = OpLabel - %124 = OpFOrdEqual %v4bool %120 %114 - %123 = OpAll %bool %124 - OpStore %x_99 %123 - %125 = OpLoad %bool %x_99 - OpStore %x_100_phi %125 - OpBranch %121 - %121 = OpLabel - %126 = OpLoad %bool %x_100_phi - OpStore %x_9_ok %126 - %129 = OpFMul %v4float %120 %128 - OpStore %x_10_val %129 - %130 = OpFDiv %v4float %129 %128 - OpStore %x_10_val %130 - %131 = OpFMul %v4float %130 %128 - OpStore %x_10_val %131 - %132 = OpFDiv %v4float %131 %128 - OpStore %x_10_val %132 - OpStore %x_111_phi %20 - OpSelectionMerge %133 None - OpBranchConditional %126 %134 %133 - %134 = OpLabel - %136 = OpFOrdEqual %v4bool %132 %114 - %135 = OpAll %bool %136 - OpStore %x_110 %135 - %137 = OpLoad %bool %x_110 - OpStore %x_111_phi %137 - OpBranch %133 - %133 = OpLabel - %138 = OpLoad %bool %x_111_phi - OpStore %x_9_ok %138 - OpStore %x_115_phi %20 - OpSelectionMerge %139 None - OpBranchConditional %138 %140 %139 - %140 = OpLabel - %141 = OpFunctionCall %bool %test_int_S1_c0_b - OpStore %x_114 %141 - %142 = OpLoad %bool %x_114 - OpStore %x_115_phi %142 - OpBranch %139 + %121 = OpFSub %v4float %120 %119 + OpStore %x_10_val %121 + %122 = OpFAdd %v4float %121 %119 + OpStore %x_10_val %122 + %123 = OpFSub %v4float %122 %119 + OpStore %x_10_val %123 + OpStore %x_100 %20 + %124 = OpLoad %bool %x_87 + OpSelectionMerge %125 None + OpBranchConditional %124 %126 %125 + %126 = OpLabel + %128 = OpFOrdEqual %v4bool %123 %117 + %127 = OpAll %bool %128 + OpStore %x_99 %127 + %129 = OpLoad %bool %x_99 + OpStore %x_100 %129 + OpBranch %125 + %125 = OpLabel + %130 = OpLoad %bool %x_100 + OpStore %x_9_ok %130 + %133 = OpFMul %v4float %123 %132 + OpStore %x_10_val %133 + %134 = OpFDiv %v4float %133 %132 + OpStore %x_10_val %134 + %135 = OpFMul %v4float %134 %132 + OpStore %x_10_val %135 + %136 = OpFDiv %v4float %135 %132 + OpStore %x_10_val %136 + OpStore %x_111 %20 + %137 = OpLoad %bool %x_100 + OpSelectionMerge %138 None + OpBranchConditional %137 %139 %138 %139 = OpLabel - %143 = OpLoad %bool %x_115_phi - OpSelectionMerge %144 None - OpBranchConditional %143 %145 %146 - %145 = OpLabel - %149 = OpAccessChain %_ptr_Uniform_v4float %x_4 %uint_2 - %150 = OpLoad %v4float %149 - OpStore %x_116 %150 - OpBranch %144 + %141 = OpFOrdEqual %v4bool %136 %117 + %140 = OpAll %bool %141 + OpStore %x_110 %140 + %142 = OpLoad %bool %x_110 + OpStore %x_111 %142 + OpBranch %138 + %138 = OpLabel + %143 = OpLoad %bool %x_111 + OpStore %x_9_ok %143 + OpStore %x_115 %20 + %144 = OpLoad %bool %x_111 + OpSelectionMerge %145 None + OpBranchConditional %144 %146 %145 %146 = OpLabel - %152 = OpAccessChain %_ptr_Uniform_v4float %x_4 %uint_1 - %153 = OpLoad %v4float %152 - OpStore %x_116 %153 - OpBranch %144 - %144 = OpLabel - %154 = OpLoad %v4float %x_116 - OpStore %output_S1 %154 - OpStore %sk_FragColor %154 + %147 = OpFunctionCall %bool %test_int_S1_c0_b + OpStore %x_114 %147 + %148 = OpLoad %bool %x_114 + OpStore %x_115 %148 + OpBranch %145 + %145 = OpLabel + %149 = OpLoad %bool %x_115 + OpSelectionMerge %150 None + OpBranchConditional %149 %151 %152 + %151 = OpLabel + %155 = OpAccessChain %_ptr_Uniform_v4float %x_4 %uint_2 + %156 = OpLoad %v4float %155 + OpStore %x_116 %156 + OpBranch %150 + %152 = OpLabel + %158 = OpAccessChain %_ptr_Uniform_v4float %x_4 %uint_1 + %159 = OpLoad %v4float %158 + OpStore %x_116 %159 + OpBranch %150 + %150 = OpLabel + %160 = OpLoad %v4float %x_116 + OpStore %output_S1 %160 + OpStore %sk_FragColor %160 OpReturn OpFunctionEnd - %main_inner = OpFunction %main_out None %155 + %main_inner = OpFunction %main_out None %161 %sk_Clockwise_param = OpFunctionParameter %bool %vcolor_S0_param = OpFunctionParameter %v4float - %160 = OpLabel + %166 = OpLabel OpStore %sk_Clockwise %sk_Clockwise_param OpStore %vcolor_S0 %vcolor_S0_param - %161 = OpFunctionCall %void %main_1 - %162 = OpLoad %v4float %sk_FragColor - %163 = OpCompositeConstruct %main_out %162 - OpReturnValue %163 + %167 = OpFunctionCall %void %main_1 + %168 = OpLoad %v4float %sk_FragColor + %169 = OpCompositeConstruct %main_out %168 + OpReturnValue %169 OpFunctionEnd - %main = OpFunction %void None %82 - %165 = OpLabel - %167 = OpLoad %bool %sk_Clockwise_param_1 - %168 = OpLoad %v4float %vcolor_S0_param_1 - %166 = OpFunctionCall %main_out %main_inner %167 %168 - %169 = OpCompositeExtract %v4float %166 0 - OpStore %sk_FragColor_1_1 %169 + %main = OpFunction %void None %85 + %171 = OpLabel + %173 = OpLoad %bool %sk_Clockwise_param_1 + %174 = OpLoad %v4float %vcolor_S0_param_1 + %172 = OpFunctionCall %main_out %main_inner %173 %174 + %175 = OpCompositeExtract %v4float %172 0 + OpStore %sk_FragColor_1_1 %175 OpReturn OpFunctionEnd diff --git a/test/tint/bug/tint/1520.spvasm.expected.wgsl b/test/tint/bug/tint/1520.spvasm.expected.wgsl index e3b92b828c..bc85a84adf 100644 --- a/test/tint/bug/tint/1520.spvasm.expected.wgsl +++ b/test/tint/bug/tint/1520.spvasm.expected.wgsl @@ -22,21 +22,20 @@ fn test_int_S1_c0_b() -> bool { var ok : bool; var val : vec4; var x_40 : bool; + var x_41 : bool; var x_54 : bool; + var x_55 : bool; var x_65 : bool; - var x_41_phi : bool; - var x_55_phi : bool; - var x_66_phi : bool; + var x_66 : bool; let x_26 : f32 = x_4.unknownInput_S1_c0; let x_27 : i32 = i32(x_26); unknown = x_27; ok = true; - x_41_phi = false; + x_41 = false; if (true) { x_40 = all(((vec4(0i, 0i, 0i, 0i) / vec4(x_27, x_27, x_27, x_27)) == vec4(0i, 0i, 0i, 0i))); - x_41_phi = x_40; + x_41 = x_40; } - let x_41 : bool = x_41_phi; ok = x_41; let x_44 : vec4 = vec4(x_27, x_27, x_27, x_27); val = x_44; @@ -48,12 +47,11 @@ fn test_int_S1_c0_b() -> bool { val = x_49; let x_50 : vec4 = (x_49 - vec4(1i, 1i, 1i, 1i)); val = x_50; - x_55_phi = false; + x_55 = false; if (x_41) { x_54 = all((x_50 == x_44)); - x_55_phi = x_54; + x_55 = x_54; } - let x_55 : bool = x_55_phi; ok = x_55; let x_58 : vec4 = (x_50 * vec4(2i, 2i, 2i, 2i)); val = x_58; @@ -63,12 +61,11 @@ fn test_int_S1_c0_b() -> bool { val = x_60; let x_61 : vec4 = (x_60 / vec4(2i, 2i, 2i, 2i)); val = x_61; - x_66_phi = false; + x_66 = false; if (x_55) { x_65 = all((x_61 == x_44)); - x_66_phi = x_65; + x_66 = x_65; } - let x_66 : bool = x_66_phi; ok = x_66; return x_66; } @@ -81,24 +78,23 @@ fn main_1() { var x_10_val : vec4; var x_116 : vec4; var x_86 : bool; + var x_87 : bool; var x_99 : bool; + var x_100 : bool; var x_110 : bool; + var x_111 : bool; var x_114 : bool; - var x_87_phi : bool; - var x_100_phi : bool; - var x_111_phi : bool; - var x_115_phi : bool; + var x_115 : bool; let x_72 : vec4 = vcolor_S0; outputColor_S0 = x_72; let x_77 : f32 = x_4.unknownInput_S1_c0; x_8_unknown = x_77; x_9_ok = true; - x_87_phi = false; + x_87 = false; if (true) { x_86 = all(((vec4(0.0f, 0.0f, 0.0f, 0.0f) / vec4(x_77, x_77, x_77, x_77)) == vec4(0.0f, 0.0f, 0.0f, 0.0f))); - x_87_phi = x_86; + x_87 = x_86; } - let x_87 : bool = x_87_phi; x_9_ok = x_87; let x_89 : vec4 = vec4(x_77, x_77, x_77, x_77); x_10_val = x_89; @@ -110,12 +106,11 @@ fn main_1() { x_10_val = x_94; let x_95 : vec4 = (x_94 - vec4(1.0f, 1.0f, 1.0f, 1.0f)); x_10_val = x_95; - x_100_phi = false; + x_100 = false; if (x_87) { x_99 = all((x_95 == x_89)); - x_100_phi = x_99; + x_100 = x_99; } - let x_100 : bool = x_100_phi; x_9_ok = x_100; let x_103 : vec4 = (x_95 * vec4(2.0f, 2.0f, 2.0f, 2.0f)); x_10_val = x_103; @@ -125,19 +120,17 @@ fn main_1() { x_10_val = x_105; let x_106 : vec4 = (x_105 / vec4(2.0f, 2.0f, 2.0f, 2.0f)); x_10_val = x_106; - x_111_phi = false; + x_111 = false; if (x_100) { x_110 = all((x_106 == x_89)); - x_111_phi = x_110; + x_111 = x_110; } - let x_111 : bool = x_111_phi; x_9_ok = x_111; - x_115_phi = false; + x_115 = false; if (x_111) { x_114 = test_int_S1_c0_b(); - x_115_phi = x_114; + x_115 = x_114; } - let x_115 : bool = x_115_phi; if (x_115) { let x_122 : vec4 = x_4.ucolorGreen_S1_c0; x_116 = x_122; diff --git a/test/tint/bug/tint/749.spvasm.expected.dxc.hlsl b/test/tint/bug/tint/749.spvasm.expected.dxc.hlsl index 8605266c5b..149037eaec 100644 --- a/test/tint/bug/tint/749.spvasm.expected.dxc.hlsl +++ b/test/tint/bug/tint/749.spvasm.expected.dxc.hlsl @@ -1,1658 +1 @@ -struct QuicksortObject { - int numbers[10]; -}; - -static QuicksortObject obj = (QuicksortObject)0; -static float4 gl_FragCoord = float4(0.0f, 0.0f, 0.0f, 0.0f); -cbuffer cbuffer_x_188 : register(b0, space0) { - uint4 x_188[1]; -}; -static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); - -void swap_i1_i1_(inout int i, inout int j) { - int temp = 0; - const int x_932 = temp; - temp = 0; - temp = x_932; - const float3 x_523 = float3(3.0f, 2.0f, 3.0f); - const int x_933 = i; - i = 0; - i = x_933; - const int x_28 = i; - const int x_934 = j; - j = 0; - j = x_934; - const float3 x_524 = float3(x_523.y, x_523.x, x_523.y); - const int x_935 = temp; - temp = 0; - temp = x_935; - const int x_30_save = x_28; - const int x_936 = obj.numbers[x_30_save]; - { - int tint_symbol_1[10] = obj.numbers; - tint_symbol_1[x_30_save] = 0; - obj.numbers = tint_symbol_1; - } - { - int tint_symbol_3[10] = obj.numbers; - tint_symbol_3[x_30_save] = x_936; - obj.numbers = tint_symbol_3; - } - const int x_31 = obj.numbers[x_30_save]; - const int x_937 = temp; - temp = 0; - temp = x_937; - temp = x_31; - const int x_938 = j; - j = 0; - j = x_938; - const float3 x_525 = float3(x_523.z, 1.0f, x_523.y); - const int x_939 = i; - i = 0; - i = x_939; - const int x_32 = i; - const int x_940 = obj.numbers[x_30_save]; - { - int tint_symbol_5[10] = obj.numbers; - tint_symbol_5[x_30_save] = 0; - obj.numbers = tint_symbol_5; - } - { - int tint_symbol_7[10] = obj.numbers; - tint_symbol_7[x_30_save] = x_940; - obj.numbers = tint_symbol_7; - } - const int x_33 = j; - const int x_941 = i; - i = 0; - i = x_941; - const float3 x_526 = float3(x_525.x, x_525.z, x_525.z); - const int x_942 = obj.numbers[x_30_save]; - { - int tint_symbol_9[10] = obj.numbers; - tint_symbol_9[x_30_save] = 0; - obj.numbers = tint_symbol_9; - } - { - int tint_symbol_11[10] = obj.numbers; - tint_symbol_11[x_30_save] = x_942; - obj.numbers = tint_symbol_11; - } - const int x_34_save = x_33; - const int x_35 = obj.numbers[x_34_save]; - const QuicksortObject x_943 = obj; - const int tint_symbol_52[10] = (int[10])0; - const QuicksortObject tint_symbol_53 = {tint_symbol_52}; - obj = tint_symbol_53; - obj = x_943; - const float2 x_527 = float2(x_526.x, x_526.x); - const int x_36_save = x_32; - const float3 x_528 = float3(x_524.x, x_524.z, x_524.x); - { - int tint_symbol_13[10] = obj.numbers; - tint_symbol_13[x_36_save] = x_35; - obj.numbers = tint_symbol_13; - } - const QuicksortObject x_944 = obj; - const int tint_symbol_54[10] = (int[10])0; - const QuicksortObject tint_symbol_55 = {tint_symbol_54}; - obj = tint_symbol_55; - obj = x_944; - const float3 x_529 = float3(x_526.y, x_526.z, x_526.x); - const int x_945 = i; - i = 0; - i = x_945; - const int x_37 = j; - const int x_946 = temp; - temp = 0; - temp = x_946; - const float2 x_530 = float2(x_529.z, x_529.y); - const int x_947 = obj.numbers[x_34_save]; - { - int tint_symbol_15[10] = obj.numbers; - tint_symbol_15[x_34_save] = 0; - obj.numbers = tint_symbol_15; - } - { - int tint_symbol_17[10] = obj.numbers; - tint_symbol_17[x_34_save] = x_947; - obj.numbers = tint_symbol_17; - } - const int x_38 = temp; - const int x_948 = j; - j = 0; - j = x_948; - const float3 x_531 = float3(x_527.x, x_526.y, x_526.x); - const int x_949 = obj.numbers[x_36_save]; - { - int tint_symbol_19[10] = obj.numbers; - tint_symbol_19[x_36_save] = 0; - obj.numbers = tint_symbol_19; - } - { - int tint_symbol_21[10] = obj.numbers; - tint_symbol_21[x_36_save] = x_949; - obj.numbers = tint_symbol_21; - } - const QuicksortObject x_950 = obj; - const int tint_symbol_56[10] = (int[10])0; - const QuicksortObject tint_symbol_57 = {tint_symbol_56}; - obj = tint_symbol_57; - obj = x_950; - const float3 x_532 = float3(x_528.x, x_528.y, x_528.x); - const int x_951 = obj.numbers[x_34_save]; - { - int tint_symbol_23[10] = obj.numbers; - tint_symbol_23[x_34_save] = 0; - obj.numbers = tint_symbol_23; - } - { - int tint_symbol_25[10] = obj.numbers; - tint_symbol_25[x_34_save] = x_951; - obj.numbers = tint_symbol_25; - } - { - int tint_symbol_27[10] = obj.numbers; - tint_symbol_27[x_37] = x_38; - obj.numbers = tint_symbol_27; - } - return; -} - -int performPartition_i1_i1_(inout int l, inout int h) { - int param_3 = 0; - int i_1 = 0; - int j_1 = 0; - int param_2 = 0; - int param_1 = 0; - int param = 0; - int pivot = 0; - float2 x_537 = float2(0.0f, 0.0f); - float3 x_538 = float3(0.0f, 0.0f, 0.0f); - const int x_952 = h; - h = 0; - h = x_952; - const int x_41 = h; - const int x_953 = l; - l = 0; - l = x_953; - const int x_42_save = x_41; - const int x_954 = obj.numbers[x_42_save]; - { - int tint_symbol_29[10] = obj.numbers; - tint_symbol_29[x_42_save] = 0; - obj.numbers = tint_symbol_29; - } - { - int tint_symbol_31[10] = obj.numbers; - tint_symbol_31[x_42_save] = x_954; - obj.numbers = tint_symbol_31; - } - const int x_43 = obj.numbers[x_42_save]; - const int x_955 = param_3; - param_3 = 0; - param_3 = x_955; - const float3 x_534 = float3(3.0f, 1.0f, 3.0f); - const int x_956 = param_1; - param_1 = 0; - param_1 = x_956; - pivot = x_43; - const int x_45 = l; - const int x_957 = h; - h = 0; - h = x_957; - const int x_958 = j_1; - j_1 = 0; - j_1 = x_958; - const float3 x_535 = float3(x_534.y, x_534.z, x_534.y); - const int x_959 = l; - l = 0; - l = x_959; - i_1 = (x_45 - asint(1u)); - const int x_49 = l; - const float3 x_536 = float3(x_534.x, x_534.z, x_535.x); - j_1 = 10; - const QuicksortObject x_960 = obj; - const int tint_symbol_58[10] = (int[10])0; - const QuicksortObject tint_symbol_59 = {tint_symbol_58}; - obj = tint_symbol_59; - obj = x_960; - [loop] while (true) { - const int x_961 = pivot; - pivot = 0; - pivot = x_961; - const int x_962 = param_1; - param_1 = 0; - param_1 = x_962; - const int x_55 = j_1; - const int x_963 = pivot; - pivot = 0; - pivot = x_963; - x_537 = float2(2.0f, 3.0f); - const QuicksortObject x_964 = obj; - const int tint_symbol_60[10] = (int[10])0; - const QuicksortObject tint_symbol_61 = {tint_symbol_60}; - obj = tint_symbol_61; - obj = x_964; - const int x_56 = h; - const int x_965 = h; - h = 0; - h = x_965; - const int x_966 = param; - param = 0; - param = x_966; - const int x_967 = j_1; - j_1 = 0; - j_1 = x_967; - x_538 = float3(x_534.x, x_537.y, x_534.z); - const int x_968 = param; - param = 0; - param = x_968; - if ((x_55 <= (x_56 - asint(1u)))) { - } else { - break; - } - const int x_60 = j_1; - const int x_969 = obj.numbers[x_42_save]; - { - int tint_symbol_33[10] = obj.numbers; - tint_symbol_33[x_42_save] = 0; - obj.numbers = tint_symbol_33; - } - { - int tint_symbol_35[10] = obj.numbers; - tint_symbol_35[x_42_save] = x_969; - obj.numbers = tint_symbol_35; - } - const int x_61_save = x_60; - const int x_970 = h; - h = 0; - h = x_970; - const float3 x_539 = float3(x_537.x, x_535.z, x_537.x); - const int x_971 = param_1; - param_1 = 0; - param_1 = x_971; - const int x_62 = obj.numbers[x_61_save]; - const QuicksortObject x_972 = obj; - const int tint_symbol_62[10] = (int[10])0; - const QuicksortObject tint_symbol_63 = {tint_symbol_62}; - obj = tint_symbol_63; - obj = x_972; - const int x_63 = pivot; - const float2 x_540 = float2(2.0f, x_534.z); - const int x_973 = i_1; - i_1 = 0; - i_1 = x_973; - const int x_974 = l; - l = 0; - l = x_974; - const float3 x_541 = float3(x_534.y, x_534.x, x_534.y); - const int x_975 = pivot; - pivot = 0; - pivot = x_975; - if ((x_62 <= x_63)) { - const float3 x_542 = float3(x_541.z, x_541.x, x_541.x); - const int x_976 = param_3; - param_3 = 0; - param_3 = x_976; - const int x_67 = i_1; - const int x_977 = pivot; - pivot = 0; - pivot = x_977; - const float2 x_543 = float2(x_539.x, x_541.y); - const int x_978 = i_1; - i_1 = 0; - i_1 = x_978; - const int x_979 = param; - param = 0; - param = x_979; - i_1 = (x_67 + asint(1u)); - const int x_980 = l; - l = 0; - l = x_980; - const float3 x_544 = float3(3.0f, 2.0f, x_540.x); - const int x_70 = i_1; - const float2 x_545 = float2(x_537.y, x_538.x); - const int x_981 = param; - param = 0; - param = x_981; - param = x_70; - const int x_982 = param; - param = 0; - param = x_982; - const float2 x_546 = float2(x_545.x, x_545.x); - const int x_983 = i_1; - i_1 = 0; - i_1 = x_983; - param_1 = j_1; - const int x_984 = param_3; - param_3 = 0; - param_3 = x_984; - swap_i1_i1_(param, param_1); - const int x_985 = param_1; - param_1 = 0; - param_1 = x_985; - } - const QuicksortObject x_986 = obj; - const int tint_symbol_64[10] = (int[10])0; - const QuicksortObject tint_symbol_65 = {tint_symbol_64}; - obj = tint_symbol_65; - obj = x_986; - { - const int x_987 = h; - h = 0; - h = x_987; - const int x_74 = j_1; - const int x_988 = h; - h = 0; - h = x_988; - const float3 x_547 = float3(x_539.x, x_541.z, x_541.z); - const int x_989 = obj.numbers[x_61_save]; - { - int tint_symbol_37[10] = obj.numbers; - tint_symbol_37[x_61_save] = 0; - obj.numbers = tint_symbol_37; - } - { - int tint_symbol_39[10] = obj.numbers; - tint_symbol_39[x_61_save] = x_989; - obj.numbers = tint_symbol_39; - } - const int x_990 = param; - param = 0; - param = x_990; - j_1 = (1 + x_74); - const int x_991 = param_1; - param_1 = 0; - param_1 = x_991; - const float3 x_548 = float3(x_541.y, x_541.z, x_541.x); - const int x_992 = obj.numbers[x_61_save]; - { - int tint_symbol_41[10] = obj.numbers; - tint_symbol_41[x_61_save] = 0; - obj.numbers = tint_symbol_41; - } - { - int tint_symbol_43[10] = obj.numbers; - tint_symbol_43[x_61_save] = x_992; - obj.numbers = tint_symbol_43; - } - } - } - const int x_76 = i_1; - const int x_993 = obj.numbers[x_42_save]; - { - int tint_symbol_45[10] = obj.numbers; - tint_symbol_45[x_42_save] = 0; - obj.numbers = tint_symbol_45; - } - { - int tint_symbol_47[10] = obj.numbers; - tint_symbol_47[x_42_save] = x_993; - obj.numbers = tint_symbol_47; - } - const float2 x_549 = float2(x_534.x, x_534.y); - const QuicksortObject x_994 = obj; - const int tint_symbol_66[10] = (int[10])0; - const QuicksortObject tint_symbol_67 = {tint_symbol_66}; - obj = tint_symbol_67; - obj = x_994; - const int x_995 = h; - h = 0; - h = x_995; - i_1 = (1 + x_76); - const int x_996 = param_1; - param_1 = 0; - param_1 = x_996; - const int x_79 = i_1; - const int x_997 = j_1; - j_1 = 0; - j_1 = x_997; - const float2 x_550 = float2(x_534.x, x_534.x); - const int x_998 = param_1; - param_1 = 0; - param_1 = x_998; - param_2 = x_79; - const float2 x_551 = float2(x_534.y, x_536.x); - const int x_999 = pivot; - pivot = 0; - pivot = x_999; - const int x_81 = h; - const float2 x_552 = float2(x_550.x, x_549.y); - const int x_1000 = h; - h = 0; - h = x_1000; - param_3 = x_81; - const int x_1001 = i_1; - i_1 = 0; - i_1 = x_1001; - const float2 x_553 = float2(x_549.y, x_552.x); - const int x_1002 = h; - h = 0; - h = x_1002; - swap_i1_i1_(param_2, param_3); - const int x_1003 = l; - l = 0; - l = x_1003; - const float2 x_554 = float2(x_536.z, 2.0f); - const int x_1004 = param_1; - param_1 = 0; - param_1 = x_1004; - const int x_83 = i_1; - const int x_1005 = param; - param = 0; - param = x_1005; - const float2 x_555 = float2(x_534.y, x_534.x); - const int x_1006 = j_1; - j_1 = 0; - j_1 = x_1006; - return x_83; -} - -void quicksort_() { - int param_4 = 0; - int h_1 = 0; - int p = 0; - int l_1 = 0; - int top = 0; - int stack[10] = (int[10])0; - int param_5 = 0; - l_1 = 0; - const int x_1007 = param_5; - param_5 = 0; - param_5 = x_1007; - h_1 = 9; - const int x_1008[10] = stack; - const int tint_symbol_68[10] = (int[10])0; - stack = tint_symbol_68; - stack = x_1008; - const float2 x_556 = (2.0f).xx; - const int x_1009 = param_5; - param_5 = 0; - param_5 = x_1009; - top = -1; - const int x_1010 = p; - p = 0; - p = x_1010; - const int x_93 = top; - const float2 x_557 = (1.0f).xx; - const int x_1011 = p; - p = 0; - p = x_1011; - const int x_94 = (x_93 + asint(1u)); - const int x_1012 = top; - top = 0; - top = x_1012; - const float2 x_558 = float2(x_556.y, x_557.y); - const int x_1013 = param_4; - param_4 = 0; - param_4 = x_1013; - top = x_94; - const int x_1014 = h_1; - h_1 = 0; - h_1 = x_1014; - const float3 x_559 = float3(x_557.y, x_557.x, x_557.x); - const int x_1015 = param_4; - param_4 = 0; - param_4 = x_1015; - const int x_95 = l_1; - const QuicksortObject x_1016 = obj; - const int tint_symbol_69[10] = (int[10])0; - const QuicksortObject tint_symbol_70 = {tint_symbol_69}; - obj = tint_symbol_70; - obj = x_1016; - const float3 x_560 = float3(x_559.y, x_559.x, x_557.x); - const int x_96_save = x_94; - const int x_1017[10] = stack; - const int tint_symbol_71[10] = (int[10])0; - stack = tint_symbol_71; - stack = x_1017; - const float3 x_561 = float3(x_556.y, x_556.y, x_556.y); - const int x_1018 = l_1; - l_1 = 0; - l_1 = 0; - stack[x_96_save] = x_95; - const int x_1019 = param_5; - param_5 = 0; - param_5 = x_1019; - const int x_97 = top; - const int x_1020 = param_4; - param_4 = 0; - param_4 = x_1020; - const float3 x_562 = float3(3.0f, x_558.y, 2.0f); - const int x_1021 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1021; - const int x_98 = (x_97 + 1); - const int x_1022 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1022; - const float3 x_563 = float3(x_559.x, x_559.z, x_556.y); - top = x_98; - const int x_1023 = param_4; - param_4 = 0; - param_4 = x_1023; - const int x_99 = h_1; - const int x_1024 = param_4; - param_4 = 0; - param_4 = x_1024; - const float3 x_564 = float3(x_558.x, x_561.x, x_558.y); - const int x_1025 = l_1; - l_1 = 0; - l_1 = x_1025; - const int x_100_save = x_98; - const int x_1026 = param_5; - param_5 = 0; - param_5 = x_1026; - const float2 x_565 = float2(x_564.z, x_564.z); - const int x_1027 = p; - p = 0; - p = x_1027; - stack[x_100_save] = x_99; - [loop] while (true) { - const float3 x_566 = float3(x_563.x, x_563.x, x_563.x); - const int x_1028 = h_1; - h_1 = 0; - h_1 = x_1028; - const int x_1029[10] = stack; - const int tint_symbol_72[10] = (int[10])0; - stack = tint_symbol_72; - stack = x_1029; - const int x_106 = top; - const int x_1030[10] = stack; - const int tint_symbol_73[10] = (int[10])0; - stack = tint_symbol_73; - stack = x_1030; - const float2 x_567 = float2(x_558.x, x_564.z); - const int x_1031 = param_4; - param_4 = 0; - param_4 = x_1031; - if ((x_106 >= asint(0u))) { - } else { - break; - } - const QuicksortObject x_1032 = obj; - const int tint_symbol_74[10] = (int[10])0; - const QuicksortObject tint_symbol_75 = {tint_symbol_74}; - obj = tint_symbol_75; - obj = x_1032; - const float3 x_568 = float3(x_559.y, x_559.x, x_563.y); - const int x_1033 = param_4; - param_4 = 0; - param_4 = x_1033; - const int x_108 = top; - const float3 x_569 = float3(x_565.x, x_567.y, x_565.x); - const int x_1034 = h_1; - h_1 = 0; - h_1 = x_1034; - const float2 x_570 = float2(x_556.x, x_556.x); - const int x_1035 = p; - p = 0; - p = x_1035; - top = (x_108 - asint(1u)); - const int x_1036 = p; - p = 0; - p = x_1036; - const int x_110_save = x_108; - const int x_1037 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1037; - const int x_111 = stack[x_110_save]; - const int x_1038[10] = stack; - const int tint_symbol_76[10] = (int[10])0; - stack = tint_symbol_76; - stack = x_1038; - const float3 x_571 = float3(x_559.y, x_559.x, x_564.y); - const int x_1039 = l_1; - l_1 = 0; - l_1 = x_1039; - h_1 = x_111; - const int x_1040[10] = stack; - const int tint_symbol_77[10] = (int[10])0; - stack = tint_symbol_77; - stack = x_1040; - const float2 x_572 = float2(x_562.y, x_561.y); - const int x_1041 = p; - p = 0; - p = x_1041; - const int x_112 = top; - const int x_1042 = param_4; - param_4 = 0; - param_4 = x_1042; - const int x_1043 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1043; - const float2 x_573 = float2(2.0f, 3.0f); - top = (x_112 - 1); - const int x_1044 = param_5; - param_5 = 0; - param_5 = x_1044; - const float3 x_574 = float3(x_570.y, x_565.x, x_570.y); - const int x_1045 = h_1; - h_1 = 0; - h_1 = x_1045; - const int x_114_save = x_112; - const float2 x_575 = float2(x_564.y, x_564.z); - const int x_1046 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1046; - const int x_115 = stack[x_114_save]; - const int x_1047 = p; - p = 0; - p = x_1047; - const float3 x_576 = float3(x_573.y, x_573.y, x_565.x); - const int x_1048 = param_5; - param_5 = 0; - param_5 = x_1048; - l_1 = x_115; - const int x_1049 = top; - top = 0; - top = x_1049; - param_4 = l_1; - const int x_1050 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1050; - const float2 x_577 = float2(x_569.y, x_569.z); - const int x_120 = h_1; - const float2 x_578 = float2(x_558.x, 2.0f); - param_5 = x_120; - const int x_1051 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1051; - const int x_121 = performPartition_i1_i1_(param_4, param_5); - const float2 x_579 = float2(x_567.x, x_568.x); - const int x_1052 = param_5; - param_5 = 0; - param_5 = x_1052; - p = x_121; - const int x_1053 = param_4; - param_4 = 0; - param_4 = x_1053; - const int x_122 = p; - const int x_1054 = h_1; - h_1 = 0; - h_1 = x_1054; - const float2 x_580 = float2(x_568.y, x_568.y); - const int x_1055 = l_1; - l_1 = 0; - l_1 = x_1055; - const int x_1056 = h_1; - h_1 = 0; - h_1 = x_1056; - const int x_124 = l_1; - const int x_1057 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1057; - const int x_1058 = h_1; - h_1 = 0; - h_1 = x_1058; - const float2 x_582 = float2(x_567.y, x_573.x); - const int x_1059 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1059; - if (((x_122 - asint(1u)) > x_124)) { - const int x_1060 = param_4; - param_4 = 0; - param_4 = x_1060; - const int x_128 = top; - const float2 x_583 = float2(x_571.y, x_556.y); - const int x_1061 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1061; - const int x_1062[10] = stack; - const int tint_symbol_78[10] = (int[10])0; - stack = tint_symbol_78; - stack = x_1062; - const float2 x_584 = float2(x_569.z, x_569.y); - const float3 x_585 = float3(x_580.y, x_577.x, x_577.x); - const int x_130 = l_1; - const int x_1063 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1063; - const float2 x_586 = float2(x_564.x, x_585.x); - const int x_1064 = param_5; - param_5 = 0; - param_5 = x_1064; - const int x_131_save = (1 + x_128); - const int x_1065 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1065; - const float3 x_587 = float3(x_566.y, x_566.y, x_563.x); - const int x_1066 = param_5; - param_5 = 0; - param_5 = x_1066; - stack[x_131_save] = x_130; - const int x_132 = top; - const int x_1067 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1067; - const float2 x_588 = float2(x_575.y, x_575.x); - const int x_1068 = stack[x_131_save]; - stack[x_131_save] = 0; - stack[x_131_save] = x_1068; - const int x_133 = asint((1u + asuint(x_132))); - const int x_1069 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1069; - const float3 x_589 = float3(x_576.z, x_588.y, x_576.z); - const int x_1070 = h_1; - h_1 = 0; - h_1 = x_1070; - top = x_133; - const int x_1071[10] = stack; - const int tint_symbol_79[10] = (int[10])0; - stack = tint_symbol_79; - stack = x_1071; - const int x_134 = p; - const float2 x_590 = float2(x_576.x, x_573.y); - const int x_1072 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1072; - const int x_136_save = x_133; - const int x_1073 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1073; - stack[x_136_save] = (x_134 - asint(1u)); - const int x_1074 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1074; - const float2 x_591 = float2(x_569.z, x_569.y); - const int x_1075 = stack[x_136_save]; - stack[x_136_save] = 0; - stack[x_136_save] = x_1075; - } - const int x_1076 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1076; - const float2 x_592 = float2(1.0f, 2.0f); - const QuicksortObject x_1077 = obj; - const int tint_symbol_80[10] = (int[10])0; - const QuicksortObject tint_symbol_81 = {tint_symbol_80}; - obj = tint_symbol_81; - obj = x_1077; - const int x_137 = p; - const int x_1078 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1078; - const float3 x_593 = float3(x_571.z, x_556.x, x_556.y); - const int x_1079 = p; - p = 0; - p = x_1079; - const float3 x_594 = float3(x_563.z, x_563.x, x_575.x); - const int x_1080 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1080; - const int x_139 = h_1; - const int x_1081 = top; - top = 0; - top = x_1081; - const float3 x_595 = float3(x_560.z, x_568.x, x_560.x); - const int x_1082 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1082; - const int x_1083 = p; - p = 0; - p = x_1083; - if ((asint((1u + asuint(x_137))) < x_139)) { - const int x_1084 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1084; - const float2 x_596 = float2(x_592.y, x_582.x); - const int x_1085 = l_1; - l_1 = 0; - l_1 = x_1085; - const int x_143 = top; - const int x_1086 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1086; - const float3 x_597 = float3(x_562.y, x_560.y, x_560.y); - const int x_144 = (x_143 + 1); - const int x_1087 = param_5; - param_5 = 0; - param_5 = x_1087; - top = x_144; - const int x_1088 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1088; - const int x_145 = p; - const int x_1089 = param_5; - param_5 = 0; - param_5 = x_1089; - const float3 x_599 = float3(x_560.z, x_560.x, x_568.x); - const int x_1090 = p; - p = 0; - p = x_1090; - const float3 x_600 = float3(x_556.x, x_580.x, x_580.x); - const int x_1091 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1091; - const int x_147_save = x_144; - const int x_1092 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1092; - const float2 x_601 = float2(x_563.x, x_563.y); - stack[x_147_save] = asint((1u + asuint(x_145))); - const int x_1093[10] = stack; - const int tint_symbol_82[10] = (int[10])0; - stack = tint_symbol_82; - stack = x_1093; - const int x_148 = top; - const int x_1094 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1094; - const float2 x_602 = float2(x_565.y, x_599.y); - const int x_1095[10] = stack; - const int tint_symbol_83[10] = (int[10])0; - stack = tint_symbol_83; - stack = x_1095; - const int x_149 = (x_148 + asint(1u)); - const int x_1096 = stack[x_147_save]; - stack[x_147_save] = 0; - stack[x_147_save] = x_1096; - top = x_149; - const int x_1097 = param_4; - param_4 = 0; - param_4 = x_1097; - const int x_150 = h_1; - const int x_1098 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1098; - const int x_1099 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1099; - stack[x_149] = x_150; - const int x_1100 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1100; - const float3 x_603 = float3(x_568.y, x_564.x, x_564.x); - const int x_1101 = l_1; - l_1 = 0; - l_1 = x_1101; - } - const int x_1102 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1102; - { - const int x_1103 = l_1; - l_1 = 0; - l_1 = x_1103; - const float2 x_604 = float2(x_563.z, x_564.x); - const QuicksortObject x_1104 = obj; - const int tint_symbol_84[10] = (int[10])0; - const QuicksortObject tint_symbol_85 = {tint_symbol_84}; - obj = tint_symbol_85; - obj = x_1104; - } - } - const int x_1105 = h_1; - h_1 = 0; - h_1 = x_1105; - return; -} - -void main_1() { - float3 color = float3(0.0f, 0.0f, 0.0f); - int i_2 = 0; - float2 uv = float2(0.0f, 0.0f); - const float2 x_717 = uv; - uv = (0.0f).xx; - uv = x_717; - i_2 = 0; - const QuicksortObject x_721 = obj; - const int tint_symbol_86[10] = (int[10])0; - const QuicksortObject tint_symbol_87 = {tint_symbol_86}; - obj = tint_symbol_87; - obj = x_721; - if (true) { - const QuicksortObject x_722 = obj; - const int tint_symbol_88[10] = (int[10])0; - const QuicksortObject tint_symbol_89 = {tint_symbol_88}; - obj = tint_symbol_89; - obj = x_722; - const float2 x_431 = (1.0f).xx; - const int x_158 = i_2; - const float2 x_723 = uv; - uv = (0.0f).xx; - uv = x_723; - const float3 x_725 = color; - color = (0.0f).xxx; - color = x_725; - const float2 x_432 = float2(x_431.y, x_431.y); - const QuicksortObject x_726 = obj; - const int tint_symbol_90[10] = (int[10])0; - const QuicksortObject tint_symbol_91 = {tint_symbol_90}; - obj = tint_symbol_91; - obj = x_726; - } - const QuicksortObject x_756 = obj; - const int tint_symbol_92[10] = (int[10])0; - const QuicksortObject tint_symbol_93 = {tint_symbol_92}; - obj = tint_symbol_93; - obj = x_756; - const float2 x_446 = (0.0f).xx; - const int x_757 = i_2; - i_2 = 0; - i_2 = x_757; - quicksort_(); - const QuicksortObject x_758 = obj; - const int tint_symbol_94[10] = (int[10])0; - const QuicksortObject tint_symbol_95 = {tint_symbol_94}; - obj = tint_symbol_95; - obj = x_758; - const float4 x_184 = gl_FragCoord; - const float2 x_759 = uv; - uv = (0.0f).xx; - uv = x_759; - const float2 x_447 = (0.0f).xx; - const float2 x_760 = uv; - uv = (0.0f).xx; - uv = x_760; - const float2 x_185 = float2(x_184.x, x_184.y); - const float3 x_448 = float3(x_185.y, x_446.y, x_446.y); - const QuicksortObject x_761 = obj; - const int tint_symbol_96[10] = (int[10])0; - const QuicksortObject tint_symbol_97 = {tint_symbol_96}; - obj = tint_symbol_97; - obj = x_761; - const float2 x_762 = uv; - uv = (0.0f).xx; - uv = x_762; - const float2 x_191 = asfloat(x_188[0].xy); - const QuicksortObject x_763 = obj; - const int tint_symbol_98[10] = (int[10])0; - const QuicksortObject tint_symbol_99 = {tint_symbol_98}; - obj = tint_symbol_99; - obj = x_763; - const float3 x_449 = float3(x_184.y, 3.0f, x_184.w); - const float3 x_764 = color; - color = (0.0f).xxx; - color = x_764; - const float2 x_192 = (x_185 / x_191); - const QuicksortObject x_765 = obj; - const int tint_symbol_100[10] = (int[10])0; - const QuicksortObject tint_symbol_101 = {tint_symbol_100}; - obj = tint_symbol_101; - obj = x_765; - const float2 x_450 = float2(x_447.x, x_185.y); - const float3 x_766 = color; - color = (0.0f).xxx; - const float3 x_767 = color; - color = (0.0f).xxx; - color = x_767; - color = x_766; - uv = x_192; - color = float3(1.0f, 2.0f, 3.0f); - const float3 x_768 = color; - color = (0.0f).xxx; - color = x_768; - const float3 x_451 = float3(x_185.x, x_185.y, x_446.y); - const QuicksortObject x_769 = obj; - const int tint_symbol_102[10] = (int[10])0; - const QuicksortObject tint_symbol_103 = {tint_symbol_102}; - obj = tint_symbol_103; - obj = x_769; - const int x_770 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_770; - const int x_201 = obj.numbers[0u]; - const QuicksortObject x_771 = obj; - const int tint_symbol_104[10] = (int[10])0; - const QuicksortObject tint_symbol_105 = {tint_symbol_104}; - obj = tint_symbol_105; - obj = x_771; - const int x_772 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_772; - const float x_206 = color.x; - const float x_773 = color.x; - color.x = 0.0f; - color.x = x_773; - const float2 x_452 = float2(3.0f, 2.0f); - const int x_774 = i_2; - i_2 = 0; - i_2 = x_774; - const QuicksortObject x_775 = obj; - const int tint_symbol_106[10] = (int[10])0; - const QuicksortObject tint_symbol_107 = {tint_symbol_106}; - obj = tint_symbol_107; - obj = x_775; - const float3 x_453 = float3(x_451.x, x_450.x, x_450.y); - color.x = (x_206 + float(x_201)); - const float2 x_776 = uv; - uv = (0.0f).xx; - uv = x_776; - const float2 x_777 = uv; - uv = (0.0f).xx; - uv = x_777; - const float2 x_454 = float2(x_184.y, x_184.y); - const float x_210 = uv.x; - const float2 x_455 = float2(x_192.y, x_192.x); - const float x_778 = uv.x; - uv.x = 0.0f; - uv.x = x_778; - const QuicksortObject x_779 = obj; - const int tint_symbol_108[10] = (int[10])0; - const QuicksortObject tint_symbol_109 = {tint_symbol_108}; - obj = tint_symbol_109; - obj = x_779; - if ((x_210 > 0.25f)) { - const int x_780 = i_2; - i_2 = 0; - i_2 = x_780; - const int x_781 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_781; - const float3 x_456 = float3(0.0f, x_448.y, x_448.y); - const float x_782 = uv.x; - uv.x = 0.0f; - uv.x = x_782; - const int x_216 = obj.numbers[1]; - const QuicksortObject x_783 = obj; - const int tint_symbol_110[10] = (int[10])0; - const QuicksortObject tint_symbol_111 = {tint_symbol_110}; - obj = tint_symbol_111; - obj = x_783; - const float2 x_457 = float2(x_454.x, x_454.x); - const float2 x_784 = uv; - uv = (0.0f).xx; - uv = x_784; - const QuicksortObject x_785 = obj; - const int tint_symbol_112[10] = (int[10])0; - const QuicksortObject tint_symbol_113 = {tint_symbol_112}; - obj = tint_symbol_113; - obj = x_785; - const float2 x_458 = float2(3.0f, 0.0f); - const int x_786 = i_2; - i_2 = 0; - i_2 = x_786; - const float x_219 = color[0]; - const float x_787 = color[0]; - color[0] = 0.0f; - color[0] = x_787; - const float3 x_788 = color; - color = (0.0f).xxx; - color = x_788; - const float3 x_789 = color; - color = (0.0f).xxx; - color = x_789; - const float3 x_459 = float3(x_454.y, x_454.y, x_447.y); - const float x_790 = color[0]; - color[0] = 0.0f; - color[0] = x_790; - color.x = (float(x_216) + x_219); - const int x_791 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_791; - } - const float x_792 = uv.x; - uv.x = 0.0f; - uv.x = x_792; - const float x_793 = uv.x; - uv.x = 0.0f; - uv.x = x_793; - const float x_223 = uv.x; - const float x_794 = uv.x; - uv.x = 0.0f; - uv.x = x_794; - const float3 x_460 = float3(x_453.z, x_453.y, x_453.y); - const float2 x_795 = uv; - uv = (0.0f).xx; - uv = x_795; - const float x_796 = uv.x; - uv.x = 0.0f; - uv.x = x_796; - const float2 x_461 = (0.0f).xx; - const float x_797 = uv.x; - uv.x = 0.0f; - uv.x = x_797; - if ((x_223 > 0.5f)) { - const float x_798 = uv.x; - uv.x = 0.0f; - uv.x = x_798; - const float2 x_462 = float2(x_446.x, x_446.x); - const float x_799 = color.x; - color.x = 0.0f; - color.x = x_799; - const float x_800 = color.x; - color.x = 0.0f; - color.x = x_800; - const float3 x_463 = float3(x_453.x, x_453.z, x_461.y); - const float x_801 = color.x; - color.x = 0.0f; - color.x = x_801; - const int x_230 = obj.numbers[2u]; - const float x_802 = uv.x; - uv.x = 0.0f; - uv.x = x_802; - const float x_803 = color.x; - color.x = 0.0f; - color.x = x_803; - const int x_804 = obj.numbers[2u]; - obj.numbers[2u] = 0; - obj.numbers[2u] = x_804; - const float2 x_464 = float2(x_450.y, x_191.x); - const float x_805 = color.y; - color.y = 0.0f; - color.y = x_805; - const float x_234 = color.y; - const int x_806 = obj.numbers[2u]; - obj.numbers[2u] = 0; - obj.numbers[2u] = x_806; - const float2 x_465 = float2(x_463.x, x_185.x); - const float x_807 = color.x; - color.x = 0.0f; - color.x = x_807; - const int x_808 = i_2; - i_2 = 0; - i_2 = x_808; - const float2 x_466 = float2(x_455.y, 0.0f); - const int x_809 = i_2; - i_2 = 0; - i_2 = x_809; - color.y = (float(x_230) + x_234); - const float x_810 = uv.x; - uv.x = 0.0f; - uv.x = x_810; - } - const int x_811 = i_2; - i_2 = 0; - i_2 = x_811; - const float2 x_467 = float2(x_191.x, x_191.x); - const float x_812 = uv.x; - uv.x = 0.0f; - uv.x = x_812; - const float x_238 = uv[0]; - const float3 x_813 = color; - color = (0.0f).xxx; - color = x_813; - const float x_814 = color.x; - color.x = 0.0f; - color.x = x_814; - if ((x_238 > 0.75f)) { - const float x_815 = color.x; - color.x = 0.0f; - color.x = x_815; - const int x_245 = obj.numbers[3]; - const float x_816 = color.x; - color.x = 0.0f; - color.x = x_816; - const QuicksortObject x_817 = obj; - const int tint_symbol_114[10] = (int[10])0; - const QuicksortObject tint_symbol_115 = {tint_symbol_114}; - obj = tint_symbol_115; - obj = x_817; - const float3 x_468 = float3(x_467.x, x_467.x, x_467.x); - const float x_818 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_818; - const float x_819 = uv.x; - uv.x = 0.0f; - uv.x = x_819; - const float x_249 = color.z; - const float3 x_820 = color; - color = (0.0f).xxx; - color = x_820; - const float3 x_469 = float3(x_467.x, x_191.y, x_467.y); - const float x_821 = color.z; - color.z = 0.0f; - color.z = x_821; - const int x_822 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_822; - const float2 x_470 = (0.0f).xx; - const float x_823 = color.z; - color.z = 0.0f; - color.z = x_823; - color.z = (x_249 + float(x_245)); - const float2 x_824 = uv; - uv = (0.0f).xx; - uv = x_824; - const float2 x_471 = float2(x_470.y, x_470.y); - } - const float x_825 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_825; - const float3 x_472 = float3(x_454.x, x_454.y, x_454.y); - const int x_254 = obj.numbers[4]; - const float x_826 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_826; - const float3 x_827 = color; - color = (0.0f).xxx; - color = x_827; - const float3 x_473 = float3(x_446.y, x_453.x, x_453.x); - const int x_828 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_828; - const float2 x_474 = float2(x_191.x, x_184.z); - const float x_829 = uv.x; - uv.x = 0.0f; - uv.x = x_829; - const float x_257 = color.y; - const float x_830 = color.y; - color.y = 0.0f; - color.y = x_830; - const float2 x_475 = float2(x_467.x, x_450.x); - const float x_831 = uv.x; - uv.x = 0.0f; - uv.x = x_831; - const float x_832 = color.x; - color.x = 0.0f; - color.x = x_832; - const float2 x_476 = float2(x_451.z, x_460.y); - color.y = (x_257 + float(x_254)); - const float3 x_477 = float3(0.0f, x_472.x, 0.0f); - const float x_833 = uv.x; - uv.x = 0.0f; - uv.x = x_833; - const float x_834 = color.x; - color.x = 0.0f; - color.x = x_834; - const float2 x_478 = float2(x_472.x, x_472.y); - const float x_835 = uv.y; - uv.y = 0.0f; - uv.y = x_835; - const float x_261 = uv.y; - const int x_836 = i_2; - i_2 = 0; - i_2 = x_836; - const float3 x_479 = float3(0.0f, x_454.y, 0.0f); - const int x_837 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_837; - const float x_838 = color.y; - color.y = 0.0f; - color.y = x_838; - const float3 x_480 = float3(x_446.x, x_446.x, 0.0f); - const float x_839 = uv.x; - uv.x = 0.0f; - uv.x = x_839; - if ((x_261 > 0.25f)) { - const float2 x_481 = float2(x_447.x, x_480.z); - const float3 x_840 = color; - color = (0.0f).xxx; - color = x_840; - const int x_267 = obj.numbers[5u]; - const float x_841 = color.x; - color.x = 0.0f; - color.x = x_841; - const int x_842 = i_2; - i_2 = 0; - i_2 = x_842; - const int x_843 = i_2; - i_2 = 0; - i_2 = x_843; - const float x_270 = color.x; - const float x_844 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_844; - const float3 x_482 = float3(x_455.x, x_475.y, x_455.y); - const QuicksortObject x_845 = obj; - const int tint_symbol_116[10] = (int[10])0; - const QuicksortObject tint_symbol_117 = {tint_symbol_116}; - obj = tint_symbol_117; - obj = x_845; - const float x_846 = uv.y; - uv.y = 0.0f; - uv.y = x_846; - const int x_847 = i_2; - i_2 = 0; - i_2 = x_847; - const float3 x_483 = float3(x_184.w, x_184.w, x_192.x); - const float x_848 = uv.x; - uv.x = 0.0f; - uv.x = x_848; - color.x = (float(x_267) + x_270); - const float3 x_484 = float3(x_454.y, x_450.x, x_454.y); - const float x_849 = uv.x; - uv.x = 0.0f; - uv.x = x_849; - } - const float x_850 = color.x; - color.x = 0.0f; - color.x = x_850; - const float3 x_485 = float3(x_467.x, x_450.y, x_450.x); - const float x_851 = uv.y; - uv.y = 0.0f; - uv.y = x_851; - const int x_852 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_852; - const float x_274 = uv.y; - const int x_853 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_853; - if ((x_274 > 0.5f)) { - const float x_854 = uv.x; - uv.x = 0.0f; - uv.x = x_854; - const float2 x_486 = float2(x_480.y, x_455.y); - const float x_855 = color.y; - color.y = 0.0f; - color.y = x_855; - const float2 x_487 = float2(x_449.z, x_449.y); - const float x_856 = uv.y; - uv.y = 0.0f; - uv.y = x_856; - const int x_280 = obj.numbers[6u]; - const float x_857 = uv.y; - uv.y = 0.0f; - uv.y = x_857; - const int x_858 = i_2; - i_2 = 0; - i_2 = x_858; - const int x_859 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_859; - const float2 x_488 = float2(x_473.z, x_473.y); - const float x_283 = color.y; - const float2 x_860 = uv; - uv = (0.0f).xx; - uv = x_860; - const float x_861 = color.x; - color.x = 0.0f; - color.x = x_861; - const float2 x_489 = float2(x_475.y, x_475.x); - const int x_862 = obj.numbers[6u]; - obj.numbers[6u] = 0; - obj.numbers[6u] = x_862; - const int x_863 = obj.numbers[6u]; - obj.numbers[6u] = 0; - obj.numbers[6u] = x_863; - const float2 x_490 = float2(x_480.z, x_480.z); - const QuicksortObject x_864 = obj; - const int tint_symbol_118[10] = (int[10])0; - const QuicksortObject tint_symbol_119 = {tint_symbol_118}; - obj = tint_symbol_119; - obj = x_864; - color.y = (float(x_280) + x_283); - const float x_865 = color.x; - color.x = 0.0f; - color.x = x_865; - const float2 x_491 = float2(2.0f, x_454.x); - const float x_866 = color.y; - color.y = 0.0f; - color.y = x_866; - } - const float2 x_492 = float2(x_455.y, x_455.y); - const float x_867 = color.x; - color.x = 0.0f; - color.x = x_867; - const float x_287 = uv.y; - const QuicksortObject x_868 = obj; - const int tint_symbol_120[10] = (int[10])0; - const QuicksortObject tint_symbol_121 = {tint_symbol_120}; - obj = tint_symbol_121; - obj = x_868; - const float2 x_493 = float2(x_475.x, x_475.y); - const float x_869 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_869; - const float x_870 = color.y; - color.y = 0.0f; - color.y = x_870; - const float3 x_494 = float3(x_191.x, x_191.y, x_191.y); - const int x_871 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_871; - if ((x_287 > 0.75f)) { - const float3 x_872 = color; - color = (0.0f).xxx; - color = x_872; - const float x_873 = color.x; - color.x = 0.0f; - color.x = x_873; - const float3 x_495 = float3(x_192.y, x_192.x, x_192.y); - const float3 x_874 = color; - color = (0.0f).xxx; - color = x_874; - const int x_293 = obj.numbers[7]; - const float x_875 = uv.x; - uv.x = 0.0f; - uv.x = x_875; - const float3 x_496 = float3(x_475.x, x_467.y, x_467.x); - const float x_876 = color.y; - color.y = 0.0f; - color.y = x_876; - const float2 x_497 = float2(x_477.x, x_461.y); - const int x_877 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_877; - const float x_878 = color.y; - color.y = 0.0f; - color.y = x_878; - const float3 x_498 = float3(x_478.x, x_478.y, x_478.x); - const float x_879 = color.x; - color.x = 0.0f; - color.x = x_879; - const float x_296 = color.z; - const float x_880 = uv.y; - uv.y = 0.0f; - uv.y = x_880; - const float2 x_499 = float2(x_184.x, x_184.y); - const float x_881 = uv.x; - uv.x = 0.0f; - uv.x = x_881; - const float x_882 = uv.y; - uv.y = 0.0f; - uv.y = x_882; - const float x_883 = uv.y; - uv.y = 0.0f; - uv.y = x_883; - const float3 x_500 = float3(x_499.y, x_499.y, x_494.z); - const float x_884 = color.z; - color.z = 0.0f; - color.z = x_884; - color.z = (float(x_293) + x_296); - const float x_885 = color.y; - color.y = 0.0f; - color.y = x_885; - const float2 x_501 = float2(x_453.x, x_453.z); - const float x_886 = color.x; - color.x = 0.0f; - color.x = x_886; - } - const int x_887 = i_2; - i_2 = 0; - i_2 = x_887; - const float2 x_502 = float2(x_451.y, x_192.y); - const float2 x_888 = uv; - uv = (0.0f).xx; - uv = x_888; - const int x_301 = obj.numbers[8]; - const int x_889 = i_2; - i_2 = 0; - i_2 = x_889; - const float2 x_503 = float2(x_185.x, x_451.z); - const int x_890 = obj.numbers[8]; - obj.numbers[8] = 0; - obj.numbers[8] = x_890; - const float x_891 = color.y; - color.y = 0.0f; - color.y = x_891; - const float2 x_504 = float2(x_453.y, 0.0f); - const float x_892 = color.x; - color.x = 0.0f; - color.x = x_892; - const float3 x_505 = float3(x_504.x, x_504.y, x_504.x); - const float x_893 = color.z; - color.z = 0.0f; - color.z = x_893; - const float x_304 = color.z; - const float x_894 = color.x; - color.x = 0.0f; - color.x = x_894; - const float2 x_506 = float2(x_493.x, x_492.x); - const int x_895 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_895; - const float x_896 = uv.y; - uv.y = 0.0f; - uv.y = x_896; - const float2 x_507 = float2(x_461.x, x_447.x); - const float x_897 = color.y; - color.y = 0.0f; - color.y = x_897; - color.z = (x_304 + float(x_301)); - const float2 x_898 = uv; - uv = (0.0f).xx; - uv = x_898; - const float x_899 = uv.x; - uv.x = 0.0f; - uv.x = x_899; - const float3 x_508 = float3(x_461.y, x_461.x, x_506.y); - const float x_900 = uv.x; - uv.x = 0.0f; - uv.x = x_900; - const float x_308 = uv.x; - const float x_901 = color.y; - color.y = 0.0f; - color.y = x_901; - const float3 x_509 = float3(x_503.y, x_503.x, x_448.z); - const float x_902 = uv.y; - uv.y = 0.0f; - uv.y = x_902; - const float x_310 = uv.y; - const float x_903 = uv.y; - uv.y = 0.0f; - uv.y = x_903; - const float x_904 = color.z; - color.z = 0.0f; - color.z = x_904; - const float3 x_510 = float3(2.0f, x_485.y, x_485.z); - const float x_905 = color.z; - color.z = 0.0f; - color.z = x_905; - const int x_906 = i_2; - i_2 = 0; - i_2 = x_906; - const float2 x_511 = float2(x_485.z, x_485.y); - const float3 x_907 = color; - color = (0.0f).xxx; - color = x_907; - const float x_908 = uv.y; - uv.y = 0.0f; - uv.y = x_908; - const float3 x_512 = float3(x_455.y, x_455.y, x_455.y); - const int x_909 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_909; - if ((abs((x_308 - x_310)) < 0.25f)) { - const float x_910 = uv.x; - uv.x = 0.0f; - uv.x = x_910; - const QuicksortObject x_911 = obj; - const int tint_symbol_122[10] = (int[10])0; - const QuicksortObject tint_symbol_123 = {tint_symbol_122}; - obj = tint_symbol_123; - obj = x_911; - const float3 x_513 = float3(x_505.z, x_505.x, x_448.x); - const int x_912 = obj.numbers[8]; - obj.numbers[8] = 0; - obj.numbers[8] = x_912; - const int x_317 = obj.numbers[9u]; - const float3 x_514 = float3(x_474.y, x_474.y, x_474.y); - const float x_913 = uv.y; - uv.y = 0.0f; - uv.y = x_913; - const float x_320 = color.x; - const float x_914 = uv.y; - uv.y = 0.0f; - uv.y = x_914; - const float2 x_515 = float2(x_502.x, x_502.y); - const float x_915 = color.x; - color.x = 0.0f; - color.x = x_915; - const float3 x_916 = color; - color = (0.0f).xxx; - color = x_916; - const float2 x_516 = float2(x_452.x, x_452.x); - const float2 x_917 = uv; - uv = (0.0f).xx; - uv = x_917; - const float x_918 = uv.x; - uv.x = 0.0f; - uv.x = x_918; - const float3 x_517 = (0.0f).xxx; - color.x = (float(x_317) + x_320); - const float x_919 = color.x; - color.x = 0.0f; - color.x = x_919; - const float3 x_518 = float3(x_480.y, x_508.x, x_480.x); - const float x_920 = color.x; - color.x = 0.0f; - color.x = x_920; - } - const float x_921 = uv.y; - uv.y = 0.0f; - uv.y = x_921; - const float3 x_325 = color; - const float x_922 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_922; - const float3 x_519 = float3(x_447.x, x_446.x, x_446.y); - const float3 x_326 = normalize(x_325); - const float x_923 = uv.x; - uv.x = 0.0f; - uv.x = x_923; - const QuicksortObject x_924 = obj; - const int tint_symbol_124[10] = (int[10])0; - const QuicksortObject tint_symbol_125 = {tint_symbol_124}; - obj = tint_symbol_125; - obj = x_924; - const QuicksortObject x_925 = obj; - const int tint_symbol_126[10] = (int[10])0; - const QuicksortObject tint_symbol_127 = {tint_symbol_126}; - obj = tint_symbol_127; - obj = x_925; - const float x_926 = color.y; - color.y = 0.0f; - color.y = x_926; - const float2 x_520 = float2(x_506.y, x_519.y); - const float x_927 = color.y; - color.y = 0.0f; - color.y = x_927; - const float4 x_330 = float4(x_326.x, x_326.y, x_326.z, 1.0f); - const float x_928 = uv.y; - uv.y = 0.0f; - uv.y = x_928; - const float3 x_521 = float3(2.0f, 2.0f, x_520.y); - const float x_929 = uv.x; - uv.x = 0.0f; - uv.x = x_929; - x_GLF_color = x_330; - const QuicksortObject x_930 = obj; - const int tint_symbol_128[10] = (int[10])0; - const QuicksortObject tint_symbol_129 = {tint_symbol_128}; - obj = tint_symbol_129; - obj = x_930; - const float3 x_522 = float3(x_330.w, x_330.y, x_493.x); - const float x_931 = color.x; - color.x = 0.0f; - color.x = x_931; - return; -} - -struct main_out { - float4 x_GLF_color_1; -}; -struct tint_symbol_49 { - float4 gl_FragCoord_param : SV_Position; -}; -struct tint_symbol_50 { - float4 x_GLF_color_1 : SV_Target0; -}; - -main_out main_inner(float4 gl_FragCoord_param) { - gl_FragCoord = gl_FragCoord_param; - main_1(); - const main_out tint_symbol_130 = {x_GLF_color}; - return tint_symbol_130; -} - -tint_symbol_50 main(tint_symbol_49 tint_symbol_48) { - const main_out inner_result = main_inner(tint_symbol_48.gl_FragCoord_param); - tint_symbol_50 wrapper_result = (tint_symbol_50)0; - wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; - return wrapper_result; -} +SKIP: triggers crbug.com/tint/98 diff --git a/test/tint/bug/tint/749.spvasm.expected.fxc.hlsl b/test/tint/bug/tint/749.spvasm.expected.fxc.hlsl index 8605266c5b..149037eaec 100644 --- a/test/tint/bug/tint/749.spvasm.expected.fxc.hlsl +++ b/test/tint/bug/tint/749.spvasm.expected.fxc.hlsl @@ -1,1658 +1 @@ -struct QuicksortObject { - int numbers[10]; -}; - -static QuicksortObject obj = (QuicksortObject)0; -static float4 gl_FragCoord = float4(0.0f, 0.0f, 0.0f, 0.0f); -cbuffer cbuffer_x_188 : register(b0, space0) { - uint4 x_188[1]; -}; -static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f); - -void swap_i1_i1_(inout int i, inout int j) { - int temp = 0; - const int x_932 = temp; - temp = 0; - temp = x_932; - const float3 x_523 = float3(3.0f, 2.0f, 3.0f); - const int x_933 = i; - i = 0; - i = x_933; - const int x_28 = i; - const int x_934 = j; - j = 0; - j = x_934; - const float3 x_524 = float3(x_523.y, x_523.x, x_523.y); - const int x_935 = temp; - temp = 0; - temp = x_935; - const int x_30_save = x_28; - const int x_936 = obj.numbers[x_30_save]; - { - int tint_symbol_1[10] = obj.numbers; - tint_symbol_1[x_30_save] = 0; - obj.numbers = tint_symbol_1; - } - { - int tint_symbol_3[10] = obj.numbers; - tint_symbol_3[x_30_save] = x_936; - obj.numbers = tint_symbol_3; - } - const int x_31 = obj.numbers[x_30_save]; - const int x_937 = temp; - temp = 0; - temp = x_937; - temp = x_31; - const int x_938 = j; - j = 0; - j = x_938; - const float3 x_525 = float3(x_523.z, 1.0f, x_523.y); - const int x_939 = i; - i = 0; - i = x_939; - const int x_32 = i; - const int x_940 = obj.numbers[x_30_save]; - { - int tint_symbol_5[10] = obj.numbers; - tint_symbol_5[x_30_save] = 0; - obj.numbers = tint_symbol_5; - } - { - int tint_symbol_7[10] = obj.numbers; - tint_symbol_7[x_30_save] = x_940; - obj.numbers = tint_symbol_7; - } - const int x_33 = j; - const int x_941 = i; - i = 0; - i = x_941; - const float3 x_526 = float3(x_525.x, x_525.z, x_525.z); - const int x_942 = obj.numbers[x_30_save]; - { - int tint_symbol_9[10] = obj.numbers; - tint_symbol_9[x_30_save] = 0; - obj.numbers = tint_symbol_9; - } - { - int tint_symbol_11[10] = obj.numbers; - tint_symbol_11[x_30_save] = x_942; - obj.numbers = tint_symbol_11; - } - const int x_34_save = x_33; - const int x_35 = obj.numbers[x_34_save]; - const QuicksortObject x_943 = obj; - const int tint_symbol_52[10] = (int[10])0; - const QuicksortObject tint_symbol_53 = {tint_symbol_52}; - obj = tint_symbol_53; - obj = x_943; - const float2 x_527 = float2(x_526.x, x_526.x); - const int x_36_save = x_32; - const float3 x_528 = float3(x_524.x, x_524.z, x_524.x); - { - int tint_symbol_13[10] = obj.numbers; - tint_symbol_13[x_36_save] = x_35; - obj.numbers = tint_symbol_13; - } - const QuicksortObject x_944 = obj; - const int tint_symbol_54[10] = (int[10])0; - const QuicksortObject tint_symbol_55 = {tint_symbol_54}; - obj = tint_symbol_55; - obj = x_944; - const float3 x_529 = float3(x_526.y, x_526.z, x_526.x); - const int x_945 = i; - i = 0; - i = x_945; - const int x_37 = j; - const int x_946 = temp; - temp = 0; - temp = x_946; - const float2 x_530 = float2(x_529.z, x_529.y); - const int x_947 = obj.numbers[x_34_save]; - { - int tint_symbol_15[10] = obj.numbers; - tint_symbol_15[x_34_save] = 0; - obj.numbers = tint_symbol_15; - } - { - int tint_symbol_17[10] = obj.numbers; - tint_symbol_17[x_34_save] = x_947; - obj.numbers = tint_symbol_17; - } - const int x_38 = temp; - const int x_948 = j; - j = 0; - j = x_948; - const float3 x_531 = float3(x_527.x, x_526.y, x_526.x); - const int x_949 = obj.numbers[x_36_save]; - { - int tint_symbol_19[10] = obj.numbers; - tint_symbol_19[x_36_save] = 0; - obj.numbers = tint_symbol_19; - } - { - int tint_symbol_21[10] = obj.numbers; - tint_symbol_21[x_36_save] = x_949; - obj.numbers = tint_symbol_21; - } - const QuicksortObject x_950 = obj; - const int tint_symbol_56[10] = (int[10])0; - const QuicksortObject tint_symbol_57 = {tint_symbol_56}; - obj = tint_symbol_57; - obj = x_950; - const float3 x_532 = float3(x_528.x, x_528.y, x_528.x); - const int x_951 = obj.numbers[x_34_save]; - { - int tint_symbol_23[10] = obj.numbers; - tint_symbol_23[x_34_save] = 0; - obj.numbers = tint_symbol_23; - } - { - int tint_symbol_25[10] = obj.numbers; - tint_symbol_25[x_34_save] = x_951; - obj.numbers = tint_symbol_25; - } - { - int tint_symbol_27[10] = obj.numbers; - tint_symbol_27[x_37] = x_38; - obj.numbers = tint_symbol_27; - } - return; -} - -int performPartition_i1_i1_(inout int l, inout int h) { - int param_3 = 0; - int i_1 = 0; - int j_1 = 0; - int param_2 = 0; - int param_1 = 0; - int param = 0; - int pivot = 0; - float2 x_537 = float2(0.0f, 0.0f); - float3 x_538 = float3(0.0f, 0.0f, 0.0f); - const int x_952 = h; - h = 0; - h = x_952; - const int x_41 = h; - const int x_953 = l; - l = 0; - l = x_953; - const int x_42_save = x_41; - const int x_954 = obj.numbers[x_42_save]; - { - int tint_symbol_29[10] = obj.numbers; - tint_symbol_29[x_42_save] = 0; - obj.numbers = tint_symbol_29; - } - { - int tint_symbol_31[10] = obj.numbers; - tint_symbol_31[x_42_save] = x_954; - obj.numbers = tint_symbol_31; - } - const int x_43 = obj.numbers[x_42_save]; - const int x_955 = param_3; - param_3 = 0; - param_3 = x_955; - const float3 x_534 = float3(3.0f, 1.0f, 3.0f); - const int x_956 = param_1; - param_1 = 0; - param_1 = x_956; - pivot = x_43; - const int x_45 = l; - const int x_957 = h; - h = 0; - h = x_957; - const int x_958 = j_1; - j_1 = 0; - j_1 = x_958; - const float3 x_535 = float3(x_534.y, x_534.z, x_534.y); - const int x_959 = l; - l = 0; - l = x_959; - i_1 = (x_45 - asint(1u)); - const int x_49 = l; - const float3 x_536 = float3(x_534.x, x_534.z, x_535.x); - j_1 = 10; - const QuicksortObject x_960 = obj; - const int tint_symbol_58[10] = (int[10])0; - const QuicksortObject tint_symbol_59 = {tint_symbol_58}; - obj = tint_symbol_59; - obj = x_960; - [loop] while (true) { - const int x_961 = pivot; - pivot = 0; - pivot = x_961; - const int x_962 = param_1; - param_1 = 0; - param_1 = x_962; - const int x_55 = j_1; - const int x_963 = pivot; - pivot = 0; - pivot = x_963; - x_537 = float2(2.0f, 3.0f); - const QuicksortObject x_964 = obj; - const int tint_symbol_60[10] = (int[10])0; - const QuicksortObject tint_symbol_61 = {tint_symbol_60}; - obj = tint_symbol_61; - obj = x_964; - const int x_56 = h; - const int x_965 = h; - h = 0; - h = x_965; - const int x_966 = param; - param = 0; - param = x_966; - const int x_967 = j_1; - j_1 = 0; - j_1 = x_967; - x_538 = float3(x_534.x, x_537.y, x_534.z); - const int x_968 = param; - param = 0; - param = x_968; - if ((x_55 <= (x_56 - asint(1u)))) { - } else { - break; - } - const int x_60 = j_1; - const int x_969 = obj.numbers[x_42_save]; - { - int tint_symbol_33[10] = obj.numbers; - tint_symbol_33[x_42_save] = 0; - obj.numbers = tint_symbol_33; - } - { - int tint_symbol_35[10] = obj.numbers; - tint_symbol_35[x_42_save] = x_969; - obj.numbers = tint_symbol_35; - } - const int x_61_save = x_60; - const int x_970 = h; - h = 0; - h = x_970; - const float3 x_539 = float3(x_537.x, x_535.z, x_537.x); - const int x_971 = param_1; - param_1 = 0; - param_1 = x_971; - const int x_62 = obj.numbers[x_61_save]; - const QuicksortObject x_972 = obj; - const int tint_symbol_62[10] = (int[10])0; - const QuicksortObject tint_symbol_63 = {tint_symbol_62}; - obj = tint_symbol_63; - obj = x_972; - const int x_63 = pivot; - const float2 x_540 = float2(2.0f, x_534.z); - const int x_973 = i_1; - i_1 = 0; - i_1 = x_973; - const int x_974 = l; - l = 0; - l = x_974; - const float3 x_541 = float3(x_534.y, x_534.x, x_534.y); - const int x_975 = pivot; - pivot = 0; - pivot = x_975; - if ((x_62 <= x_63)) { - const float3 x_542 = float3(x_541.z, x_541.x, x_541.x); - const int x_976 = param_3; - param_3 = 0; - param_3 = x_976; - const int x_67 = i_1; - const int x_977 = pivot; - pivot = 0; - pivot = x_977; - const float2 x_543 = float2(x_539.x, x_541.y); - const int x_978 = i_1; - i_1 = 0; - i_1 = x_978; - const int x_979 = param; - param = 0; - param = x_979; - i_1 = (x_67 + asint(1u)); - const int x_980 = l; - l = 0; - l = x_980; - const float3 x_544 = float3(3.0f, 2.0f, x_540.x); - const int x_70 = i_1; - const float2 x_545 = float2(x_537.y, x_538.x); - const int x_981 = param; - param = 0; - param = x_981; - param = x_70; - const int x_982 = param; - param = 0; - param = x_982; - const float2 x_546 = float2(x_545.x, x_545.x); - const int x_983 = i_1; - i_1 = 0; - i_1 = x_983; - param_1 = j_1; - const int x_984 = param_3; - param_3 = 0; - param_3 = x_984; - swap_i1_i1_(param, param_1); - const int x_985 = param_1; - param_1 = 0; - param_1 = x_985; - } - const QuicksortObject x_986 = obj; - const int tint_symbol_64[10] = (int[10])0; - const QuicksortObject tint_symbol_65 = {tint_symbol_64}; - obj = tint_symbol_65; - obj = x_986; - { - const int x_987 = h; - h = 0; - h = x_987; - const int x_74 = j_1; - const int x_988 = h; - h = 0; - h = x_988; - const float3 x_547 = float3(x_539.x, x_541.z, x_541.z); - const int x_989 = obj.numbers[x_61_save]; - { - int tint_symbol_37[10] = obj.numbers; - tint_symbol_37[x_61_save] = 0; - obj.numbers = tint_symbol_37; - } - { - int tint_symbol_39[10] = obj.numbers; - tint_symbol_39[x_61_save] = x_989; - obj.numbers = tint_symbol_39; - } - const int x_990 = param; - param = 0; - param = x_990; - j_1 = (1 + x_74); - const int x_991 = param_1; - param_1 = 0; - param_1 = x_991; - const float3 x_548 = float3(x_541.y, x_541.z, x_541.x); - const int x_992 = obj.numbers[x_61_save]; - { - int tint_symbol_41[10] = obj.numbers; - tint_symbol_41[x_61_save] = 0; - obj.numbers = tint_symbol_41; - } - { - int tint_symbol_43[10] = obj.numbers; - tint_symbol_43[x_61_save] = x_992; - obj.numbers = tint_symbol_43; - } - } - } - const int x_76 = i_1; - const int x_993 = obj.numbers[x_42_save]; - { - int tint_symbol_45[10] = obj.numbers; - tint_symbol_45[x_42_save] = 0; - obj.numbers = tint_symbol_45; - } - { - int tint_symbol_47[10] = obj.numbers; - tint_symbol_47[x_42_save] = x_993; - obj.numbers = tint_symbol_47; - } - const float2 x_549 = float2(x_534.x, x_534.y); - const QuicksortObject x_994 = obj; - const int tint_symbol_66[10] = (int[10])0; - const QuicksortObject tint_symbol_67 = {tint_symbol_66}; - obj = tint_symbol_67; - obj = x_994; - const int x_995 = h; - h = 0; - h = x_995; - i_1 = (1 + x_76); - const int x_996 = param_1; - param_1 = 0; - param_1 = x_996; - const int x_79 = i_1; - const int x_997 = j_1; - j_1 = 0; - j_1 = x_997; - const float2 x_550 = float2(x_534.x, x_534.x); - const int x_998 = param_1; - param_1 = 0; - param_1 = x_998; - param_2 = x_79; - const float2 x_551 = float2(x_534.y, x_536.x); - const int x_999 = pivot; - pivot = 0; - pivot = x_999; - const int x_81 = h; - const float2 x_552 = float2(x_550.x, x_549.y); - const int x_1000 = h; - h = 0; - h = x_1000; - param_3 = x_81; - const int x_1001 = i_1; - i_1 = 0; - i_1 = x_1001; - const float2 x_553 = float2(x_549.y, x_552.x); - const int x_1002 = h; - h = 0; - h = x_1002; - swap_i1_i1_(param_2, param_3); - const int x_1003 = l; - l = 0; - l = x_1003; - const float2 x_554 = float2(x_536.z, 2.0f); - const int x_1004 = param_1; - param_1 = 0; - param_1 = x_1004; - const int x_83 = i_1; - const int x_1005 = param; - param = 0; - param = x_1005; - const float2 x_555 = float2(x_534.y, x_534.x); - const int x_1006 = j_1; - j_1 = 0; - j_1 = x_1006; - return x_83; -} - -void quicksort_() { - int param_4 = 0; - int h_1 = 0; - int p = 0; - int l_1 = 0; - int top = 0; - int stack[10] = (int[10])0; - int param_5 = 0; - l_1 = 0; - const int x_1007 = param_5; - param_5 = 0; - param_5 = x_1007; - h_1 = 9; - const int x_1008[10] = stack; - const int tint_symbol_68[10] = (int[10])0; - stack = tint_symbol_68; - stack = x_1008; - const float2 x_556 = (2.0f).xx; - const int x_1009 = param_5; - param_5 = 0; - param_5 = x_1009; - top = -1; - const int x_1010 = p; - p = 0; - p = x_1010; - const int x_93 = top; - const float2 x_557 = (1.0f).xx; - const int x_1011 = p; - p = 0; - p = x_1011; - const int x_94 = (x_93 + asint(1u)); - const int x_1012 = top; - top = 0; - top = x_1012; - const float2 x_558 = float2(x_556.y, x_557.y); - const int x_1013 = param_4; - param_4 = 0; - param_4 = x_1013; - top = x_94; - const int x_1014 = h_1; - h_1 = 0; - h_1 = x_1014; - const float3 x_559 = float3(x_557.y, x_557.x, x_557.x); - const int x_1015 = param_4; - param_4 = 0; - param_4 = x_1015; - const int x_95 = l_1; - const QuicksortObject x_1016 = obj; - const int tint_symbol_69[10] = (int[10])0; - const QuicksortObject tint_symbol_70 = {tint_symbol_69}; - obj = tint_symbol_70; - obj = x_1016; - const float3 x_560 = float3(x_559.y, x_559.x, x_557.x); - const int x_96_save = x_94; - const int x_1017[10] = stack; - const int tint_symbol_71[10] = (int[10])0; - stack = tint_symbol_71; - stack = x_1017; - const float3 x_561 = float3(x_556.y, x_556.y, x_556.y); - const int x_1018 = l_1; - l_1 = 0; - l_1 = 0; - stack[x_96_save] = x_95; - const int x_1019 = param_5; - param_5 = 0; - param_5 = x_1019; - const int x_97 = top; - const int x_1020 = param_4; - param_4 = 0; - param_4 = x_1020; - const float3 x_562 = float3(3.0f, x_558.y, 2.0f); - const int x_1021 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1021; - const int x_98 = (x_97 + 1); - const int x_1022 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1022; - const float3 x_563 = float3(x_559.x, x_559.z, x_556.y); - top = x_98; - const int x_1023 = param_4; - param_4 = 0; - param_4 = x_1023; - const int x_99 = h_1; - const int x_1024 = param_4; - param_4 = 0; - param_4 = x_1024; - const float3 x_564 = float3(x_558.x, x_561.x, x_558.y); - const int x_1025 = l_1; - l_1 = 0; - l_1 = x_1025; - const int x_100_save = x_98; - const int x_1026 = param_5; - param_5 = 0; - param_5 = x_1026; - const float2 x_565 = float2(x_564.z, x_564.z); - const int x_1027 = p; - p = 0; - p = x_1027; - stack[x_100_save] = x_99; - [loop] while (true) { - const float3 x_566 = float3(x_563.x, x_563.x, x_563.x); - const int x_1028 = h_1; - h_1 = 0; - h_1 = x_1028; - const int x_1029[10] = stack; - const int tint_symbol_72[10] = (int[10])0; - stack = tint_symbol_72; - stack = x_1029; - const int x_106 = top; - const int x_1030[10] = stack; - const int tint_symbol_73[10] = (int[10])0; - stack = tint_symbol_73; - stack = x_1030; - const float2 x_567 = float2(x_558.x, x_564.z); - const int x_1031 = param_4; - param_4 = 0; - param_4 = x_1031; - if ((x_106 >= asint(0u))) { - } else { - break; - } - const QuicksortObject x_1032 = obj; - const int tint_symbol_74[10] = (int[10])0; - const QuicksortObject tint_symbol_75 = {tint_symbol_74}; - obj = tint_symbol_75; - obj = x_1032; - const float3 x_568 = float3(x_559.y, x_559.x, x_563.y); - const int x_1033 = param_4; - param_4 = 0; - param_4 = x_1033; - const int x_108 = top; - const float3 x_569 = float3(x_565.x, x_567.y, x_565.x); - const int x_1034 = h_1; - h_1 = 0; - h_1 = x_1034; - const float2 x_570 = float2(x_556.x, x_556.x); - const int x_1035 = p; - p = 0; - p = x_1035; - top = (x_108 - asint(1u)); - const int x_1036 = p; - p = 0; - p = x_1036; - const int x_110_save = x_108; - const int x_1037 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1037; - const int x_111 = stack[x_110_save]; - const int x_1038[10] = stack; - const int tint_symbol_76[10] = (int[10])0; - stack = tint_symbol_76; - stack = x_1038; - const float3 x_571 = float3(x_559.y, x_559.x, x_564.y); - const int x_1039 = l_1; - l_1 = 0; - l_1 = x_1039; - h_1 = x_111; - const int x_1040[10] = stack; - const int tint_symbol_77[10] = (int[10])0; - stack = tint_symbol_77; - stack = x_1040; - const float2 x_572 = float2(x_562.y, x_561.y); - const int x_1041 = p; - p = 0; - p = x_1041; - const int x_112 = top; - const int x_1042 = param_4; - param_4 = 0; - param_4 = x_1042; - const int x_1043 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1043; - const float2 x_573 = float2(2.0f, 3.0f); - top = (x_112 - 1); - const int x_1044 = param_5; - param_5 = 0; - param_5 = x_1044; - const float3 x_574 = float3(x_570.y, x_565.x, x_570.y); - const int x_1045 = h_1; - h_1 = 0; - h_1 = x_1045; - const int x_114_save = x_112; - const float2 x_575 = float2(x_564.y, x_564.z); - const int x_1046 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1046; - const int x_115 = stack[x_114_save]; - const int x_1047 = p; - p = 0; - p = x_1047; - const float3 x_576 = float3(x_573.y, x_573.y, x_565.x); - const int x_1048 = param_5; - param_5 = 0; - param_5 = x_1048; - l_1 = x_115; - const int x_1049 = top; - top = 0; - top = x_1049; - param_4 = l_1; - const int x_1050 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1050; - const float2 x_577 = float2(x_569.y, x_569.z); - const int x_120 = h_1; - const float2 x_578 = float2(x_558.x, 2.0f); - param_5 = x_120; - const int x_1051 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1051; - const int x_121 = performPartition_i1_i1_(param_4, param_5); - const float2 x_579 = float2(x_567.x, x_568.x); - const int x_1052 = param_5; - param_5 = 0; - param_5 = x_1052; - p = x_121; - const int x_1053 = param_4; - param_4 = 0; - param_4 = x_1053; - const int x_122 = p; - const int x_1054 = h_1; - h_1 = 0; - h_1 = x_1054; - const float2 x_580 = float2(x_568.y, x_568.y); - const int x_1055 = l_1; - l_1 = 0; - l_1 = x_1055; - const int x_1056 = h_1; - h_1 = 0; - h_1 = x_1056; - const int x_124 = l_1; - const int x_1057 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1057; - const int x_1058 = h_1; - h_1 = 0; - h_1 = x_1058; - const float2 x_582 = float2(x_567.y, x_573.x); - const int x_1059 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1059; - if (((x_122 - asint(1u)) > x_124)) { - const int x_1060 = param_4; - param_4 = 0; - param_4 = x_1060; - const int x_128 = top; - const float2 x_583 = float2(x_571.y, x_556.y); - const int x_1061 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1061; - const int x_1062[10] = stack; - const int tint_symbol_78[10] = (int[10])0; - stack = tint_symbol_78; - stack = x_1062; - const float2 x_584 = float2(x_569.z, x_569.y); - const float3 x_585 = float3(x_580.y, x_577.x, x_577.x); - const int x_130 = l_1; - const int x_1063 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1063; - const float2 x_586 = float2(x_564.x, x_585.x); - const int x_1064 = param_5; - param_5 = 0; - param_5 = x_1064; - const int x_131_save = (1 + x_128); - const int x_1065 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1065; - const float3 x_587 = float3(x_566.y, x_566.y, x_563.x); - const int x_1066 = param_5; - param_5 = 0; - param_5 = x_1066; - stack[x_131_save] = x_130; - const int x_132 = top; - const int x_1067 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1067; - const float2 x_588 = float2(x_575.y, x_575.x); - const int x_1068 = stack[x_131_save]; - stack[x_131_save] = 0; - stack[x_131_save] = x_1068; - const int x_133 = asint((1u + asuint(x_132))); - const int x_1069 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1069; - const float3 x_589 = float3(x_576.z, x_588.y, x_576.z); - const int x_1070 = h_1; - h_1 = 0; - h_1 = x_1070; - top = x_133; - const int x_1071[10] = stack; - const int tint_symbol_79[10] = (int[10])0; - stack = tint_symbol_79; - stack = x_1071; - const int x_134 = p; - const float2 x_590 = float2(x_576.x, x_573.y); - const int x_1072 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1072; - const int x_136_save = x_133; - const int x_1073 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1073; - stack[x_136_save] = (x_134 - asint(1u)); - const int x_1074 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1074; - const float2 x_591 = float2(x_569.z, x_569.y); - const int x_1075 = stack[x_136_save]; - stack[x_136_save] = 0; - stack[x_136_save] = x_1075; - } - const int x_1076 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1076; - const float2 x_592 = float2(1.0f, 2.0f); - const QuicksortObject x_1077 = obj; - const int tint_symbol_80[10] = (int[10])0; - const QuicksortObject tint_symbol_81 = {tint_symbol_80}; - obj = tint_symbol_81; - obj = x_1077; - const int x_137 = p; - const int x_1078 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1078; - const float3 x_593 = float3(x_571.z, x_556.x, x_556.y); - const int x_1079 = p; - p = 0; - p = x_1079; - const float3 x_594 = float3(x_563.z, x_563.x, x_575.x); - const int x_1080 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1080; - const int x_139 = h_1; - const int x_1081 = top; - top = 0; - top = x_1081; - const float3 x_595 = float3(x_560.z, x_568.x, x_560.x); - const int x_1082 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1082; - const int x_1083 = p; - p = 0; - p = x_1083; - if ((asint((1u + asuint(x_137))) < x_139)) { - const int x_1084 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1084; - const float2 x_596 = float2(x_592.y, x_582.x); - const int x_1085 = l_1; - l_1 = 0; - l_1 = x_1085; - const int x_143 = top; - const int x_1086 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1086; - const float3 x_597 = float3(x_562.y, x_560.y, x_560.y); - const int x_144 = (x_143 + 1); - const int x_1087 = param_5; - param_5 = 0; - param_5 = x_1087; - top = x_144; - const int x_1088 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1088; - const int x_145 = p; - const int x_1089 = param_5; - param_5 = 0; - param_5 = x_1089; - const float3 x_599 = float3(x_560.z, x_560.x, x_568.x); - const int x_1090 = p; - p = 0; - p = x_1090; - const float3 x_600 = float3(x_556.x, x_580.x, x_580.x); - const int x_1091 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1091; - const int x_147_save = x_144; - const int x_1092 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1092; - const float2 x_601 = float2(x_563.x, x_563.y); - stack[x_147_save] = asint((1u + asuint(x_145))); - const int x_1093[10] = stack; - const int tint_symbol_82[10] = (int[10])0; - stack = tint_symbol_82; - stack = x_1093; - const int x_148 = top; - const int x_1094 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1094; - const float2 x_602 = float2(x_565.y, x_599.y); - const int x_1095[10] = stack; - const int tint_symbol_83[10] = (int[10])0; - stack = tint_symbol_83; - stack = x_1095; - const int x_149 = (x_148 + asint(1u)); - const int x_1096 = stack[x_147_save]; - stack[x_147_save] = 0; - stack[x_147_save] = x_1096; - top = x_149; - const int x_1097 = param_4; - param_4 = 0; - param_4 = x_1097; - const int x_150 = h_1; - const int x_1098 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1098; - const int x_1099 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1099; - stack[x_149] = x_150; - const int x_1100 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1100; - const float3 x_603 = float3(x_568.y, x_564.x, x_564.x); - const int x_1101 = l_1; - l_1 = 0; - l_1 = x_1101; - } - const int x_1102 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1102; - { - const int x_1103 = l_1; - l_1 = 0; - l_1 = x_1103; - const float2 x_604 = float2(x_563.z, x_564.x); - const QuicksortObject x_1104 = obj; - const int tint_symbol_84[10] = (int[10])0; - const QuicksortObject tint_symbol_85 = {tint_symbol_84}; - obj = tint_symbol_85; - obj = x_1104; - } - } - const int x_1105 = h_1; - h_1 = 0; - h_1 = x_1105; - return; -} - -void main_1() { - float3 color = float3(0.0f, 0.0f, 0.0f); - int i_2 = 0; - float2 uv = float2(0.0f, 0.0f); - const float2 x_717 = uv; - uv = (0.0f).xx; - uv = x_717; - i_2 = 0; - const QuicksortObject x_721 = obj; - const int tint_symbol_86[10] = (int[10])0; - const QuicksortObject tint_symbol_87 = {tint_symbol_86}; - obj = tint_symbol_87; - obj = x_721; - if (true) { - const QuicksortObject x_722 = obj; - const int tint_symbol_88[10] = (int[10])0; - const QuicksortObject tint_symbol_89 = {tint_symbol_88}; - obj = tint_symbol_89; - obj = x_722; - const float2 x_431 = (1.0f).xx; - const int x_158 = i_2; - const float2 x_723 = uv; - uv = (0.0f).xx; - uv = x_723; - const float3 x_725 = color; - color = (0.0f).xxx; - color = x_725; - const float2 x_432 = float2(x_431.y, x_431.y); - const QuicksortObject x_726 = obj; - const int tint_symbol_90[10] = (int[10])0; - const QuicksortObject tint_symbol_91 = {tint_symbol_90}; - obj = tint_symbol_91; - obj = x_726; - } - const QuicksortObject x_756 = obj; - const int tint_symbol_92[10] = (int[10])0; - const QuicksortObject tint_symbol_93 = {tint_symbol_92}; - obj = tint_symbol_93; - obj = x_756; - const float2 x_446 = (0.0f).xx; - const int x_757 = i_2; - i_2 = 0; - i_2 = x_757; - quicksort_(); - const QuicksortObject x_758 = obj; - const int tint_symbol_94[10] = (int[10])0; - const QuicksortObject tint_symbol_95 = {tint_symbol_94}; - obj = tint_symbol_95; - obj = x_758; - const float4 x_184 = gl_FragCoord; - const float2 x_759 = uv; - uv = (0.0f).xx; - uv = x_759; - const float2 x_447 = (0.0f).xx; - const float2 x_760 = uv; - uv = (0.0f).xx; - uv = x_760; - const float2 x_185 = float2(x_184.x, x_184.y); - const float3 x_448 = float3(x_185.y, x_446.y, x_446.y); - const QuicksortObject x_761 = obj; - const int tint_symbol_96[10] = (int[10])0; - const QuicksortObject tint_symbol_97 = {tint_symbol_96}; - obj = tint_symbol_97; - obj = x_761; - const float2 x_762 = uv; - uv = (0.0f).xx; - uv = x_762; - const float2 x_191 = asfloat(x_188[0].xy); - const QuicksortObject x_763 = obj; - const int tint_symbol_98[10] = (int[10])0; - const QuicksortObject tint_symbol_99 = {tint_symbol_98}; - obj = tint_symbol_99; - obj = x_763; - const float3 x_449 = float3(x_184.y, 3.0f, x_184.w); - const float3 x_764 = color; - color = (0.0f).xxx; - color = x_764; - const float2 x_192 = (x_185 / x_191); - const QuicksortObject x_765 = obj; - const int tint_symbol_100[10] = (int[10])0; - const QuicksortObject tint_symbol_101 = {tint_symbol_100}; - obj = tint_symbol_101; - obj = x_765; - const float2 x_450 = float2(x_447.x, x_185.y); - const float3 x_766 = color; - color = (0.0f).xxx; - const float3 x_767 = color; - color = (0.0f).xxx; - color = x_767; - color = x_766; - uv = x_192; - color = float3(1.0f, 2.0f, 3.0f); - const float3 x_768 = color; - color = (0.0f).xxx; - color = x_768; - const float3 x_451 = float3(x_185.x, x_185.y, x_446.y); - const QuicksortObject x_769 = obj; - const int tint_symbol_102[10] = (int[10])0; - const QuicksortObject tint_symbol_103 = {tint_symbol_102}; - obj = tint_symbol_103; - obj = x_769; - const int x_770 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_770; - const int x_201 = obj.numbers[0u]; - const QuicksortObject x_771 = obj; - const int tint_symbol_104[10] = (int[10])0; - const QuicksortObject tint_symbol_105 = {tint_symbol_104}; - obj = tint_symbol_105; - obj = x_771; - const int x_772 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_772; - const float x_206 = color.x; - const float x_773 = color.x; - color.x = 0.0f; - color.x = x_773; - const float2 x_452 = float2(3.0f, 2.0f); - const int x_774 = i_2; - i_2 = 0; - i_2 = x_774; - const QuicksortObject x_775 = obj; - const int tint_symbol_106[10] = (int[10])0; - const QuicksortObject tint_symbol_107 = {tint_symbol_106}; - obj = tint_symbol_107; - obj = x_775; - const float3 x_453 = float3(x_451.x, x_450.x, x_450.y); - color.x = (x_206 + float(x_201)); - const float2 x_776 = uv; - uv = (0.0f).xx; - uv = x_776; - const float2 x_777 = uv; - uv = (0.0f).xx; - uv = x_777; - const float2 x_454 = float2(x_184.y, x_184.y); - const float x_210 = uv.x; - const float2 x_455 = float2(x_192.y, x_192.x); - const float x_778 = uv.x; - uv.x = 0.0f; - uv.x = x_778; - const QuicksortObject x_779 = obj; - const int tint_symbol_108[10] = (int[10])0; - const QuicksortObject tint_symbol_109 = {tint_symbol_108}; - obj = tint_symbol_109; - obj = x_779; - if ((x_210 > 0.25f)) { - const int x_780 = i_2; - i_2 = 0; - i_2 = x_780; - const int x_781 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_781; - const float3 x_456 = float3(0.0f, x_448.y, x_448.y); - const float x_782 = uv.x; - uv.x = 0.0f; - uv.x = x_782; - const int x_216 = obj.numbers[1]; - const QuicksortObject x_783 = obj; - const int tint_symbol_110[10] = (int[10])0; - const QuicksortObject tint_symbol_111 = {tint_symbol_110}; - obj = tint_symbol_111; - obj = x_783; - const float2 x_457 = float2(x_454.x, x_454.x); - const float2 x_784 = uv; - uv = (0.0f).xx; - uv = x_784; - const QuicksortObject x_785 = obj; - const int tint_symbol_112[10] = (int[10])0; - const QuicksortObject tint_symbol_113 = {tint_symbol_112}; - obj = tint_symbol_113; - obj = x_785; - const float2 x_458 = float2(3.0f, 0.0f); - const int x_786 = i_2; - i_2 = 0; - i_2 = x_786; - const float x_219 = color[0]; - const float x_787 = color[0]; - color[0] = 0.0f; - color[0] = x_787; - const float3 x_788 = color; - color = (0.0f).xxx; - color = x_788; - const float3 x_789 = color; - color = (0.0f).xxx; - color = x_789; - const float3 x_459 = float3(x_454.y, x_454.y, x_447.y); - const float x_790 = color[0]; - color[0] = 0.0f; - color[0] = x_790; - color.x = (float(x_216) + x_219); - const int x_791 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_791; - } - const float x_792 = uv.x; - uv.x = 0.0f; - uv.x = x_792; - const float x_793 = uv.x; - uv.x = 0.0f; - uv.x = x_793; - const float x_223 = uv.x; - const float x_794 = uv.x; - uv.x = 0.0f; - uv.x = x_794; - const float3 x_460 = float3(x_453.z, x_453.y, x_453.y); - const float2 x_795 = uv; - uv = (0.0f).xx; - uv = x_795; - const float x_796 = uv.x; - uv.x = 0.0f; - uv.x = x_796; - const float2 x_461 = (0.0f).xx; - const float x_797 = uv.x; - uv.x = 0.0f; - uv.x = x_797; - if ((x_223 > 0.5f)) { - const float x_798 = uv.x; - uv.x = 0.0f; - uv.x = x_798; - const float2 x_462 = float2(x_446.x, x_446.x); - const float x_799 = color.x; - color.x = 0.0f; - color.x = x_799; - const float x_800 = color.x; - color.x = 0.0f; - color.x = x_800; - const float3 x_463 = float3(x_453.x, x_453.z, x_461.y); - const float x_801 = color.x; - color.x = 0.0f; - color.x = x_801; - const int x_230 = obj.numbers[2u]; - const float x_802 = uv.x; - uv.x = 0.0f; - uv.x = x_802; - const float x_803 = color.x; - color.x = 0.0f; - color.x = x_803; - const int x_804 = obj.numbers[2u]; - obj.numbers[2u] = 0; - obj.numbers[2u] = x_804; - const float2 x_464 = float2(x_450.y, x_191.x); - const float x_805 = color.y; - color.y = 0.0f; - color.y = x_805; - const float x_234 = color.y; - const int x_806 = obj.numbers[2u]; - obj.numbers[2u] = 0; - obj.numbers[2u] = x_806; - const float2 x_465 = float2(x_463.x, x_185.x); - const float x_807 = color.x; - color.x = 0.0f; - color.x = x_807; - const int x_808 = i_2; - i_2 = 0; - i_2 = x_808; - const float2 x_466 = float2(x_455.y, 0.0f); - const int x_809 = i_2; - i_2 = 0; - i_2 = x_809; - color.y = (float(x_230) + x_234); - const float x_810 = uv.x; - uv.x = 0.0f; - uv.x = x_810; - } - const int x_811 = i_2; - i_2 = 0; - i_2 = x_811; - const float2 x_467 = float2(x_191.x, x_191.x); - const float x_812 = uv.x; - uv.x = 0.0f; - uv.x = x_812; - const float x_238 = uv[0]; - const float3 x_813 = color; - color = (0.0f).xxx; - color = x_813; - const float x_814 = color.x; - color.x = 0.0f; - color.x = x_814; - if ((x_238 > 0.75f)) { - const float x_815 = color.x; - color.x = 0.0f; - color.x = x_815; - const int x_245 = obj.numbers[3]; - const float x_816 = color.x; - color.x = 0.0f; - color.x = x_816; - const QuicksortObject x_817 = obj; - const int tint_symbol_114[10] = (int[10])0; - const QuicksortObject tint_symbol_115 = {tint_symbol_114}; - obj = tint_symbol_115; - obj = x_817; - const float3 x_468 = float3(x_467.x, x_467.x, x_467.x); - const float x_818 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_818; - const float x_819 = uv.x; - uv.x = 0.0f; - uv.x = x_819; - const float x_249 = color.z; - const float3 x_820 = color; - color = (0.0f).xxx; - color = x_820; - const float3 x_469 = float3(x_467.x, x_191.y, x_467.y); - const float x_821 = color.z; - color.z = 0.0f; - color.z = x_821; - const int x_822 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_822; - const float2 x_470 = (0.0f).xx; - const float x_823 = color.z; - color.z = 0.0f; - color.z = x_823; - color.z = (x_249 + float(x_245)); - const float2 x_824 = uv; - uv = (0.0f).xx; - uv = x_824; - const float2 x_471 = float2(x_470.y, x_470.y); - } - const float x_825 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_825; - const float3 x_472 = float3(x_454.x, x_454.y, x_454.y); - const int x_254 = obj.numbers[4]; - const float x_826 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_826; - const float3 x_827 = color; - color = (0.0f).xxx; - color = x_827; - const float3 x_473 = float3(x_446.y, x_453.x, x_453.x); - const int x_828 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_828; - const float2 x_474 = float2(x_191.x, x_184.z); - const float x_829 = uv.x; - uv.x = 0.0f; - uv.x = x_829; - const float x_257 = color.y; - const float x_830 = color.y; - color.y = 0.0f; - color.y = x_830; - const float2 x_475 = float2(x_467.x, x_450.x); - const float x_831 = uv.x; - uv.x = 0.0f; - uv.x = x_831; - const float x_832 = color.x; - color.x = 0.0f; - color.x = x_832; - const float2 x_476 = float2(x_451.z, x_460.y); - color.y = (x_257 + float(x_254)); - const float3 x_477 = float3(0.0f, x_472.x, 0.0f); - const float x_833 = uv.x; - uv.x = 0.0f; - uv.x = x_833; - const float x_834 = color.x; - color.x = 0.0f; - color.x = x_834; - const float2 x_478 = float2(x_472.x, x_472.y); - const float x_835 = uv.y; - uv.y = 0.0f; - uv.y = x_835; - const float x_261 = uv.y; - const int x_836 = i_2; - i_2 = 0; - i_2 = x_836; - const float3 x_479 = float3(0.0f, x_454.y, 0.0f); - const int x_837 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_837; - const float x_838 = color.y; - color.y = 0.0f; - color.y = x_838; - const float3 x_480 = float3(x_446.x, x_446.x, 0.0f); - const float x_839 = uv.x; - uv.x = 0.0f; - uv.x = x_839; - if ((x_261 > 0.25f)) { - const float2 x_481 = float2(x_447.x, x_480.z); - const float3 x_840 = color; - color = (0.0f).xxx; - color = x_840; - const int x_267 = obj.numbers[5u]; - const float x_841 = color.x; - color.x = 0.0f; - color.x = x_841; - const int x_842 = i_2; - i_2 = 0; - i_2 = x_842; - const int x_843 = i_2; - i_2 = 0; - i_2 = x_843; - const float x_270 = color.x; - const float x_844 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_844; - const float3 x_482 = float3(x_455.x, x_475.y, x_455.y); - const QuicksortObject x_845 = obj; - const int tint_symbol_116[10] = (int[10])0; - const QuicksortObject tint_symbol_117 = {tint_symbol_116}; - obj = tint_symbol_117; - obj = x_845; - const float x_846 = uv.y; - uv.y = 0.0f; - uv.y = x_846; - const int x_847 = i_2; - i_2 = 0; - i_2 = x_847; - const float3 x_483 = float3(x_184.w, x_184.w, x_192.x); - const float x_848 = uv.x; - uv.x = 0.0f; - uv.x = x_848; - color.x = (float(x_267) + x_270); - const float3 x_484 = float3(x_454.y, x_450.x, x_454.y); - const float x_849 = uv.x; - uv.x = 0.0f; - uv.x = x_849; - } - const float x_850 = color.x; - color.x = 0.0f; - color.x = x_850; - const float3 x_485 = float3(x_467.x, x_450.y, x_450.x); - const float x_851 = uv.y; - uv.y = 0.0f; - uv.y = x_851; - const int x_852 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_852; - const float x_274 = uv.y; - const int x_853 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_853; - if ((x_274 > 0.5f)) { - const float x_854 = uv.x; - uv.x = 0.0f; - uv.x = x_854; - const float2 x_486 = float2(x_480.y, x_455.y); - const float x_855 = color.y; - color.y = 0.0f; - color.y = x_855; - const float2 x_487 = float2(x_449.z, x_449.y); - const float x_856 = uv.y; - uv.y = 0.0f; - uv.y = x_856; - const int x_280 = obj.numbers[6u]; - const float x_857 = uv.y; - uv.y = 0.0f; - uv.y = x_857; - const int x_858 = i_2; - i_2 = 0; - i_2 = x_858; - const int x_859 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_859; - const float2 x_488 = float2(x_473.z, x_473.y); - const float x_283 = color.y; - const float2 x_860 = uv; - uv = (0.0f).xx; - uv = x_860; - const float x_861 = color.x; - color.x = 0.0f; - color.x = x_861; - const float2 x_489 = float2(x_475.y, x_475.x); - const int x_862 = obj.numbers[6u]; - obj.numbers[6u] = 0; - obj.numbers[6u] = x_862; - const int x_863 = obj.numbers[6u]; - obj.numbers[6u] = 0; - obj.numbers[6u] = x_863; - const float2 x_490 = float2(x_480.z, x_480.z); - const QuicksortObject x_864 = obj; - const int tint_symbol_118[10] = (int[10])0; - const QuicksortObject tint_symbol_119 = {tint_symbol_118}; - obj = tint_symbol_119; - obj = x_864; - color.y = (float(x_280) + x_283); - const float x_865 = color.x; - color.x = 0.0f; - color.x = x_865; - const float2 x_491 = float2(2.0f, x_454.x); - const float x_866 = color.y; - color.y = 0.0f; - color.y = x_866; - } - const float2 x_492 = float2(x_455.y, x_455.y); - const float x_867 = color.x; - color.x = 0.0f; - color.x = x_867; - const float x_287 = uv.y; - const QuicksortObject x_868 = obj; - const int tint_symbol_120[10] = (int[10])0; - const QuicksortObject tint_symbol_121 = {tint_symbol_120}; - obj = tint_symbol_121; - obj = x_868; - const float2 x_493 = float2(x_475.x, x_475.y); - const float x_869 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_869; - const float x_870 = color.y; - color.y = 0.0f; - color.y = x_870; - const float3 x_494 = float3(x_191.x, x_191.y, x_191.y); - const int x_871 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_871; - if ((x_287 > 0.75f)) { - const float3 x_872 = color; - color = (0.0f).xxx; - color = x_872; - const float x_873 = color.x; - color.x = 0.0f; - color.x = x_873; - const float3 x_495 = float3(x_192.y, x_192.x, x_192.y); - const float3 x_874 = color; - color = (0.0f).xxx; - color = x_874; - const int x_293 = obj.numbers[7]; - const float x_875 = uv.x; - uv.x = 0.0f; - uv.x = x_875; - const float3 x_496 = float3(x_475.x, x_467.y, x_467.x); - const float x_876 = color.y; - color.y = 0.0f; - color.y = x_876; - const float2 x_497 = float2(x_477.x, x_461.y); - const int x_877 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_877; - const float x_878 = color.y; - color.y = 0.0f; - color.y = x_878; - const float3 x_498 = float3(x_478.x, x_478.y, x_478.x); - const float x_879 = color.x; - color.x = 0.0f; - color.x = x_879; - const float x_296 = color.z; - const float x_880 = uv.y; - uv.y = 0.0f; - uv.y = x_880; - const float2 x_499 = float2(x_184.x, x_184.y); - const float x_881 = uv.x; - uv.x = 0.0f; - uv.x = x_881; - const float x_882 = uv.y; - uv.y = 0.0f; - uv.y = x_882; - const float x_883 = uv.y; - uv.y = 0.0f; - uv.y = x_883; - const float3 x_500 = float3(x_499.y, x_499.y, x_494.z); - const float x_884 = color.z; - color.z = 0.0f; - color.z = x_884; - color.z = (float(x_293) + x_296); - const float x_885 = color.y; - color.y = 0.0f; - color.y = x_885; - const float2 x_501 = float2(x_453.x, x_453.z); - const float x_886 = color.x; - color.x = 0.0f; - color.x = x_886; - } - const int x_887 = i_2; - i_2 = 0; - i_2 = x_887; - const float2 x_502 = float2(x_451.y, x_192.y); - const float2 x_888 = uv; - uv = (0.0f).xx; - uv = x_888; - const int x_301 = obj.numbers[8]; - const int x_889 = i_2; - i_2 = 0; - i_2 = x_889; - const float2 x_503 = float2(x_185.x, x_451.z); - const int x_890 = obj.numbers[8]; - obj.numbers[8] = 0; - obj.numbers[8] = x_890; - const float x_891 = color.y; - color.y = 0.0f; - color.y = x_891; - const float2 x_504 = float2(x_453.y, 0.0f); - const float x_892 = color.x; - color.x = 0.0f; - color.x = x_892; - const float3 x_505 = float3(x_504.x, x_504.y, x_504.x); - const float x_893 = color.z; - color.z = 0.0f; - color.z = x_893; - const float x_304 = color.z; - const float x_894 = color.x; - color.x = 0.0f; - color.x = x_894; - const float2 x_506 = float2(x_493.x, x_492.x); - const int x_895 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_895; - const float x_896 = uv.y; - uv.y = 0.0f; - uv.y = x_896; - const float2 x_507 = float2(x_461.x, x_447.x); - const float x_897 = color.y; - color.y = 0.0f; - color.y = x_897; - color.z = (x_304 + float(x_301)); - const float2 x_898 = uv; - uv = (0.0f).xx; - uv = x_898; - const float x_899 = uv.x; - uv.x = 0.0f; - uv.x = x_899; - const float3 x_508 = float3(x_461.y, x_461.x, x_506.y); - const float x_900 = uv.x; - uv.x = 0.0f; - uv.x = x_900; - const float x_308 = uv.x; - const float x_901 = color.y; - color.y = 0.0f; - color.y = x_901; - const float3 x_509 = float3(x_503.y, x_503.x, x_448.z); - const float x_902 = uv.y; - uv.y = 0.0f; - uv.y = x_902; - const float x_310 = uv.y; - const float x_903 = uv.y; - uv.y = 0.0f; - uv.y = x_903; - const float x_904 = color.z; - color.z = 0.0f; - color.z = x_904; - const float3 x_510 = float3(2.0f, x_485.y, x_485.z); - const float x_905 = color.z; - color.z = 0.0f; - color.z = x_905; - const int x_906 = i_2; - i_2 = 0; - i_2 = x_906; - const float2 x_511 = float2(x_485.z, x_485.y); - const float3 x_907 = color; - color = (0.0f).xxx; - color = x_907; - const float x_908 = uv.y; - uv.y = 0.0f; - uv.y = x_908; - const float3 x_512 = float3(x_455.y, x_455.y, x_455.y); - const int x_909 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_909; - if ((abs((x_308 - x_310)) < 0.25f)) { - const float x_910 = uv.x; - uv.x = 0.0f; - uv.x = x_910; - const QuicksortObject x_911 = obj; - const int tint_symbol_122[10] = (int[10])0; - const QuicksortObject tint_symbol_123 = {tint_symbol_122}; - obj = tint_symbol_123; - obj = x_911; - const float3 x_513 = float3(x_505.z, x_505.x, x_448.x); - const int x_912 = obj.numbers[8]; - obj.numbers[8] = 0; - obj.numbers[8] = x_912; - const int x_317 = obj.numbers[9u]; - const float3 x_514 = float3(x_474.y, x_474.y, x_474.y); - const float x_913 = uv.y; - uv.y = 0.0f; - uv.y = x_913; - const float x_320 = color.x; - const float x_914 = uv.y; - uv.y = 0.0f; - uv.y = x_914; - const float2 x_515 = float2(x_502.x, x_502.y); - const float x_915 = color.x; - color.x = 0.0f; - color.x = x_915; - const float3 x_916 = color; - color = (0.0f).xxx; - color = x_916; - const float2 x_516 = float2(x_452.x, x_452.x); - const float2 x_917 = uv; - uv = (0.0f).xx; - uv = x_917; - const float x_918 = uv.x; - uv.x = 0.0f; - uv.x = x_918; - const float3 x_517 = (0.0f).xxx; - color.x = (float(x_317) + x_320); - const float x_919 = color.x; - color.x = 0.0f; - color.x = x_919; - const float3 x_518 = float3(x_480.y, x_508.x, x_480.x); - const float x_920 = color.x; - color.x = 0.0f; - color.x = x_920; - } - const float x_921 = uv.y; - uv.y = 0.0f; - uv.y = x_921; - const float3 x_325 = color; - const float x_922 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_922; - const float3 x_519 = float3(x_447.x, x_446.x, x_446.y); - const float3 x_326 = normalize(x_325); - const float x_923 = uv.x; - uv.x = 0.0f; - uv.x = x_923; - const QuicksortObject x_924 = obj; - const int tint_symbol_124[10] = (int[10])0; - const QuicksortObject tint_symbol_125 = {tint_symbol_124}; - obj = tint_symbol_125; - obj = x_924; - const QuicksortObject x_925 = obj; - const int tint_symbol_126[10] = (int[10])0; - const QuicksortObject tint_symbol_127 = {tint_symbol_126}; - obj = tint_symbol_127; - obj = x_925; - const float x_926 = color.y; - color.y = 0.0f; - color.y = x_926; - const float2 x_520 = float2(x_506.y, x_519.y); - const float x_927 = color.y; - color.y = 0.0f; - color.y = x_927; - const float4 x_330 = float4(x_326.x, x_326.y, x_326.z, 1.0f); - const float x_928 = uv.y; - uv.y = 0.0f; - uv.y = x_928; - const float3 x_521 = float3(2.0f, 2.0f, x_520.y); - const float x_929 = uv.x; - uv.x = 0.0f; - uv.x = x_929; - x_GLF_color = x_330; - const QuicksortObject x_930 = obj; - const int tint_symbol_128[10] = (int[10])0; - const QuicksortObject tint_symbol_129 = {tint_symbol_128}; - obj = tint_symbol_129; - obj = x_930; - const float3 x_522 = float3(x_330.w, x_330.y, x_493.x); - const float x_931 = color.x; - color.x = 0.0f; - color.x = x_931; - return; -} - -struct main_out { - float4 x_GLF_color_1; -}; -struct tint_symbol_49 { - float4 gl_FragCoord_param : SV_Position; -}; -struct tint_symbol_50 { - float4 x_GLF_color_1 : SV_Target0; -}; - -main_out main_inner(float4 gl_FragCoord_param) { - gl_FragCoord = gl_FragCoord_param; - main_1(); - const main_out tint_symbol_130 = {x_GLF_color}; - return tint_symbol_130; -} - -tint_symbol_50 main(tint_symbol_49 tint_symbol_48) { - const main_out inner_result = main_inner(tint_symbol_48.gl_FragCoord_param); - tint_symbol_50 wrapper_result = (tint_symbol_50)0; - wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; - return wrapper_result; -} +SKIP: triggers crbug.com/tint/98 diff --git a/test/tint/bug/tint/749.spvasm.expected.glsl b/test/tint/bug/tint/749.spvasm.expected.glsl index 57b834da56..149037eaec 100644 --- a/test/tint/bug/tint/749.spvasm.expected.glsl +++ b/test/tint/bug/tint/749.spvasm.expected.glsl @@ -1,1561 +1 @@ -#version 310 es -precision mediump float; - -layout(location = 0) out vec4 x_GLF_color_1_1; -struct QuicksortObject { - int numbers[10]; -}; - -QuicksortObject obj = QuicksortObject(int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0)); -vec4 tint_symbol = vec4(0.0f, 0.0f, 0.0f, 0.0f); -layout(binding = 0, std140) uniform buf0_ubo { - vec2 resolution; - uint pad; - uint pad_1; -} x_188; - -vec4 x_GLF_color = vec4(0.0f, 0.0f, 0.0f, 0.0f); -void swap_i1_i1_(inout int i, inout int j) { - int temp = 0; - int x_932 = temp; - temp = 0; - temp = x_932; - vec3 x_523 = vec3(3.0f, 2.0f, 3.0f); - int x_933 = i; - i = 0; - i = x_933; - int x_28 = i; - int x_934 = j; - j = 0; - j = x_934; - vec3 x_524 = vec3(x_523.y, x_523.x, x_523.y); - int x_935 = temp; - temp = 0; - temp = x_935; - int x_30_save = x_28; - int x_936 = obj.numbers[x_30_save]; - obj.numbers[x_30_save] = 0; - obj.numbers[x_30_save] = x_936; - int x_31 = obj.numbers[x_30_save]; - int x_937 = temp; - temp = 0; - temp = x_937; - temp = x_31; - int x_938 = j; - j = 0; - j = x_938; - vec3 x_525 = vec3(x_523.z, 1.0f, x_523.y); - int x_939 = i; - i = 0; - i = x_939; - int x_32 = i; - int x_940 = obj.numbers[x_30_save]; - obj.numbers[x_30_save] = 0; - obj.numbers[x_30_save] = x_940; - int x_33 = j; - int x_941 = i; - i = 0; - i = x_941; - vec3 x_526 = vec3(x_525.x, x_525.z, x_525.z); - int x_942 = obj.numbers[x_30_save]; - obj.numbers[x_30_save] = 0; - obj.numbers[x_30_save] = x_942; - int x_34_save = x_33; - int x_35 = obj.numbers[x_34_save]; - QuicksortObject x_943 = obj; - int tint_symbol_3[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_4 = QuicksortObject(tint_symbol_3); - obj = tint_symbol_4; - obj = x_943; - vec2 x_527 = vec2(x_526.x, x_526.x); - int x_36_save = x_32; - vec3 x_528 = vec3(x_524.x, x_524.z, x_524.x); - obj.numbers[x_36_save] = x_35; - QuicksortObject x_944 = obj; - int tint_symbol_5[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_6 = QuicksortObject(tint_symbol_5); - obj = tint_symbol_6; - obj = x_944; - vec3 x_529 = vec3(x_526.y, x_526.z, x_526.x); - int x_945 = i; - i = 0; - i = x_945; - int x_37 = j; - int x_946 = temp; - temp = 0; - temp = x_946; - vec2 x_530 = vec2(x_529.z, x_529.y); - int x_947 = obj.numbers[x_34_save]; - obj.numbers[x_34_save] = 0; - obj.numbers[x_34_save] = x_947; - int x_38 = temp; - int x_948 = j; - j = 0; - j = x_948; - vec3 x_531 = vec3(x_527.x, x_526.y, x_526.x); - int x_949 = obj.numbers[x_36_save]; - obj.numbers[x_36_save] = 0; - obj.numbers[x_36_save] = x_949; - QuicksortObject x_950 = obj; - int tint_symbol_7[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_8 = QuicksortObject(tint_symbol_7); - obj = tint_symbol_8; - obj = x_950; - vec3 x_532 = vec3(x_528.x, x_528.y, x_528.x); - int x_951 = obj.numbers[x_34_save]; - obj.numbers[x_34_save] = 0; - obj.numbers[x_34_save] = x_951; - obj.numbers[x_37] = x_38; - return; -} - -int performPartition_i1_i1_(inout int l, inout int h) { - int param_3 = 0; - int i_1 = 0; - int j_1 = 0; - int param_2 = 0; - int param_1 = 0; - int param = 0; - int pivot = 0; - vec2 x_537 = vec2(0.0f, 0.0f); - vec3 x_538 = vec3(0.0f, 0.0f, 0.0f); - int x_952 = h; - h = 0; - h = x_952; - int x_41 = h; - int x_953 = l; - l = 0; - l = x_953; - int x_42_save = x_41; - int x_954 = obj.numbers[x_42_save]; - obj.numbers[x_42_save] = 0; - obj.numbers[x_42_save] = x_954; - int x_43 = obj.numbers[x_42_save]; - int x_955 = param_3; - param_3 = 0; - param_3 = x_955; - vec3 x_534 = vec3(3.0f, 1.0f, 3.0f); - int x_956 = param_1; - param_1 = 0; - param_1 = x_956; - pivot = x_43; - int x_45 = l; - int x_957 = h; - h = 0; - h = x_957; - int x_958 = j_1; - j_1 = 0; - j_1 = x_958; - vec3 x_535 = vec3(x_534.y, x_534.z, x_534.y); - int x_959 = l; - l = 0; - l = x_959; - i_1 = (x_45 - int(1u)); - int x_49 = l; - vec3 x_536 = vec3(x_534.x, x_534.z, x_535.x); - j_1 = 10; - QuicksortObject x_960 = obj; - int tint_symbol_9[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_10 = QuicksortObject(tint_symbol_9); - obj = tint_symbol_10; - obj = x_960; - while (true) { - int x_961 = pivot; - pivot = 0; - pivot = x_961; - int x_962 = param_1; - param_1 = 0; - param_1 = x_962; - int x_55 = j_1; - int x_963 = pivot; - pivot = 0; - pivot = x_963; - x_537 = vec2(2.0f, 3.0f); - QuicksortObject x_964 = obj; - int tint_symbol_11[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_12 = QuicksortObject(tint_symbol_11); - obj = tint_symbol_12; - obj = x_964; - int x_56 = h; - int x_965 = h; - h = 0; - h = x_965; - int x_966 = param; - param = 0; - param = x_966; - int x_967 = j_1; - j_1 = 0; - j_1 = x_967; - x_538 = vec3(x_534.x, x_537.y, x_534.z); - int x_968 = param; - param = 0; - param = x_968; - if ((x_55 <= (x_56 - int(1u)))) { - } else { - break; - } - int x_60 = j_1; - int x_969 = obj.numbers[x_42_save]; - obj.numbers[x_42_save] = 0; - obj.numbers[x_42_save] = x_969; - int x_61_save = x_60; - int x_970 = h; - h = 0; - h = x_970; - vec3 x_539 = vec3(x_537.x, x_535.z, x_537.x); - int x_971 = param_1; - param_1 = 0; - param_1 = x_971; - int x_62 = obj.numbers[x_61_save]; - QuicksortObject x_972 = obj; - int tint_symbol_13[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_14 = QuicksortObject(tint_symbol_13); - obj = tint_symbol_14; - obj = x_972; - int x_63 = pivot; - vec2 x_540 = vec2(2.0f, x_534.z); - int x_973 = i_1; - i_1 = 0; - i_1 = x_973; - int x_974 = l; - l = 0; - l = x_974; - vec3 x_541 = vec3(x_534.y, x_534.x, x_534.y); - int x_975 = pivot; - pivot = 0; - pivot = x_975; - if ((x_62 <= x_63)) { - vec3 x_542 = vec3(x_541.z, x_541.x, x_541.x); - int x_976 = param_3; - param_3 = 0; - param_3 = x_976; - int x_67 = i_1; - int x_977 = pivot; - pivot = 0; - pivot = x_977; - vec2 x_543 = vec2(x_539.x, x_541.y); - int x_978 = i_1; - i_1 = 0; - i_1 = x_978; - int x_979 = param; - param = 0; - param = x_979; - i_1 = (x_67 + int(1u)); - int x_980 = l; - l = 0; - l = x_980; - vec3 x_544 = vec3(3.0f, 2.0f, x_540.x); - int x_70 = i_1; - vec2 x_545 = vec2(x_537.y, x_538.x); - int x_981 = param; - param = 0; - param = x_981; - param = x_70; - int x_982 = param; - param = 0; - param = x_982; - vec2 x_546 = vec2(x_545.x, x_545.x); - int x_983 = i_1; - i_1 = 0; - i_1 = x_983; - param_1 = j_1; - int x_984 = param_3; - param_3 = 0; - param_3 = x_984; - swap_i1_i1_(param, param_1); - int x_985 = param_1; - param_1 = 0; - param_1 = x_985; - } - QuicksortObject x_986 = obj; - int tint_symbol_15[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_16 = QuicksortObject(tint_symbol_15); - obj = tint_symbol_16; - obj = x_986; - { - int x_987 = h; - h = 0; - h = x_987; - int x_74 = j_1; - int x_988 = h; - h = 0; - h = x_988; - vec3 x_547 = vec3(x_539.x, x_541.z, x_541.z); - int x_989 = obj.numbers[x_61_save]; - obj.numbers[x_61_save] = 0; - obj.numbers[x_61_save] = x_989; - int x_990 = param; - param = 0; - param = x_990; - j_1 = (1 + x_74); - int x_991 = param_1; - param_1 = 0; - param_1 = x_991; - vec3 x_548 = vec3(x_541.y, x_541.z, x_541.x); - int x_992 = obj.numbers[x_61_save]; - obj.numbers[x_61_save] = 0; - obj.numbers[x_61_save] = x_992; - } - } - int x_76 = i_1; - int x_993 = obj.numbers[x_42_save]; - obj.numbers[x_42_save] = 0; - obj.numbers[x_42_save] = x_993; - vec2 x_549 = vec2(x_534.x, x_534.y); - QuicksortObject x_994 = obj; - int tint_symbol_17[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_18 = QuicksortObject(tint_symbol_17); - obj = tint_symbol_18; - obj = x_994; - int x_995 = h; - h = 0; - h = x_995; - i_1 = (1 + x_76); - int x_996 = param_1; - param_1 = 0; - param_1 = x_996; - int x_79 = i_1; - int x_997 = j_1; - j_1 = 0; - j_1 = x_997; - vec2 x_550 = vec2(x_534.x, x_534.x); - int x_998 = param_1; - param_1 = 0; - param_1 = x_998; - param_2 = x_79; - vec2 x_551 = vec2(x_534.y, x_536.x); - int x_999 = pivot; - pivot = 0; - pivot = x_999; - int x_81 = h; - vec2 x_552 = vec2(x_550.x, x_549.y); - int x_1000 = h; - h = 0; - h = x_1000; - param_3 = x_81; - int x_1001 = i_1; - i_1 = 0; - i_1 = x_1001; - vec2 x_553 = vec2(x_549.y, x_552.x); - int x_1002 = h; - h = 0; - h = x_1002; - swap_i1_i1_(param_2, param_3); - int x_1003 = l; - l = 0; - l = x_1003; - vec2 x_554 = vec2(x_536.z, 2.0f); - int x_1004 = param_1; - param_1 = 0; - param_1 = x_1004; - int x_83 = i_1; - int x_1005 = param; - param = 0; - param = x_1005; - vec2 x_555 = vec2(x_534.y, x_534.x); - int x_1006 = j_1; - j_1 = 0; - j_1 = x_1006; - return x_83; -} - -void quicksort_() { - int param_4 = 0; - int h_1 = 0; - int p = 0; - int l_1 = 0; - int top = 0; - int stack[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - int param_5 = 0; - l_1 = 0; - int x_1007 = param_5; - param_5 = 0; - param_5 = x_1007; - h_1 = 9; - int x_1008[10] = stack; - int tint_symbol_19[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - stack = tint_symbol_19; - stack = x_1008; - vec2 x_556 = vec2(2.0f); - int x_1009 = param_5; - param_5 = 0; - param_5 = x_1009; - top = -1; - int x_1010 = p; - p = 0; - p = x_1010; - int x_93 = top; - vec2 x_557 = vec2(1.0f); - int x_1011 = p; - p = 0; - p = x_1011; - int x_94 = (x_93 + int(1u)); - int x_1012 = top; - top = 0; - top = x_1012; - vec2 x_558 = vec2(x_556.y, x_557.y); - int x_1013 = param_4; - param_4 = 0; - param_4 = x_1013; - top = x_94; - int x_1014 = h_1; - h_1 = 0; - h_1 = x_1014; - vec3 x_559 = vec3(x_557.y, x_557.x, x_557.x); - int x_1015 = param_4; - param_4 = 0; - param_4 = x_1015; - int x_95 = l_1; - QuicksortObject x_1016 = obj; - int tint_symbol_20[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_21 = QuicksortObject(tint_symbol_20); - obj = tint_symbol_21; - obj = x_1016; - vec3 x_560 = vec3(x_559.y, x_559.x, x_557.x); - int x_96_save = x_94; - int x_1017[10] = stack; - int tint_symbol_22[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - stack = tint_symbol_22; - stack = x_1017; - vec3 x_561 = vec3(x_556.y, x_556.y, x_556.y); - int x_1018 = l_1; - l_1 = 0; - l_1 = 0; - stack[x_96_save] = x_95; - int x_1019 = param_5; - param_5 = 0; - param_5 = x_1019; - int x_97 = top; - int x_1020 = param_4; - param_4 = 0; - param_4 = x_1020; - vec3 x_562 = vec3(3.0f, x_558.y, 2.0f); - int x_1021 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1021; - int x_98 = (x_97 + 1); - int x_1022 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1022; - vec3 x_563 = vec3(x_559.x, x_559.z, x_556.y); - top = x_98; - int x_1023 = param_4; - param_4 = 0; - param_4 = x_1023; - int x_99 = h_1; - int x_1024 = param_4; - param_4 = 0; - param_4 = x_1024; - vec3 x_564 = vec3(x_558.x, x_561.x, x_558.y); - int x_1025 = l_1; - l_1 = 0; - l_1 = x_1025; - int x_100_save = x_98; - int x_1026 = param_5; - param_5 = 0; - param_5 = x_1026; - vec2 x_565 = vec2(x_564.z, x_564.z); - int x_1027 = p; - p = 0; - p = x_1027; - stack[x_100_save] = x_99; - while (true) { - vec3 x_566 = vec3(x_563.x, x_563.x, x_563.x); - int x_1028 = h_1; - h_1 = 0; - h_1 = x_1028; - int x_1029[10] = stack; - int tint_symbol_23[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - stack = tint_symbol_23; - stack = x_1029; - int x_106 = top; - int x_1030[10] = stack; - int tint_symbol_24[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - stack = tint_symbol_24; - stack = x_1030; - vec2 x_567 = vec2(x_558.x, x_564.z); - int x_1031 = param_4; - param_4 = 0; - param_4 = x_1031; - if ((x_106 >= int(0u))) { - } else { - break; - } - QuicksortObject x_1032 = obj; - int tint_symbol_25[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_26 = QuicksortObject(tint_symbol_25); - obj = tint_symbol_26; - obj = x_1032; - vec3 x_568 = vec3(x_559.y, x_559.x, x_563.y); - int x_1033 = param_4; - param_4 = 0; - param_4 = x_1033; - int x_108 = top; - vec3 x_569 = vec3(x_565.x, x_567.y, x_565.x); - int x_1034 = h_1; - h_1 = 0; - h_1 = x_1034; - vec2 x_570 = vec2(x_556.x, x_556.x); - int x_1035 = p; - p = 0; - p = x_1035; - top = (x_108 - int(1u)); - int x_1036 = p; - p = 0; - p = x_1036; - int x_110_save = x_108; - int x_1037 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1037; - int x_111 = stack[x_110_save]; - int x_1038[10] = stack; - int tint_symbol_27[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - stack = tint_symbol_27; - stack = x_1038; - vec3 x_571 = vec3(x_559.y, x_559.x, x_564.y); - int x_1039 = l_1; - l_1 = 0; - l_1 = x_1039; - h_1 = x_111; - int x_1040[10] = stack; - int tint_symbol_28[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - stack = tint_symbol_28; - stack = x_1040; - vec2 x_572 = vec2(x_562.y, x_561.y); - int x_1041 = p; - p = 0; - p = x_1041; - int x_112 = top; - int x_1042 = param_4; - param_4 = 0; - param_4 = x_1042; - int x_1043 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1043; - vec2 x_573 = vec2(2.0f, 3.0f); - top = (x_112 - 1); - int x_1044 = param_5; - param_5 = 0; - param_5 = x_1044; - vec3 x_574 = vec3(x_570.y, x_565.x, x_570.y); - int x_1045 = h_1; - h_1 = 0; - h_1 = x_1045; - int x_114_save = x_112; - vec2 x_575 = vec2(x_564.y, x_564.z); - int x_1046 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1046; - int x_115 = stack[x_114_save]; - int x_1047 = p; - p = 0; - p = x_1047; - vec3 x_576 = vec3(x_573.y, x_573.y, x_565.x); - int x_1048 = param_5; - param_5 = 0; - param_5 = x_1048; - l_1 = x_115; - int x_1049 = top; - top = 0; - top = x_1049; - param_4 = l_1; - int x_1050 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1050; - vec2 x_577 = vec2(x_569.y, x_569.z); - int x_120 = h_1; - vec2 x_578 = vec2(x_558.x, 2.0f); - param_5 = x_120; - int x_1051 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1051; - int x_121 = performPartition_i1_i1_(param_4, param_5); - vec2 x_579 = vec2(x_567.x, x_568.x); - int x_1052 = param_5; - param_5 = 0; - param_5 = x_1052; - p = x_121; - int x_1053 = param_4; - param_4 = 0; - param_4 = x_1053; - int x_122 = p; - int x_1054 = h_1; - h_1 = 0; - h_1 = x_1054; - vec2 x_580 = vec2(x_568.y, x_568.y); - int x_1055 = l_1; - l_1 = 0; - l_1 = x_1055; - int x_1056 = h_1; - h_1 = 0; - h_1 = x_1056; - int x_124 = l_1; - int x_1057 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1057; - int x_1058 = h_1; - h_1 = 0; - h_1 = x_1058; - vec2 x_582 = vec2(x_567.y, x_573.x); - int x_1059 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1059; - if (((x_122 - int(1u)) > x_124)) { - int x_1060 = param_4; - param_4 = 0; - param_4 = x_1060; - int x_128 = top; - vec2 x_583 = vec2(x_571.y, x_556.y); - int x_1061 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1061; - int x_1062[10] = stack; - int tint_symbol_29[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - stack = tint_symbol_29; - stack = x_1062; - vec2 x_584 = vec2(x_569.z, x_569.y); - vec3 x_585 = vec3(x_580.y, x_577.x, x_577.x); - int x_130 = l_1; - int x_1063 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1063; - vec2 x_586 = vec2(x_564.x, x_585.x); - int x_1064 = param_5; - param_5 = 0; - param_5 = x_1064; - int x_131_save = (1 + x_128); - int x_1065 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1065; - vec3 x_587 = vec3(x_566.y, x_566.y, x_563.x); - int x_1066 = param_5; - param_5 = 0; - param_5 = x_1066; - stack[x_131_save] = x_130; - int x_132 = top; - int x_1067 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1067; - vec2 x_588 = vec2(x_575.y, x_575.x); - int x_1068 = stack[x_131_save]; - stack[x_131_save] = 0; - stack[x_131_save] = x_1068; - int x_133 = int((1u + uint(x_132))); - int x_1069 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1069; - vec3 x_589 = vec3(x_576.z, x_588.y, x_576.z); - int x_1070 = h_1; - h_1 = 0; - h_1 = x_1070; - top = x_133; - int x_1071[10] = stack; - int tint_symbol_30[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - stack = tint_symbol_30; - stack = x_1071; - int x_134 = p; - vec2 x_590 = vec2(x_576.x, x_573.y); - int x_1072 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1072; - int x_136_save = x_133; - int x_1073 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1073; - stack[x_136_save] = (x_134 - int(1u)); - int x_1074 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1074; - vec2 x_591 = vec2(x_569.z, x_569.y); - int x_1075 = stack[x_136_save]; - stack[x_136_save] = 0; - stack[x_136_save] = x_1075; - } - int x_1076 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1076; - vec2 x_592 = vec2(1.0f, 2.0f); - QuicksortObject x_1077 = obj; - int tint_symbol_31[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_32 = QuicksortObject(tint_symbol_31); - obj = tint_symbol_32; - obj = x_1077; - int x_137 = p; - int x_1078 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1078; - vec3 x_593 = vec3(x_571.z, x_556.x, x_556.y); - int x_1079 = p; - p = 0; - p = x_1079; - vec3 x_594 = vec3(x_563.z, x_563.x, x_575.x); - int x_1080 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1080; - int x_139 = h_1; - int x_1081 = top; - top = 0; - top = x_1081; - vec3 x_595 = vec3(x_560.z, x_568.x, x_560.x); - int x_1082 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1082; - int x_1083 = p; - p = 0; - p = x_1083; - if ((int((1u + uint(x_137))) < x_139)) { - int x_1084 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1084; - vec2 x_596 = vec2(x_592.y, x_582.x); - int x_1085 = l_1; - l_1 = 0; - l_1 = x_1085; - int x_143 = top; - int x_1086 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1086; - vec3 x_597 = vec3(x_562.y, x_560.y, x_560.y); - int x_144 = (x_143 + 1); - int x_1087 = param_5; - param_5 = 0; - param_5 = x_1087; - top = x_144; - int x_1088 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1088; - int x_145 = p; - int x_1089 = param_5; - param_5 = 0; - param_5 = x_1089; - vec3 x_599 = vec3(x_560.z, x_560.x, x_568.x); - int x_1090 = p; - p = 0; - p = x_1090; - vec3 x_600 = vec3(x_556.x, x_580.x, x_580.x); - int x_1091 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1091; - int x_147_save = x_144; - int x_1092 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1092; - vec2 x_601 = vec2(x_563.x, x_563.y); - stack[x_147_save] = int((1u + uint(x_145))); - int x_1093[10] = stack; - int tint_symbol_33[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - stack = tint_symbol_33; - stack = x_1093; - int x_148 = top; - int x_1094 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1094; - vec2 x_602 = vec2(x_565.y, x_599.y); - int x_1095[10] = stack; - int tint_symbol_34[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - stack = tint_symbol_34; - stack = x_1095; - int x_149 = (x_148 + int(1u)); - int x_1096 = stack[x_147_save]; - stack[x_147_save] = 0; - stack[x_147_save] = x_1096; - top = x_149; - int x_1097 = param_4; - param_4 = 0; - param_4 = x_1097; - int x_150 = h_1; - int x_1098 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1098; - int x_1099 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1099; - stack[x_149] = x_150; - int x_1100 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1100; - vec3 x_603 = vec3(x_568.y, x_564.x, x_564.x); - int x_1101 = l_1; - l_1 = 0; - l_1 = x_1101; - } - int x_1102 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1102; - { - int x_1103 = l_1; - l_1 = 0; - l_1 = x_1103; - vec2 x_604 = vec2(x_563.z, x_564.x); - QuicksortObject x_1104 = obj; - int tint_symbol_35[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_36 = QuicksortObject(tint_symbol_35); - obj = tint_symbol_36; - obj = x_1104; - } - } - int x_1105 = h_1; - h_1 = 0; - h_1 = x_1105; - return; -} - -void main_1() { - vec3 color = vec3(0.0f, 0.0f, 0.0f); - int i_2 = 0; - vec2 uv = vec2(0.0f, 0.0f); - vec2 x_717 = uv; - uv = vec2(0.0f); - uv = x_717; - i_2 = 0; - QuicksortObject x_721 = obj; - int tint_symbol_37[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_38 = QuicksortObject(tint_symbol_37); - obj = tint_symbol_38; - obj = x_721; - if (true) { - QuicksortObject x_722 = obj; - int tint_symbol_39[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_40 = QuicksortObject(tint_symbol_39); - obj = tint_symbol_40; - obj = x_722; - vec2 x_431 = vec2(1.0f); - int x_158 = i_2; - vec2 x_723 = uv; - uv = vec2(0.0f); - uv = x_723; - vec3 x_725 = color; - color = vec3(0.0f); - color = x_725; - vec2 x_432 = vec2(x_431.y, x_431.y); - QuicksortObject x_726 = obj; - int tint_symbol_41[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_42 = QuicksortObject(tint_symbol_41); - obj = tint_symbol_42; - obj = x_726; - } - QuicksortObject x_756 = obj; - int tint_symbol_43[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_44 = QuicksortObject(tint_symbol_43); - obj = tint_symbol_44; - obj = x_756; - vec2 x_446 = vec2(0.0f); - int x_757 = i_2; - i_2 = 0; - i_2 = x_757; - quicksort_(); - QuicksortObject x_758 = obj; - int tint_symbol_45[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_46 = QuicksortObject(tint_symbol_45); - obj = tint_symbol_46; - obj = x_758; - vec4 x_184 = tint_symbol; - vec2 x_759 = uv; - uv = vec2(0.0f); - uv = x_759; - vec2 x_447 = vec2(0.0f); - vec2 x_760 = uv; - uv = vec2(0.0f); - uv = x_760; - vec2 x_185 = vec2(x_184.x, x_184.y); - vec3 x_448 = vec3(x_185.y, x_446.y, x_446.y); - QuicksortObject x_761 = obj; - int tint_symbol_47[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_48 = QuicksortObject(tint_symbol_47); - obj = tint_symbol_48; - obj = x_761; - vec2 x_762 = uv; - uv = vec2(0.0f); - uv = x_762; - vec2 x_191 = x_188.resolution; - QuicksortObject x_763 = obj; - int tint_symbol_49[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_50 = QuicksortObject(tint_symbol_49); - obj = tint_symbol_50; - obj = x_763; - vec3 x_449 = vec3(x_184.y, 3.0f, x_184.w); - vec3 x_764 = color; - color = vec3(0.0f); - color = x_764; - vec2 x_192 = (x_185 / x_191); - QuicksortObject x_765 = obj; - int tint_symbol_51[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_52 = QuicksortObject(tint_symbol_51); - obj = tint_symbol_52; - obj = x_765; - vec2 x_450 = vec2(x_447.x, x_185.y); - vec3 x_766 = color; - color = vec3(0.0f); - vec3 x_767 = color; - color = vec3(0.0f); - color = x_767; - color = x_766; - uv = x_192; - color = vec3(1.0f, 2.0f, 3.0f); - vec3 x_768 = color; - color = vec3(0.0f); - color = x_768; - vec3 x_451 = vec3(x_185.x, x_185.y, x_446.y); - QuicksortObject x_769 = obj; - int tint_symbol_53[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_54 = QuicksortObject(tint_symbol_53); - obj = tint_symbol_54; - obj = x_769; - int x_770 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_770; - int x_201 = obj.numbers[0u]; - QuicksortObject x_771 = obj; - int tint_symbol_55[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_56 = QuicksortObject(tint_symbol_55); - obj = tint_symbol_56; - obj = x_771; - int x_772 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_772; - float x_206 = color.x; - float x_773 = color.x; - color.x = 0.0f; - color.x = x_773; - vec2 x_452 = vec2(3.0f, 2.0f); - int x_774 = i_2; - i_2 = 0; - i_2 = x_774; - QuicksortObject x_775 = obj; - int tint_symbol_57[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_58 = QuicksortObject(tint_symbol_57); - obj = tint_symbol_58; - obj = x_775; - vec3 x_453 = vec3(x_451.x, x_450.x, x_450.y); - color.x = (x_206 + float(x_201)); - vec2 x_776 = uv; - uv = vec2(0.0f); - uv = x_776; - vec2 x_777 = uv; - uv = vec2(0.0f); - uv = x_777; - vec2 x_454 = vec2(x_184.y, x_184.y); - float x_210 = uv.x; - vec2 x_455 = vec2(x_192.y, x_192.x); - float x_778 = uv.x; - uv.x = 0.0f; - uv.x = x_778; - QuicksortObject x_779 = obj; - int tint_symbol_59[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_60 = QuicksortObject(tint_symbol_59); - obj = tint_symbol_60; - obj = x_779; - if ((x_210 > 0.25f)) { - int x_780 = i_2; - i_2 = 0; - i_2 = x_780; - int x_781 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_781; - vec3 x_456 = vec3(0.0f, x_448.y, x_448.y); - float x_782 = uv.x; - uv.x = 0.0f; - uv.x = x_782; - int x_216 = obj.numbers[1]; - QuicksortObject x_783 = obj; - int tint_symbol_61[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_62 = QuicksortObject(tint_symbol_61); - obj = tint_symbol_62; - obj = x_783; - vec2 x_457 = vec2(x_454.x, x_454.x); - vec2 x_784 = uv; - uv = vec2(0.0f); - uv = x_784; - QuicksortObject x_785 = obj; - int tint_symbol_63[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_64 = QuicksortObject(tint_symbol_63); - obj = tint_symbol_64; - obj = x_785; - vec2 x_458 = vec2(3.0f, 0.0f); - int x_786 = i_2; - i_2 = 0; - i_2 = x_786; - float x_219 = color[0]; - float x_787 = color[0]; - color[0] = 0.0f; - color[0] = x_787; - vec3 x_788 = color; - color = vec3(0.0f); - color = x_788; - vec3 x_789 = color; - color = vec3(0.0f); - color = x_789; - vec3 x_459 = vec3(x_454.y, x_454.y, x_447.y); - float x_790 = color[0]; - color[0] = 0.0f; - color[0] = x_790; - color.x = (float(x_216) + x_219); - int x_791 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_791; - } - float x_792 = uv.x; - uv.x = 0.0f; - uv.x = x_792; - float x_793 = uv.x; - uv.x = 0.0f; - uv.x = x_793; - float x_223 = uv.x; - float x_794 = uv.x; - uv.x = 0.0f; - uv.x = x_794; - vec3 x_460 = vec3(x_453.z, x_453.y, x_453.y); - vec2 x_795 = uv; - uv = vec2(0.0f); - uv = x_795; - float x_796 = uv.x; - uv.x = 0.0f; - uv.x = x_796; - vec2 x_461 = vec2(0.0f); - float x_797 = uv.x; - uv.x = 0.0f; - uv.x = x_797; - if ((x_223 > 0.5f)) { - float x_798 = uv.x; - uv.x = 0.0f; - uv.x = x_798; - vec2 x_462 = vec2(x_446.x, x_446.x); - float x_799 = color.x; - color.x = 0.0f; - color.x = x_799; - float x_800 = color.x; - color.x = 0.0f; - color.x = x_800; - vec3 x_463 = vec3(x_453.x, x_453.z, x_461.y); - float x_801 = color.x; - color.x = 0.0f; - color.x = x_801; - int x_230 = obj.numbers[2u]; - float x_802 = uv.x; - uv.x = 0.0f; - uv.x = x_802; - float x_803 = color.x; - color.x = 0.0f; - color.x = x_803; - int x_804 = obj.numbers[2u]; - obj.numbers[2u] = 0; - obj.numbers[2u] = x_804; - vec2 x_464 = vec2(x_450.y, x_191.x); - float x_805 = color.y; - color.y = 0.0f; - color.y = x_805; - float x_234 = color.y; - int x_806 = obj.numbers[2u]; - obj.numbers[2u] = 0; - obj.numbers[2u] = x_806; - vec2 x_465 = vec2(x_463.x, x_185.x); - float x_807 = color.x; - color.x = 0.0f; - color.x = x_807; - int x_808 = i_2; - i_2 = 0; - i_2 = x_808; - vec2 x_466 = vec2(x_455.y, 0.0f); - int x_809 = i_2; - i_2 = 0; - i_2 = x_809; - color.y = (float(x_230) + x_234); - float x_810 = uv.x; - uv.x = 0.0f; - uv.x = x_810; - } - int x_811 = i_2; - i_2 = 0; - i_2 = x_811; - vec2 x_467 = vec2(x_191.x, x_191.x); - float x_812 = uv.x; - uv.x = 0.0f; - uv.x = x_812; - float x_238 = uv[0]; - vec3 x_813 = color; - color = vec3(0.0f); - color = x_813; - float x_814 = color.x; - color.x = 0.0f; - color.x = x_814; - if ((x_238 > 0.75f)) { - float x_815 = color.x; - color.x = 0.0f; - color.x = x_815; - int x_245 = obj.numbers[3]; - float x_816 = color.x; - color.x = 0.0f; - color.x = x_816; - QuicksortObject x_817 = obj; - int tint_symbol_65[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_66 = QuicksortObject(tint_symbol_65); - obj = tint_symbol_66; - obj = x_817; - vec3 x_468 = vec3(x_467.x, x_467.x, x_467.x); - float x_818 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_818; - float x_819 = uv.x; - uv.x = 0.0f; - uv.x = x_819; - float x_249 = color.z; - vec3 x_820 = color; - color = vec3(0.0f); - color = x_820; - vec3 x_469 = vec3(x_467.x, x_191.y, x_467.y); - float x_821 = color.z; - color.z = 0.0f; - color.z = x_821; - int x_822 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_822; - vec2 x_470 = vec2(0.0f); - float x_823 = color.z; - color.z = 0.0f; - color.z = x_823; - color.z = (x_249 + float(x_245)); - vec2 x_824 = uv; - uv = vec2(0.0f); - uv = x_824; - vec2 x_471 = vec2(x_470.y, x_470.y); - } - float x_825 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_825; - vec3 x_472 = vec3(x_454.x, x_454.y, x_454.y); - int x_254 = obj.numbers[4]; - float x_826 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_826; - vec3 x_827 = color; - color = vec3(0.0f); - color = x_827; - vec3 x_473 = vec3(x_446.y, x_453.x, x_453.x); - int x_828 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_828; - vec2 x_474 = vec2(x_191.x, x_184.z); - float x_829 = uv.x; - uv.x = 0.0f; - uv.x = x_829; - float x_257 = color.y; - float x_830 = color.y; - color.y = 0.0f; - color.y = x_830; - vec2 x_475 = vec2(x_467.x, x_450.x); - float x_831 = uv.x; - uv.x = 0.0f; - uv.x = x_831; - float x_832 = color.x; - color.x = 0.0f; - color.x = x_832; - vec2 x_476 = vec2(x_451.z, x_460.y); - color.y = (x_257 + float(x_254)); - vec3 x_477 = vec3(0.0f, x_472.x, 0.0f); - float x_833 = uv.x; - uv.x = 0.0f; - uv.x = x_833; - float x_834 = color.x; - color.x = 0.0f; - color.x = x_834; - vec2 x_478 = vec2(x_472.x, x_472.y); - float x_835 = uv.y; - uv.y = 0.0f; - uv.y = x_835; - float x_261 = uv.y; - int x_836 = i_2; - i_2 = 0; - i_2 = x_836; - vec3 x_479 = vec3(0.0f, x_454.y, 0.0f); - int x_837 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_837; - float x_838 = color.y; - color.y = 0.0f; - color.y = x_838; - vec3 x_480 = vec3(x_446.x, x_446.x, 0.0f); - float x_839 = uv.x; - uv.x = 0.0f; - uv.x = x_839; - if ((x_261 > 0.25f)) { - vec2 x_481 = vec2(x_447.x, x_480.z); - vec3 x_840 = color; - color = vec3(0.0f); - color = x_840; - int x_267 = obj.numbers[5u]; - float x_841 = color.x; - color.x = 0.0f; - color.x = x_841; - int x_842 = i_2; - i_2 = 0; - i_2 = x_842; - int x_843 = i_2; - i_2 = 0; - i_2 = x_843; - float x_270 = color.x; - float x_844 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_844; - vec3 x_482 = vec3(x_455.x, x_475.y, x_455.y); - QuicksortObject x_845 = obj; - int tint_symbol_67[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_68 = QuicksortObject(tint_symbol_67); - obj = tint_symbol_68; - obj = x_845; - float x_846 = uv.y; - uv.y = 0.0f; - uv.y = x_846; - int x_847 = i_2; - i_2 = 0; - i_2 = x_847; - vec3 x_483 = vec3(x_184.w, x_184.w, x_192.x); - float x_848 = uv.x; - uv.x = 0.0f; - uv.x = x_848; - color.x = (float(x_267) + x_270); - vec3 x_484 = vec3(x_454.y, x_450.x, x_454.y); - float x_849 = uv.x; - uv.x = 0.0f; - uv.x = x_849; - } - float x_850 = color.x; - color.x = 0.0f; - color.x = x_850; - vec3 x_485 = vec3(x_467.x, x_450.y, x_450.x); - float x_851 = uv.y; - uv.y = 0.0f; - uv.y = x_851; - int x_852 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_852; - float x_274 = uv.y; - int x_853 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_853; - if ((x_274 > 0.5f)) { - float x_854 = uv.x; - uv.x = 0.0f; - uv.x = x_854; - vec2 x_486 = vec2(x_480.y, x_455.y); - float x_855 = color.y; - color.y = 0.0f; - color.y = x_855; - vec2 x_487 = vec2(x_449.z, x_449.y); - float x_856 = uv.y; - uv.y = 0.0f; - uv.y = x_856; - int x_280 = obj.numbers[6u]; - float x_857 = uv.y; - uv.y = 0.0f; - uv.y = x_857; - int x_858 = i_2; - i_2 = 0; - i_2 = x_858; - int x_859 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_859; - vec2 x_488 = vec2(x_473.z, x_473.y); - float x_283 = color.y; - vec2 x_860 = uv; - uv = vec2(0.0f); - uv = x_860; - float x_861 = color.x; - color.x = 0.0f; - color.x = x_861; - vec2 x_489 = vec2(x_475.y, x_475.x); - int x_862 = obj.numbers[6u]; - obj.numbers[6u] = 0; - obj.numbers[6u] = x_862; - int x_863 = obj.numbers[6u]; - obj.numbers[6u] = 0; - obj.numbers[6u] = x_863; - vec2 x_490 = vec2(x_480.z, x_480.z); - QuicksortObject x_864 = obj; - int tint_symbol_69[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_70 = QuicksortObject(tint_symbol_69); - obj = tint_symbol_70; - obj = x_864; - color.y = (float(x_280) + x_283); - float x_865 = color.x; - color.x = 0.0f; - color.x = x_865; - vec2 x_491 = vec2(2.0f, x_454.x); - float x_866 = color.y; - color.y = 0.0f; - color.y = x_866; - } - vec2 x_492 = vec2(x_455.y, x_455.y); - float x_867 = color.x; - color.x = 0.0f; - color.x = x_867; - float x_287 = uv.y; - QuicksortObject x_868 = obj; - int tint_symbol_71[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_72 = QuicksortObject(tint_symbol_71); - obj = tint_symbol_72; - obj = x_868; - vec2 x_493 = vec2(x_475.x, x_475.y); - float x_869 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_869; - float x_870 = color.y; - color.y = 0.0f; - color.y = x_870; - vec3 x_494 = vec3(x_191.x, x_191.y, x_191.y); - int x_871 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_871; - if ((x_287 > 0.75f)) { - vec3 x_872 = color; - color = vec3(0.0f); - color = x_872; - float x_873 = color.x; - color.x = 0.0f; - color.x = x_873; - vec3 x_495 = vec3(x_192.y, x_192.x, x_192.y); - vec3 x_874 = color; - color = vec3(0.0f); - color = x_874; - int x_293 = obj.numbers[7]; - float x_875 = uv.x; - uv.x = 0.0f; - uv.x = x_875; - vec3 x_496 = vec3(x_475.x, x_467.y, x_467.x); - float x_876 = color.y; - color.y = 0.0f; - color.y = x_876; - vec2 x_497 = vec2(x_477.x, x_461.y); - int x_877 = obj.numbers[0u]; - obj.numbers[0u] = 0; - obj.numbers[0u] = x_877; - float x_878 = color.y; - color.y = 0.0f; - color.y = x_878; - vec3 x_498 = vec3(x_478.x, x_478.y, x_478.x); - float x_879 = color.x; - color.x = 0.0f; - color.x = x_879; - float x_296 = color.z; - float x_880 = uv.y; - uv.y = 0.0f; - uv.y = x_880; - vec2 x_499 = vec2(x_184.x, x_184.y); - float x_881 = uv.x; - uv.x = 0.0f; - uv.x = x_881; - float x_882 = uv.y; - uv.y = 0.0f; - uv.y = x_882; - float x_883 = uv.y; - uv.y = 0.0f; - uv.y = x_883; - vec3 x_500 = vec3(x_499.y, x_499.y, x_494.z); - float x_884 = color.z; - color.z = 0.0f; - color.z = x_884; - color.z = (float(x_293) + x_296); - float x_885 = color.y; - color.y = 0.0f; - color.y = x_885; - vec2 x_501 = vec2(x_453.x, x_453.z); - float x_886 = color.x; - color.x = 0.0f; - color.x = x_886; - } - int x_887 = i_2; - i_2 = 0; - i_2 = x_887; - vec2 x_502 = vec2(x_451.y, x_192.y); - vec2 x_888 = uv; - uv = vec2(0.0f); - uv = x_888; - int x_301 = obj.numbers[8]; - int x_889 = i_2; - i_2 = 0; - i_2 = x_889; - vec2 x_503 = vec2(x_185.x, x_451.z); - int x_890 = obj.numbers[8]; - obj.numbers[8] = 0; - obj.numbers[8] = x_890; - float x_891 = color.y; - color.y = 0.0f; - color.y = x_891; - vec2 x_504 = vec2(x_453.y, 0.0f); - float x_892 = color.x; - color.x = 0.0f; - color.x = x_892; - vec3 x_505 = vec3(x_504.x, x_504.y, x_504.x); - float x_893 = color.z; - color.z = 0.0f; - color.z = x_893; - float x_304 = color.z; - float x_894 = color.x; - color.x = 0.0f; - color.x = x_894; - vec2 x_506 = vec2(x_493.x, x_492.x); - int x_895 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_895; - float x_896 = uv.y; - uv.y = 0.0f; - uv.y = x_896; - vec2 x_507 = vec2(x_461.x, x_447.x); - float x_897 = color.y; - color.y = 0.0f; - color.y = x_897; - color.z = (x_304 + float(x_301)); - vec2 x_898 = uv; - uv = vec2(0.0f); - uv = x_898; - float x_899 = uv.x; - uv.x = 0.0f; - uv.x = x_899; - vec3 x_508 = vec3(x_461.y, x_461.x, x_506.y); - float x_900 = uv.x; - uv.x = 0.0f; - uv.x = x_900; - float x_308 = uv.x; - float x_901 = color.y; - color.y = 0.0f; - color.y = x_901; - vec3 x_509 = vec3(x_503.y, x_503.x, x_448.z); - float x_902 = uv.y; - uv.y = 0.0f; - uv.y = x_902; - float x_310 = uv.y; - float x_903 = uv.y; - uv.y = 0.0f; - uv.y = x_903; - float x_904 = color.z; - color.z = 0.0f; - color.z = x_904; - vec3 x_510 = vec3(2.0f, x_485.y, x_485.z); - float x_905 = color.z; - color.z = 0.0f; - color.z = x_905; - int x_906 = i_2; - i_2 = 0; - i_2 = x_906; - vec2 x_511 = vec2(x_485.z, x_485.y); - vec3 x_907 = color; - color = vec3(0.0f); - color = x_907; - float x_908 = uv.y; - uv.y = 0.0f; - uv.y = x_908; - vec3 x_512 = vec3(x_455.y, x_455.y, x_455.y); - int x_909 = obj.numbers[4]; - obj.numbers[4] = 0; - obj.numbers[4] = x_909; - if ((abs((x_308 - x_310)) < 0.25f)) { - float x_910 = uv.x; - uv.x = 0.0f; - uv.x = x_910; - QuicksortObject x_911 = obj; - int tint_symbol_73[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_74 = QuicksortObject(tint_symbol_73); - obj = tint_symbol_74; - obj = x_911; - vec3 x_513 = vec3(x_505.z, x_505.x, x_448.x); - int x_912 = obj.numbers[8]; - obj.numbers[8] = 0; - obj.numbers[8] = x_912; - int x_317 = obj.numbers[9u]; - vec3 x_514 = vec3(x_474.y, x_474.y, x_474.y); - float x_913 = uv.y; - uv.y = 0.0f; - uv.y = x_913; - float x_320 = color.x; - float x_914 = uv.y; - uv.y = 0.0f; - uv.y = x_914; - vec2 x_515 = vec2(x_502.x, x_502.y); - float x_915 = color.x; - color.x = 0.0f; - color.x = x_915; - vec3 x_916 = color; - color = vec3(0.0f); - color = x_916; - vec2 x_516 = vec2(x_452.x, x_452.x); - vec2 x_917 = uv; - uv = vec2(0.0f); - uv = x_917; - float x_918 = uv.x; - uv.x = 0.0f; - uv.x = x_918; - vec3 x_517 = vec3(0.0f); - color.x = (float(x_317) + x_320); - float x_919 = color.x; - color.x = 0.0f; - color.x = x_919; - vec3 x_518 = vec3(x_480.y, x_508.x, x_480.x); - float x_920 = color.x; - color.x = 0.0f; - color.x = x_920; - } - float x_921 = uv.y; - uv.y = 0.0f; - uv.y = x_921; - vec3 x_325 = color; - float x_922 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_922; - vec3 x_519 = vec3(x_447.x, x_446.x, x_446.y); - vec3 x_326 = normalize(x_325); - float x_923 = uv.x; - uv.x = 0.0f; - uv.x = x_923; - QuicksortObject x_924 = obj; - int tint_symbol_75[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_76 = QuicksortObject(tint_symbol_75); - obj = tint_symbol_76; - obj = x_924; - QuicksortObject x_925 = obj; - int tint_symbol_77[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_78 = QuicksortObject(tint_symbol_77); - obj = tint_symbol_78; - obj = x_925; - float x_926 = color.y; - color.y = 0.0f; - color.y = x_926; - vec2 x_520 = vec2(x_506.y, x_519.y); - float x_927 = color.y; - color.y = 0.0f; - color.y = x_927; - vec4 x_330 = vec4(x_326.x, x_326.y, x_326.z, 1.0f); - float x_928 = uv.y; - uv.y = 0.0f; - uv.y = x_928; - vec3 x_521 = vec3(2.0f, 2.0f, x_520.y); - float x_929 = uv.x; - uv.x = 0.0f; - uv.x = x_929; - x_GLF_color = x_330; - QuicksortObject x_930 = obj; - int tint_symbol_79[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - QuicksortObject tint_symbol_80 = QuicksortObject(tint_symbol_79); - obj = tint_symbol_80; - obj = x_930; - vec3 x_522 = vec3(x_330.w, x_330.y, x_493.x); - float x_931 = color.x; - color.x = 0.0f; - color.x = x_931; - return; -} - -struct main_out { - vec4 x_GLF_color_1; -}; - -main_out tint_symbol_1(vec4 tint_symbol_2) { - tint_symbol = tint_symbol_2; - main_1(); - main_out tint_symbol_81 = main_out(x_GLF_color); - return tint_symbol_81; -} - -void main() { - main_out inner_result = tint_symbol_1(gl_FragCoord); - x_GLF_color_1_1 = inner_result.x_GLF_color_1; - return; -} +SKIP: triggers crbug.com/tint/98 diff --git a/test/tint/bug/tint/749.spvasm.expected.msl b/test/tint/bug/tint/749.spvasm.expected.msl index 119081c18e..149037eaec 100644 --- a/test/tint/bug/tint/749.spvasm.expected.msl +++ b/test/tint/bug/tint/749.spvasm.expected.msl @@ -1,1579 +1 @@ -#include - -using namespace metal; - -template -struct tint_array { - const constant T& operator[](size_t i) const constant { return elements[i]; } - device T& operator[](size_t i) device { return elements[i]; } - const device T& operator[](size_t i) const device { return elements[i]; } - thread T& operator[](size_t i) thread { return elements[i]; } - const thread T& operator[](size_t i) const thread { return elements[i]; } - threadgroup T& operator[](size_t i) threadgroup { return elements[i]; } - const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; } - T elements[N]; -}; - -struct QuicksortObject { - tint_array numbers; -}; - -struct buf0 { - /* 0x0000 */ float2 resolution; -}; - -void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_81) { - int temp = 0; - int const x_932 = temp; - temp = 0; - temp = x_932; - float3 const x_523 = float3(3.0f, 2.0f, 3.0f); - int const x_933 = *(i); - *(i) = 0; - *(i) = x_933; - int const x_28 = *(i); - int const x_934 = *(j); - *(j) = 0; - *(j) = x_934; - float3 const x_524 = float3(x_523[1], x_523[0], x_523[1]); - int const x_935 = temp; - temp = 0; - temp = x_935; - int const x_30_save = x_28; - int const x_936 = (*(tint_symbol_81)).numbers[x_30_save]; - (*(tint_symbol_81)).numbers[x_30_save] = 0; - (*(tint_symbol_81)).numbers[x_30_save] = x_936; - int const x_31 = (*(tint_symbol_81)).numbers[x_30_save]; - int const x_937 = temp; - temp = 0; - temp = x_937; - temp = x_31; - int const x_938 = *(j); - *(j) = 0; - *(j) = x_938; - float3 const x_525 = float3(x_523[2], 1.0f, x_523[1]); - int const x_939 = *(i); - *(i) = 0; - *(i) = x_939; - int const x_32 = *(i); - int const x_940 = (*(tint_symbol_81)).numbers[x_30_save]; - (*(tint_symbol_81)).numbers[x_30_save] = 0; - (*(tint_symbol_81)).numbers[x_30_save] = x_940; - int const x_33 = *(j); - int const x_941 = *(i); - *(i) = 0; - *(i) = x_941; - float3 const x_526 = float3(x_525[0], x_525[2], x_525[2]); - int const x_942 = (*(tint_symbol_81)).numbers[x_30_save]; - (*(tint_symbol_81)).numbers[x_30_save] = 0; - (*(tint_symbol_81)).numbers[x_30_save] = x_942; - int const x_34_save = x_33; - int const x_35 = (*(tint_symbol_81)).numbers[x_34_save]; - QuicksortObject const x_943 = *(tint_symbol_81); - tint_array const tint_symbol_2 = tint_array{}; - QuicksortObject const tint_symbol_3 = {.numbers=tint_symbol_2}; - *(tint_symbol_81) = tint_symbol_3; - *(tint_symbol_81) = x_943; - float2 const x_527 = float2(x_526[0], x_526[0]); - int const x_36_save = x_32; - float3 const x_528 = float3(x_524[0], x_524[2], x_524[0]); - (*(tint_symbol_81)).numbers[x_36_save] = x_35; - QuicksortObject const x_944 = *(tint_symbol_81); - tint_array const tint_symbol_4 = tint_array{}; - QuicksortObject const tint_symbol_5 = {.numbers=tint_symbol_4}; - *(tint_symbol_81) = tint_symbol_5; - *(tint_symbol_81) = x_944; - float3 const x_529 = float3(x_526[1], x_526[2], x_526[0]); - int const x_945 = *(i); - *(i) = 0; - *(i) = x_945; - int const x_37 = *(j); - int const x_946 = temp; - temp = 0; - temp = x_946; - float2 const x_530 = float2(x_529[2], x_529[1]); - int const x_947 = (*(tint_symbol_81)).numbers[x_34_save]; - (*(tint_symbol_81)).numbers[x_34_save] = 0; - (*(tint_symbol_81)).numbers[x_34_save] = x_947; - int const x_38 = temp; - int const x_948 = *(j); - *(j) = 0; - *(j) = x_948; - float3 const x_531 = float3(x_527[0], x_526[1], x_526[0]); - int const x_949 = (*(tint_symbol_81)).numbers[x_36_save]; - (*(tint_symbol_81)).numbers[x_36_save] = 0; - (*(tint_symbol_81)).numbers[x_36_save] = x_949; - QuicksortObject const x_950 = *(tint_symbol_81); - tint_array const tint_symbol_6 = tint_array{}; - QuicksortObject const tint_symbol_7 = {.numbers=tint_symbol_6}; - *(tint_symbol_81) = tint_symbol_7; - *(tint_symbol_81) = x_950; - float3 const x_532 = float3(x_528[0], x_528[1], x_528[0]); - int const x_951 = (*(tint_symbol_81)).numbers[x_34_save]; - (*(tint_symbol_81)).numbers[x_34_save] = 0; - (*(tint_symbol_81)).numbers[x_34_save] = x_951; - (*(tint_symbol_81)).numbers[x_37] = x_38; - return; -} - -int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_82) { - int param_3 = 0; - int i_1 = 0; - int j_1 = 0; - int param_2 = 0; - int param_1 = 0; - int param = 0; - int pivot = 0; - float2 x_537 = 0.0f; - float3 x_538 = 0.0f; - int const x_952 = *(h); - *(h) = 0; - *(h) = x_952; - int const x_41 = *(h); - int const x_953 = *(l); - *(l) = 0; - *(l) = x_953; - int const x_42_save = x_41; - int const x_954 = (*(tint_symbol_82)).numbers[x_42_save]; - (*(tint_symbol_82)).numbers[x_42_save] = 0; - (*(tint_symbol_82)).numbers[x_42_save] = x_954; - int const x_43 = (*(tint_symbol_82)).numbers[x_42_save]; - int const x_955 = param_3; - param_3 = 0; - param_3 = x_955; - float3 const x_534 = float3(3.0f, 1.0f, 3.0f); - int const x_956 = param_1; - param_1 = 0; - param_1 = x_956; - pivot = x_43; - int const x_45 = *(l); - int const x_957 = *(h); - *(h) = 0; - *(h) = x_957; - int const x_958 = j_1; - j_1 = 0; - j_1 = x_958; - float3 const x_535 = float3(x_534[1], x_534[2], x_534[1]); - int const x_959 = *(l); - *(l) = 0; - *(l) = x_959; - i_1 = as_type((as_type(x_45) - as_type(as_type(1u)))); - int const x_49 = *(l); - float3 const x_536 = float3(x_534[0], x_534[2], x_535[0]); - j_1 = 10; - QuicksortObject const x_960 = *(tint_symbol_82); - tint_array const tint_symbol_8 = tint_array{}; - QuicksortObject const tint_symbol_9 = {.numbers=tint_symbol_8}; - *(tint_symbol_82) = tint_symbol_9; - *(tint_symbol_82) = x_960; - while (true) { - int const x_961 = pivot; - pivot = 0; - pivot = x_961; - int const x_962 = param_1; - param_1 = 0; - param_1 = x_962; - int const x_55 = j_1; - int const x_963 = pivot; - pivot = 0; - pivot = x_963; - x_537 = float2(2.0f, 3.0f); - QuicksortObject const x_964 = *(tint_symbol_82); - tint_array const tint_symbol_10 = tint_array{}; - QuicksortObject const tint_symbol_11 = {.numbers=tint_symbol_10}; - *(tint_symbol_82) = tint_symbol_11; - *(tint_symbol_82) = x_964; - int const x_56 = *(h); - int const x_965 = *(h); - *(h) = 0; - *(h) = x_965; - int const x_966 = param; - param = 0; - param = x_966; - int const x_967 = j_1; - j_1 = 0; - j_1 = x_967; - x_538 = float3(x_534[0], x_537[1], x_534[2]); - int const x_968 = param; - param = 0; - param = x_968; - if ((x_55 <= as_type((as_type(x_56) - as_type(as_type(1u)))))) { - } else { - break; - } - int const x_60 = j_1; - int const x_969 = (*(tint_symbol_82)).numbers[x_42_save]; - (*(tint_symbol_82)).numbers[x_42_save] = 0; - (*(tint_symbol_82)).numbers[x_42_save] = x_969; - int const x_61_save = x_60; - int const x_970 = *(h); - *(h) = 0; - *(h) = x_970; - float3 const x_539 = float3(x_537[0], x_535[2], x_537[0]); - int const x_971 = param_1; - param_1 = 0; - param_1 = x_971; - int const x_62 = (*(tint_symbol_82)).numbers[x_61_save]; - QuicksortObject const x_972 = *(tint_symbol_82); - tint_array const tint_symbol_12 = tint_array{}; - QuicksortObject const tint_symbol_13 = {.numbers=tint_symbol_12}; - *(tint_symbol_82) = tint_symbol_13; - *(tint_symbol_82) = x_972; - int const x_63 = pivot; - float2 const x_540 = float2(2.0f, x_534[2]); - int const x_973 = i_1; - i_1 = 0; - i_1 = x_973; - int const x_974 = *(l); - *(l) = 0; - *(l) = x_974; - float3 const x_541 = float3(x_534[1], x_534[0], x_534[1]); - int const x_975 = pivot; - pivot = 0; - pivot = x_975; - if ((x_62 <= x_63)) { - float3 const x_542 = float3(x_541[2], x_541[0], x_541[0]); - int const x_976 = param_3; - param_3 = 0; - param_3 = x_976; - int const x_67 = i_1; - int const x_977 = pivot; - pivot = 0; - pivot = x_977; - float2 const x_543 = float2(x_539[0], x_541[1]); - int const x_978 = i_1; - i_1 = 0; - i_1 = x_978; - int const x_979 = param; - param = 0; - param = x_979; - i_1 = as_type((as_type(x_67) + as_type(as_type(1u)))); - int const x_980 = *(l); - *(l) = 0; - *(l) = x_980; - float3 const x_544 = float3(3.0f, 2.0f, x_540[0]); - int const x_70 = i_1; - float2 const x_545 = float2(x_537[1], x_538[0]); - int const x_981 = param; - param = 0; - param = x_981; - param = x_70; - int const x_982 = param; - param = 0; - param = x_982; - float2 const x_546 = float2(x_545[0], x_545[0]); - int const x_983 = i_1; - i_1 = 0; - i_1 = x_983; - int const x_72 = j_1; - param_1 = x_72; - int const x_984 = param_3; - param_3 = 0; - param_3 = x_984; - swap_i1_i1_(&(param), &(param_1), tint_symbol_82); - int const x_985 = param_1; - param_1 = 0; - param_1 = x_985; - } - QuicksortObject const x_986 = *(tint_symbol_82); - tint_array const tint_symbol_14 = tint_array{}; - QuicksortObject const tint_symbol_15 = {.numbers=tint_symbol_14}; - *(tint_symbol_82) = tint_symbol_15; - *(tint_symbol_82) = x_986; - { - int const x_987 = *(h); - *(h) = 0; - *(h) = x_987; - int const x_74 = j_1; - int const x_988 = *(h); - *(h) = 0; - *(h) = x_988; - float3 const x_547 = float3(x_539[0], x_541[2], x_541[2]); - int const x_989 = (*(tint_symbol_82)).numbers[x_61_save]; - (*(tint_symbol_82)).numbers[x_61_save] = 0; - (*(tint_symbol_82)).numbers[x_61_save] = x_989; - int const x_990 = param; - param = 0; - param = x_990; - j_1 = as_type((as_type(1) + as_type(x_74))); - int const x_991 = param_1; - param_1 = 0; - param_1 = x_991; - float3 const x_548 = float3(x_541[1], x_541[2], x_541[0]); - int const x_992 = (*(tint_symbol_82)).numbers[x_61_save]; - (*(tint_symbol_82)).numbers[x_61_save] = 0; - (*(tint_symbol_82)).numbers[x_61_save] = x_992; - } - } - int const x_76 = i_1; - int const x_993 = (*(tint_symbol_82)).numbers[x_42_save]; - (*(tint_symbol_82)).numbers[x_42_save] = 0; - (*(tint_symbol_82)).numbers[x_42_save] = x_993; - float2 const x_549 = float2(x_534[0], x_534[1]); - QuicksortObject const x_994 = *(tint_symbol_82); - tint_array const tint_symbol_16 = tint_array{}; - QuicksortObject const tint_symbol_17 = {.numbers=tint_symbol_16}; - *(tint_symbol_82) = tint_symbol_17; - *(tint_symbol_82) = x_994; - int const x_995 = *(h); - *(h) = 0; - *(h) = x_995; - i_1 = as_type((as_type(1) + as_type(x_76))); - int const x_996 = param_1; - param_1 = 0; - param_1 = x_996; - int const x_79 = i_1; - int const x_997 = j_1; - j_1 = 0; - j_1 = x_997; - float2 const x_550 = float2(x_534[0], x_534[0]); - int const x_998 = param_1; - param_1 = 0; - param_1 = x_998; - param_2 = x_79; - float2 const x_551 = float2(x_534[1], x_536[0]); - int const x_999 = pivot; - pivot = 0; - pivot = x_999; - int const x_81 = *(h); - float2 const x_552 = float2(x_550[0], x_549[1]); - int const x_1000 = *(h); - *(h) = 0; - *(h) = x_1000; - param_3 = x_81; - int const x_1001 = i_1; - i_1 = 0; - i_1 = x_1001; - float2 const x_553 = float2(x_549[1], x_552[0]); - int const x_1002 = *(h); - *(h) = 0; - *(h) = x_1002; - swap_i1_i1_(&(param_2), &(param_3), tint_symbol_82); - int const x_1003 = *(l); - *(l) = 0; - *(l) = x_1003; - float2 const x_554 = float2(x_536[2], 2.0f); - int const x_1004 = param_1; - param_1 = 0; - param_1 = x_1004; - int const x_83 = i_1; - int const x_1005 = param; - param = 0; - param = x_1005; - float2 const x_555 = float2(x_534[1], x_534[0]); - int const x_1006 = j_1; - j_1 = 0; - j_1 = x_1006; - return x_83; -} - -void quicksort_(thread QuicksortObject* const tint_symbol_83) { - int param_4 = 0; - int h_1 = 0; - int p = 0; - int l_1 = 0; - int top = 0; - tint_array stack = {}; - int param_5 = 0; - l_1 = 0; - int const x_1007 = param_5; - param_5 = 0; - param_5 = x_1007; - h_1 = 9; - tint_array const x_1008 = stack; - tint_array const tint_symbol_18 = tint_array{}; - stack = tint_symbol_18; - stack = x_1008; - float2 const x_556 = float2(2.0f); - int const x_1009 = param_5; - param_5 = 0; - param_5 = x_1009; - top = -1; - int const x_1010 = p; - p = 0; - p = x_1010; - int const x_93 = top; - float2 const x_557 = float2(1.0f); - int const x_1011 = p; - p = 0; - p = x_1011; - int const x_94 = as_type((as_type(x_93) + as_type(as_type(1u)))); - int const x_1012 = top; - top = 0; - top = x_1012; - float2 const x_558 = float2(x_556[1], x_557[1]); - int const x_1013 = param_4; - param_4 = 0; - param_4 = x_1013; - top = x_94; - int const x_1014 = h_1; - h_1 = 0; - h_1 = x_1014; - float3 const x_559 = float3(x_557[1], x_557[0], x_557[0]); - int const x_1015 = param_4; - param_4 = 0; - param_4 = x_1015; - int const x_95 = l_1; - QuicksortObject const x_1016 = *(tint_symbol_83); - tint_array const tint_symbol_19 = tint_array{}; - QuicksortObject const tint_symbol_20 = {.numbers=tint_symbol_19}; - *(tint_symbol_83) = tint_symbol_20; - *(tint_symbol_83) = x_1016; - float3 const x_560 = float3(x_559[1], x_559[0], x_557[0]); - int const x_96_save = x_94; - tint_array const x_1017 = stack; - tint_array const tint_symbol_21 = tint_array{}; - stack = tint_symbol_21; - stack = x_1017; - float3 const x_561 = float3(x_556[1], x_556[1], x_556[1]); - int const x_1018 = l_1; - l_1 = 0; - l_1 = 0; - stack[x_96_save] = x_95; - int const x_1019 = param_5; - param_5 = 0; - param_5 = x_1019; - int const x_97 = top; - int const x_1020 = param_4; - param_4 = 0; - param_4 = x_1020; - float3 const x_562 = float3(3.0f, x_558[1], 2.0f); - int const x_1021 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1021; - int const x_98 = as_type((as_type(x_97) + as_type(1))); - int const x_1022 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1022; - float3 const x_563 = float3(x_559[0], x_559[2], x_556[1]); - top = x_98; - int const x_1023 = param_4; - param_4 = 0; - param_4 = x_1023; - int const x_99 = h_1; - int const x_1024 = param_4; - param_4 = 0; - param_4 = x_1024; - float3 const x_564 = float3(x_558[0], x_561[0], x_558[1]); - int const x_1025 = l_1; - l_1 = 0; - l_1 = x_1025; - int const x_100_save = x_98; - int const x_1026 = param_5; - param_5 = 0; - param_5 = x_1026; - float2 const x_565 = float2(x_564[2], x_564[2]); - int const x_1027 = p; - p = 0; - p = x_1027; - stack[x_100_save] = x_99; - while (true) { - float3 const x_566 = float3(x_563[0], x_563[0], x_563[0]); - int const x_1028 = h_1; - h_1 = 0; - h_1 = x_1028; - tint_array const x_1029 = stack; - tint_array const tint_symbol_22 = tint_array{}; - stack = tint_symbol_22; - stack = x_1029; - int const x_106 = top; - tint_array const x_1030 = stack; - tint_array const tint_symbol_23 = tint_array{}; - stack = tint_symbol_23; - stack = x_1030; - float2 const x_567 = float2(x_558[0], x_564[2]); - int const x_1031 = param_4; - param_4 = 0; - param_4 = x_1031; - if ((x_106 >= as_type(0u))) { - } else { - break; - } - QuicksortObject const x_1032 = *(tint_symbol_83); - tint_array const tint_symbol_24 = tint_array{}; - QuicksortObject const tint_symbol_25 = {.numbers=tint_symbol_24}; - *(tint_symbol_83) = tint_symbol_25; - *(tint_symbol_83) = x_1032; - float3 const x_568 = float3(x_559[1], x_559[0], x_563[1]); - int const x_1033 = param_4; - param_4 = 0; - param_4 = x_1033; - int const x_108 = top; - float3 const x_569 = float3(x_565[0], x_567[1], x_565[0]); - int const x_1034 = h_1; - h_1 = 0; - h_1 = x_1034; - float2 const x_570 = float2(x_556[0], x_556[0]); - int const x_1035 = p; - p = 0; - p = x_1035; - top = as_type((as_type(x_108) - as_type(as_type(1u)))); - int const x_1036 = p; - p = 0; - p = x_1036; - int const x_110_save = x_108; - int const x_1037 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1037; - int const x_111 = stack[x_110_save]; - tint_array const x_1038 = stack; - tint_array const tint_symbol_26 = tint_array{}; - stack = tint_symbol_26; - stack = x_1038; - float3 const x_571 = float3(x_559[1], x_559[0], x_564[1]); - int const x_1039 = l_1; - l_1 = 0; - l_1 = x_1039; - h_1 = x_111; - tint_array const x_1040 = stack; - tint_array const tint_symbol_27 = tint_array{}; - stack = tint_symbol_27; - stack = x_1040; - float2 const x_572 = float2(x_562[1], x_561[1]); - int const x_1041 = p; - p = 0; - p = x_1041; - int const x_112 = top; - int const x_1042 = param_4; - param_4 = 0; - param_4 = x_1042; - int const x_1043 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1043; - float2 const x_573 = float2(2.0f, 3.0f); - top = as_type((as_type(x_112) - as_type(1))); - int const x_1044 = param_5; - param_5 = 0; - param_5 = x_1044; - float3 const x_574 = float3(x_570[1], x_565[0], x_570[1]); - int const x_1045 = h_1; - h_1 = 0; - h_1 = x_1045; - int const x_114_save = x_112; - float2 const x_575 = float2(x_564[1], x_564[2]); - int const x_1046 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1046; - int const x_115 = stack[x_114_save]; - int const x_1047 = p; - p = 0; - p = x_1047; - float3 const x_576 = float3(x_573[1], x_573[1], x_565[0]); - int const x_1048 = param_5; - param_5 = 0; - param_5 = x_1048; - l_1 = x_115; - int const x_1049 = top; - top = 0; - top = x_1049; - int const x_118 = l_1; - param_4 = x_118; - int const x_1050 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1050; - float2 const x_577 = float2(x_569[1], x_569[2]); - int const x_120 = h_1; - float2 const x_578 = float2(x_558[0], 2.0f); - param_5 = x_120; - int const x_1051 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1051; - int const x_121 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_83); - float2 const x_579 = float2(x_567[0], x_568[0]); - int const x_1052 = param_5; - param_5 = 0; - param_5 = x_1052; - p = x_121; - int const x_1053 = param_4; - param_4 = 0; - param_4 = x_1053; - int const x_122 = p; - int const x_1054 = h_1; - h_1 = 0; - h_1 = x_1054; - float2 const x_580 = float2(x_568[1], x_568[1]); - int const x_1055 = l_1; - l_1 = 0; - l_1 = x_1055; - int const x_1056 = h_1; - h_1 = 0; - h_1 = x_1056; - int const x_124 = l_1; - int const x_1057 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1057; - int const x_1058 = h_1; - h_1 = 0; - h_1 = x_1058; - float2 const x_582 = float2(x_567[1], x_573[0]); - int const x_1059 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1059; - if ((as_type((as_type(x_122) - as_type(as_type(1u)))) > x_124)) { - int const x_1060 = param_4; - param_4 = 0; - param_4 = x_1060; - int const x_128 = top; - float2 const x_583 = float2(x_571[1], x_556[1]); - int const x_1061 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1061; - tint_array const x_1062 = stack; - tint_array const tint_symbol_28 = tint_array{}; - stack = tint_symbol_28; - stack = x_1062; - float2 const x_584 = float2(x_569[2], x_569[1]); - float3 const x_585 = float3(x_580[1], x_577[0], x_577[0]); - int const x_130 = l_1; - int const x_1063 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1063; - float2 const x_586 = float2(x_564[0], x_585[0]); - int const x_1064 = param_5; - param_5 = 0; - param_5 = x_1064; - int const x_131_save = as_type((as_type(1) + as_type(x_128))); - int const x_1065 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1065; - float3 const x_587 = float3(x_566[1], x_566[1], x_563[0]); - int const x_1066 = param_5; - param_5 = 0; - param_5 = x_1066; - stack[x_131_save] = x_130; - int const x_132 = top; - int const x_1067 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1067; - float2 const x_588 = float2(x_575[1], x_575[0]); - int const x_1068 = stack[x_131_save]; - stack[x_131_save] = 0; - stack[x_131_save] = x_1068; - int const x_133 = as_type((1u + as_type(x_132))); - int const x_1069 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1069; - float3 const x_589 = float3(x_576[2], x_588[1], x_576[2]); - int const x_1070 = h_1; - h_1 = 0; - h_1 = x_1070; - top = x_133; - tint_array const x_1071 = stack; - tint_array const tint_symbol_29 = tint_array{}; - stack = tint_symbol_29; - stack = x_1071; - int const x_134 = p; - float2 const x_590 = float2(x_576[0], x_573[1]); - int const x_1072 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1072; - int const x_136_save = x_133; - int const x_1073 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1073; - stack[x_136_save] = as_type((as_type(x_134) - as_type(as_type(1u)))); - int const x_1074 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1074; - float2 const x_591 = float2(x_569[2], x_569[1]); - int const x_1075 = stack[x_136_save]; - stack[x_136_save] = 0; - stack[x_136_save] = x_1075; - } - int const x_1076 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1076; - float2 const x_592 = float2(1.0f, 2.0f); - QuicksortObject const x_1077 = *(tint_symbol_83); - tint_array const tint_symbol_30 = tint_array{}; - QuicksortObject const tint_symbol_31 = {.numbers=tint_symbol_30}; - *(tint_symbol_83) = tint_symbol_31; - *(tint_symbol_83) = x_1077; - int const x_137 = p; - int const x_1078 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1078; - float3 const x_593 = float3(x_571[2], x_556[0], x_556[1]); - int const x_1079 = p; - p = 0; - p = x_1079; - float3 const x_594 = float3(x_563[2], x_563[0], x_575[0]); - int const x_1080 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1080; - int const x_139 = h_1; - int const x_1081 = top; - top = 0; - top = x_1081; - float3 const x_595 = float3(x_560[2], x_568[0], x_560[0]); - int const x_1082 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1082; - int const x_1083 = p; - p = 0; - p = x_1083; - if ((as_type((1u + as_type(x_137))) < x_139)) { - int const x_1084 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1084; - float2 const x_596 = float2(x_592[1], x_582[0]); - int const x_1085 = l_1; - l_1 = 0; - l_1 = x_1085; - int const x_143 = top; - int const x_1086 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1086; - float3 const x_597 = float3(x_562[1], x_560[1], x_560[1]); - int const x_144 = as_type((as_type(x_143) + as_type(1))); - int const x_1087 = param_5; - param_5 = 0; - param_5 = x_1087; - top = x_144; - int const x_1088 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1088; - int const x_145 = p; - int const x_1089 = param_5; - param_5 = 0; - param_5 = x_1089; - float3 const x_599 = float3(x_560[2], x_560[0], x_568[0]); - int const x_1090 = p; - p = 0; - p = x_1090; - float3 const x_600 = float3(x_556[0], x_580[0], x_580[0]); - int const x_1091 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1091; - int const x_147_save = x_144; - int const x_1092 = stack[x_110_save]; - stack[x_110_save] = 0; - stack[x_110_save] = x_1092; - float2 const x_601 = float2(x_563[0], x_563[1]); - stack[x_147_save] = as_type((1u + as_type(x_145))); - tint_array const x_1093 = stack; - tint_array const tint_symbol_32 = tint_array{}; - stack = tint_symbol_32; - stack = x_1093; - int const x_148 = top; - int const x_1094 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1094; - float2 const x_602 = float2(x_565[1], x_599[1]); - tint_array const x_1095 = stack; - tint_array const tint_symbol_33 = tint_array{}; - stack = tint_symbol_33; - stack = x_1095; - int const x_149 = as_type((as_type(x_148) + as_type(as_type(1u)))); - int const x_1096 = stack[x_147_save]; - stack[x_147_save] = 0; - stack[x_147_save] = x_1096; - top = x_149; - int const x_1097 = param_4; - param_4 = 0; - param_4 = x_1097; - int const x_150 = h_1; - int const x_1098 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1098; - int const x_1099 = stack[x_96_save]; - stack[x_96_save] = 0; - stack[x_96_save] = x_1099; - stack[x_149] = x_150; - int const x_1100 = stack[x_114_save]; - stack[x_114_save] = 0; - stack[x_114_save] = x_1100; - float3 const x_603 = float3(x_568[1], x_564[0], x_564[0]); - int const x_1101 = l_1; - l_1 = 0; - l_1 = x_1101; - } - int const x_1102 = stack[x_100_save]; - stack[x_100_save] = 0; - stack[x_100_save] = x_1102; - { - int const x_1103 = l_1; - l_1 = 0; - l_1 = x_1103; - float2 const x_604 = float2(x_563[2], x_564[0]); - QuicksortObject const x_1104 = *(tint_symbol_83); - tint_array const tint_symbol_34 = tint_array{}; - QuicksortObject const tint_symbol_35 = {.numbers=tint_symbol_34}; - *(tint_symbol_83) = tint_symbol_35; - *(tint_symbol_83) = x_1104; - } - } - int const x_1105 = h_1; - h_1 = 0; - h_1 = x_1105; - return; -} - -void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const tint_symbol_85, const constant buf0* const tint_symbol_86, thread float4* const tint_symbol_87) { - float3 color = 0.0f; - int i_2 = 0; - float2 uv = 0.0f; - float2 const x_717 = uv; - uv = float2(0.0f); - uv = x_717; - i_2 = 0; - QuicksortObject const x_721 = *(tint_symbol_84); - tint_array const tint_symbol_36 = tint_array{}; - QuicksortObject const tint_symbol_37 = {.numbers=tint_symbol_36}; - *(tint_symbol_84) = tint_symbol_37; - *(tint_symbol_84) = x_721; - if (true) { - QuicksortObject const x_722 = *(tint_symbol_84); - tint_array const tint_symbol_38 = tint_array{}; - QuicksortObject const tint_symbol_39 = {.numbers=tint_symbol_38}; - *(tint_symbol_84) = tint_symbol_39; - *(tint_symbol_84) = x_722; - float2 const x_431 = float2(1.0f); - int const x_158 = i_2; - float2 const x_723 = uv; - uv = float2(0.0f); - uv = x_723; - float3 const x_725 = color; - color = float3(0.0f); - color = x_725; - float2 const x_432 = float2(x_431[1], x_431[1]); - QuicksortObject const x_726 = *(tint_symbol_84); - tint_array const tint_symbol_40 = tint_array{}; - QuicksortObject const tint_symbol_41 = {.numbers=tint_symbol_40}; - *(tint_symbol_84) = tint_symbol_41; - *(tint_symbol_84) = x_726; - } - QuicksortObject const x_756 = *(tint_symbol_84); - tint_array const tint_symbol_42 = tint_array{}; - QuicksortObject const tint_symbol_43 = {.numbers=tint_symbol_42}; - *(tint_symbol_84) = tint_symbol_43; - *(tint_symbol_84) = x_756; - float2 const x_446 = float2(0.0f); - int const x_757 = i_2; - i_2 = 0; - i_2 = x_757; - quicksort_(tint_symbol_84); - QuicksortObject const x_758 = *(tint_symbol_84); - tint_array const tint_symbol_44 = tint_array{}; - QuicksortObject const tint_symbol_45 = {.numbers=tint_symbol_44}; - *(tint_symbol_84) = tint_symbol_45; - *(tint_symbol_84) = x_758; - float4 const x_184 = *(tint_symbol_85); - float2 const x_759 = uv; - uv = float2(0.0f); - uv = x_759; - float2 const x_447 = float2(0.0f); - float2 const x_760 = uv; - uv = float2(0.0f); - uv = x_760; - float2 const x_185 = float2(x_184[0], x_184[1]); - float3 const x_448 = float3(x_185[1], x_446[1], x_446[1]); - QuicksortObject const x_761 = *(tint_symbol_84); - tint_array const tint_symbol_46 = tint_array{}; - QuicksortObject const tint_symbol_47 = {.numbers=tint_symbol_46}; - *(tint_symbol_84) = tint_symbol_47; - *(tint_symbol_84) = x_761; - float2 const x_762 = uv; - uv = float2(0.0f); - uv = x_762; - float2 const x_191 = (*(tint_symbol_86)).resolution; - QuicksortObject const x_763 = *(tint_symbol_84); - tint_array const tint_symbol_48 = tint_array{}; - QuicksortObject const tint_symbol_49 = {.numbers=tint_symbol_48}; - *(tint_symbol_84) = tint_symbol_49; - *(tint_symbol_84) = x_763; - float3 const x_449 = float3(x_184[1], 3.0f, x_184[3]); - float3 const x_764 = color; - color = float3(0.0f); - color = x_764; - float2 const x_192 = (x_185 / x_191); - QuicksortObject const x_765 = *(tint_symbol_84); - tint_array const tint_symbol_50 = tint_array{}; - QuicksortObject const tint_symbol_51 = {.numbers=tint_symbol_50}; - *(tint_symbol_84) = tint_symbol_51; - *(tint_symbol_84) = x_765; - float2 const x_450 = float2(x_447[0], x_185[1]); - float3 const x_766 = color; - color = float3(0.0f); - float3 const x_767 = color; - color = float3(0.0f); - color = x_767; - color = x_766; - uv = x_192; - color = float3(1.0f, 2.0f, 3.0f); - float3 const x_768 = color; - color = float3(0.0f); - color = x_768; - float3 const x_451 = float3(x_185[0], x_185[1], x_446[1]); - QuicksortObject const x_769 = *(tint_symbol_84); - tint_array const tint_symbol_52 = tint_array{}; - QuicksortObject const tint_symbol_53 = {.numbers=tint_symbol_52}; - *(tint_symbol_84) = tint_symbol_53; - *(tint_symbol_84) = x_769; - int const x_770 = (*(tint_symbol_84)).numbers[0u]; - (*(tint_symbol_84)).numbers[0u] = 0; - (*(tint_symbol_84)).numbers[0u] = x_770; - int const x_201 = (*(tint_symbol_84)).numbers[0u]; - QuicksortObject const x_771 = *(tint_symbol_84); - tint_array const tint_symbol_54 = tint_array{}; - QuicksortObject const tint_symbol_55 = {.numbers=tint_symbol_54}; - *(tint_symbol_84) = tint_symbol_55; - *(tint_symbol_84) = x_771; - int const x_772 = (*(tint_symbol_84)).numbers[0u]; - (*(tint_symbol_84)).numbers[0u] = 0; - (*(tint_symbol_84)).numbers[0u] = x_772; - float const x_206 = color[0]; - float const x_773 = color[0]; - color[0] = 0.0f; - color[0] = x_773; - float2 const x_452 = float2(3.0f, 2.0f); - int const x_774 = i_2; - i_2 = 0; - i_2 = x_774; - QuicksortObject const x_775 = *(tint_symbol_84); - tint_array const tint_symbol_56 = tint_array{}; - QuicksortObject const tint_symbol_57 = {.numbers=tint_symbol_56}; - *(tint_symbol_84) = tint_symbol_57; - *(tint_symbol_84) = x_775; - float3 const x_453 = float3(x_451[0], x_450[0], x_450[1]); - color[0] = (x_206 + float(x_201)); - float2 const x_776 = uv; - uv = float2(0.0f); - uv = x_776; - float2 const x_777 = uv; - uv = float2(0.0f); - uv = x_777; - float2 const x_454 = float2(x_184[1], x_184[1]); - float const x_210 = uv[0]; - float2 const x_455 = float2(x_192[1], x_192[0]); - float const x_778 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_778; - QuicksortObject const x_779 = *(tint_symbol_84); - tint_array const tint_symbol_58 = tint_array{}; - QuicksortObject const tint_symbol_59 = {.numbers=tint_symbol_58}; - *(tint_symbol_84) = tint_symbol_59; - *(tint_symbol_84) = x_779; - if ((x_210 > 0.25f)) { - int const x_780 = i_2; - i_2 = 0; - i_2 = x_780; - int const x_781 = (*(tint_symbol_84)).numbers[0u]; - (*(tint_symbol_84)).numbers[0u] = 0; - (*(tint_symbol_84)).numbers[0u] = x_781; - float3 const x_456 = float3(0.0f, x_448[1], x_448[1]); - float const x_782 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_782; - int const x_216 = (*(tint_symbol_84)).numbers[1]; - QuicksortObject const x_783 = *(tint_symbol_84); - tint_array const tint_symbol_60 = tint_array{}; - QuicksortObject const tint_symbol_61 = {.numbers=tint_symbol_60}; - *(tint_symbol_84) = tint_symbol_61; - *(tint_symbol_84) = x_783; - float2 const x_457 = float2(x_454[0], x_454[0]); - float2 const x_784 = uv; - uv = float2(0.0f); - uv = x_784; - QuicksortObject const x_785 = *(tint_symbol_84); - tint_array const tint_symbol_62 = tint_array{}; - QuicksortObject const tint_symbol_63 = {.numbers=tint_symbol_62}; - *(tint_symbol_84) = tint_symbol_63; - *(tint_symbol_84) = x_785; - float2 const x_458 = float2(3.0f, 0.0f); - int const x_786 = i_2; - i_2 = 0; - i_2 = x_786; - float const x_219 = color[0]; - float const x_787 = color[0]; - color[0] = 0.0f; - color[0] = x_787; - float3 const x_788 = color; - color = float3(0.0f); - color = x_788; - float3 const x_789 = color; - color = float3(0.0f); - color = x_789; - float3 const x_459 = float3(x_454[1], x_454[1], x_447[1]); - float const x_790 = color[0]; - color[0] = 0.0f; - color[0] = x_790; - color[0] = (float(x_216) + x_219); - int const x_791 = (*(tint_symbol_84)).numbers[0u]; - (*(tint_symbol_84)).numbers[0u] = 0; - (*(tint_symbol_84)).numbers[0u] = x_791; - } - float const x_792 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_792; - float const x_793 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_793; - float const x_223 = uv[0]; - float const x_794 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_794; - float3 const x_460 = float3(x_453[2], x_453[1], x_453[1]); - float2 const x_795 = uv; - uv = float2(0.0f); - uv = x_795; - float const x_796 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_796; - float2 const x_461 = float2(0.0f); - float const x_797 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_797; - if ((x_223 > 0.5f)) { - float const x_798 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_798; - float2 const x_462 = float2(x_446[0], x_446[0]); - float const x_799 = color[0]; - color[0] = 0.0f; - color[0] = x_799; - float const x_800 = color[0]; - color[0] = 0.0f; - color[0] = x_800; - float3 const x_463 = float3(x_453[0], x_453[2], x_461[1]); - float const x_801 = color[0]; - color[0] = 0.0f; - color[0] = x_801; - int const x_230 = (*(tint_symbol_84)).numbers[2u]; - float const x_802 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_802; - float const x_803 = color[0]; - color[0] = 0.0f; - color[0] = x_803; - int const x_804 = (*(tint_symbol_84)).numbers[2u]; - (*(tint_symbol_84)).numbers[2u] = 0; - (*(tint_symbol_84)).numbers[2u] = x_804; - float2 const x_464 = float2(x_450[1], x_191[0]); - float const x_805 = color[1]; - color[1] = 0.0f; - color[1] = x_805; - float const x_234 = color[1]; - int const x_806 = (*(tint_symbol_84)).numbers[2u]; - (*(tint_symbol_84)).numbers[2u] = 0; - (*(tint_symbol_84)).numbers[2u] = x_806; - float2 const x_465 = float2(x_463[0], x_185[0]); - float const x_807 = color[0]; - color[0] = 0.0f; - color[0] = x_807; - int const x_808 = i_2; - i_2 = 0; - i_2 = x_808; - float2 const x_466 = float2(x_455[1], 0.0f); - int const x_809 = i_2; - i_2 = 0; - i_2 = x_809; - color[1] = (float(x_230) + x_234); - float const x_810 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_810; - } - int const x_811 = i_2; - i_2 = 0; - i_2 = x_811; - float2 const x_467 = float2(x_191[0], x_191[0]); - float const x_812 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_812; - float const x_238 = uv[0]; - float3 const x_813 = color; - color = float3(0.0f); - color = x_813; - float const x_814 = color[0]; - color[0] = 0.0f; - color[0] = x_814; - if ((x_238 > 0.75f)) { - float const x_815 = color[0]; - color[0] = 0.0f; - color[0] = x_815; - int const x_245 = (*(tint_symbol_84)).numbers[3]; - float const x_816 = color[0]; - color[0] = 0.0f; - color[0] = x_816; - QuicksortObject const x_817 = *(tint_symbol_84); - tint_array const tint_symbol_64 = tint_array{}; - QuicksortObject const tint_symbol_65 = {.numbers=tint_symbol_64}; - *(tint_symbol_84) = tint_symbol_65; - *(tint_symbol_84) = x_817; - float3 const x_468 = float3(x_467[0], x_467[0], x_467[0]); - float const x_818 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_818; - float const x_819 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_819; - float const x_249 = color[2]; - float3 const x_820 = color; - color = float3(0.0f); - color = x_820; - float3 const x_469 = float3(x_467[0], x_191[1], x_467[1]); - float const x_821 = color[2]; - color[2] = 0.0f; - color[2] = x_821; - int const x_822 = (*(tint_symbol_84)).numbers[0u]; - (*(tint_symbol_84)).numbers[0u] = 0; - (*(tint_symbol_84)).numbers[0u] = x_822; - float2 const x_470 = float2(0.0f); - float const x_823 = color[2]; - color[2] = 0.0f; - color[2] = x_823; - color[2] = (x_249 + float(x_245)); - float2 const x_824 = uv; - uv = float2(0.0f); - uv = x_824; - float2 const x_471 = float2(x_470[1], x_470[1]); - } - float const x_825 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_825; - float3 const x_472 = float3(x_454[0], x_454[1], x_454[1]); - int const x_254 = (*(tint_symbol_84)).numbers[4]; - float const x_826 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_826; - float3 const x_827 = color; - color = float3(0.0f); - color = x_827; - float3 const x_473 = float3(x_446[1], x_453[0], x_453[0]); - int const x_828 = (*(tint_symbol_84)).numbers[4]; - (*(tint_symbol_84)).numbers[4] = 0; - (*(tint_symbol_84)).numbers[4] = x_828; - float2 const x_474 = float2(x_191[0], x_184[2]); - float const x_829 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_829; - float const x_257 = color[1]; - float const x_830 = color[1]; - color[1] = 0.0f; - color[1] = x_830; - float2 const x_475 = float2(x_467[0], x_450[0]); - float const x_831 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_831; - float const x_832 = color[0]; - color[0] = 0.0f; - color[0] = x_832; - float2 const x_476 = float2(x_451[2], x_460[1]); - color[1] = (x_257 + float(x_254)); - float3 const x_477 = float3(0.0f, x_472[0], 0.0f); - float const x_833 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_833; - float const x_834 = color[0]; - color[0] = 0.0f; - color[0] = x_834; - float2 const x_478 = float2(x_472[0], x_472[1]); - float const x_835 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_835; - float const x_261 = uv[1]; - int const x_836 = i_2; - i_2 = 0; - i_2 = x_836; - float3 const x_479 = float3(0.0f, x_454[1], 0.0f); - int const x_837 = (*(tint_symbol_84)).numbers[0u]; - (*(tint_symbol_84)).numbers[0u] = 0; - (*(tint_symbol_84)).numbers[0u] = x_837; - float const x_838 = color[1]; - color[1] = 0.0f; - color[1] = x_838; - float3 const x_480 = float3(x_446[0], x_446[0], 0.0f); - float const x_839 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_839; - if ((x_261 > 0.25f)) { - float2 const x_481 = float2(x_447[0], x_480[2]); - float3 const x_840 = color; - color = float3(0.0f); - color = x_840; - int const x_267 = (*(tint_symbol_84)).numbers[5u]; - float const x_841 = color[0]; - color[0] = 0.0f; - color[0] = x_841; - int const x_842 = i_2; - i_2 = 0; - i_2 = x_842; - int const x_843 = i_2; - i_2 = 0; - i_2 = x_843; - float const x_270 = color[0]; - float const x_844 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_844; - float3 const x_482 = float3(x_455[0], x_475[1], x_455[1]); - QuicksortObject const x_845 = *(tint_symbol_84); - tint_array const tint_symbol_66 = tint_array{}; - QuicksortObject const tint_symbol_67 = {.numbers=tint_symbol_66}; - *(tint_symbol_84) = tint_symbol_67; - *(tint_symbol_84) = x_845; - float const x_846 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_846; - int const x_847 = i_2; - i_2 = 0; - i_2 = x_847; - float3 const x_483 = float3(x_184[3], x_184[3], x_192[0]); - float const x_848 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_848; - color[0] = (float(x_267) + x_270); - float3 const x_484 = float3(x_454[1], x_450[0], x_454[1]); - float const x_849 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_849; - } - float const x_850 = color[0]; - color[0] = 0.0f; - color[0] = x_850; - float3 const x_485 = float3(x_467[0], x_450[1], x_450[0]); - float const x_851 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_851; - int const x_852 = (*(tint_symbol_84)).numbers[4]; - (*(tint_symbol_84)).numbers[4] = 0; - (*(tint_symbol_84)).numbers[4] = x_852; - float const x_274 = uv[1]; - int const x_853 = (*(tint_symbol_84)).numbers[0u]; - (*(tint_symbol_84)).numbers[0u] = 0; - (*(tint_symbol_84)).numbers[0u] = x_853; - if ((x_274 > 0.5f)) { - float const x_854 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_854; - float2 const x_486 = float2(x_480[1], x_455[1]); - float const x_855 = color[1]; - color[1] = 0.0f; - color[1] = x_855; - float2 const x_487 = float2(x_449[2], x_449[1]); - float const x_856 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_856; - int const x_280 = (*(tint_symbol_84)).numbers[6u]; - float const x_857 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_857; - int const x_858 = i_2; - i_2 = 0; - i_2 = x_858; - int const x_859 = (*(tint_symbol_84)).numbers[4]; - (*(tint_symbol_84)).numbers[4] = 0; - (*(tint_symbol_84)).numbers[4] = x_859; - float2 const x_488 = float2(x_473[2], x_473[1]); - float const x_283 = color[1]; - float2 const x_860 = uv; - uv = float2(0.0f); - uv = x_860; - float const x_861 = color[0]; - color[0] = 0.0f; - color[0] = x_861; - float2 const x_489 = float2(x_475[1], x_475[0]); - int const x_862 = (*(tint_symbol_84)).numbers[6u]; - (*(tint_symbol_84)).numbers[6u] = 0; - (*(tint_symbol_84)).numbers[6u] = x_862; - int const x_863 = (*(tint_symbol_84)).numbers[6u]; - (*(tint_symbol_84)).numbers[6u] = 0; - (*(tint_symbol_84)).numbers[6u] = x_863; - float2 const x_490 = float2(x_480[2], x_480[2]); - QuicksortObject const x_864 = *(tint_symbol_84); - tint_array const tint_symbol_68 = tint_array{}; - QuicksortObject const tint_symbol_69 = {.numbers=tint_symbol_68}; - *(tint_symbol_84) = tint_symbol_69; - *(tint_symbol_84) = x_864; - color[1] = (float(x_280) + x_283); - float const x_865 = color[0]; - color[0] = 0.0f; - color[0] = x_865; - float2 const x_491 = float2(2.0f, x_454[0]); - float const x_866 = color[1]; - color[1] = 0.0f; - color[1] = x_866; - } - float2 const x_492 = float2(x_455[1], x_455[1]); - float const x_867 = color[0]; - color[0] = 0.0f; - color[0] = x_867; - float const x_287 = uv[1]; - QuicksortObject const x_868 = *(tint_symbol_84); - tint_array const tint_symbol_70 = tint_array{}; - QuicksortObject const tint_symbol_71 = {.numbers=tint_symbol_70}; - *(tint_symbol_84) = tint_symbol_71; - *(tint_symbol_84) = x_868; - float2 const x_493 = float2(x_475[0], x_475[1]); - float const x_869 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_869; - float const x_870 = color[1]; - color[1] = 0.0f; - color[1] = x_870; - float3 const x_494 = float3(x_191[0], x_191[1], x_191[1]); - int const x_871 = (*(tint_symbol_84)).numbers[4]; - (*(tint_symbol_84)).numbers[4] = 0; - (*(tint_symbol_84)).numbers[4] = x_871; - if ((x_287 > 0.75f)) { - float3 const x_872 = color; - color = float3(0.0f); - color = x_872; - float const x_873 = color[0]; - color[0] = 0.0f; - color[0] = x_873; - float3 const x_495 = float3(x_192[1], x_192[0], x_192[1]); - float3 const x_874 = color; - color = float3(0.0f); - color = x_874; - int const x_293 = (*(tint_symbol_84)).numbers[7]; - float const x_875 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_875; - float3 const x_496 = float3(x_475[0], x_467[1], x_467[0]); - float const x_876 = color[1]; - color[1] = 0.0f; - color[1] = x_876; - float2 const x_497 = float2(x_477[0], x_461[1]); - int const x_877 = (*(tint_symbol_84)).numbers[0u]; - (*(tint_symbol_84)).numbers[0u] = 0; - (*(tint_symbol_84)).numbers[0u] = x_877; - float const x_878 = color[1]; - color[1] = 0.0f; - color[1] = x_878; - float3 const x_498 = float3(x_478[0], x_478[1], x_478[0]); - float const x_879 = color[0]; - color[0] = 0.0f; - color[0] = x_879; - float const x_296 = color[2]; - float const x_880 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_880; - float2 const x_499 = float2(x_184[0], x_184[1]); - float const x_881 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_881; - float const x_882 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_882; - float const x_883 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_883; - float3 const x_500 = float3(x_499[1], x_499[1], x_494[2]); - float const x_884 = color[2]; - color[2] = 0.0f; - color[2] = x_884; - color[2] = (float(x_293) + x_296); - float const x_885 = color[1]; - color[1] = 0.0f; - color[1] = x_885; - float2 const x_501 = float2(x_453[0], x_453[2]); - float const x_886 = color[0]; - color[0] = 0.0f; - color[0] = x_886; - } - int const x_887 = i_2; - i_2 = 0; - i_2 = x_887; - float2 const x_502 = float2(x_451[1], x_192[1]); - float2 const x_888 = uv; - uv = float2(0.0f); - uv = x_888; - int const x_301 = (*(tint_symbol_84)).numbers[8]; - int const x_889 = i_2; - i_2 = 0; - i_2 = x_889; - float2 const x_503 = float2(x_185[0], x_451[2]); - int const x_890 = (*(tint_symbol_84)).numbers[8]; - (*(tint_symbol_84)).numbers[8] = 0; - (*(tint_symbol_84)).numbers[8] = x_890; - float const x_891 = color[1]; - color[1] = 0.0f; - color[1] = x_891; - float2 const x_504 = float2(x_453[1], 0.0f); - float const x_892 = color[0]; - color[0] = 0.0f; - color[0] = x_892; - float3 const x_505 = float3(x_504[0], x_504[1], x_504[0]); - float const x_893 = color[2]; - color[2] = 0.0f; - color[2] = x_893; - float const x_304 = color[2]; - float const x_894 = color[0]; - color[0] = 0.0f; - color[0] = x_894; - float2 const x_506 = float2(x_493[0], x_492[0]); - int const x_895 = (*(tint_symbol_84)).numbers[4]; - (*(tint_symbol_84)).numbers[4] = 0; - (*(tint_symbol_84)).numbers[4] = x_895; - float const x_896 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_896; - float2 const x_507 = float2(x_461[0], x_447[0]); - float const x_897 = color[1]; - color[1] = 0.0f; - color[1] = x_897; - color[2] = (x_304 + float(x_301)); - float2 const x_898 = uv; - uv = float2(0.0f); - uv = x_898; - float const x_899 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_899; - float3 const x_508 = float3(x_461[1], x_461[0], x_506[1]); - float const x_900 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_900; - float const x_308 = uv[0]; - float const x_901 = color[1]; - color[1] = 0.0f; - color[1] = x_901; - float3 const x_509 = float3(x_503[1], x_503[0], x_448[2]); - float const x_902 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_902; - float const x_310 = uv[1]; - float const x_903 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_903; - float const x_904 = color[2]; - color[2] = 0.0f; - color[2] = x_904; - float3 const x_510 = float3(2.0f, x_485[1], x_485[2]); - float const x_905 = color[2]; - color[2] = 0.0f; - color[2] = x_905; - int const x_906 = i_2; - i_2 = 0; - i_2 = x_906; - float2 const x_511 = float2(x_485[2], x_485[1]); - float3 const x_907 = color; - color = float3(0.0f); - color = x_907; - float const x_908 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_908; - float3 const x_512 = float3(x_455[1], x_455[1], x_455[1]); - int const x_909 = (*(tint_symbol_84)).numbers[4]; - (*(tint_symbol_84)).numbers[4] = 0; - (*(tint_symbol_84)).numbers[4] = x_909; - if ((fabs((x_308 - x_310)) < 0.25f)) { - float const x_910 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_910; - QuicksortObject const x_911 = *(tint_symbol_84); - tint_array const tint_symbol_72 = tint_array{}; - QuicksortObject const tint_symbol_73 = {.numbers=tint_symbol_72}; - *(tint_symbol_84) = tint_symbol_73; - *(tint_symbol_84) = x_911; - float3 const x_513 = float3(x_505[2], x_505[0], x_448[0]); - int const x_912 = (*(tint_symbol_84)).numbers[8]; - (*(tint_symbol_84)).numbers[8] = 0; - (*(tint_symbol_84)).numbers[8] = x_912; - int const x_317 = (*(tint_symbol_84)).numbers[9u]; - float3 const x_514 = float3(x_474[1], x_474[1], x_474[1]); - float const x_913 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_913; - float const x_320 = color[0]; - float const x_914 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_914; - float2 const x_515 = float2(x_502[0], x_502[1]); - float const x_915 = color[0]; - color[0] = 0.0f; - color[0] = x_915; - float3 const x_916 = color; - color = float3(0.0f); - color = x_916; - float2 const x_516 = float2(x_452[0], x_452[0]); - float2 const x_917 = uv; - uv = float2(0.0f); - uv = x_917; - float const x_918 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_918; - float3 const x_517 = float3(0.0f); - color[0] = (float(x_317) + x_320); - float const x_919 = color[0]; - color[0] = 0.0f; - color[0] = x_919; - float3 const x_518 = float3(x_480[1], x_508[0], x_480[0]); - float const x_920 = color[0]; - color[0] = 0.0f; - color[0] = x_920; - } - float const x_921 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_921; - float3 const x_325 = color; - float const x_922 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_922; - float3 const x_519 = float3(x_447[0], x_446[0], x_446[1]); - float3 const x_326 = normalize(x_325); - float const x_923 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_923; - QuicksortObject const x_924 = *(tint_symbol_84); - tint_array const tint_symbol_74 = tint_array{}; - QuicksortObject const tint_symbol_75 = {.numbers=tint_symbol_74}; - *(tint_symbol_84) = tint_symbol_75; - *(tint_symbol_84) = x_924; - QuicksortObject const x_925 = *(tint_symbol_84); - tint_array const tint_symbol_76 = tint_array{}; - QuicksortObject const tint_symbol_77 = {.numbers=tint_symbol_76}; - *(tint_symbol_84) = tint_symbol_77; - *(tint_symbol_84) = x_925; - float const x_926 = color[1]; - color[1] = 0.0f; - color[1] = x_926; - float2 const x_520 = float2(x_506[1], x_519[1]); - float const x_927 = color[1]; - color[1] = 0.0f; - color[1] = x_927; - float4 const x_330 = float4(x_326[0], x_326[1], x_326[2], 1.0f); - float const x_928 = uv[1]; - uv[1] = 0.0f; - uv[1] = x_928; - float3 const x_521 = float3(2.0f, 2.0f, x_520[1]); - float const x_929 = uv[0]; - uv[0] = 0.0f; - uv[0] = x_929; - *(tint_symbol_87) = x_330; - QuicksortObject const x_930 = *(tint_symbol_84); - tint_array const tint_symbol_78 = tint_array{}; - QuicksortObject const tint_symbol_79 = {.numbers=tint_symbol_78}; - *(tint_symbol_84) = tint_symbol_79; - *(tint_symbol_84) = x_930; - float3 const x_522 = float3(x_330[3], x_330[1], x_493[0]); - float const x_931 = color[0]; - color[0] = 0.0f; - color[0] = x_931; - return; -} - -struct main_out { - float4 x_GLF_color_1; -}; - -struct tint_symbol_1 { - float4 x_GLF_color_1 [[color(0)]]; -}; - -main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_88, thread QuicksortObject* const tint_symbol_89, const constant buf0* const tint_symbol_90, thread float4* const tint_symbol_91) { - *(tint_symbol_88) = gl_FragCoord_param; - main_1(tint_symbol_89, tint_symbol_88, tint_symbol_90, tint_symbol_91); - main_out const tint_symbol_80 = {.x_GLF_color_1=*(tint_symbol_91)}; - return tint_symbol_80; -} - -fragment tint_symbol_1 tint_symbol(const constant buf0* tint_symbol_94 [[buffer(0)]], float4 gl_FragCoord_param [[position]]) { - thread float4 tint_symbol_92 = 0.0f; - thread QuicksortObject tint_symbol_93 = {}; - thread float4 tint_symbol_95 = 0.0f; - main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_92), &(tint_symbol_93), tint_symbol_94, &(tint_symbol_95)); - tint_symbol_1 wrapper_result = {}; - wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; - return wrapper_result; -} - +SKIP: triggers crbug.com/tint/98 diff --git a/test/tint/bug/tint/749.spvasm.expected.spvasm b/test/tint/bug/tint/749.spvasm.expected.spvasm index 2953b7a1c6..149037eaec 100644 --- a/test/tint/bug/tint/749.spvasm.expected.spvasm +++ b/test/tint/bug/tint/749.spvasm.expected.spvasm @@ -1,2578 +1 @@ -; SPIR-V -; Version: 1.3 -; Generator: Google Tint Compiler; 0 -; Bound: 1768 -; Schema: 0 - OpCapability Shader - %1635 = OpExtInstImport "GLSL.std.450" - OpMemoryModel Logical GLSL450 - OpEntryPoint Fragment %main "main" %gl_FragCoord_param_1 %x_GLF_color_1_1 - OpExecutionMode %main OriginUpperLeft - OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1" - OpName %x_GLF_color_1_1 "x_GLF_color_1_1" - OpName %QuicksortObject "QuicksortObject" - OpMemberName %QuicksortObject 0 "numbers" - OpName %obj "obj" - OpName %gl_FragCoord "gl_FragCoord" - OpName %buf0 "buf0" - OpMemberName %buf0 0 "resolution" - OpName %x_188 "x_188" - OpName %x_GLF_color "x_GLF_color" - OpName %swap_i1_i1_ "swap_i1_i1_" - OpName %i "i" - OpName %j "j" - OpName %temp "temp" - OpName %performPartition_i1_i1_ "performPartition_i1_i1_" - OpName %l "l" - OpName %h "h" - OpName %param_3 "param_3" - OpName %i_1 "i_1" - OpName %j_1 "j_1" - OpName %param_2 "param_2" - OpName %param_1 "param_1" - OpName %param "param" - OpName %pivot "pivot" - OpName %x_537 "x_537" - OpName %x_538 "x_538" - OpName %quicksort_ "quicksort_" - OpName %param_4 "param_4" - OpName %h_1 "h_1" - OpName %p "p" - OpName %l_1 "l_1" - OpName %top "top" - OpName %stack "stack" - OpName %param_5 "param_5" - OpName %main_1 "main_1" - OpName %color "color" - OpName %i_2 "i_2" - OpName %uv "uv" - OpName %main_out "main_out" - OpMemberName %main_out 0 "x_GLF_color_1" - OpName %main_inner "main_inner" - OpName %gl_FragCoord_param "gl_FragCoord_param" - OpName %main "main" - OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord - OpDecorate %x_GLF_color_1_1 Location 0 - OpMemberDecorate %QuicksortObject 0 Offset 0 - OpDecorate %_arr_int_uint_10 ArrayStride 4 - OpDecorate %buf0 Block - OpMemberDecorate %buf0 0 Offset 0 - OpDecorate %x_188 NonWritable - OpDecorate %x_188 DescriptorSet 0 - OpDecorate %x_188 Binding 0 - OpMemberDecorate %main_out 0 Offset 0 - %float = OpTypeFloat 32 - %v4float = OpTypeVector %float 4 -%_ptr_Input_v4float = OpTypePointer Input %v4float -%gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input -%_ptr_Output_v4float = OpTypePointer Output %v4float - %7 = OpConstantNull %v4float -%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %7 - %int = OpTypeInt 32 1 - %uint = OpTypeInt 32 0 - %uint_10 = OpConstant %uint 10 -%_arr_int_uint_10 = OpTypeArray %int %uint_10 -%QuicksortObject = OpTypeStruct %_arr_int_uint_10 -%_ptr_Private_QuicksortObject = OpTypePointer Private %QuicksortObject - %15 = OpConstantNull %QuicksortObject - %obj = OpVariable %_ptr_Private_QuicksortObject Private %15 -%_ptr_Private_v4float = OpTypePointer Private %v4float -%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7 - %v2float = OpTypeVector %float 2 - %buf0 = OpTypeStruct %v2float -%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0 - %x_188 = OpVariable %_ptr_Uniform_buf0 Uniform -%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7 - %void = OpTypeVoid -%_ptr_Function_int = OpTypePointer Function %int - %23 = OpTypeFunction %void %_ptr_Function_int %_ptr_Function_int - %31 = OpConstantNull %int - %v3float = OpTypeVector %float 3 - %float_3 = OpConstant %float 3 - %float_2 = OpConstant %float 2 - %36 = OpConstantComposite %v3float %float_3 %float_2 %float_3 - %uint_0 = OpConstant %uint 0 -%_ptr_Private_int = OpTypePointer Private %int - %float_1 = OpConstant %float 1 - %146 = OpTypeFunction %int %_ptr_Function_int %_ptr_Function_int -%_ptr_Function_v2float = OpTypePointer Function %v2float - %160 = OpConstantNull %v2float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %163 = OpConstantNull %v3float - %181 = OpConstantComposite %v3float %float_3 %float_1 %float_3 - %uint_1 = OpConstant %uint 1 - %int_10 = OpConstant %int 10 - %217 = OpConstantComposite %v2float %float_2 %float_3 -%_ptr_Function_float = OpTypePointer Function %float - %bool = OpTypeBool - %int_1 = OpConstant %int 1 - %402 = OpTypeFunction %void -%_ptr_Function__arr_int_uint_10 = OpTypePointer Function %_arr_int_uint_10 - %412 = OpConstantNull %_arr_int_uint_10 - %int_9 = OpConstant %int 9 - %417 = OpConstantComposite %v2float %float_2 %float_2 - %int_n1 = OpConstant %int -1 - %422 = OpConstantComposite %v2float %float_1 %float_1 - %499 = OpConstantNull %uint - %709 = OpConstantComposite %v2float %float_1 %float_2 - %true = OpConstantTrue %bool -%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float - %890 = OpConstantComposite %v3float %float_1 %float_2 %float_3 - %913 = OpConstantNull %float - %915 = OpConstantComposite %v2float %float_3 %float_2 - %float_0_25 = OpConstant %float 0.25 - %964 = OpConstantComposite %v2float %float_3 %913 - %float_0_5 = OpConstant %float 0.5 - %uint_2 = OpConstant %uint 2 - %float_0_75 = OpConstant %float 0.75 - %int_3 = OpConstant %int 3 - %int_4 = OpConstant %int 4 - %uint_5 = OpConstant %uint 5 - %uint_6 = OpConstant %uint 6 - %int_7 = OpConstant %int 7 - %int_8 = OpConstant %int 8 - %uint_9 = OpConstant %uint 9 - %main_out = OpTypeStruct %v4float - %1755 = OpTypeFunction %main_out %v4float -%swap_i1_i1_ = OpFunction %void None %23 - %i = OpFunctionParameter %_ptr_Function_int - %j = OpFunctionParameter %_ptr_Function_int - %29 = OpLabel - %temp = OpVariable %_ptr_Function_int Function %31 - %32 = OpLoad %int %temp - OpStore %temp %31 - OpStore %temp %32 - %38 = OpLoad %int %i - OpStore %i %31 - OpStore %i %38 - %42 = OpLoad %int %i - %44 = OpLoad %int %j - OpStore %j %31 - OpStore %j %44 - %47 = OpCompositeExtract %float %36 1 - %48 = OpCompositeExtract %float %36 0 - %49 = OpCompositeExtract %float %36 1 - %50 = OpCompositeConstruct %v3float %47 %48 %49 - %51 = OpLoad %int %temp - OpStore %temp %31 - OpStore %temp %51 - %54 = OpAccessChain %_ptr_Private_int %obj %uint_0 %42 - %55 = OpLoad %int %54 - %56 = OpAccessChain %_ptr_Private_int %obj %uint_0 %42 - OpStore %56 %31 - %57 = OpAccessChain %_ptr_Private_int %obj %uint_0 %42 - OpStore %57 %55 - %58 = OpAccessChain %_ptr_Private_int %obj %uint_0 %42 - %59 = OpLoad %int %58 - %60 = OpLoad %int %temp - OpStore %temp %31 - OpStore %temp %60 - OpStore %temp %59 - %62 = OpLoad %int %j - OpStore %j %31 - OpStore %j %62 - %65 = OpCompositeExtract %float %36 2 - %67 = OpCompositeExtract %float %36 1 - %68 = OpCompositeConstruct %v3float %65 %float_1 %67 - %70 = OpLoad %int %i - OpStore %i %31 - OpStore %i %70 - %74 = OpLoad %int %i - %75 = OpAccessChain %_ptr_Private_int %obj %uint_0 %42 - %76 = OpLoad %int %75 - %77 = OpAccessChain %_ptr_Private_int %obj %uint_0 %42 - OpStore %77 %31 - %78 = OpAccessChain %_ptr_Private_int %obj %uint_0 %42 - OpStore %78 %76 - %80 = OpLoad %int %j - %82 = OpLoad %int %i - OpStore %i %31 - OpStore %i %82 - %85 = OpCompositeExtract %float %68 0 - %86 = OpCompositeExtract %float %68 2 - %87 = OpCompositeExtract %float %68 2 - %88 = OpCompositeConstruct %v3float %85 %86 %87 - %89 = OpAccessChain %_ptr_Private_int %obj %uint_0 %42 - %90 = OpLoad %int %89 - %91 = OpAccessChain %_ptr_Private_int %obj %uint_0 %42 - OpStore %91 %31 - %92 = OpAccessChain %_ptr_Private_int %obj %uint_0 %42 - OpStore %92 %90 - %93 = OpAccessChain %_ptr_Private_int %obj %uint_0 %80 - %94 = OpLoad %int %93 - %95 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %95 - %96 = OpCompositeExtract %float %88 0 - %97 = OpCompositeExtract %float %88 0 - %98 = OpCompositeConstruct %v2float %96 %97 - %99 = OpCompositeExtract %float %50 0 - %100 = OpCompositeExtract %float %50 2 - %101 = OpCompositeExtract %float %50 0 - %102 = OpCompositeConstruct %v3float %99 %100 %101 - %103 = OpAccessChain %_ptr_Private_int %obj %uint_0 %74 - OpStore %103 %94 - %104 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %104 - %105 = OpCompositeExtract %float %88 1 - %106 = OpCompositeExtract %float %88 2 - %107 = OpCompositeExtract %float %88 0 - %108 = OpCompositeConstruct %v3float %105 %106 %107 - %110 = OpLoad %int %i - OpStore %i %31 - OpStore %i %110 - %114 = OpLoad %int %j - %115 = OpLoad %int %temp - OpStore %temp %31 - OpStore %temp %115 - %116 = OpCompositeExtract %float %108 2 - %117 = OpCompositeExtract %float %108 1 - %118 = OpCompositeConstruct %v2float %116 %117 - %119 = OpAccessChain %_ptr_Private_int %obj %uint_0 %80 - %120 = OpLoad %int %119 - %121 = OpAccessChain %_ptr_Private_int %obj %uint_0 %80 - OpStore %121 %31 - %122 = OpAccessChain %_ptr_Private_int %obj %uint_0 %80 - OpStore %122 %120 - %123 = OpLoad %int %temp - %125 = OpLoad %int %j - OpStore %j %31 - OpStore %j %125 - %128 = OpCompositeExtract %float %98 0 - %129 = OpCompositeExtract %float %88 1 - %130 = OpCompositeExtract %float %88 0 - %131 = OpCompositeConstruct %v3float %128 %129 %130 - %132 = OpAccessChain %_ptr_Private_int %obj %uint_0 %74 - %133 = OpLoad %int %132 - %134 = OpAccessChain %_ptr_Private_int %obj %uint_0 %74 - OpStore %134 %31 - %135 = OpAccessChain %_ptr_Private_int %obj %uint_0 %74 - OpStore %135 %133 - %136 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %136 - %137 = OpCompositeExtract %float %102 0 - %138 = OpCompositeExtract %float %102 1 - %139 = OpCompositeExtract %float %102 0 - %140 = OpCompositeConstruct %v3float %137 %138 %139 - %141 = OpAccessChain %_ptr_Private_int %obj %uint_0 %80 - %142 = OpLoad %int %141 - %143 = OpAccessChain %_ptr_Private_int %obj %uint_0 %80 - OpStore %143 %31 - %144 = OpAccessChain %_ptr_Private_int %obj %uint_0 %80 - OpStore %144 %142 - %145 = OpAccessChain %_ptr_Private_int %obj %uint_0 %114 - OpStore %145 %123 - OpReturn - OpFunctionEnd -%performPartition_i1_i1_ = OpFunction %int None %146 - %l = OpFunctionParameter %_ptr_Function_int - %h = OpFunctionParameter %_ptr_Function_int - %150 = OpLabel - %param_3 = OpVariable %_ptr_Function_int Function %31 - %i_1 = OpVariable %_ptr_Function_int Function %31 - %j_1 = OpVariable %_ptr_Function_int Function %31 - %param_2 = OpVariable %_ptr_Function_int Function %31 - %param_1 = OpVariable %_ptr_Function_int Function %31 - %param = OpVariable %_ptr_Function_int Function %31 - %pivot = OpVariable %_ptr_Function_int Function %31 - %x_537 = OpVariable %_ptr_Function_v2float Function %160 - %x_538 = OpVariable %_ptr_Function_v3float Function %163 - %165 = OpLoad %int %h - OpStore %h %31 - OpStore %h %165 - %169 = OpLoad %int %h - %171 = OpLoad %int %l - OpStore %l %31 - OpStore %l %171 - %174 = OpAccessChain %_ptr_Private_int %obj %uint_0 %169 - %175 = OpLoad %int %174 - %176 = OpAccessChain %_ptr_Private_int %obj %uint_0 %169 - OpStore %176 %31 - %177 = OpAccessChain %_ptr_Private_int %obj %uint_0 %169 - OpStore %177 %175 - %178 = OpAccessChain %_ptr_Private_int %obj %uint_0 %169 - %179 = OpLoad %int %178 - %180 = OpLoad %int %param_3 - OpStore %param_3 %31 - OpStore %param_3 %180 - %182 = OpLoad %int %param_1 - OpStore %param_1 %31 - OpStore %param_1 %182 - OpStore %pivot %179 - %184 = OpLoad %int %l - %186 = OpLoad %int %h - OpStore %h %31 - OpStore %h %186 - %189 = OpLoad %int %j_1 - OpStore %j_1 %31 - OpStore %j_1 %189 - %190 = OpCompositeExtract %float %181 1 - %191 = OpCompositeExtract %float %181 2 - %192 = OpCompositeExtract %float %181 1 - %193 = OpCompositeConstruct %v3float %190 %191 %192 - %195 = OpLoad %int %l - OpStore %l %31 - OpStore %l %195 - %198 = OpBitcast %int %uint_1 - %200 = OpISub %int %184 %198 - OpStore %i_1 %200 - %202 = OpLoad %int %l - %203 = OpCompositeExtract %float %181 0 - %204 = OpCompositeExtract %float %181 2 - %205 = OpCompositeExtract %float %193 0 - %206 = OpCompositeConstruct %v3float %203 %204 %205 - OpStore %j_1 %int_10 - %208 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %208 - OpBranch %209 - %209 = OpLabel - OpLoopMerge %210 %211 None - OpBranch %212 - %212 = OpLabel - %213 = OpLoad %int %pivot - OpStore %pivot %31 - OpStore %pivot %213 - %214 = OpLoad %int %param_1 - OpStore %param_1 %31 - OpStore %param_1 %214 - %215 = OpLoad %int %j_1 - %216 = OpLoad %int %pivot - OpStore %pivot %31 - OpStore %pivot %216 - OpStore %x_537 %217 - %218 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %218 - %220 = OpLoad %int %h - %222 = OpLoad %int %h - OpStore %h %31 - OpStore %h %222 - %225 = OpLoad %int %param - OpStore %param %31 - OpStore %param %225 - %226 = OpLoad %int %j_1 - OpStore %j_1 %31 - OpStore %j_1 %226 - %227 = OpCompositeExtract %float %181 0 - %229 = OpAccessChain %_ptr_Function_float %x_537 %uint_1 - %230 = OpLoad %float %229 - %231 = OpCompositeExtract %float %181 2 - %232 = OpCompositeConstruct %v3float %227 %230 %231 - OpStore %x_538 %232 - %233 = OpLoad %int %param - OpStore %param %31 - OpStore %param %233 - %234 = OpBitcast %int %uint_1 - %235 = OpISub %int %220 %234 - %236 = OpSLessThanEqual %bool %215 %235 - OpSelectionMerge %238 None - OpBranchConditional %236 %239 %240 - %239 = OpLabel - OpBranch %238 - %240 = OpLabel - OpBranch %210 - %238 = OpLabel - %241 = OpLoad %int %j_1 - %242 = OpAccessChain %_ptr_Private_int %obj %uint_0 %169 - %243 = OpLoad %int %242 - %244 = OpAccessChain %_ptr_Private_int %obj %uint_0 %169 - OpStore %244 %31 - %245 = OpAccessChain %_ptr_Private_int %obj %uint_0 %169 - OpStore %245 %243 - %247 = OpLoad %int %h - OpStore %h %31 - OpStore %h %247 - %250 = OpAccessChain %_ptr_Function_float %x_537 %uint_0 - %251 = OpLoad %float %250 - %252 = OpCompositeExtract %float %193 2 - %253 = OpAccessChain %_ptr_Function_float %x_537 %uint_0 - %254 = OpLoad %float %253 - %255 = OpCompositeConstruct %v3float %251 %252 %254 - %256 = OpLoad %int %param_1 - OpStore %param_1 %31 - OpStore %param_1 %256 - %257 = OpAccessChain %_ptr_Private_int %obj %uint_0 %241 - %258 = OpLoad %int %257 - %259 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %259 - %260 = OpLoad %int %pivot - %261 = OpCompositeExtract %float %181 2 - %262 = OpCompositeConstruct %v2float %float_2 %261 - %263 = OpLoad %int %i_1 - OpStore %i_1 %31 - OpStore %i_1 %263 - %265 = OpLoad %int %l - OpStore %l %31 - OpStore %l %265 - %268 = OpCompositeExtract %float %181 1 - %269 = OpCompositeExtract %float %181 0 - %270 = OpCompositeExtract %float %181 1 - %271 = OpCompositeConstruct %v3float %268 %269 %270 - %272 = OpLoad %int %pivot - OpStore %pivot %31 - OpStore %pivot %272 - %273 = OpSLessThanEqual %bool %258 %260 - OpSelectionMerge %274 None - OpBranchConditional %273 %275 %274 - %275 = OpLabel - %276 = OpCompositeExtract %float %271 2 - %277 = OpCompositeExtract %float %271 0 - %278 = OpCompositeExtract %float %271 0 - %279 = OpCompositeConstruct %v3float %276 %277 %278 - %280 = OpLoad %int %param_3 - OpStore %param_3 %31 - OpStore %param_3 %280 - %281 = OpLoad %int %i_1 - %282 = OpLoad %int %pivot - OpStore %pivot %31 - OpStore %pivot %282 - %283 = OpCompositeExtract %float %255 0 - %284 = OpCompositeExtract %float %271 1 - %285 = OpCompositeConstruct %v2float %283 %284 - %286 = OpLoad %int %i_1 - OpStore %i_1 %31 - OpStore %i_1 %286 - %287 = OpLoad %int %param - OpStore %param %31 - OpStore %param %287 - %288 = OpBitcast %int %uint_1 - %289 = OpIAdd %int %281 %288 - OpStore %i_1 %289 - %291 = OpLoad %int %l - OpStore %l %31 - OpStore %l %291 - %294 = OpCompositeExtract %float %262 0 - %295 = OpCompositeConstruct %v3float %float_3 %float_2 %294 - %296 = OpLoad %int %i_1 - %297 = OpAccessChain %_ptr_Function_float %x_537 %uint_1 - %298 = OpLoad %float %297 - %299 = OpAccessChain %_ptr_Function_float %x_538 %uint_0 - %300 = OpLoad %float %299 - %301 = OpCompositeConstruct %v2float %298 %300 - %302 = OpLoad %int %param - OpStore %param %31 - OpStore %param %302 - OpStore %param %296 - %303 = OpLoad %int %param - OpStore %param %31 - OpStore %param %303 - %304 = OpCompositeExtract %float %301 0 - %305 = OpCompositeExtract %float %301 0 - %306 = OpCompositeConstruct %v2float %304 %305 - %307 = OpLoad %int %i_1 - OpStore %i_1 %31 - OpStore %i_1 %307 - %308 = OpLoad %int %j_1 - OpStore %param_1 %308 - %309 = OpLoad %int %param_3 - OpStore %param_3 %31 - OpStore %param_3 %309 - %310 = OpFunctionCall %void %swap_i1_i1_ %param %param_1 - %313 = OpLoad %int %param_1 - OpStore %param_1 %31 - OpStore %param_1 %313 - OpBranch %274 - %274 = OpLabel - %314 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %314 - OpBranch %211 - %211 = OpLabel - %316 = OpLoad %int %h - OpStore %h %31 - OpStore %h %316 - %319 = OpLoad %int %j_1 - %321 = OpLoad %int %h - OpStore %h %31 - OpStore %h %321 - %324 = OpCompositeExtract %float %255 0 - %325 = OpCompositeExtract %float %271 2 - %326 = OpCompositeExtract %float %271 2 - %327 = OpCompositeConstruct %v3float %324 %325 %326 - %328 = OpAccessChain %_ptr_Private_int %obj %uint_0 %241 - %329 = OpLoad %int %328 - %330 = OpAccessChain %_ptr_Private_int %obj %uint_0 %241 - OpStore %330 %31 - %331 = OpAccessChain %_ptr_Private_int %obj %uint_0 %241 - OpStore %331 %329 - %332 = OpLoad %int %param - OpStore %param %31 - OpStore %param %332 - %334 = OpIAdd %int %int_1 %319 - OpStore %j_1 %334 - %335 = OpLoad %int %param_1 - OpStore %param_1 %31 - OpStore %param_1 %335 - %336 = OpCompositeExtract %float %271 1 - %337 = OpCompositeExtract %float %271 2 - %338 = OpCompositeExtract %float %271 0 - %339 = OpCompositeConstruct %v3float %336 %337 %338 - %340 = OpAccessChain %_ptr_Private_int %obj %uint_0 %241 - %341 = OpLoad %int %340 - %342 = OpAccessChain %_ptr_Private_int %obj %uint_0 %241 - OpStore %342 %31 - %343 = OpAccessChain %_ptr_Private_int %obj %uint_0 %241 - OpStore %343 %341 - OpBranch %209 - %210 = OpLabel - %344 = OpLoad %int %i_1 - %345 = OpAccessChain %_ptr_Private_int %obj %uint_0 %169 - %346 = OpLoad %int %345 - %347 = OpAccessChain %_ptr_Private_int %obj %uint_0 %169 - OpStore %347 %31 - %348 = OpAccessChain %_ptr_Private_int %obj %uint_0 %169 - OpStore %348 %346 - %349 = OpCompositeExtract %float %181 0 - %350 = OpCompositeExtract %float %181 1 - %351 = OpCompositeConstruct %v2float %349 %350 - %352 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %352 - %354 = OpLoad %int %h - OpStore %h %31 - OpStore %h %354 - %357 = OpIAdd %int %int_1 %344 - OpStore %i_1 %357 - %358 = OpLoad %int %param_1 - OpStore %param_1 %31 - OpStore %param_1 %358 - %359 = OpLoad %int %i_1 - %360 = OpLoad %int %j_1 - OpStore %j_1 %31 - OpStore %j_1 %360 - %361 = OpCompositeExtract %float %181 0 - %362 = OpCompositeExtract %float %181 0 - %363 = OpCompositeConstruct %v2float %361 %362 - %364 = OpLoad %int %param_1 - OpStore %param_1 %31 - OpStore %param_1 %364 - OpStore %param_2 %359 - %365 = OpCompositeExtract %float %181 1 - %366 = OpCompositeExtract %float %206 0 - %367 = OpCompositeConstruct %v2float %365 %366 - %368 = OpLoad %int %pivot - OpStore %pivot %31 - OpStore %pivot %368 - %370 = OpLoad %int %h - %371 = OpCompositeExtract %float %363 0 - %372 = OpCompositeExtract %float %351 1 - %373 = OpCompositeConstruct %v2float %371 %372 - %375 = OpLoad %int %h - OpStore %h %31 - OpStore %h %375 - OpStore %param_3 %370 - %378 = OpLoad %int %i_1 - OpStore %i_1 %31 - OpStore %i_1 %378 - %379 = OpCompositeExtract %float %351 1 - %380 = OpCompositeExtract %float %373 0 - %381 = OpCompositeConstruct %v2float %379 %380 - %383 = OpLoad %int %h - OpStore %h %31 - OpStore %h %383 - %386 = OpFunctionCall %void %swap_i1_i1_ %param_2 %param_3 - %390 = OpLoad %int %l - OpStore %l %31 - OpStore %l %390 - %393 = OpCompositeExtract %float %206 2 - %394 = OpCompositeConstruct %v2float %393 %float_2 - %395 = OpLoad %int %param_1 - OpStore %param_1 %31 - OpStore %param_1 %395 - %396 = OpLoad %int %i_1 - %397 = OpLoad %int %param - OpStore %param %31 - OpStore %param %397 - %398 = OpCompositeExtract %float %181 1 - %399 = OpCompositeExtract %float %181 0 - %400 = OpCompositeConstruct %v2float %398 %399 - %401 = OpLoad %int %j_1 - OpStore %j_1 %31 - OpStore %j_1 %401 - OpReturnValue %396 - OpFunctionEnd - %quicksort_ = OpFunction %void None %402 - %404 = OpLabel - %param_4 = OpVariable %_ptr_Function_int Function %31 - %h_1 = OpVariable %_ptr_Function_int Function %31 - %p = OpVariable %_ptr_Function_int Function %31 - %l_1 = OpVariable %_ptr_Function_int Function %31 - %top = OpVariable %_ptr_Function_int Function %31 - %stack = OpVariable %_ptr_Function__arr_int_uint_10 Function %412 - %param_5 = OpVariable %_ptr_Function_int Function %31 - OpStore %l_1 %31 - %414 = OpLoad %int %param_5 - OpStore %param_5 %31 - OpStore %param_5 %414 - OpStore %h_1 %int_9 - %416 = OpLoad %_arr_int_uint_10 %stack - OpStore %stack %412 - OpStore %stack %416 - %418 = OpLoad %int %param_5 - OpStore %param_5 %31 - OpStore %param_5 %418 - OpStore %top %int_n1 - %420 = OpLoad %int %p - OpStore %p %31 - OpStore %p %420 - %421 = OpLoad %int %top - %423 = OpLoad %int %p - OpStore %p %31 - OpStore %p %423 - %424 = OpBitcast %int %uint_1 - %425 = OpIAdd %int %421 %424 - %426 = OpLoad %int %top - OpStore %top %31 - OpStore %top %426 - %427 = OpCompositeExtract %float %417 1 - %428 = OpCompositeExtract %float %422 1 - %429 = OpCompositeConstruct %v2float %427 %428 - %430 = OpLoad %int %param_4 - OpStore %param_4 %31 - OpStore %param_4 %430 - OpStore %top %425 - %431 = OpLoad %int %h_1 - OpStore %h_1 %31 - OpStore %h_1 %431 - %432 = OpCompositeExtract %float %422 1 - %433 = OpCompositeExtract %float %422 0 - %434 = OpCompositeExtract %float %422 0 - %435 = OpCompositeConstruct %v3float %432 %433 %434 - %436 = OpLoad %int %param_4 - OpStore %param_4 %31 - OpStore %param_4 %436 - %437 = OpLoad %int %l_1 - %438 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %438 - %439 = OpCompositeExtract %float %435 1 - %440 = OpCompositeExtract %float %435 0 - %441 = OpCompositeExtract %float %422 0 - %442 = OpCompositeConstruct %v3float %439 %440 %441 - %443 = OpLoad %_arr_int_uint_10 %stack - OpStore %stack %412 - OpStore %stack %443 - %444 = OpCompositeExtract %float %417 1 - %445 = OpCompositeExtract %float %417 1 - %446 = OpCompositeExtract %float %417 1 - %447 = OpCompositeConstruct %v3float %444 %445 %446 - %448 = OpLoad %int %l_1 - OpStore %l_1 %31 - OpStore %l_1 %31 - %449 = OpAccessChain %_ptr_Function_int %stack %425 - OpStore %449 %437 - %450 = OpLoad %int %param_5 - OpStore %param_5 %31 - OpStore %param_5 %450 - %451 = OpLoad %int %top - %452 = OpLoad %int %param_4 - OpStore %param_4 %31 - OpStore %param_4 %452 - %453 = OpCompositeExtract %float %429 1 - %454 = OpCompositeConstruct %v3float %float_3 %453 %float_2 - %455 = OpAccessChain %_ptr_Function_int %stack %425 - %456 = OpLoad %int %455 - %457 = OpAccessChain %_ptr_Function_int %stack %425 - OpStore %457 %31 - %458 = OpAccessChain %_ptr_Function_int %stack %425 - OpStore %458 %456 - %459 = OpIAdd %int %451 %int_1 - %460 = OpAccessChain %_ptr_Function_int %stack %425 - %461 = OpLoad %int %460 - %462 = OpAccessChain %_ptr_Function_int %stack %425 - OpStore %462 %31 - %463 = OpAccessChain %_ptr_Function_int %stack %425 - OpStore %463 %461 - %464 = OpCompositeExtract %float %435 0 - %465 = OpCompositeExtract %float %435 2 - %466 = OpCompositeExtract %float %417 1 - %467 = OpCompositeConstruct %v3float %464 %465 %466 - OpStore %top %459 - %468 = OpLoad %int %param_4 - OpStore %param_4 %31 - OpStore %param_4 %468 - %469 = OpLoad %int %h_1 - %470 = OpLoad %int %param_4 - OpStore %param_4 %31 - OpStore %param_4 %470 - %471 = OpCompositeExtract %float %429 0 - %472 = OpCompositeExtract %float %447 0 - %473 = OpCompositeExtract %float %429 1 - %474 = OpCompositeConstruct %v3float %471 %472 %473 - %475 = OpLoad %int %l_1 - OpStore %l_1 %31 - OpStore %l_1 %475 - %476 = OpLoad %int %param_5 - OpStore %param_5 %31 - OpStore %param_5 %476 - %477 = OpCompositeExtract %float %474 2 - %478 = OpCompositeExtract %float %474 2 - %479 = OpCompositeConstruct %v2float %477 %478 - %480 = OpLoad %int %p - OpStore %p %31 - OpStore %p %480 - %481 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %481 %469 - OpBranch %482 - %482 = OpLabel - OpLoopMerge %483 %484 None - OpBranch %485 - %485 = OpLabel - %486 = OpCompositeExtract %float %467 0 - %487 = OpCompositeExtract %float %467 0 - %488 = OpCompositeExtract %float %467 0 - %489 = OpCompositeConstruct %v3float %486 %487 %488 - %490 = OpLoad %int %h_1 - OpStore %h_1 %31 - OpStore %h_1 %490 - %491 = OpLoad %_arr_int_uint_10 %stack - OpStore %stack %412 - OpStore %stack %491 - %492 = OpLoad %int %top - %493 = OpLoad %_arr_int_uint_10 %stack - OpStore %stack %412 - OpStore %stack %493 - %494 = OpCompositeExtract %float %429 0 - %495 = OpCompositeExtract %float %474 2 - %496 = OpCompositeConstruct %v2float %494 %495 - %497 = OpLoad %int %param_4 - OpStore %param_4 %31 - OpStore %param_4 %497 - %498 = OpBitcast %int %499 - %500 = OpSGreaterThanEqual %bool %492 %498 - OpSelectionMerge %501 None - OpBranchConditional %500 %502 %503 - %502 = OpLabel - OpBranch %501 - %503 = OpLabel - OpBranch %483 - %501 = OpLabel - %504 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %504 - %505 = OpCompositeExtract %float %435 1 - %506 = OpCompositeExtract %float %435 0 - %507 = OpCompositeExtract %float %467 1 - %508 = OpCompositeConstruct %v3float %505 %506 %507 - %509 = OpLoad %int %param_4 - OpStore %param_4 %31 - OpStore %param_4 %509 - %510 = OpLoad %int %top - %511 = OpCompositeExtract %float %479 0 - %512 = OpCompositeExtract %float %496 1 - %513 = OpCompositeExtract %float %479 0 - %514 = OpCompositeConstruct %v3float %511 %512 %513 - %515 = OpLoad %int %h_1 - OpStore %h_1 %31 - OpStore %h_1 %515 - %516 = OpCompositeExtract %float %417 0 - %517 = OpCompositeExtract %float %417 0 - %518 = OpCompositeConstruct %v2float %516 %517 - %519 = OpLoad %int %p - OpStore %p %31 - OpStore %p %519 - %520 = OpBitcast %int %uint_1 - %521 = OpISub %int %510 %520 - OpStore %top %521 - %522 = OpLoad %int %p - OpStore %p %31 - OpStore %p %522 - %523 = OpAccessChain %_ptr_Function_int %stack %425 - %524 = OpLoad %int %523 - %525 = OpAccessChain %_ptr_Function_int %stack %425 - OpStore %525 %31 - %526 = OpAccessChain %_ptr_Function_int %stack %425 - OpStore %526 %524 - %527 = OpAccessChain %_ptr_Function_int %stack %510 - %528 = OpLoad %int %527 - %529 = OpLoad %_arr_int_uint_10 %stack - OpStore %stack %412 - OpStore %stack %529 - %530 = OpCompositeExtract %float %435 1 - %531 = OpCompositeExtract %float %435 0 - %532 = OpCompositeExtract %float %474 1 - %533 = OpCompositeConstruct %v3float %530 %531 %532 - %534 = OpLoad %int %l_1 - OpStore %l_1 %31 - OpStore %l_1 %534 - OpStore %h_1 %528 - %535 = OpLoad %_arr_int_uint_10 %stack - OpStore %stack %412 - OpStore %stack %535 - %536 = OpCompositeExtract %float %454 1 - %537 = OpCompositeExtract %float %447 1 - %538 = OpCompositeConstruct %v2float %536 %537 - %539 = OpLoad %int %p - OpStore %p %31 - OpStore %p %539 - %540 = OpLoad %int %top - %541 = OpLoad %int %param_4 - OpStore %param_4 %31 - OpStore %param_4 %541 - %542 = OpAccessChain %_ptr_Function_int %stack %459 - %543 = OpLoad %int %542 - %544 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %544 %31 - %545 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %545 %543 - %546 = OpISub %int %540 %int_1 - OpStore %top %546 - %547 = OpLoad %int %param_5 - OpStore %param_5 %31 - OpStore %param_5 %547 - %548 = OpCompositeExtract %float %518 1 - %549 = OpCompositeExtract %float %479 0 - %550 = OpCompositeExtract %float %518 1 - %551 = OpCompositeConstruct %v3float %548 %549 %550 - %552 = OpLoad %int %h_1 - OpStore %h_1 %31 - OpStore %h_1 %552 - %553 = OpCompositeExtract %float %474 1 - %554 = OpCompositeExtract %float %474 2 - %555 = OpCompositeConstruct %v2float %553 %554 - %556 = OpAccessChain %_ptr_Function_int %stack %459 - %557 = OpLoad %int %556 - %558 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %558 %31 - %559 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %559 %557 - %560 = OpAccessChain %_ptr_Function_int %stack %540 - %561 = OpLoad %int %560 - %562 = OpLoad %int %p - OpStore %p %31 - OpStore %p %562 - %563 = OpCompositeExtract %float %217 1 - %564 = OpCompositeExtract %float %217 1 - %565 = OpCompositeExtract %float %479 0 - %566 = OpCompositeConstruct %v3float %563 %564 %565 - %567 = OpLoad %int %param_5 - OpStore %param_5 %31 - OpStore %param_5 %567 - OpStore %l_1 %561 - %568 = OpLoad %int %top - OpStore %top %31 - OpStore %top %568 - %569 = OpLoad %int %l_1 - OpStore %param_4 %569 - %570 = OpAccessChain %_ptr_Function_int %stack %510 - %571 = OpLoad %int %570 - %572 = OpAccessChain %_ptr_Function_int %stack %510 - OpStore %572 %31 - %573 = OpAccessChain %_ptr_Function_int %stack %510 - OpStore %573 %571 - %574 = OpCompositeExtract %float %514 1 - %575 = OpCompositeExtract %float %514 2 - %576 = OpCompositeConstruct %v2float %574 %575 - %577 = OpLoad %int %h_1 - %578 = OpCompositeExtract %float %429 0 - %579 = OpCompositeConstruct %v2float %578 %float_2 - OpStore %param_5 %577 - %580 = OpAccessChain %_ptr_Function_int %stack %459 - %581 = OpLoad %int %580 - %582 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %582 %31 - %583 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %583 %581 - %584 = OpFunctionCall %int %performPartition_i1_i1_ %param_4 %param_5 - %587 = OpCompositeExtract %float %496 0 - %588 = OpCompositeExtract %float %508 0 - %589 = OpCompositeConstruct %v2float %587 %588 - %590 = OpLoad %int %param_5 - OpStore %param_5 %31 - OpStore %param_5 %590 - OpStore %p %584 - %591 = OpLoad %int %param_4 - OpStore %param_4 %31 - OpStore %param_4 %591 - %592 = OpLoad %int %p - %593 = OpLoad %int %h_1 - OpStore %h_1 %31 - OpStore %h_1 %593 - %594 = OpCompositeExtract %float %508 1 - %595 = OpCompositeExtract %float %508 1 - %596 = OpCompositeConstruct %v2float %594 %595 - %597 = OpLoad %int %l_1 - OpStore %l_1 %31 - OpStore %l_1 %597 - %598 = OpLoad %int %h_1 - OpStore %h_1 %31 - OpStore %h_1 %598 - %599 = OpLoad %int %l_1 - %600 = OpAccessChain %_ptr_Function_int %stack %510 - %601 = OpLoad %int %600 - %602 = OpAccessChain %_ptr_Function_int %stack %510 - OpStore %602 %31 - %603 = OpAccessChain %_ptr_Function_int %stack %510 - OpStore %603 %601 - %604 = OpLoad %int %h_1 - OpStore %h_1 %31 - OpStore %h_1 %604 - %605 = OpCompositeExtract %float %496 1 - %606 = OpCompositeExtract %float %217 0 - %607 = OpCompositeConstruct %v2float %605 %606 - %608 = OpAccessChain %_ptr_Function_int %stack %459 - %609 = OpLoad %int %608 - %610 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %610 %31 - %611 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %611 %609 - %612 = OpBitcast %int %uint_1 - %613 = OpISub %int %592 %612 - %614 = OpSGreaterThan %bool %613 %599 - OpSelectionMerge %615 None - OpBranchConditional %614 %616 %615 - %616 = OpLabel - %617 = OpLoad %int %param_4 - OpStore %param_4 %31 - OpStore %param_4 %617 - %618 = OpLoad %int %top - %619 = OpCompositeExtract %float %533 1 - %620 = OpCompositeExtract %float %417 1 - %621 = OpCompositeConstruct %v2float %619 %620 - %622 = OpAccessChain %_ptr_Function_int %stack %459 - %623 = OpLoad %int %622 - %624 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %624 %31 - %625 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %625 %623 - %626 = OpLoad %_arr_int_uint_10 %stack - OpStore %stack %412 - OpStore %stack %626 - %627 = OpCompositeExtract %float %514 2 - %628 = OpCompositeExtract %float %514 1 - %629 = OpCompositeConstruct %v2float %627 %628 - %630 = OpCompositeExtract %float %596 1 - %631 = OpCompositeExtract %float %576 0 - %632 = OpCompositeExtract %float %576 0 - %633 = OpCompositeConstruct %v3float %630 %631 %632 - %634 = OpLoad %int %l_1 - %635 = OpAccessChain %_ptr_Function_int %stack %540 - %636 = OpLoad %int %635 - %637 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %637 %31 - %638 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %638 %636 - %639 = OpCompositeExtract %float %474 0 - %640 = OpCompositeExtract %float %633 0 - %641 = OpCompositeConstruct %v2float %639 %640 - %642 = OpLoad %int %param_5 - OpStore %param_5 %31 - OpStore %param_5 %642 - %643 = OpIAdd %int %int_1 %618 - %644 = OpAccessChain %_ptr_Function_int %stack %510 - %645 = OpLoad %int %644 - %646 = OpAccessChain %_ptr_Function_int %stack %510 - OpStore %646 %31 - %647 = OpAccessChain %_ptr_Function_int %stack %510 - OpStore %647 %645 - %648 = OpCompositeExtract %float %489 1 - %649 = OpCompositeExtract %float %489 1 - %650 = OpCompositeExtract %float %467 0 - %651 = OpCompositeConstruct %v3float %648 %649 %650 - %652 = OpLoad %int %param_5 - OpStore %param_5 %31 - OpStore %param_5 %652 - %653 = OpAccessChain %_ptr_Function_int %stack %643 - OpStore %653 %634 - %654 = OpLoad %int %top - %655 = OpAccessChain %_ptr_Function_int %stack %459 - %656 = OpLoad %int %655 - %657 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %657 %31 - %658 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %658 %656 - %659 = OpCompositeExtract %float %555 1 - %660 = OpCompositeExtract %float %555 0 - %661 = OpCompositeConstruct %v2float %659 %660 - %662 = OpAccessChain %_ptr_Function_int %stack %643 - %663 = OpLoad %int %662 - %664 = OpAccessChain %_ptr_Function_int %stack %643 - OpStore %664 %31 - %665 = OpAccessChain %_ptr_Function_int %stack %643 - OpStore %665 %663 - %667 = OpBitcast %uint %654 - %668 = OpIAdd %uint %uint_1 %667 - %666 = OpBitcast %int %668 - %669 = OpAccessChain %_ptr_Function_int %stack %459 - %670 = OpLoad %int %669 - %671 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %671 %31 - %672 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %672 %670 - %673 = OpCompositeExtract %float %566 2 - %674 = OpCompositeExtract %float %661 1 - %675 = OpCompositeExtract %float %566 2 - %676 = OpCompositeConstruct %v3float %673 %674 %675 - %677 = OpLoad %int %h_1 - OpStore %h_1 %31 - OpStore %h_1 %677 - OpStore %top %666 - %678 = OpLoad %_arr_int_uint_10 %stack - OpStore %stack %412 - OpStore %stack %678 - %679 = OpLoad %int %p - %680 = OpCompositeExtract %float %566 0 - %681 = OpCompositeExtract %float %217 1 - %682 = OpCompositeConstruct %v2float %680 %681 - %683 = OpAccessChain %_ptr_Function_int %stack %540 - %684 = OpLoad %int %683 - %685 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %685 %31 - %686 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %686 %684 - %687 = OpAccessChain %_ptr_Function_int %stack %540 - %688 = OpLoad %int %687 - %689 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %689 %31 - %690 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %690 %688 - %691 = OpAccessChain %_ptr_Function_int %stack %666 - %692 = OpBitcast %int %uint_1 - %693 = OpISub %int %679 %692 - OpStore %691 %693 - %694 = OpAccessChain %_ptr_Function_int %stack %425 - %695 = OpLoad %int %694 - %696 = OpAccessChain %_ptr_Function_int %stack %425 - OpStore %696 %31 - %697 = OpAccessChain %_ptr_Function_int %stack %425 - OpStore %697 %695 - %698 = OpCompositeExtract %float %514 2 - %699 = OpCompositeExtract %float %514 1 - %700 = OpCompositeConstruct %v2float %698 %699 - %701 = OpAccessChain %_ptr_Function_int %stack %666 - %702 = OpLoad %int %701 - %703 = OpAccessChain %_ptr_Function_int %stack %666 - OpStore %703 %31 - %704 = OpAccessChain %_ptr_Function_int %stack %666 - OpStore %704 %702 - OpBranch %615 - %615 = OpLabel - %705 = OpAccessChain %_ptr_Function_int %stack %425 - %706 = OpLoad %int %705 - %707 = OpAccessChain %_ptr_Function_int %stack %425 - OpStore %707 %31 - %708 = OpAccessChain %_ptr_Function_int %stack %425 - OpStore %708 %706 - %710 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %710 - %711 = OpLoad %int %p - %712 = OpAccessChain %_ptr_Function_int %stack %540 - %713 = OpLoad %int %712 - %714 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %714 %31 - %715 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %715 %713 - %716 = OpCompositeExtract %float %533 2 - %717 = OpCompositeExtract %float %417 0 - %718 = OpCompositeExtract %float %417 1 - %719 = OpCompositeConstruct %v3float %716 %717 %718 - %720 = OpLoad %int %p - OpStore %p %31 - OpStore %p %720 - %721 = OpCompositeExtract %float %467 2 - %722 = OpCompositeExtract %float %467 0 - %723 = OpCompositeExtract %float %555 0 - %724 = OpCompositeConstruct %v3float %721 %722 %723 - %725 = OpAccessChain %_ptr_Function_int %stack %540 - %726 = OpLoad %int %725 - %727 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %727 %31 - %728 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %728 %726 - %729 = OpLoad %int %h_1 - %730 = OpLoad %int %top - OpStore %top %31 - OpStore %top %730 - %731 = OpCompositeExtract %float %442 2 - %732 = OpCompositeExtract %float %508 0 - %733 = OpCompositeExtract %float %442 0 - %734 = OpCompositeConstruct %v3float %731 %732 %733 - %735 = OpAccessChain %_ptr_Function_int %stack %459 - %736 = OpLoad %int %735 - %737 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %737 %31 - %738 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %738 %736 - %739 = OpLoad %int %p - OpStore %p %31 - OpStore %p %739 - %741 = OpBitcast %uint %711 - %742 = OpIAdd %uint %uint_1 %741 - %740 = OpBitcast %int %742 - %743 = OpSLessThan %bool %740 %729 - OpSelectionMerge %744 None - OpBranchConditional %743 %745 %744 - %745 = OpLabel - %746 = OpAccessChain %_ptr_Function_int %stack %540 - %747 = OpLoad %int %746 - %748 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %748 %31 - %749 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %749 %747 - %750 = OpCompositeExtract %float %709 1 - %751 = OpCompositeExtract %float %607 0 - %752 = OpCompositeConstruct %v2float %750 %751 - %753 = OpLoad %int %l_1 - OpStore %l_1 %31 - OpStore %l_1 %753 - %754 = OpLoad %int %top - %755 = OpAccessChain %_ptr_Function_int %stack %540 - %756 = OpLoad %int %755 - %757 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %757 %31 - %758 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %758 %756 - %759 = OpCompositeExtract %float %454 1 - %760 = OpCompositeExtract %float %442 1 - %761 = OpCompositeExtract %float %442 1 - %762 = OpCompositeConstruct %v3float %759 %760 %761 - %763 = OpIAdd %int %754 %int_1 - %764 = OpLoad %int %param_5 - OpStore %param_5 %31 - OpStore %param_5 %764 - OpStore %top %763 - %765 = OpAccessChain %_ptr_Function_int %stack %540 - %766 = OpLoad %int %765 - %767 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %767 %31 - %768 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %768 %766 - %769 = OpLoad %int %p - %770 = OpLoad %int %param_5 - OpStore %param_5 %31 - OpStore %param_5 %770 - %771 = OpCompositeExtract %float %442 2 - %772 = OpCompositeExtract %float %442 0 - %773 = OpCompositeExtract %float %508 0 - %774 = OpCompositeConstruct %v3float %771 %772 %773 - %775 = OpLoad %int %p - OpStore %p %31 - OpStore %p %775 - %776 = OpCompositeExtract %float %417 0 - %777 = OpCompositeExtract %float %596 0 - %778 = OpCompositeExtract %float %596 0 - %779 = OpCompositeConstruct %v3float %776 %777 %778 - %780 = OpAccessChain %_ptr_Function_int %stack %459 - %781 = OpLoad %int %780 - %782 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %782 %31 - %783 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %783 %781 - %784 = OpAccessChain %_ptr_Function_int %stack %510 - %785 = OpLoad %int %784 - %786 = OpAccessChain %_ptr_Function_int %stack %510 - OpStore %786 %31 - %787 = OpAccessChain %_ptr_Function_int %stack %510 - OpStore %787 %785 - %788 = OpCompositeExtract %float %467 0 - %789 = OpCompositeExtract %float %467 1 - %790 = OpCompositeConstruct %v2float %788 %789 - %791 = OpAccessChain %_ptr_Function_int %stack %763 - %793 = OpBitcast %uint %769 - %794 = OpIAdd %uint %uint_1 %793 - %792 = OpBitcast %int %794 - OpStore %791 %792 - %795 = OpLoad %_arr_int_uint_10 %stack - OpStore %stack %412 - OpStore %stack %795 - %796 = OpLoad %int %top - %797 = OpAccessChain %_ptr_Function_int %stack %540 - %798 = OpLoad %int %797 - %799 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %799 %31 - %800 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %800 %798 - %801 = OpCompositeExtract %float %479 1 - %802 = OpCompositeExtract %float %774 1 - %803 = OpCompositeConstruct %v2float %801 %802 - %804 = OpLoad %_arr_int_uint_10 %stack - OpStore %stack %412 - OpStore %stack %804 - %805 = OpBitcast %int %uint_1 - %806 = OpIAdd %int %796 %805 - %807 = OpAccessChain %_ptr_Function_int %stack %763 - %808 = OpLoad %int %807 - %809 = OpAccessChain %_ptr_Function_int %stack %763 - OpStore %809 %31 - %810 = OpAccessChain %_ptr_Function_int %stack %763 - OpStore %810 %808 - OpStore %top %806 - %811 = OpLoad %int %param_4 - OpStore %param_4 %31 - OpStore %param_4 %811 - %812 = OpLoad %int %h_1 - %813 = OpAccessChain %_ptr_Function_int %stack %459 - %814 = OpLoad %int %813 - %815 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %815 %31 - %816 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %816 %814 - %817 = OpAccessChain %_ptr_Function_int %stack %425 - %818 = OpLoad %int %817 - %819 = OpAccessChain %_ptr_Function_int %stack %425 - OpStore %819 %31 - %820 = OpAccessChain %_ptr_Function_int %stack %425 - OpStore %820 %818 - %821 = OpAccessChain %_ptr_Function_int %stack %806 - OpStore %821 %812 - %822 = OpAccessChain %_ptr_Function_int %stack %540 - %823 = OpLoad %int %822 - %824 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %824 %31 - %825 = OpAccessChain %_ptr_Function_int %stack %540 - OpStore %825 %823 - %826 = OpCompositeExtract %float %508 1 - %827 = OpCompositeExtract %float %474 0 - %828 = OpCompositeExtract %float %474 0 - %829 = OpCompositeConstruct %v3float %826 %827 %828 - %830 = OpLoad %int %l_1 - OpStore %l_1 %31 - OpStore %l_1 %830 - OpBranch %744 - %744 = OpLabel - %831 = OpAccessChain %_ptr_Function_int %stack %459 - %832 = OpLoad %int %831 - %833 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %833 %31 - %834 = OpAccessChain %_ptr_Function_int %stack %459 - OpStore %834 %832 - OpBranch %484 - %484 = OpLabel - %835 = OpLoad %int %l_1 - OpStore %l_1 %31 - OpStore %l_1 %835 - %836 = OpCompositeExtract %float %467 2 - %837 = OpCompositeExtract %float %474 0 - %838 = OpCompositeConstruct %v2float %836 %837 - %839 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %839 - OpBranch %482 - %483 = OpLabel - %840 = OpLoad %int %h_1 - OpStore %h_1 %31 - OpStore %h_1 %840 - OpReturn - OpFunctionEnd - %main_1 = OpFunction %void None %402 - %842 = OpLabel - %color = OpVariable %_ptr_Function_v3float Function %163 - %i_2 = OpVariable %_ptr_Function_int Function %31 - %uv = OpVariable %_ptr_Function_v2float Function %160 - %846 = OpLoad %v2float %uv - OpStore %uv %160 - OpStore %uv %846 - OpStore %i_2 %31 - %847 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %847 - OpSelectionMerge %849 None - OpBranchConditional %true %850 %849 - %850 = OpLabel - %851 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %851 - %852 = OpLoad %int %i_2 - %853 = OpLoad %v2float %uv - OpStore %uv %160 - OpStore %uv %853 - %854 = OpLoad %v3float %color - OpStore %color %163 - OpStore %color %854 - %855 = OpCompositeExtract %float %422 1 - %856 = OpCompositeExtract %float %422 1 - %857 = OpCompositeConstruct %v2float %855 %856 - %858 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %858 - OpBranch %849 - %849 = OpLabel - %859 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %859 - %860 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %860 - %861 = OpFunctionCall %void %quicksort_ - %862 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %862 - %863 = OpLoad %v4float %gl_FragCoord - %864 = OpLoad %v2float %uv - OpStore %uv %160 - OpStore %uv %864 - %865 = OpLoad %v2float %uv - OpStore %uv %160 - OpStore %uv %865 - %866 = OpCompositeExtract %float %863 0 - %867 = OpCompositeExtract %float %863 1 - %868 = OpCompositeConstruct %v2float %866 %867 - %869 = OpCompositeExtract %float %868 1 - %870 = OpCompositeExtract %float %160 1 - %871 = OpCompositeExtract %float %160 1 - %872 = OpCompositeConstruct %v3float %869 %870 %871 - %873 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %873 - %874 = OpLoad %v2float %uv - OpStore %uv %160 - OpStore %uv %874 - %876 = OpAccessChain %_ptr_Uniform_v2float %x_188 %uint_0 - %877 = OpLoad %v2float %876 - %878 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %878 - %879 = OpCompositeExtract %float %863 1 - %880 = OpCompositeExtract %float %863 3 - %881 = OpCompositeConstruct %v3float %879 %float_3 %880 - %882 = OpLoad %v3float %color - OpStore %color %163 - OpStore %color %882 - %883 = OpFDiv %v2float %868 %877 - %884 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %884 - %885 = OpCompositeExtract %float %160 0 - %886 = OpCompositeExtract %float %868 1 - %887 = OpCompositeConstruct %v2float %885 %886 - %888 = OpLoad %v3float %color - OpStore %color %163 - %889 = OpLoad %v3float %color - OpStore %color %163 - OpStore %color %889 - OpStore %color %888 - OpStore %uv %883 - OpStore %color %890 - %891 = OpLoad %v3float %color - OpStore %color %163 - OpStore %color %891 - %892 = OpCompositeExtract %float %868 0 - %893 = OpCompositeExtract %float %868 1 - %894 = OpCompositeExtract %float %160 1 - %895 = OpCompositeConstruct %v3float %892 %893 %894 - %896 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %896 - %897 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - %898 = OpLoad %int %897 - %899 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %899 %31 - %900 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %900 %898 - %901 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - %902 = OpLoad %int %901 - %903 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %903 - %904 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - %905 = OpLoad %int %904 - %906 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %906 %31 - %907 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %907 %905 - %908 = OpAccessChain %_ptr_Function_float %color %uint_0 - %909 = OpLoad %float %908 - %910 = OpAccessChain %_ptr_Function_float %color %uint_0 - %911 = OpLoad %float %910 - %912 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %912 %913 - %914 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %914 %911 - %916 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %916 - %917 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %917 - %918 = OpCompositeExtract %float %895 0 - %919 = OpCompositeExtract %float %887 0 - %920 = OpCompositeExtract %float %887 1 - %921 = OpCompositeConstruct %v3float %918 %919 %920 - %922 = OpAccessChain %_ptr_Function_float %color %uint_0 - %923 = OpConvertSToF %float %902 - %924 = OpFAdd %float %909 %923 - OpStore %922 %924 - %925 = OpLoad %v2float %uv - OpStore %uv %160 - OpStore %uv %925 - %926 = OpLoad %v2float %uv - OpStore %uv %160 - OpStore %uv %926 - %927 = OpCompositeExtract %float %863 1 - %928 = OpCompositeExtract %float %863 1 - %929 = OpCompositeConstruct %v2float %927 %928 - %930 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %931 = OpLoad %float %930 - %932 = OpCompositeExtract %float %883 1 - %933 = OpCompositeExtract %float %883 0 - %934 = OpCompositeConstruct %v2float %932 %933 - %935 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %936 = OpLoad %float %935 - %937 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %937 %913 - %938 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %938 %936 - %939 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %939 - %941 = OpFOrdGreaterThan %bool %931 %float_0_25 - OpSelectionMerge %942 None - OpBranchConditional %941 %943 %942 - %943 = OpLabel - %944 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %944 - %945 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - %946 = OpLoad %int %945 - %947 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %947 %31 - %948 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %948 %946 - %949 = OpCompositeExtract %float %872 1 - %950 = OpCompositeExtract %float %872 1 - %951 = OpCompositeConstruct %v3float %913 %949 %950 - %952 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %953 = OpLoad %float %952 - %954 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %954 %913 - %955 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %955 %953 - %956 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_1 - %957 = OpLoad %int %956 - %958 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %958 - %959 = OpCompositeExtract %float %929 0 - %960 = OpCompositeExtract %float %929 0 - %961 = OpCompositeConstruct %v2float %959 %960 - %962 = OpLoad %v2float %uv - OpStore %uv %160 - OpStore %uv %962 - %963 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %963 - %965 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %965 - %966 = OpAccessChain %_ptr_Function_float %color %31 - %967 = OpLoad %float %966 - %968 = OpAccessChain %_ptr_Function_float %color %31 - %969 = OpLoad %float %968 - %970 = OpAccessChain %_ptr_Function_float %color %31 - OpStore %970 %913 - %971 = OpAccessChain %_ptr_Function_float %color %31 - OpStore %971 %969 - %972 = OpLoad %v3float %color - OpStore %color %163 - OpStore %color %972 - %973 = OpLoad %v3float %color - OpStore %color %163 - OpStore %color %973 - %974 = OpCompositeExtract %float %929 1 - %975 = OpCompositeExtract %float %929 1 - %976 = OpCompositeExtract %float %160 1 - %977 = OpCompositeConstruct %v3float %974 %975 %976 - %978 = OpAccessChain %_ptr_Function_float %color %31 - %979 = OpLoad %float %978 - %980 = OpAccessChain %_ptr_Function_float %color %31 - OpStore %980 %913 - %981 = OpAccessChain %_ptr_Function_float %color %31 - OpStore %981 %979 - %982 = OpAccessChain %_ptr_Function_float %color %uint_0 - %983 = OpConvertSToF %float %957 - %984 = OpFAdd %float %983 %967 - OpStore %982 %984 - %985 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - %986 = OpLoad %int %985 - %987 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %987 %31 - %988 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %988 %986 - OpBranch %942 - %942 = OpLabel - %989 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %990 = OpLoad %float %989 - %991 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %991 %913 - %992 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %992 %990 - %993 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %994 = OpLoad %float %993 - %995 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %995 %913 - %996 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %996 %994 - %997 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %998 = OpLoad %float %997 - %999 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1000 = OpLoad %float %999 - %1001 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1001 %913 - %1002 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1002 %1000 - %1003 = OpCompositeExtract %float %921 2 - %1004 = OpCompositeExtract %float %921 1 - %1005 = OpCompositeExtract %float %921 1 - %1006 = OpCompositeConstruct %v3float %1003 %1004 %1005 - %1007 = OpLoad %v2float %uv - OpStore %uv %160 - OpStore %uv %1007 - %1008 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1009 = OpLoad %float %1008 - %1010 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1010 %913 - %1011 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1011 %1009 - %1012 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1013 = OpLoad %float %1012 - %1014 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1014 %913 - %1015 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1015 %1013 - %1017 = OpFOrdGreaterThan %bool %998 %float_0_5 - OpSelectionMerge %1018 None - OpBranchConditional %1017 %1019 %1018 - %1019 = OpLabel - %1020 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1021 = OpLoad %float %1020 - %1022 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1022 %913 - %1023 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1023 %1021 - %1024 = OpCompositeExtract %float %160 0 - %1025 = OpCompositeExtract %float %160 0 - %1026 = OpCompositeConstruct %v2float %1024 %1025 - %1027 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1028 = OpLoad %float %1027 - %1029 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1029 %913 - %1030 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1030 %1028 - %1031 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1032 = OpLoad %float %1031 - %1033 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1033 %913 - %1034 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1034 %1032 - %1035 = OpCompositeExtract %float %921 0 - %1036 = OpCompositeExtract %float %921 2 - %1037 = OpCompositeExtract %float %160 1 - %1038 = OpCompositeConstruct %v3float %1035 %1036 %1037 - %1039 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1040 = OpLoad %float %1039 - %1041 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1041 %913 - %1042 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1042 %1040 - %1044 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_2 - %1045 = OpLoad %int %1044 - %1046 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1047 = OpLoad %float %1046 - %1048 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1048 %913 - %1049 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1049 %1047 - %1050 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1051 = OpLoad %float %1050 - %1052 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1052 %913 - %1053 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1053 %1051 - %1054 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_2 - %1055 = OpLoad %int %1054 - %1056 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_2 - OpStore %1056 %31 - %1057 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_2 - OpStore %1057 %1055 - %1058 = OpCompositeExtract %float %887 1 - %1059 = OpCompositeExtract %float %877 0 - %1060 = OpCompositeConstruct %v2float %1058 %1059 - %1061 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1062 = OpLoad %float %1061 - %1063 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1063 %913 - %1064 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1064 %1062 - %1065 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1066 = OpLoad %float %1065 - %1067 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_2 - %1068 = OpLoad %int %1067 - %1069 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_2 - OpStore %1069 %31 - %1070 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_2 - OpStore %1070 %1068 - %1071 = OpCompositeExtract %float %1038 0 - %1072 = OpCompositeExtract %float %868 0 - %1073 = OpCompositeConstruct %v2float %1071 %1072 - %1074 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1075 = OpLoad %float %1074 - %1076 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1076 %913 - %1077 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1077 %1075 - %1078 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %1078 - %1079 = OpCompositeExtract %float %934 1 - %1080 = OpCompositeConstruct %v2float %1079 %913 - %1081 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %1081 - %1082 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1083 = OpConvertSToF %float %1045 - %1084 = OpFAdd %float %1083 %1066 - OpStore %1082 %1084 - %1085 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1086 = OpLoad %float %1085 - %1087 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1087 %913 - %1088 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1088 %1086 - OpBranch %1018 - %1018 = OpLabel - %1089 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %1089 - %1090 = OpCompositeExtract %float %877 0 - %1091 = OpCompositeExtract %float %877 0 - %1092 = OpCompositeConstruct %v2float %1090 %1091 - %1093 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1094 = OpLoad %float %1093 - %1095 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1095 %913 - %1096 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1096 %1094 - %1097 = OpAccessChain %_ptr_Function_float %uv %31 - %1098 = OpLoad %float %1097 - %1099 = OpLoad %v3float %color - OpStore %color %163 - OpStore %color %1099 - %1100 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1101 = OpLoad %float %1100 - %1102 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1102 %913 - %1103 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1103 %1101 - %1105 = OpFOrdGreaterThan %bool %1098 %float_0_75 - OpSelectionMerge %1106 None - OpBranchConditional %1105 %1107 %1106 - %1107 = OpLabel - %1108 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1109 = OpLoad %float %1108 - %1110 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1110 %913 - %1111 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1111 %1109 - %1113 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_3 - %1114 = OpLoad %int %1113 - %1115 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1116 = OpLoad %float %1115 - %1117 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1117 %913 - %1118 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1118 %1116 - %1119 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %1119 - %1120 = OpCompositeExtract %float %1092 0 - %1121 = OpCompositeExtract %float %1092 0 - %1122 = OpCompositeExtract %float %1092 0 - %1123 = OpCompositeConstruct %v3float %1120 %1121 %1122 - %1124 = OpAccessChain %_ptr_Function_float %uv %31 - %1125 = OpLoad %float %1124 - %1126 = OpAccessChain %_ptr_Function_float %uv %31 - OpStore %1126 %913 - %1127 = OpAccessChain %_ptr_Function_float %uv %31 - OpStore %1127 %1125 - %1128 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1129 = OpLoad %float %1128 - %1130 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1130 %913 - %1131 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1131 %1129 - %1132 = OpAccessChain %_ptr_Function_float %color %uint_2 - %1133 = OpLoad %float %1132 - %1134 = OpLoad %v3float %color - OpStore %color %163 - OpStore %color %1134 - %1135 = OpCompositeExtract %float %1092 0 - %1136 = OpCompositeExtract %float %877 1 - %1137 = OpCompositeExtract %float %1092 1 - %1138 = OpCompositeConstruct %v3float %1135 %1136 %1137 - %1139 = OpAccessChain %_ptr_Function_float %color %uint_2 - %1140 = OpLoad %float %1139 - %1141 = OpAccessChain %_ptr_Function_float %color %uint_2 - OpStore %1141 %913 - %1142 = OpAccessChain %_ptr_Function_float %color %uint_2 - OpStore %1142 %1140 - %1143 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - %1144 = OpLoad %int %1143 - %1145 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %1145 %31 - %1146 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %1146 %1144 - %1147 = OpAccessChain %_ptr_Function_float %color %uint_2 - %1148 = OpLoad %float %1147 - %1149 = OpAccessChain %_ptr_Function_float %color %uint_2 - OpStore %1149 %913 - %1150 = OpAccessChain %_ptr_Function_float %color %uint_2 - OpStore %1150 %1148 - %1151 = OpAccessChain %_ptr_Function_float %color %uint_2 - %1152 = OpConvertSToF %float %1114 - %1153 = OpFAdd %float %1133 %1152 - OpStore %1151 %1153 - %1154 = OpLoad %v2float %uv - OpStore %uv %160 - OpStore %uv %1154 - %1155 = OpCompositeExtract %float %160 1 - %1156 = OpCompositeExtract %float %160 1 - %1157 = OpCompositeConstruct %v2float %1155 %1156 - OpBranch %1106 - %1106 = OpLabel - %1158 = OpAccessChain %_ptr_Function_float %uv %31 - %1159 = OpLoad %float %1158 - %1160 = OpAccessChain %_ptr_Function_float %uv %31 - OpStore %1160 %913 - %1161 = OpAccessChain %_ptr_Function_float %uv %31 - OpStore %1161 %1159 - %1162 = OpCompositeExtract %float %929 0 - %1163 = OpCompositeExtract %float %929 1 - %1164 = OpCompositeExtract %float %929 1 - %1165 = OpCompositeConstruct %v3float %1162 %1163 %1164 - %1167 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - %1168 = OpLoad %int %1167 - %1169 = OpAccessChain %_ptr_Function_float %uv %31 - %1170 = OpLoad %float %1169 - %1171 = OpAccessChain %_ptr_Function_float %uv %31 - OpStore %1171 %913 - %1172 = OpAccessChain %_ptr_Function_float %uv %31 - OpStore %1172 %1170 - %1173 = OpLoad %v3float %color - OpStore %color %163 - OpStore %color %1173 - %1174 = OpCompositeExtract %float %160 1 - %1175 = OpCompositeExtract %float %921 0 - %1176 = OpCompositeExtract %float %921 0 - %1177 = OpCompositeConstruct %v3float %1174 %1175 %1176 - %1178 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - %1179 = OpLoad %int %1178 - %1180 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - OpStore %1180 %31 - %1181 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - OpStore %1181 %1179 - %1182 = OpCompositeExtract %float %877 0 - %1183 = OpCompositeExtract %float %863 2 - %1184 = OpCompositeConstruct %v2float %1182 %1183 - %1185 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1186 = OpLoad %float %1185 - %1187 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1187 %913 - %1188 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1188 %1186 - %1189 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1190 = OpLoad %float %1189 - %1191 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1192 = OpLoad %float %1191 - %1193 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1193 %913 - %1194 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1194 %1192 - %1195 = OpCompositeExtract %float %1092 0 - %1196 = OpCompositeExtract %float %887 0 - %1197 = OpCompositeConstruct %v2float %1195 %1196 - %1198 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1199 = OpLoad %float %1198 - %1200 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1200 %913 - %1201 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1201 %1199 - %1202 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1203 = OpLoad %float %1202 - %1204 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1204 %913 - %1205 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1205 %1203 - %1206 = OpCompositeExtract %float %895 2 - %1207 = OpCompositeExtract %float %1006 1 - %1208 = OpCompositeConstruct %v2float %1206 %1207 - %1209 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1210 = OpConvertSToF %float %1168 - %1211 = OpFAdd %float %1190 %1210 - OpStore %1209 %1211 - %1212 = OpCompositeExtract %float %1165 0 - %1213 = OpCompositeConstruct %v3float %913 %1212 %913 - %1214 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1215 = OpLoad %float %1214 - %1216 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1216 %913 - %1217 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1217 %1215 - %1218 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1219 = OpLoad %float %1218 - %1220 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1220 %913 - %1221 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1221 %1219 - %1222 = OpCompositeExtract %float %1165 0 - %1223 = OpCompositeExtract %float %1165 1 - %1224 = OpCompositeConstruct %v2float %1222 %1223 - %1225 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1226 = OpLoad %float %1225 - %1227 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1227 %913 - %1228 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1228 %1226 - %1229 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1230 = OpLoad %float %1229 - %1231 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %1231 - %1232 = OpCompositeExtract %float %929 1 - %1233 = OpCompositeConstruct %v3float %913 %1232 %913 - %1234 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - %1235 = OpLoad %int %1234 - %1236 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %1236 %31 - %1237 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %1237 %1235 - %1238 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1239 = OpLoad %float %1238 - %1240 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1240 %913 - %1241 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1241 %1239 - %1242 = OpCompositeExtract %float %160 0 - %1243 = OpCompositeExtract %float %160 0 - %1244 = OpCompositeConstruct %v3float %1242 %1243 %913 - %1245 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1246 = OpLoad %float %1245 - %1247 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1247 %913 - %1248 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1248 %1246 - %1249 = OpFOrdGreaterThan %bool %1230 %float_0_25 - OpSelectionMerge %1250 None - OpBranchConditional %1249 %1251 %1250 - %1251 = OpLabel - %1252 = OpCompositeExtract %float %160 0 - %1253 = OpCompositeExtract %float %1244 2 - %1254 = OpCompositeConstruct %v2float %1252 %1253 - %1255 = OpLoad %v3float %color - OpStore %color %163 - OpStore %color %1255 - %1257 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_5 - %1258 = OpLoad %int %1257 - %1259 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1260 = OpLoad %float %1259 - %1261 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1261 %913 - %1262 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1262 %1260 - %1263 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %1263 - %1264 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %1264 - %1265 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1266 = OpLoad %float %1265 - %1267 = OpAccessChain %_ptr_Function_float %uv %31 - %1268 = OpLoad %float %1267 - %1269 = OpAccessChain %_ptr_Function_float %uv %31 - OpStore %1269 %913 - %1270 = OpAccessChain %_ptr_Function_float %uv %31 - OpStore %1270 %1268 - %1271 = OpCompositeExtract %float %934 0 - %1272 = OpCompositeExtract %float %1197 1 - %1273 = OpCompositeExtract %float %934 1 - %1274 = OpCompositeConstruct %v3float %1271 %1272 %1273 - %1275 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %1275 - %1276 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1277 = OpLoad %float %1276 - %1278 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1278 %913 - %1279 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1279 %1277 - %1280 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %1280 - %1281 = OpCompositeExtract %float %863 3 - %1282 = OpCompositeExtract %float %863 3 - %1283 = OpCompositeExtract %float %883 0 - %1284 = OpCompositeConstruct %v3float %1281 %1282 %1283 - %1285 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1286 = OpLoad %float %1285 - %1287 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1287 %913 - %1288 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1288 %1286 - %1289 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1290 = OpConvertSToF %float %1258 - %1291 = OpFAdd %float %1290 %1266 - OpStore %1289 %1291 - %1292 = OpCompositeExtract %float %929 1 - %1293 = OpCompositeExtract %float %887 0 - %1294 = OpCompositeExtract %float %929 1 - %1295 = OpCompositeConstruct %v3float %1292 %1293 %1294 - %1296 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1297 = OpLoad %float %1296 - %1298 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1298 %913 - %1299 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1299 %1297 - OpBranch %1250 - %1250 = OpLabel - %1300 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1301 = OpLoad %float %1300 - %1302 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1302 %913 - %1303 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1303 %1301 - %1304 = OpCompositeExtract %float %1092 0 - %1305 = OpCompositeExtract %float %887 1 - %1306 = OpCompositeExtract %float %887 0 - %1307 = OpCompositeConstruct %v3float %1304 %1305 %1306 - %1308 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1309 = OpLoad %float %1308 - %1310 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1310 %913 - %1311 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1311 %1309 - %1312 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - %1313 = OpLoad %int %1312 - %1314 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - OpStore %1314 %31 - %1315 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - OpStore %1315 %1313 - %1316 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1317 = OpLoad %float %1316 - %1318 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - %1319 = OpLoad %int %1318 - %1320 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %1320 %31 - %1321 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %1321 %1319 - %1322 = OpFOrdGreaterThan %bool %1317 %float_0_5 - OpSelectionMerge %1323 None - OpBranchConditional %1322 %1324 %1323 - %1324 = OpLabel - %1325 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1326 = OpLoad %float %1325 - %1327 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1327 %913 - %1328 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1328 %1326 - %1329 = OpCompositeExtract %float %1244 1 - %1330 = OpCompositeExtract %float %934 1 - %1331 = OpCompositeConstruct %v2float %1329 %1330 - %1332 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1333 = OpLoad %float %1332 - %1334 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1334 %913 - %1335 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1335 %1333 - %1336 = OpCompositeExtract %float %881 2 - %1337 = OpCompositeExtract %float %881 1 - %1338 = OpCompositeConstruct %v2float %1336 %1337 - %1339 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1340 = OpLoad %float %1339 - %1341 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1341 %913 - %1342 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1342 %1340 - %1344 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_6 - %1345 = OpLoad %int %1344 - %1346 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1347 = OpLoad %float %1346 - %1348 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1348 %913 - %1349 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1349 %1347 - %1350 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %1350 - %1351 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - %1352 = OpLoad %int %1351 - %1353 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - OpStore %1353 %31 - %1354 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - OpStore %1354 %1352 - %1355 = OpCompositeExtract %float %1177 2 - %1356 = OpCompositeExtract %float %1177 1 - %1357 = OpCompositeConstruct %v2float %1355 %1356 - %1358 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1359 = OpLoad %float %1358 - %1360 = OpLoad %v2float %uv - OpStore %uv %160 - OpStore %uv %1360 - %1361 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1362 = OpLoad %float %1361 - %1363 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1363 %913 - %1364 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1364 %1362 - %1365 = OpCompositeExtract %float %1197 1 - %1366 = OpCompositeExtract %float %1197 0 - %1367 = OpCompositeConstruct %v2float %1365 %1366 - %1368 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_6 - %1369 = OpLoad %int %1368 - %1370 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_6 - OpStore %1370 %31 - %1371 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_6 - OpStore %1371 %1369 - %1372 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_6 - %1373 = OpLoad %int %1372 - %1374 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_6 - OpStore %1374 %31 - %1375 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_6 - OpStore %1375 %1373 - %1376 = OpCompositeExtract %float %1244 2 - %1377 = OpCompositeExtract %float %1244 2 - %1378 = OpCompositeConstruct %v2float %1376 %1377 - %1379 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %1379 - %1380 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1381 = OpConvertSToF %float %1345 - %1382 = OpFAdd %float %1381 %1359 - OpStore %1380 %1382 - %1383 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1384 = OpLoad %float %1383 - %1385 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1385 %913 - %1386 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1386 %1384 - %1387 = OpCompositeExtract %float %929 0 - %1388 = OpCompositeConstruct %v2float %float_2 %1387 - %1389 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1390 = OpLoad %float %1389 - %1391 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1391 %913 - %1392 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1392 %1390 - OpBranch %1323 - %1323 = OpLabel - %1393 = OpCompositeExtract %float %934 1 - %1394 = OpCompositeExtract %float %934 1 - %1395 = OpCompositeConstruct %v2float %1393 %1394 - %1396 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1397 = OpLoad %float %1396 - %1398 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1398 %913 - %1399 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1399 %1397 - %1400 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1401 = OpLoad %float %1400 - %1402 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %1402 - %1403 = OpCompositeExtract %float %1197 0 - %1404 = OpCompositeExtract %float %1197 1 - %1405 = OpCompositeConstruct %v2float %1403 %1404 - %1406 = OpAccessChain %_ptr_Function_float %uv %31 - %1407 = OpLoad %float %1406 - %1408 = OpAccessChain %_ptr_Function_float %uv %31 - OpStore %1408 %913 - %1409 = OpAccessChain %_ptr_Function_float %uv %31 - OpStore %1409 %1407 - %1410 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1411 = OpLoad %float %1410 - %1412 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1412 %913 - %1413 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1413 %1411 - %1414 = OpCompositeExtract %float %877 0 - %1415 = OpCompositeExtract %float %877 1 - %1416 = OpCompositeExtract %float %877 1 - %1417 = OpCompositeConstruct %v3float %1414 %1415 %1416 - %1418 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - %1419 = OpLoad %int %1418 - %1420 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - OpStore %1420 %31 - %1421 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - OpStore %1421 %1419 - %1422 = OpFOrdGreaterThan %bool %1401 %float_0_75 - OpSelectionMerge %1423 None - OpBranchConditional %1422 %1424 %1423 - %1424 = OpLabel - %1425 = OpLoad %v3float %color - OpStore %color %163 - OpStore %color %1425 - %1426 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1427 = OpLoad %float %1426 - %1428 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1428 %913 - %1429 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1429 %1427 - %1430 = OpCompositeExtract %float %883 1 - %1431 = OpCompositeExtract %float %883 0 - %1432 = OpCompositeExtract %float %883 1 - %1433 = OpCompositeConstruct %v3float %1430 %1431 %1432 - %1434 = OpLoad %v3float %color - OpStore %color %163 - OpStore %color %1434 - %1436 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_7 - %1437 = OpLoad %int %1436 - %1438 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1439 = OpLoad %float %1438 - %1440 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1440 %913 - %1441 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1441 %1439 - %1442 = OpCompositeExtract %float %1197 0 - %1443 = OpCompositeExtract %float %1092 1 - %1444 = OpCompositeExtract %float %1092 0 - %1445 = OpCompositeConstruct %v3float %1442 %1443 %1444 - %1446 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1447 = OpLoad %float %1446 - %1448 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1448 %913 - %1449 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1449 %1447 - %1450 = OpCompositeExtract %float %1213 0 - %1451 = OpCompositeExtract %float %160 1 - %1452 = OpCompositeConstruct %v2float %1450 %1451 - %1453 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - %1454 = OpLoad %int %1453 - %1455 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %1455 %31 - %1456 = OpAccessChain %_ptr_Private_int %obj %uint_0 %499 - OpStore %1456 %1454 - %1457 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1458 = OpLoad %float %1457 - %1459 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1459 %913 - %1460 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1460 %1458 - %1461 = OpCompositeExtract %float %1224 0 - %1462 = OpCompositeExtract %float %1224 1 - %1463 = OpCompositeExtract %float %1224 0 - %1464 = OpCompositeConstruct %v3float %1461 %1462 %1463 - %1465 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1466 = OpLoad %float %1465 - %1467 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1467 %913 - %1468 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1468 %1466 - %1469 = OpAccessChain %_ptr_Function_float %color %uint_2 - %1470 = OpLoad %float %1469 - %1471 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1472 = OpLoad %float %1471 - %1473 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1473 %913 - %1474 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1474 %1472 - %1475 = OpCompositeExtract %float %863 0 - %1476 = OpCompositeExtract %float %863 1 - %1477 = OpCompositeConstruct %v2float %1475 %1476 - %1478 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1479 = OpLoad %float %1478 - %1480 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1480 %913 - %1481 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1481 %1479 - %1482 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1483 = OpLoad %float %1482 - %1484 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1484 %913 - %1485 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1485 %1483 - %1486 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1487 = OpLoad %float %1486 - %1488 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1488 %913 - %1489 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1489 %1487 - %1490 = OpCompositeExtract %float %1477 1 - %1491 = OpCompositeExtract %float %1477 1 - %1492 = OpCompositeExtract %float %1417 2 - %1493 = OpCompositeConstruct %v3float %1490 %1491 %1492 - %1494 = OpAccessChain %_ptr_Function_float %color %uint_2 - %1495 = OpLoad %float %1494 - %1496 = OpAccessChain %_ptr_Function_float %color %uint_2 - OpStore %1496 %913 - %1497 = OpAccessChain %_ptr_Function_float %color %uint_2 - OpStore %1497 %1495 - %1498 = OpAccessChain %_ptr_Function_float %color %uint_2 - %1499 = OpConvertSToF %float %1437 - %1500 = OpFAdd %float %1499 %1470 - OpStore %1498 %1500 - %1501 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1502 = OpLoad %float %1501 - %1503 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1503 %913 - %1504 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1504 %1502 - %1505 = OpCompositeExtract %float %921 0 - %1506 = OpCompositeExtract %float %921 2 - %1507 = OpCompositeConstruct %v2float %1505 %1506 - %1508 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1509 = OpLoad %float %1508 - %1510 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1510 %913 - %1511 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1511 %1509 - OpBranch %1423 - %1423 = OpLabel - %1512 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %1512 - %1513 = OpCompositeExtract %float %895 1 - %1514 = OpCompositeExtract %float %883 1 - %1515 = OpCompositeConstruct %v2float %1513 %1514 - %1516 = OpLoad %v2float %uv - OpStore %uv %160 - OpStore %uv %1516 - %1518 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_8 - %1519 = OpLoad %int %1518 - %1520 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %1520 - %1521 = OpCompositeExtract %float %868 0 - %1522 = OpCompositeExtract %float %895 2 - %1523 = OpCompositeConstruct %v2float %1521 %1522 - %1524 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_8 - %1525 = OpLoad %int %1524 - %1526 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_8 - OpStore %1526 %31 - %1527 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_8 - OpStore %1527 %1525 - %1528 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1529 = OpLoad %float %1528 - %1530 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1530 %913 - %1531 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1531 %1529 - %1532 = OpCompositeExtract %float %921 1 - %1533 = OpCompositeConstruct %v2float %1532 %913 - %1534 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1535 = OpLoad %float %1534 - %1536 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1536 %913 - %1537 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1537 %1535 - %1538 = OpCompositeExtract %float %1533 0 - %1539 = OpCompositeExtract %float %1533 1 - %1540 = OpCompositeExtract %float %1533 0 - %1541 = OpCompositeConstruct %v3float %1538 %1539 %1540 - %1542 = OpAccessChain %_ptr_Function_float %color %uint_2 - %1543 = OpLoad %float %1542 - %1544 = OpAccessChain %_ptr_Function_float %color %uint_2 - OpStore %1544 %913 - %1545 = OpAccessChain %_ptr_Function_float %color %uint_2 - OpStore %1545 %1543 - %1546 = OpAccessChain %_ptr_Function_float %color %uint_2 - %1547 = OpLoad %float %1546 - %1548 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1549 = OpLoad %float %1548 - %1550 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1550 %913 - %1551 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1551 %1549 - %1552 = OpCompositeExtract %float %1405 0 - %1553 = OpCompositeExtract %float %1395 0 - %1554 = OpCompositeConstruct %v2float %1552 %1553 - %1555 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - %1556 = OpLoad %int %1555 - %1557 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - OpStore %1557 %31 - %1558 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - OpStore %1558 %1556 - %1559 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1560 = OpLoad %float %1559 - %1561 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1561 %913 - %1562 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1562 %1560 - %1563 = OpCompositeExtract %float %160 0 - %1564 = OpCompositeExtract %float %160 0 - %1565 = OpCompositeConstruct %v2float %1563 %1564 - %1566 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1567 = OpLoad %float %1566 - %1568 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1568 %913 - %1569 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1569 %1567 - %1570 = OpAccessChain %_ptr_Function_float %color %uint_2 - %1571 = OpConvertSToF %float %1519 - %1572 = OpFAdd %float %1547 %1571 - OpStore %1570 %1572 - %1573 = OpLoad %v2float %uv - OpStore %uv %160 - OpStore %uv %1573 - %1574 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1575 = OpLoad %float %1574 - %1576 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1576 %913 - %1577 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1577 %1575 - %1578 = OpCompositeExtract %float %160 1 - %1579 = OpCompositeExtract %float %160 0 - %1580 = OpCompositeExtract %float %1554 1 - %1581 = OpCompositeConstruct %v3float %1578 %1579 %1580 - %1582 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1583 = OpLoad %float %1582 - %1584 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1584 %913 - %1585 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1585 %1583 - %1586 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1587 = OpLoad %float %1586 - %1588 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1589 = OpLoad %float %1588 - %1590 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1590 %913 - %1591 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1591 %1589 - %1592 = OpCompositeExtract %float %1523 1 - %1593 = OpCompositeExtract %float %1523 0 - %1594 = OpCompositeExtract %float %872 2 - %1595 = OpCompositeConstruct %v3float %1592 %1593 %1594 - %1596 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1597 = OpLoad %float %1596 - %1598 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1598 %913 - %1599 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1599 %1597 - %1600 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1601 = OpLoad %float %1600 - %1602 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1603 = OpLoad %float %1602 - %1604 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1604 %913 - %1605 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1605 %1603 - %1606 = OpAccessChain %_ptr_Function_float %color %uint_2 - %1607 = OpLoad %float %1606 - %1608 = OpAccessChain %_ptr_Function_float %color %uint_2 - OpStore %1608 %913 - %1609 = OpAccessChain %_ptr_Function_float %color %uint_2 - OpStore %1609 %1607 - %1610 = OpCompositeExtract %float %1307 1 - %1611 = OpCompositeExtract %float %1307 2 - %1612 = OpCompositeConstruct %v3float %float_2 %1610 %1611 - %1613 = OpAccessChain %_ptr_Function_float %color %uint_2 - %1614 = OpLoad %float %1613 - %1615 = OpAccessChain %_ptr_Function_float %color %uint_2 - OpStore %1615 %913 - %1616 = OpAccessChain %_ptr_Function_float %color %uint_2 - OpStore %1616 %1614 - %1617 = OpLoad %int %i_2 - OpStore %i_2 %31 - OpStore %i_2 %1617 - %1618 = OpCompositeExtract %float %1307 2 - %1619 = OpCompositeExtract %float %1307 1 - %1620 = OpCompositeConstruct %v2float %1618 %1619 - %1621 = OpLoad %v3float %color - OpStore %color %163 - OpStore %color %1621 - %1622 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1623 = OpLoad %float %1622 - %1624 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1624 %913 - %1625 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1625 %1623 - %1626 = OpCompositeExtract %float %934 1 - %1627 = OpCompositeExtract %float %934 1 - %1628 = OpCompositeExtract %float %934 1 - %1629 = OpCompositeConstruct %v3float %1626 %1627 %1628 - %1630 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - %1631 = OpLoad %int %1630 - %1632 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - OpStore %1632 %31 - %1633 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4 - OpStore %1633 %1631 - %1636 = OpFSub %float %1587 %1601 - %1634 = OpExtInst %float %1635 FAbs %1636 - %1637 = OpFOrdLessThan %bool %1634 %float_0_25 - OpSelectionMerge %1638 None - OpBranchConditional %1637 %1639 %1638 - %1639 = OpLabel - %1640 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1641 = OpLoad %float %1640 - %1642 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1642 %913 - %1643 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1643 %1641 - %1644 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %1644 - %1645 = OpCompositeExtract %float %1541 2 - %1646 = OpCompositeExtract %float %1541 0 - %1647 = OpCompositeExtract %float %872 0 - %1648 = OpCompositeConstruct %v3float %1645 %1646 %1647 - %1649 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_8 - %1650 = OpLoad %int %1649 - %1651 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_8 - OpStore %1651 %31 - %1652 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_8 - OpStore %1652 %1650 - %1654 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_9 - %1655 = OpLoad %int %1654 - %1656 = OpCompositeExtract %float %1184 1 - %1657 = OpCompositeExtract %float %1184 1 - %1658 = OpCompositeExtract %float %1184 1 - %1659 = OpCompositeConstruct %v3float %1656 %1657 %1658 - %1660 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1661 = OpLoad %float %1660 - %1662 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1662 %913 - %1663 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1663 %1661 - %1664 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1665 = OpLoad %float %1664 - %1666 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1667 = OpLoad %float %1666 - %1668 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1668 %913 - %1669 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1669 %1667 - %1670 = OpCompositeExtract %float %1515 0 - %1671 = OpCompositeExtract %float %1515 1 - %1672 = OpCompositeConstruct %v2float %1670 %1671 - %1673 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1674 = OpLoad %float %1673 - %1675 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1675 %913 - %1676 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1676 %1674 - %1677 = OpLoad %v3float %color - OpStore %color %163 - OpStore %color %1677 - %1678 = OpCompositeExtract %float %915 0 - %1679 = OpCompositeExtract %float %915 0 - %1680 = OpCompositeConstruct %v2float %1678 %1679 - %1681 = OpLoad %v2float %uv - OpStore %uv %160 - OpStore %uv %1681 - %1682 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1683 = OpLoad %float %1682 - %1684 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1684 %913 - %1685 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1685 %1683 - %1686 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1687 = OpConvertSToF %float %1655 - %1688 = OpFAdd %float %1687 %1665 - OpStore %1686 %1688 - %1689 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1690 = OpLoad %float %1689 - %1691 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1691 %913 - %1692 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1692 %1690 - %1693 = OpCompositeExtract %float %1244 1 - %1694 = OpCompositeExtract %float %1581 0 - %1695 = OpCompositeExtract %float %1244 0 - %1696 = OpCompositeConstruct %v3float %1693 %1694 %1695 - %1697 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1698 = OpLoad %float %1697 - %1699 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1699 %913 - %1700 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1700 %1698 - OpBranch %1638 - %1638 = OpLabel - %1701 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1702 = OpLoad %float %1701 - %1703 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1703 %913 - %1704 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1704 %1702 - %1705 = OpLoad %v3float %color - %1706 = OpAccessChain %_ptr_Function_float %uv %31 - %1707 = OpLoad %float %1706 - %1708 = OpAccessChain %_ptr_Function_float %uv %31 - OpStore %1708 %913 - %1709 = OpAccessChain %_ptr_Function_float %uv %31 - OpStore %1709 %1707 - %1710 = OpCompositeExtract %float %160 0 - %1711 = OpCompositeExtract %float %160 0 - %1712 = OpCompositeExtract %float %160 1 - %1713 = OpCompositeConstruct %v3float %1710 %1711 %1712 - %1714 = OpExtInst %v3float %1635 Normalize %1705 - %1715 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1716 = OpLoad %float %1715 - %1717 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1717 %913 - %1718 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1718 %1716 - %1719 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %1719 - %1720 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %1720 - %1721 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1722 = OpLoad %float %1721 - %1723 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1723 %913 - %1724 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1724 %1722 - %1725 = OpCompositeExtract %float %1554 1 - %1726 = OpCompositeExtract %float %1713 1 - %1727 = OpCompositeConstruct %v2float %1725 %1726 - %1728 = OpAccessChain %_ptr_Function_float %color %uint_1 - %1729 = OpLoad %float %1728 - %1730 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1730 %913 - %1731 = OpAccessChain %_ptr_Function_float %color %uint_1 - OpStore %1731 %1729 - %1732 = OpCompositeExtract %float %1714 0 - %1733 = OpCompositeExtract %float %1714 1 - %1734 = OpCompositeExtract %float %1714 2 - %1735 = OpCompositeConstruct %v4float %1732 %1733 %1734 %float_1 - %1736 = OpAccessChain %_ptr_Function_float %uv %uint_1 - %1737 = OpLoad %float %1736 - %1738 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1738 %913 - %1739 = OpAccessChain %_ptr_Function_float %uv %uint_1 - OpStore %1739 %1737 - %1740 = OpCompositeExtract %float %1727 1 - %1741 = OpCompositeConstruct %v3float %float_2 %float_2 %1740 - %1742 = OpAccessChain %_ptr_Function_float %uv %uint_0 - %1743 = OpLoad %float %1742 - %1744 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1744 %913 - %1745 = OpAccessChain %_ptr_Function_float %uv %uint_0 - OpStore %1745 %1743 - OpStore %x_GLF_color %1735 - %1746 = OpLoad %QuicksortObject %obj - OpStore %obj %15 - OpStore %obj %1746 - %1747 = OpCompositeExtract %float %1735 3 - %1748 = OpCompositeExtract %float %1735 1 - %1749 = OpCompositeExtract %float %1405 0 - %1750 = OpCompositeConstruct %v3float %1747 %1748 %1749 - %1751 = OpAccessChain %_ptr_Function_float %color %uint_0 - %1752 = OpLoad %float %1751 - %1753 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1753 %913 - %1754 = OpAccessChain %_ptr_Function_float %color %uint_0 - OpStore %1754 %1752 - OpReturn - OpFunctionEnd - %main_inner = OpFunction %main_out None %1755 -%gl_FragCoord_param = OpFunctionParameter %v4float - %1759 = OpLabel - OpStore %gl_FragCoord %gl_FragCoord_param - %1760 = OpFunctionCall %void %main_1 - %1761 = OpLoad %v4float %x_GLF_color - %1762 = OpCompositeConstruct %main_out %1761 - OpReturnValue %1762 - OpFunctionEnd - %main = OpFunction %void None %402 - %1764 = OpLabel - %1766 = OpLoad %v4float %gl_FragCoord_param_1 - %1765 = OpFunctionCall %main_out %main_inner %1766 - %1767 = OpCompositeExtract %v4float %1765 0 - OpStore %x_GLF_color_1_1 %1767 - OpReturn - OpFunctionEnd +SKIP: triggers crbug.com/tint/98 diff --git a/test/tint/bug/tint/749.spvasm.expected.wgsl b/test/tint/bug/tint/749.spvasm.expected.wgsl index 2592686dee..149037eaec 100644 --- a/test/tint/bug/tint/749.spvasm.expected.wgsl +++ b/test/tint/bug/tint/749.spvasm.expected.wgsl @@ -1,1481 +1 @@ -struct QuicksortObject { - numbers : array, -} - -struct buf0 { - resolution : vec2, -} - -var obj : QuicksortObject; - -var gl_FragCoord : vec4; - -@group(0) @binding(0) var x_188 : buf0; - -var x_GLF_color : vec4; - -fn swap_i1_i1_(i : ptr, j : ptr) { - var temp : i32; - let x_932 : i32 = temp; - temp = 0i; - temp = x_932; - let x_523 : vec3 = vec3(vec3(1.0f, 2.0f, 3.0f).z, vec3(1.0f, 2.0f, 3.0f).y, vec3(1.0f, 2.0f, 3.0f).z); - let x_933 : i32 = *(i); - *(i) = 0i; - *(i) = x_933; - let x_28 : i32 = *(i); - let x_934 : i32 = *(j); - *(j) = 0i; - *(j) = x_934; - let x_524 : vec3 = vec3(x_523.y, x_523.x, x_523.y); - let x_935 : i32 = temp; - temp = 0i; - temp = x_935; - let x_30_save = x_28; - let x_936 : i32 = obj.numbers[x_30_save]; - obj.numbers[x_30_save] = 0i; - obj.numbers[x_30_save] = x_936; - let x_31 : i32 = obj.numbers[x_30_save]; - let x_937 : i32 = temp; - temp = 0i; - temp = x_937; - temp = x_31; - let x_938 : i32 = *(j); - *(j) = 0i; - *(j) = x_938; - let x_525 : vec3 = vec3(x_523.z, vec3(1.0f, 2.0f, 3.0f).x, x_523.y); - let x_939 : i32 = *(i); - *(i) = 0i; - *(i) = x_939; - let x_32 : i32 = *(i); - let x_940 : i32 = obj.numbers[x_30_save]; - obj.numbers[x_30_save] = 0i; - obj.numbers[x_30_save] = x_940; - let x_33 : i32 = *(j); - let x_941 : i32 = *(i); - *(i) = 0i; - *(i) = x_941; - let x_526 : vec3 = vec3(x_525.x, x_525.z, x_525.z); - let x_942 : i32 = obj.numbers[x_30_save]; - obj.numbers[x_30_save] = 0i; - obj.numbers[x_30_save] = x_942; - let x_34_save = x_33; - let x_35 : i32 = obj.numbers[x_34_save]; - let x_943 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_943; - let x_527 : vec2 = vec2(x_526.x, x_526.x); - let x_36_save = x_32; - let x_528 : vec3 = vec3(x_524.x, x_524.z, x_524.x); - obj.numbers[x_36_save] = x_35; - let x_944 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_944; - let x_529 : vec3 = vec3(x_526.y, x_526.z, x_526.x); - let x_945 : i32 = *(i); - *(i) = 0i; - *(i) = x_945; - let x_37 : i32 = *(j); - let x_946 : i32 = temp; - temp = 0i; - temp = x_946; - let x_530 : vec2 = vec2(x_529.z, x_529.y); - let x_947 : i32 = obj.numbers[x_34_save]; - obj.numbers[x_34_save] = 0i; - obj.numbers[x_34_save] = x_947; - let x_38 : i32 = temp; - let x_948 : i32 = *(j); - *(j) = 0i; - *(j) = x_948; - let x_531 : vec3 = vec3(x_527.x, x_526.y, x_526.x); - let x_949 : i32 = obj.numbers[x_36_save]; - obj.numbers[x_36_save] = 0i; - obj.numbers[x_36_save] = x_949; - let x_950 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_950; - let x_532 : vec3 = vec3(x_528.x, x_528.y, x_528.x); - let x_951 : i32 = obj.numbers[x_34_save]; - obj.numbers[x_34_save] = 0i; - obj.numbers[x_34_save] = x_951; - obj.numbers[x_37] = x_38; - return; -} - -fn performPartition_i1_i1_(l : ptr, h : ptr) -> i32 { - var param_3 : i32; - var i_1 : i32; - var j_1 : i32; - var param_2 : i32; - var param_1 : i32; - var param : i32; - var pivot : i32; - var x_537 : vec2; - var x_538 : vec3; - let x_952 : i32 = *(h); - *(h) = 0i; - *(h) = x_952; - let x_41 : i32 = *(h); - let x_953 : i32 = *(l); - *(l) = 0i; - *(l) = x_953; - let x_42_save = x_41; - let x_954 : i32 = obj.numbers[x_42_save]; - obj.numbers[x_42_save] = 0i; - obj.numbers[x_42_save] = x_954; - let x_43 : i32 = obj.numbers[x_42_save]; - let x_955 : i32 = param_3; - param_3 = 0i; - param_3 = x_955; - let x_534 : vec3 = vec3(vec3(1.0f, 2.0f, 3.0f).z, vec3(1.0f, 2.0f, 3.0f).x, vec3(1.0f, 2.0f, 3.0f).z); - let x_956 : i32 = param_1; - param_1 = 0i; - param_1 = x_956; - pivot = x_43; - let x_45 : i32 = *(l); - let x_957 : i32 = *(h); - *(h) = 0i; - *(h) = x_957; - let x_958 : i32 = j_1; - j_1 = 0i; - j_1 = x_958; - let x_535 : vec3 = vec3(x_534.y, x_534.z, x_534.y); - let x_959 : i32 = *(l); - *(l) = 0i; - *(l) = x_959; - i_1 = (x_45 - bitcast(1u)); - let x_49 : i32 = *(l); - let x_536 : vec3 = vec3(x_534.x, x_534.z, x_535.x); - j_1 = 10i; - let x_960 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_960; - loop { - let x_961 : i32 = pivot; - pivot = 0i; - pivot = x_961; - let x_962 : i32 = param_1; - param_1 = 0i; - param_1 = x_962; - let x_55 : i32 = j_1; - let x_963 : i32 = pivot; - pivot = 0i; - pivot = x_963; - x_537 = vec2(vec3(1.0f, 2.0f, 3.0f).y, vec3(1.0f, 2.0f, 3.0f).z); - let x_964 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_964; - let x_56 : i32 = *(h); - let x_965 : i32 = *(h); - *(h) = 0i; - *(h) = x_965; - let x_966 : i32 = param; - param = 0i; - param = x_966; - let x_967 : i32 = j_1; - j_1 = 0i; - j_1 = x_967; - x_538 = vec3(x_534.x, x_537.y, x_534.z); - let x_968 : i32 = param; - param = 0i; - param = x_968; - if ((x_55 <= (x_56 - bitcast(1u)))) { - } else { - break; - } - let x_60 : i32 = j_1; - let x_969 : i32 = obj.numbers[x_42_save]; - obj.numbers[x_42_save] = 0i; - obj.numbers[x_42_save] = x_969; - let x_61_save = x_60; - let x_970 : i32 = *(h); - *(h) = 0i; - *(h) = x_970; - let x_539 : vec3 = vec3(x_537.x, x_535.z, x_537.x); - let x_971 : i32 = param_1; - param_1 = 0i; - param_1 = x_971; - let x_62 : i32 = obj.numbers[x_61_save]; - let x_972 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_972; - let x_63 : i32 = pivot; - let x_540 : vec2 = vec2(vec3(1.0f, 2.0f, 3.0f).y, x_534.z); - let x_973 : i32 = i_1; - i_1 = 0i; - i_1 = x_973; - let x_974 : i32 = *(l); - *(l) = 0i; - *(l) = x_974; - let x_541 : vec3 = vec3(x_534.y, x_534.x, x_534.y); - let x_975 : i32 = pivot; - pivot = 0i; - pivot = x_975; - if ((x_62 <= x_63)) { - let x_542 : vec3 = vec3(x_541.z, x_541.x, x_541.x); - let x_976 : i32 = param_3; - param_3 = 0i; - param_3 = x_976; - let x_67 : i32 = i_1; - let x_977 : i32 = pivot; - pivot = 0i; - pivot = x_977; - let x_543 : vec2 = vec2(x_539.x, x_541.y); - let x_978 : i32 = i_1; - i_1 = 0i; - i_1 = x_978; - let x_979 : i32 = param; - param = 0i; - param = x_979; - i_1 = (x_67 + bitcast(1u)); - let x_980 : i32 = *(l); - *(l) = 0i; - *(l) = x_980; - let x_544 : vec3 = vec3(vec3(1.0f, 2.0f, 3.0f).z, vec3(1.0f, 2.0f, 3.0f).y, x_540.x); - let x_70 : i32 = i_1; - let x_545 : vec2 = vec2(x_537.y, x_538.x); - let x_981 : i32 = param; - param = 0i; - param = x_981; - param = x_70; - let x_982 : i32 = param; - param = 0i; - param = x_982; - let x_546 : vec2 = vec2(x_545.x, x_545.x); - let x_983 : i32 = i_1; - i_1 = 0i; - i_1 = x_983; - let x_72 : i32 = j_1; - param_1 = x_72; - let x_984 : i32 = param_3; - param_3 = 0i; - param_3 = x_984; - swap_i1_i1_(&(param), &(param_1)); - let x_985 : i32 = param_1; - param_1 = 0i; - param_1 = x_985; - } - let x_986 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_986; - - continuing { - let x_987 : i32 = *(h); - *(h) = 0i; - *(h) = x_987; - let x_74 : i32 = j_1; - let x_988 : i32 = *(h); - *(h) = 0i; - *(h) = x_988; - let x_547 : vec3 = vec3(x_539.x, x_541.z, x_541.z); - let x_989 : i32 = obj.numbers[x_61_save]; - obj.numbers[x_61_save] = 0i; - obj.numbers[x_61_save] = x_989; - let x_990 : i32 = param; - param = 0i; - param = x_990; - j_1 = (1i + x_74); - let x_991 : i32 = param_1; - param_1 = 0i; - param_1 = x_991; - let x_548 : vec3 = vec3(x_541.y, x_541.z, x_541.x); - let x_992 : i32 = obj.numbers[x_61_save]; - obj.numbers[x_61_save] = 0i; - obj.numbers[x_61_save] = x_992; - } - } - let x_76 : i32 = i_1; - let x_993 : i32 = obj.numbers[x_42_save]; - obj.numbers[x_42_save] = 0i; - obj.numbers[x_42_save] = x_993; - let x_549 : vec2 = vec2(x_534.x, x_534.y); - let x_994 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_994; - let x_995 : i32 = *(h); - *(h) = 0i; - *(h) = x_995; - i_1 = (1i + x_76); - let x_996 : i32 = param_1; - param_1 = 0i; - param_1 = x_996; - let x_79 : i32 = i_1; - let x_997 : i32 = j_1; - j_1 = 0i; - j_1 = x_997; - let x_550 : vec2 = vec2(x_534.x, x_534.x); - let x_998 : i32 = param_1; - param_1 = 0i; - param_1 = x_998; - param_2 = x_79; - let x_551 : vec2 = vec2(x_534.y, x_536.x); - let x_999 : i32 = pivot; - pivot = 0i; - pivot = x_999; - let x_81 : i32 = *(h); - let x_552 : vec2 = vec2(x_550.x, x_549.y); - let x_1000 : i32 = *(h); - *(h) = 0i; - *(h) = x_1000; - param_3 = x_81; - let x_1001 : i32 = i_1; - i_1 = 0i; - i_1 = x_1001; - let x_553 : vec2 = vec2(x_549.y, x_552.x); - let x_1002 : i32 = *(h); - *(h) = 0i; - *(h) = x_1002; - swap_i1_i1_(&(param_2), &(param_3)); - let x_1003 : i32 = *(l); - *(l) = 0i; - *(l) = x_1003; - let x_554 : vec2 = vec2(x_536.z, vec3(1.0f, 2.0f, 3.0f).y); - let x_1004 : i32 = param_1; - param_1 = 0i; - param_1 = x_1004; - let x_83 : i32 = i_1; - let x_1005 : i32 = param; - param = 0i; - param = x_1005; - let x_555 : vec2 = vec2(x_534.y, x_534.x); - let x_1006 : i32 = j_1; - j_1 = 0i; - j_1 = x_1006; - return x_83; -} - -fn quicksort_() { - var param_4 : i32; - var h_1 : i32; - var p : i32; - var l_1 : i32; - var top : i32; - var stack : array; - var param_5 : i32; - l_1 = 0i; - let x_1007 : i32 = param_5; - param_5 = 0i; - param_5 = x_1007; - h_1 = 9i; - let x_1008 : array = stack; - stack = array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i); - stack = x_1008; - let x_556 : vec2 = vec2(vec3(1.0f, 2.0f, 3.0f).y, vec3(1.0f, 2.0f, 3.0f).y); - let x_1009 : i32 = param_5; - param_5 = 0i; - param_5 = x_1009; - top = -1i; - let x_1010 : i32 = p; - p = 0i; - p = x_1010; - let x_93 : i32 = top; - let x_557 : vec2 = vec2(vec3(1.0f, 2.0f, 3.0f).x, vec3(1.0f, 2.0f, 3.0f).x); - let x_1011 : i32 = p; - p = 0i; - p = x_1011; - let x_94 : i32 = (x_93 + bitcast(1u)); - let x_1012 : i32 = top; - top = 0i; - top = x_1012; - let x_558 : vec2 = vec2(x_556.y, x_557.y); - let x_1013 : i32 = param_4; - param_4 = 0i; - param_4 = x_1013; - top = x_94; - let x_1014 : i32 = h_1; - h_1 = 0i; - h_1 = x_1014; - let x_559 : vec3 = vec3(x_557.y, x_557.x, x_557.x); - let x_1015 : i32 = param_4; - param_4 = 0i; - param_4 = x_1015; - let x_95 : i32 = l_1; - let x_1016 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_1016; - let x_560 : vec3 = vec3(x_559.y, x_559.x, x_557.x); - let x_96_save = x_94; - let x_1017 : array = stack; - stack = array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i); - stack = x_1017; - let x_561 : vec3 = vec3(x_556.y, x_556.y, x_556.y); - let x_1018 : i32 = l_1; - l_1 = 0i; - l_1 = 0i; - stack[x_96_save] = x_95; - let x_1019 : i32 = param_5; - param_5 = 0i; - param_5 = x_1019; - let x_97 : i32 = top; - let x_1020 : i32 = param_4; - param_4 = 0i; - param_4 = x_1020; - let x_562 : vec3 = vec3(vec3(1.0f, 2.0f, 3.0f).z, x_558.y, vec3(1.0f, 2.0f, 3.0f).y); - let x_1021 : i32 = stack[x_96_save]; - stack[x_96_save] = 0i; - stack[x_96_save] = x_1021; - let x_98 : i32 = (x_97 + 1i); - let x_1022 : i32 = stack[x_96_save]; - stack[x_96_save] = 0i; - stack[x_96_save] = x_1022; - let x_563 : vec3 = vec3(x_559.x, x_559.z, x_556.y); - top = x_98; - let x_1023 : i32 = param_4; - param_4 = 0i; - param_4 = x_1023; - let x_99 : i32 = h_1; - let x_1024 : i32 = param_4; - param_4 = 0i; - param_4 = x_1024; - let x_564 : vec3 = vec3(x_558.x, x_561.x, x_558.y); - let x_1025 : i32 = l_1; - l_1 = 0i; - l_1 = x_1025; - let x_100_save = x_98; - let x_1026 : i32 = param_5; - param_5 = 0i; - param_5 = x_1026; - let x_565 : vec2 = vec2(x_564.z, x_564.z); - let x_1027 : i32 = p; - p = 0i; - p = x_1027; - stack[x_100_save] = x_99; - loop { - let x_566 : vec3 = vec3(x_563.x, x_563.x, x_563.x); - let x_1028 : i32 = h_1; - h_1 = 0i; - h_1 = x_1028; - let x_1029 : array = stack; - stack = array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i); - stack = x_1029; - let x_106 : i32 = top; - let x_1030 : array = stack; - stack = array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i); - stack = x_1030; - let x_567 : vec2 = vec2(x_558.x, x_564.z); - let x_1031 : i32 = param_4; - param_4 = 0i; - param_4 = x_1031; - if ((x_106 >= bitcast(0u))) { - } else { - break; - } - let x_1032 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_1032; - let x_568 : vec3 = vec3(x_559.y, x_559.x, x_563.y); - let x_1033 : i32 = param_4; - param_4 = 0i; - param_4 = x_1033; - let x_108 : i32 = top; - let x_569 : vec3 = vec3(x_565.x, x_567.y, x_565.x); - let x_1034 : i32 = h_1; - h_1 = 0i; - h_1 = x_1034; - let x_570 : vec2 = vec2(x_556.x, x_556.x); - let x_1035 : i32 = p; - p = 0i; - p = x_1035; - top = (x_108 - bitcast(1u)); - let x_1036 : i32 = p; - p = 0i; - p = x_1036; - let x_110_save = x_108; - let x_1037 : i32 = stack[x_96_save]; - stack[x_96_save] = 0i; - stack[x_96_save] = x_1037; - let x_111 : i32 = stack[x_110_save]; - let x_1038 : array = stack; - stack = array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i); - stack = x_1038; - let x_571 : vec3 = vec3(x_559.y, x_559.x, x_564.y); - let x_1039 : i32 = l_1; - l_1 = 0i; - l_1 = x_1039; - h_1 = x_111; - let x_1040 : array = stack; - stack = array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i); - stack = x_1040; - let x_572 : vec2 = vec2(x_562.y, x_561.y); - let x_1041 : i32 = p; - p = 0i; - p = x_1041; - let x_112 : i32 = top; - let x_1042 : i32 = param_4; - param_4 = 0i; - param_4 = x_1042; - let x_1043 : i32 = stack[x_100_save]; - stack[x_100_save] = 0i; - stack[x_100_save] = x_1043; - let x_573 : vec2 = vec2(vec3(1.0f, 2.0f, 3.0f).y, vec3(1.0f, 2.0f, 3.0f).z); - top = (x_112 - 1i); - let x_1044 : i32 = param_5; - param_5 = 0i; - param_5 = x_1044; - let x_574 : vec3 = vec3(x_570.y, x_565.x, x_570.y); - let x_1045 : i32 = h_1; - h_1 = 0i; - h_1 = x_1045; - let x_114_save = x_112; - let x_575 : vec2 = vec2(x_564.y, x_564.z); - let x_1046 : i32 = stack[x_100_save]; - stack[x_100_save] = 0i; - stack[x_100_save] = x_1046; - let x_115 : i32 = stack[x_114_save]; - let x_1047 : i32 = p; - p = 0i; - p = x_1047; - let x_576 : vec3 = vec3(x_573.y, x_573.y, x_565.x); - let x_1048 : i32 = param_5; - param_5 = 0i; - param_5 = x_1048; - l_1 = x_115; - let x_1049 : i32 = top; - top = 0i; - top = x_1049; - let x_118 : i32 = l_1; - param_4 = x_118; - let x_1050 : i32 = stack[x_110_save]; - stack[x_110_save] = 0i; - stack[x_110_save] = x_1050; - let x_577 : vec2 = vec2(x_569.y, x_569.z); - let x_120 : i32 = h_1; - let x_578 : vec2 = vec2(x_558.x, vec3(1.0f, 2.0f, 3.0f).y); - param_5 = x_120; - let x_1051 : i32 = stack[x_100_save]; - stack[x_100_save] = 0i; - stack[x_100_save] = x_1051; - let x_121 : i32 = performPartition_i1_i1_(&(param_4), &(param_5)); - let x_579 : vec2 = vec2(x_567.x, x_568.x); - let x_1052 : i32 = param_5; - param_5 = 0i; - param_5 = x_1052; - p = x_121; - let x_1053 : i32 = param_4; - param_4 = 0i; - param_4 = x_1053; - let x_122 : i32 = p; - let x_1054 : i32 = h_1; - h_1 = 0i; - h_1 = x_1054; - let x_580 : vec2 = vec2(x_568.y, x_568.y); - let x_1055 : i32 = l_1; - l_1 = 0i; - l_1 = x_1055; - let x_1056 : i32 = h_1; - h_1 = 0i; - h_1 = x_1056; - let x_124 : i32 = l_1; - let x_1057 : i32 = stack[x_110_save]; - stack[x_110_save] = 0i; - stack[x_110_save] = x_1057; - let x_1058 : i32 = h_1; - h_1 = 0i; - h_1 = x_1058; - let x_582 : vec2 = vec2(x_567.y, x_573.x); - let x_1059 : i32 = stack[x_100_save]; - stack[x_100_save] = 0i; - stack[x_100_save] = x_1059; - if (((x_122 - bitcast(1u)) > x_124)) { - let x_1060 : i32 = param_4; - param_4 = 0i; - param_4 = x_1060; - let x_128 : i32 = top; - let x_583 : vec2 = vec2(x_571.y, x_556.y); - let x_1061 : i32 = stack[x_100_save]; - stack[x_100_save] = 0i; - stack[x_100_save] = x_1061; - let x_1062 : array = stack; - stack = array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i); - stack = x_1062; - let x_584 : vec2 = vec2(x_569.z, x_569.y); - let x_585 : vec3 = vec3(x_580.y, x_577.x, x_577.x); - let x_130 : i32 = l_1; - let x_1063 : i32 = stack[x_114_save]; - stack[x_114_save] = 0i; - stack[x_114_save] = x_1063; - let x_586 : vec2 = vec2(x_564.x, x_585.x); - let x_1064 : i32 = param_5; - param_5 = 0i; - param_5 = x_1064; - let x_131_save = (1i + x_128); - let x_1065 : i32 = stack[x_110_save]; - stack[x_110_save] = 0i; - stack[x_110_save] = x_1065; - let x_587 : vec3 = vec3(x_566.y, x_566.y, x_563.x); - let x_1066 : i32 = param_5; - param_5 = 0i; - param_5 = x_1066; - stack[x_131_save] = x_130; - let x_132 : i32 = top; - let x_1067 : i32 = stack[x_100_save]; - stack[x_100_save] = 0i; - stack[x_100_save] = x_1067; - let x_588 : vec2 = vec2(x_575.y, x_575.x); - let x_1068 : i32 = stack[x_131_save]; - stack[x_131_save] = 0i; - stack[x_131_save] = x_1068; - let x_133 : i32 = bitcast((1u + bitcast(x_132))); - let x_1069 : i32 = stack[x_100_save]; - stack[x_100_save] = 0i; - stack[x_100_save] = x_1069; - let x_589 : vec3 = vec3(x_576.z, x_588.y, x_576.z); - let x_1070 : i32 = h_1; - h_1 = 0i; - h_1 = x_1070; - top = x_133; - let x_1071 : array = stack; - stack = array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i); - stack = x_1071; - let x_134 : i32 = p; - let x_590 : vec2 = vec2(x_576.x, x_573.y); - let x_1072 : i32 = stack[x_114_save]; - stack[x_114_save] = 0i; - stack[x_114_save] = x_1072; - let x_136_save = x_133; - let x_1073 : i32 = stack[x_114_save]; - stack[x_114_save] = 0i; - stack[x_114_save] = x_1073; - stack[x_136_save] = (x_134 - bitcast(1u)); - let x_1074 : i32 = stack[x_96_save]; - stack[x_96_save] = 0i; - stack[x_96_save] = x_1074; - let x_591 : vec2 = vec2(x_569.z, x_569.y); - let x_1075 : i32 = stack[x_136_save]; - stack[x_136_save] = 0i; - stack[x_136_save] = x_1075; - } - let x_1076 : i32 = stack[x_96_save]; - stack[x_96_save] = 0i; - stack[x_96_save] = x_1076; - let x_592 : vec2 = vec2(vec3(1.0f, 2.0f, 3.0f).x, vec3(1.0f, 2.0f, 3.0f).y); - let x_1077 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_1077; - let x_137 : i32 = p; - let x_1078 : i32 = stack[x_114_save]; - stack[x_114_save] = 0i; - stack[x_114_save] = x_1078; - let x_593 : vec3 = vec3(x_571.z, x_556.x, x_556.y); - let x_1079 : i32 = p; - p = 0i; - p = x_1079; - let x_594 : vec3 = vec3(x_563.z, x_563.x, x_575.x); - let x_1080 : i32 = stack[x_114_save]; - stack[x_114_save] = 0i; - stack[x_114_save] = x_1080; - let x_139 : i32 = h_1; - let x_1081 : i32 = top; - top = 0i; - top = x_1081; - let x_595 : vec3 = vec3(x_560.z, x_568.x, x_560.x); - let x_1082 : i32 = stack[x_100_save]; - stack[x_100_save] = 0i; - stack[x_100_save] = x_1082; - let x_1083 : i32 = p; - p = 0i; - p = x_1083; - if ((bitcast((1u + bitcast(x_137))) < x_139)) { - let x_1084 : i32 = stack[x_114_save]; - stack[x_114_save] = 0i; - stack[x_114_save] = x_1084; - let x_596 : vec2 = vec2(x_592.y, x_582.x); - let x_1085 : i32 = l_1; - l_1 = 0i; - l_1 = x_1085; - let x_143 : i32 = top; - let x_1086 : i32 = stack[x_114_save]; - stack[x_114_save] = 0i; - stack[x_114_save] = x_1086; - let x_597 : vec3 = vec3(x_562.y, x_560.y, x_560.y); - let x_144 : i32 = (x_143 + 1i); - let x_1087 : i32 = param_5; - param_5 = 0i; - param_5 = x_1087; - top = x_144; - let x_1088 : i32 = stack[x_114_save]; - stack[x_114_save] = 0i; - stack[x_114_save] = x_1088; - let x_145 : i32 = p; - let x_1089 : i32 = param_5; - param_5 = 0i; - param_5 = x_1089; - let x_599 : vec3 = vec3(x_560.z, x_560.x, x_568.x); - let x_1090 : i32 = p; - p = 0i; - p = x_1090; - let x_600 : vec3 = vec3(x_556.x, x_580.x, x_580.x); - let x_1091 : i32 = stack[x_100_save]; - stack[x_100_save] = 0i; - stack[x_100_save] = x_1091; - let x_147_save = x_144; - let x_1092 : i32 = stack[x_110_save]; - stack[x_110_save] = 0i; - stack[x_110_save] = x_1092; - let x_601 : vec2 = vec2(x_563.x, x_563.y); - stack[x_147_save] = bitcast((1u + bitcast(x_145))); - let x_1093 : array = stack; - stack = array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i); - stack = x_1093; - let x_148 : i32 = top; - let x_1094 : i32 = stack[x_114_save]; - stack[x_114_save] = 0i; - stack[x_114_save] = x_1094; - let x_602 : vec2 = vec2(x_565.y, x_599.y); - let x_1095 : array = stack; - stack = array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i); - stack = x_1095; - let x_149 : i32 = (x_148 + bitcast(1u)); - let x_1096 : i32 = stack[x_147_save]; - stack[x_147_save] = 0i; - stack[x_147_save] = x_1096; - top = x_149; - let x_1097 : i32 = param_4; - param_4 = 0i; - param_4 = x_1097; - let x_150 : i32 = h_1; - let x_1098 : i32 = stack[x_100_save]; - stack[x_100_save] = 0i; - stack[x_100_save] = x_1098; - let x_1099 : i32 = stack[x_96_save]; - stack[x_96_save] = 0i; - stack[x_96_save] = x_1099; - stack[x_149] = x_150; - let x_1100 : i32 = stack[x_114_save]; - stack[x_114_save] = 0i; - stack[x_114_save] = x_1100; - let x_603 : vec3 = vec3(x_568.y, x_564.x, x_564.x); - let x_1101 : i32 = l_1; - l_1 = 0i; - l_1 = x_1101; - } - let x_1102 : i32 = stack[x_100_save]; - stack[x_100_save] = 0i; - stack[x_100_save] = x_1102; - - continuing { - let x_1103 : i32 = l_1; - l_1 = 0i; - l_1 = x_1103; - let x_604 : vec2 = vec2(x_563.z, x_564.x); - let x_1104 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_1104; - } - } - let x_1105 : i32 = h_1; - h_1 = 0i; - h_1 = x_1105; - return; -} - -fn main_1() { - var color : vec3; - var i_2 : i32; - var uv : vec2; - let x_717 : vec2 = uv; - uv = vec2(0.0f, 0.0f); - uv = x_717; - i_2 = 0i; - let x_721 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_721; - if (true) { - let x_722 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_722; - let x_431 : vec2 = vec2(vec3(1.0f, 2.0f, 3.0f).x, vec3(1.0f, 2.0f, 3.0f).x); - let x_158 : i32 = i_2; - let x_723 : vec2 = uv; - uv = vec2(0.0f, 0.0f); - uv = x_723; - let x_725 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - color = x_725; - let x_432 : vec2 = vec2(x_431.y, x_431.y); - let x_726 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_726; - } - let x_756 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_756; - let x_446 : vec2 = vec2(vec2().x, vec2().x); - let x_757 : i32 = i_2; - i_2 = 0i; - i_2 = x_757; - quicksort_(); - let x_758 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_758; - let x_184 : vec4 = gl_FragCoord; - let x_759 : vec2 = uv; - uv = vec2(0.0f, 0.0f); - uv = x_759; - let x_447 : vec2 = vec2(vec2().y, vec2().y); - let x_760 : vec2 = uv; - uv = vec2(0.0f, 0.0f); - uv = x_760; - let x_185 : vec2 = vec2(x_184.x, x_184.y); - let x_448 : vec3 = vec3(x_185.y, x_446.y, x_446.y); - let x_761 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_761; - let x_762 : vec2 = uv; - uv = vec2(0.0f, 0.0f); - uv = x_762; - let x_191 : vec2 = x_188.resolution; - let x_763 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_763; - let x_449 : vec3 = vec3(x_184.y, vec3(1.0f, 2.0f, 3.0f).z, x_184.w); - let x_764 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - color = x_764; - let x_192 : vec2 = (x_185 / x_191); - let x_765 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_765; - let x_450 : vec2 = vec2(x_447.x, x_185.y); - let x_766 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - let x_767 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - color = x_767; - color = x_766; - uv = x_192; - color = vec3(1.0f, 2.0f, 3.0f); - let x_768 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - color = x_768; - let x_451 : vec3 = vec3(x_185.x, x_185.y, x_446.y); - let x_769 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_769; - let x_770 : i32 = obj.numbers[0u]; - obj.numbers[0u] = 0i; - obj.numbers[0u] = x_770; - let x_201 : i32 = obj.numbers[0u]; - let x_771 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_771; - let x_772 : i32 = obj.numbers[0u]; - obj.numbers[0u] = 0i; - obj.numbers[0u] = x_772; - let x_206 : f32 = color.x; - let x_773 : f32 = color.x; - color.x = 0.0f; - color.x = x_773; - let x_452 : vec2 = vec2(vec3(1.0f, 2.0f, 3.0f).z, vec3(1.0f, 2.0f, 3.0f).y); - let x_774 : i32 = i_2; - i_2 = 0i; - i_2 = x_774; - let x_775 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_775; - let x_453 : vec3 = vec3(x_451.x, x_450.x, x_450.y); - color.x = (x_206 + f32(x_201)); - let x_776 : vec2 = uv; - uv = vec2(0.0f, 0.0f); - uv = x_776; - let x_777 : vec2 = uv; - uv = vec2(0.0f, 0.0f); - uv = x_777; - let x_454 : vec2 = vec2(x_184.y, x_184.y); - let x_210 : f32 = uv.x; - let x_455 : vec2 = vec2(x_192.y, x_192.x); - let x_778 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_778; - let x_779 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_779; - if ((x_210 > 0.25f)) { - let x_780 : i32 = i_2; - i_2 = 0i; - i_2 = x_780; - let x_781 : i32 = obj.numbers[0u]; - obj.numbers[0u] = 0i; - obj.numbers[0u] = x_781; - let x_456 : vec3 = vec3(vec2().y, x_448.y, x_448.y); - let x_782 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_782; - let x_216 : i32 = obj.numbers[1i]; - let x_783 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_783; - let x_457 : vec2 = vec2(x_454.x, x_454.x); - let x_784 : vec2 = uv; - uv = vec2(0.0f, 0.0f); - uv = x_784; - let x_785 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_785; - let x_458 : vec2 = vec2(vec3(1.0f, 2.0f, 3.0f).z, vec2().y); - let x_786 : i32 = i_2; - i_2 = 0i; - i_2 = x_786; - let x_219 : f32 = color[0i]; - let x_787 : f32 = color[0i]; - color[0i] = 0.0f; - color[0i] = x_787; - let x_788 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - color = x_788; - let x_789 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - color = x_789; - let x_459 : vec3 = vec3(x_454.y, x_454.y, x_447.y); - let x_790 : f32 = color[0i]; - color[0i] = 0.0f; - color[0i] = x_790; - color.x = (f32(x_216) + x_219); - let x_791 : i32 = obj.numbers[0u]; - obj.numbers[0u] = 0i; - obj.numbers[0u] = x_791; - } - let x_792 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_792; - let x_793 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_793; - let x_223 : f32 = uv.x; - let x_794 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_794; - let x_460 : vec3 = vec3(x_453.z, x_453.y, x_453.y); - let x_795 : vec2 = uv; - uv = vec2(0.0f, 0.0f); - uv = x_795; - let x_796 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_796; - let x_461 : vec2 = vec2(vec2().y, vec2().y); - let x_797 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_797; - if ((x_223 > 0.5f)) { - let x_798 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_798; - let x_462 : vec2 = vec2(x_446.x, x_446.x); - let x_799 : f32 = color.x; - color.x = 0.0f; - color.x = x_799; - let x_800 : f32 = color.x; - color.x = 0.0f; - color.x = x_800; - let x_463 : vec3 = vec3(x_453.x, x_453.z, x_461.y); - let x_801 : f32 = color.x; - color.x = 0.0f; - color.x = x_801; - let x_230 : i32 = obj.numbers[2u]; - let x_802 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_802; - let x_803 : f32 = color.x; - color.x = 0.0f; - color.x = x_803; - let x_804 : i32 = obj.numbers[2u]; - obj.numbers[2u] = 0i; - obj.numbers[2u] = x_804; - let x_464 : vec2 = vec2(x_450.y, x_191.x); - let x_805 : f32 = color.y; - color.y = 0.0f; - color.y = x_805; - let x_234 : f32 = color.y; - let x_806 : i32 = obj.numbers[2u]; - obj.numbers[2u] = 0i; - obj.numbers[2u] = x_806; - let x_465 : vec2 = vec2(x_463.x, x_185.x); - let x_807 : f32 = color.x; - color.x = 0.0f; - color.x = x_807; - let x_808 : i32 = i_2; - i_2 = 0i; - i_2 = x_808; - let x_466 : vec2 = vec2(x_455.y, vec2().y); - let x_809 : i32 = i_2; - i_2 = 0i; - i_2 = x_809; - color.y = (f32(x_230) + x_234); - let x_810 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_810; - } - let x_811 : i32 = i_2; - i_2 = 0i; - i_2 = x_811; - let x_467 : vec2 = vec2(x_191.x, x_191.x); - let x_812 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_812; - let x_238 : f32 = uv[0i]; - let x_813 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - color = x_813; - let x_814 : f32 = color.x; - color.x = 0.0f; - color.x = x_814; - if ((x_238 > 0.75f)) { - let x_815 : f32 = color.x; - color.x = 0.0f; - color.x = x_815; - let x_245 : i32 = obj.numbers[3i]; - let x_816 : f32 = color.x; - color.x = 0.0f; - color.x = x_816; - let x_817 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_817; - let x_468 : vec3 = vec3(x_467.x, x_467.x, x_467.x); - let x_818 : f32 = uv[0i]; - uv[0i] = 0.0f; - uv[0i] = x_818; - let x_819 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_819; - let x_249 : f32 = color.z; - let x_820 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - color = x_820; - let x_469 : vec3 = vec3(x_467.x, x_191.y, x_467.y); - let x_821 : f32 = color.z; - color.z = 0.0f; - color.z = x_821; - let x_822 : i32 = obj.numbers[0u]; - obj.numbers[0u] = 0i; - obj.numbers[0u] = x_822; - let x_470 : vec2 = vec2(vec2().x, vec2().y); - let x_823 : f32 = color.z; - color.z = 0.0f; - color.z = x_823; - color.z = (x_249 + f32(x_245)); - let x_824 : vec2 = uv; - uv = vec2(0.0f, 0.0f); - uv = x_824; - let x_471 : vec2 = vec2(x_470.y, x_470.y); - } - let x_825 : f32 = uv[0i]; - uv[0i] = 0.0f; - uv[0i] = x_825; - let x_472 : vec3 = vec3(x_454.x, x_454.y, x_454.y); - let x_254 : i32 = obj.numbers[4i]; - let x_826 : f32 = uv[0i]; - uv[0i] = 0.0f; - uv[0i] = x_826; - let x_827 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - color = x_827; - let x_473 : vec3 = vec3(x_446.y, x_453.x, x_453.x); - let x_828 : i32 = obj.numbers[4i]; - obj.numbers[4i] = 0i; - obj.numbers[4i] = x_828; - let x_474 : vec2 = vec2(x_191.x, x_184.z); - let x_829 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_829; - let x_257 : f32 = color.y; - let x_830 : f32 = color.y; - color.y = 0.0f; - color.y = x_830; - let x_475 : vec2 = vec2(x_467.x, x_450.x); - let x_831 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_831; - let x_832 : f32 = color.x; - color.x = 0.0f; - color.x = x_832; - let x_476 : vec2 = vec2(x_451.z, x_460.y); - color.y = (x_257 + f32(x_254)); - let x_477 : vec3 = vec3(vec2().x, x_472.x, vec2().y); - let x_833 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_833; - let x_834 : f32 = color.x; - color.x = 0.0f; - color.x = x_834; - let x_478 : vec2 = vec2(x_472.x, x_472.y); - let x_835 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_835; - let x_261 : f32 = uv.y; - let x_836 : i32 = i_2; - i_2 = 0i; - i_2 = x_836; - let x_479 : vec3 = vec3(vec2().y, x_454.y, vec2().x); - let x_837 : i32 = obj.numbers[0u]; - obj.numbers[0u] = 0i; - obj.numbers[0u] = x_837; - let x_838 : f32 = color.y; - color.y = 0.0f; - color.y = x_838; - let x_480 : vec3 = vec3(x_446.x, x_446.x, vec2().y); - let x_839 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_839; - if ((x_261 > 0.25f)) { - let x_481 : vec2 = vec2(x_447.x, x_480.z); - let x_840 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - color = x_840; - let x_267 : i32 = obj.numbers[5u]; - let x_841 : f32 = color.x; - color.x = 0.0f; - color.x = x_841; - let x_842 : i32 = i_2; - i_2 = 0i; - i_2 = x_842; - let x_843 : i32 = i_2; - i_2 = 0i; - i_2 = x_843; - let x_270 : f32 = color.x; - let x_844 : f32 = uv[0i]; - uv[0i] = 0.0f; - uv[0i] = x_844; - let x_482 : vec3 = vec3(x_455.x, x_475.y, x_455.y); - let x_845 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_845; - let x_846 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_846; - let x_847 : i32 = i_2; - i_2 = 0i; - i_2 = x_847; - let x_483 : vec3 = vec3(x_184.w, x_184.w, x_192.x); - let x_848 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_848; - color.x = (f32(x_267) + x_270); - let x_484 : vec3 = vec3(x_454.y, x_450.x, x_454.y); - let x_849 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_849; - } - let x_850 : f32 = color.x; - color.x = 0.0f; - color.x = x_850; - let x_485 : vec3 = vec3(x_467.x, x_450.y, x_450.x); - let x_851 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_851; - let x_852 : i32 = obj.numbers[4i]; - obj.numbers[4i] = 0i; - obj.numbers[4i] = x_852; - let x_274 : f32 = uv.y; - let x_853 : i32 = obj.numbers[0u]; - obj.numbers[0u] = 0i; - obj.numbers[0u] = x_853; - if ((x_274 > 0.5f)) { - let x_854 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_854; - let x_486 : vec2 = vec2(x_480.y, x_455.y); - let x_855 : f32 = color.y; - color.y = 0.0f; - color.y = x_855; - let x_487 : vec2 = vec2(x_449.z, x_449.y); - let x_856 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_856; - let x_280 : i32 = obj.numbers[6u]; - let x_857 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_857; - let x_858 : i32 = i_2; - i_2 = 0i; - i_2 = x_858; - let x_859 : i32 = obj.numbers[4i]; - obj.numbers[4i] = 0i; - obj.numbers[4i] = x_859; - let x_488 : vec2 = vec2(x_473.z, x_473.y); - let x_283 : f32 = color.y; - let x_860 : vec2 = uv; - uv = vec2(0.0f, 0.0f); - uv = x_860; - let x_861 : f32 = color.x; - color.x = 0.0f; - color.x = x_861; - let x_489 : vec2 = vec2(x_475.y, x_475.x); - let x_862 : i32 = obj.numbers[6u]; - obj.numbers[6u] = 0i; - obj.numbers[6u] = x_862; - let x_863 : i32 = obj.numbers[6u]; - obj.numbers[6u] = 0i; - obj.numbers[6u] = x_863; - let x_490 : vec2 = vec2(x_480.z, x_480.z); - let x_864 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_864; - color.y = (f32(x_280) + x_283); - let x_865 : f32 = color.x; - color.x = 0.0f; - color.x = x_865; - let x_491 : vec2 = vec2(vec3(1.0f, 2.0f, 3.0f).y, x_454.x); - let x_866 : f32 = color.y; - color.y = 0.0f; - color.y = x_866; - } - let x_492 : vec2 = vec2(x_455.y, x_455.y); - let x_867 : f32 = color.x; - color.x = 0.0f; - color.x = x_867; - let x_287 : f32 = uv.y; - let x_868 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_868; - let x_493 : vec2 = vec2(x_475.x, x_475.y); - let x_869 : f32 = uv[0i]; - uv[0i] = 0.0f; - uv[0i] = x_869; - let x_870 : f32 = color.y; - color.y = 0.0f; - color.y = x_870; - let x_494 : vec3 = vec3(x_191.x, x_191.y, x_191.y); - let x_871 : i32 = obj.numbers[4i]; - obj.numbers[4i] = 0i; - obj.numbers[4i] = x_871; - if ((x_287 > 0.75f)) { - let x_872 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - color = x_872; - let x_873 : f32 = color.x; - color.x = 0.0f; - color.x = x_873; - let x_495 : vec3 = vec3(x_192.y, x_192.x, x_192.y); - let x_874 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - color = x_874; - let x_293 : i32 = obj.numbers[7i]; - let x_875 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_875; - let x_496 : vec3 = vec3(x_475.x, x_467.y, x_467.x); - let x_876 : f32 = color.y; - color.y = 0.0f; - color.y = x_876; - let x_497 : vec2 = vec2(x_477.x, x_461.y); - let x_877 : i32 = obj.numbers[0u]; - obj.numbers[0u] = 0i; - obj.numbers[0u] = x_877; - let x_878 : f32 = color.y; - color.y = 0.0f; - color.y = x_878; - let x_498 : vec3 = vec3(x_478.x, x_478.y, x_478.x); - let x_879 : f32 = color.x; - color.x = 0.0f; - color.x = x_879; - let x_296 : f32 = color.z; - let x_880 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_880; - let x_499 : vec2 = vec2(x_184.x, x_184.y); - let x_881 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_881; - let x_882 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_882; - let x_883 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_883; - let x_500 : vec3 = vec3(x_499.y, x_499.y, x_494.z); - let x_884 : f32 = color.z; - color.z = 0.0f; - color.z = x_884; - color.z = (f32(x_293) + x_296); - let x_885 : f32 = color.y; - color.y = 0.0f; - color.y = x_885; - let x_501 : vec2 = vec2(x_453.x, x_453.z); - let x_886 : f32 = color.x; - color.x = 0.0f; - color.x = x_886; - } - let x_887 : i32 = i_2; - i_2 = 0i; - i_2 = x_887; - let x_502 : vec2 = vec2(x_451.y, x_192.y); - let x_888 : vec2 = uv; - uv = vec2(0.0f, 0.0f); - uv = x_888; - let x_301 : i32 = obj.numbers[8i]; - let x_889 : i32 = i_2; - i_2 = 0i; - i_2 = x_889; - let x_503 : vec2 = vec2(x_185.x, x_451.z); - let x_890 : i32 = obj.numbers[8i]; - obj.numbers[8i] = 0i; - obj.numbers[8i] = x_890; - let x_891 : f32 = color.y; - color.y = 0.0f; - color.y = x_891; - let x_504 : vec2 = vec2(x_453.y, vec2().x); - let x_892 : f32 = color.x; - color.x = 0.0f; - color.x = x_892; - let x_505 : vec3 = vec3(x_504.x, x_504.y, x_504.x); - let x_893 : f32 = color.z; - color.z = 0.0f; - color.z = x_893; - let x_304 : f32 = color.z; - let x_894 : f32 = color.x; - color.x = 0.0f; - color.x = x_894; - let x_506 : vec2 = vec2(x_493.x, x_492.x); - let x_895 : i32 = obj.numbers[4i]; - obj.numbers[4i] = 0i; - obj.numbers[4i] = x_895; - let x_896 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_896; - let x_507 : vec2 = vec2(x_461.x, x_447.x); - let x_897 : f32 = color.y; - color.y = 0.0f; - color.y = x_897; - color.z = (x_304 + f32(x_301)); - let x_898 : vec2 = uv; - uv = vec2(0.0f, 0.0f); - uv = x_898; - let x_899 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_899; - let x_508 : vec3 = vec3(x_461.y, x_461.x, x_506.y); - let x_900 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_900; - let x_308 : f32 = uv.x; - let x_901 : f32 = color.y; - color.y = 0.0f; - color.y = x_901; - let x_509 : vec3 = vec3(x_503.y, x_503.x, x_448.z); - let x_902 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_902; - let x_310 : f32 = uv.y; - let x_903 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_903; - let x_904 : f32 = color.z; - color.z = 0.0f; - color.z = x_904; - let x_510 : vec3 = vec3(vec3(1.0f, 2.0f, 3.0f).y, x_485.y, x_485.z); - let x_905 : f32 = color.z; - color.z = 0.0f; - color.z = x_905; - let x_906 : i32 = i_2; - i_2 = 0i; - i_2 = x_906; - let x_511 : vec2 = vec2(x_485.z, x_485.y); - let x_907 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - color = x_907; - let x_908 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_908; - let x_512 : vec3 = vec3(x_455.y, x_455.y, x_455.y); - let x_909 : i32 = obj.numbers[4i]; - obj.numbers[4i] = 0i; - obj.numbers[4i] = x_909; - if ((abs((x_308 - x_310)) < 0.25f)) { - let x_910 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_910; - let x_911 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_911; - let x_513 : vec3 = vec3(x_505.z, x_505.x, x_448.x); - let x_912 : i32 = obj.numbers[8i]; - obj.numbers[8i] = 0i; - obj.numbers[8i] = x_912; - let x_317 : i32 = obj.numbers[9u]; - let x_514 : vec3 = vec3(x_474.y, x_474.y, x_474.y); - let x_913 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_913; - let x_320 : f32 = color.x; - let x_914 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_914; - let x_515 : vec2 = vec2(x_502.x, x_502.y); - let x_915 : f32 = color.x; - color.x = 0.0f; - color.x = x_915; - let x_916 : vec3 = color; - color = vec3(0.0f, 0.0f, 0.0f); - color = x_916; - let x_516 : vec2 = vec2(x_452.x, x_452.x); - let x_917 : vec2 = uv; - uv = vec2(0.0f, 0.0f); - uv = x_917; - let x_918 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_918; - let x_517 : vec3 = vec3(vec2().x, vec2().x, vec2().y); - color.x = (f32(x_317) + x_320); - let x_919 : f32 = color.x; - color.x = 0.0f; - color.x = x_919; - let x_518 : vec3 = vec3(x_480.y, x_508.x, x_480.x); - let x_920 : f32 = color.x; - color.x = 0.0f; - color.x = x_920; - } - let x_921 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_921; - let x_325 : vec3 = color; - let x_922 : f32 = uv[0i]; - uv[0i] = 0.0f; - uv[0i] = x_922; - let x_519 : vec3 = vec3(x_447.x, x_446.x, x_446.y); - let x_326 : vec3 = normalize(x_325); - let x_923 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_923; - let x_924 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_924; - let x_925 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_925; - let x_926 : f32 = color.y; - color.y = 0.0f; - color.y = x_926; - let x_520 : vec2 = vec2(x_506.y, x_519.y); - let x_927 : f32 = color.y; - color.y = 0.0f; - color.y = x_927; - let x_330 : vec4 = vec4(x_326.x, x_326.y, x_326.z, 1.0f); - let x_928 : f32 = uv.y; - uv.y = 0.0f; - uv.y = x_928; - let x_521 : vec3 = vec3(vec3(1.0f, 2.0f, 3.0f).y, vec3(1.0f, 2.0f, 3.0f).y, x_520.y); - let x_929 : f32 = uv.x; - uv.x = 0.0f; - uv.x = x_929; - x_GLF_color = x_330; - let x_930 : QuicksortObject = obj; - obj = QuicksortObject(array(0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i, 0i)); - obj = x_930; - let x_522 : vec3 = vec3(x_330.w, x_330.y, x_493.x); - let x_931 : f32 = color.x; - color.x = 0.0f; - color.x = x_931; - return; -} - -struct main_out { - @location(0) - x_GLF_color_1 : vec4, -} - -@fragment -fn main(@builtin(position) gl_FragCoord_param : vec4) -> main_out { - gl_FragCoord = gl_FragCoord_param; - main_1(); - return main_out(x_GLF_color); -} +SKIP: triggers crbug.com/tint/98 diff --git a/test/tint/bug/tint/943.spvasm.expected.dxc.hlsl b/test/tint/bug/tint/943.spvasm.expected.dxc.hlsl index ae58a78045..fa4c723a14 100644 --- a/test/tint/bug/tint/943.spvasm.expected.dxc.hlsl +++ b/test/tint/bug/tint/943.spvasm.expected.dxc.hlsl @@ -18,17 +18,17 @@ ByteAddressBuffer x_185 : register(t2, space0); bool coordsInBounds_vi2_vi2_(inout int2 coord, inout int2 shape) { bool x_87 = false; - bool x_88_phi = false; + bool x_88 = false; const int2 x_76 = coord; const bool x_81 = all((x_76 >= (0).xx)); - x_88_phi = x_81; + x_88 = x_81; if (x_81) { const int2 x_84 = coord; const int2 x_85 = shape; x_87 = all((x_84 < x_85)); - x_88_phi = x_87; + x_88 = x_87; } - return x_88_phi; + return x_88; } float mm_readA_i1_i1_(inout int row, inout int col) { @@ -286,7 +286,7 @@ void mm_matMul_i1_i1_i1_(inout int dimAOuter, inout int dimInner, inout int dimB innerCol_4 = 0; [loop] while (true) { bool x_393 = false; - bool x_394_phi = false; + bool x_394 = false; if ((innerCol_4 < 1)) { } else { break; @@ -295,15 +295,15 @@ void mm_matMul_i1_i1_i1_(inout int dimAOuter, inout int dimInner, inout int dimB const int x_383 = innerCol_4; const int x_385 = dimBOuter; const bool x_386 = ((x_382 + x_383) < x_385); - x_394_phi = x_386; + x_394 = x_386; if (x_386) { const int x_389 = globalRow; const int x_390 = innerRow_4; const int x_392 = dimAOuter; x_393 = ((x_389 + x_390) < x_392); - x_394_phi = x_393; + x_394 = x_393; } - if (x_394_phi) { + if (x_394) { const int x_400 = globalCol; const int x_401 = innerCol_4; const int x_403 = innerRow_4; diff --git a/test/tint/bug/tint/943.spvasm.expected.fxc.hlsl b/test/tint/bug/tint/943.spvasm.expected.fxc.hlsl index ae58a78045..fa4c723a14 100644 --- a/test/tint/bug/tint/943.spvasm.expected.fxc.hlsl +++ b/test/tint/bug/tint/943.spvasm.expected.fxc.hlsl @@ -18,17 +18,17 @@ ByteAddressBuffer x_185 : register(t2, space0); bool coordsInBounds_vi2_vi2_(inout int2 coord, inout int2 shape) { bool x_87 = false; - bool x_88_phi = false; + bool x_88 = false; const int2 x_76 = coord; const bool x_81 = all((x_76 >= (0).xx)); - x_88_phi = x_81; + x_88 = x_81; if (x_81) { const int2 x_84 = coord; const int2 x_85 = shape; x_87 = all((x_84 < x_85)); - x_88_phi = x_87; + x_88 = x_87; } - return x_88_phi; + return x_88; } float mm_readA_i1_i1_(inout int row, inout int col) { @@ -286,7 +286,7 @@ void mm_matMul_i1_i1_i1_(inout int dimAOuter, inout int dimInner, inout int dimB innerCol_4 = 0; [loop] while (true) { bool x_393 = false; - bool x_394_phi = false; + bool x_394 = false; if ((innerCol_4 < 1)) { } else { break; @@ -295,15 +295,15 @@ void mm_matMul_i1_i1_i1_(inout int dimAOuter, inout int dimInner, inout int dimB const int x_383 = innerCol_4; const int x_385 = dimBOuter; const bool x_386 = ((x_382 + x_383) < x_385); - x_394_phi = x_386; + x_394 = x_386; if (x_386) { const int x_389 = globalRow; const int x_390 = innerRow_4; const int x_392 = dimAOuter; x_393 = ((x_389 + x_390) < x_392); - x_394_phi = x_393; + x_394 = x_393; } - if (x_394_phi) { + if (x_394) { const int x_400 = globalCol; const int x_401 = innerCol_4; const int x_403 = innerRow_4; diff --git a/test/tint/bug/tint/943.spvasm.expected.glsl b/test/tint/bug/tint/943.spvasm.expected.glsl index 2a9acbb0b7..c563931fdd 100644 --- a/test/tint/bug/tint/943.spvasm.expected.glsl +++ b/test/tint/bug/tint/943.spvasm.expected.glsl @@ -41,17 +41,17 @@ layout(binding = 2, std430) buffer ssbB_ssbo { bool coordsInBounds_vi2_vi2_(inout ivec2 coord, inout ivec2 shape) { bool x_87 = false; - bool x_88_phi = false; + bool x_88 = false; ivec2 x_76 = coord; bool x_81 = all(greaterThanEqual(x_76, ivec2(0))); - x_88_phi = x_81; + x_88 = x_81; if (x_81) { ivec2 x_84 = coord; ivec2 x_85 = shape; x_87 = all(lessThan(x_84, x_85)); - x_88_phi = x_87; + x_88 = x_87; } - return x_88_phi; + return x_88; } float mm_readA_i1_i1_(inout int row, inout int col) { @@ -309,7 +309,7 @@ void mm_matMul_i1_i1_i1_(inout int dimAOuter, inout int dimInner, inout int dimB innerCol_4 = 0; while (true) { bool x_393 = false; - bool x_394_phi = false; + bool x_394 = false; if ((innerCol_4 < 1)) { } else { break; @@ -318,15 +318,15 @@ void mm_matMul_i1_i1_i1_(inout int dimAOuter, inout int dimInner, inout int dimB int x_383 = innerCol_4; int x_385 = dimBOuter; bool x_386 = ((x_382 + x_383) < x_385); - x_394_phi = x_386; + x_394 = x_386; if (x_386) { int x_389 = globalRow; int x_390 = innerRow_4; int x_392 = dimAOuter; x_393 = ((x_389 + x_390) < x_392); - x_394_phi = x_393; + x_394 = x_393; } - if (x_394_phi) { + if (x_394) { int x_400 = globalCol; int x_401 = innerCol_4; int x_403 = innerRow_4; diff --git a/test/tint/bug/tint/943.spvasm.expected.msl b/test/tint/bug/tint/943.spvasm.expected.msl index 48563e2c00..6894c3f7d0 100644 --- a/test/tint/bug/tint/943.spvasm.expected.msl +++ b/test/tint/bug/tint/943.spvasm.expected.msl @@ -43,17 +43,16 @@ struct ssbB { bool coordsInBounds_vi2_vi2_(thread int2* const coord, thread int2* const shape) { bool x_87 = false; - bool x_88_phi = false; + bool x_88 = false; int2 const x_76 = *(coord); bool const x_81 = all((x_76 >= int2(0))); - x_88_phi = x_81; + x_88 = x_81; if (x_81) { int2 const x_84 = *(coord); int2 const x_85 = *(shape); x_87 = all((x_84 < x_85)); - x_88_phi = x_87; + x_88 = x_87; } - bool const x_88 = x_88_phi; return x_88; } @@ -419,7 +418,7 @@ void mm_matMul_i1_i1_i1_(thread int* const dimAOuter, thread int* const dimInner innerCol_4 = 0; while (true) { bool x_393 = false; - bool x_394_phi = false; + bool x_394 = false; int const x_380 = innerCol_4; if ((x_380 < 1)) { } else { @@ -429,15 +428,14 @@ void mm_matMul_i1_i1_i1_(thread int* const dimAOuter, thread int* const dimInner int const x_383 = innerCol_4; int const x_385 = *(dimBOuter); bool const x_386 = (as_type((as_type(x_382) + as_type(x_383))) < x_385); - x_394_phi = x_386; + x_394 = x_386; if (x_386) { int const x_389 = globalRow; int const x_390 = innerRow_4; int const x_392 = *(dimAOuter); x_393 = (as_type((as_type(x_389) + as_type(x_390))) < x_392); - x_394_phi = x_393; + x_394 = x_393; } - bool const x_394 = x_394_phi; if (x_394) { int const x_397 = globalRow; int const x_398 = innerRow_4; diff --git a/test/tint/bug/tint/943.spvasm.expected.spvasm b/test/tint/bug/tint/943.spvasm.expected.spvasm index f177fa1d19..5022f2dfb5 100644 --- a/test/tint/bug/tint/943.spvasm.expected.spvasm +++ b/test/tint/bug/tint/943.spvasm.expected.spvasm @@ -41,7 +41,7 @@ note: reading from module-scope private variable 'dimInner_1' may result in a no OpName %coord "coord" OpName %shape "shape" OpName %x_87 "x_87" - OpName %x_88_phi "x_88_phi" + OpName %x_88 "x_88" OpName %mm_readA_i1_i1_ "mm_readA_i1_i1_" OpName %row "row" OpName %col "col" @@ -118,7 +118,7 @@ note: reading from module-scope private variable 'dimInner_1' may result in a no OpName %param_8 "param_8" OpName %param_9 "param_9" OpName %x_393 "x_393" - OpName %x_394_phi "x_394_phi" + OpName %x_394 "x_394" OpName %main_1 "main_1" OpName %param_18 "param_18" OpName %param_19 "param_19" @@ -250,11 +250,11 @@ note: reading from module-scope private variable 'dimInner_1' may result in a no %shape = OpFunctionParameter %_ptr_Function_v2int %51 = OpLabel %x_87 = OpVariable %_ptr_Function_bool Function %54 - %x_88_phi = OpVariable %_ptr_Function_bool Function %54 + %x_88 = OpVariable %_ptr_Function_bool Function %54 %57 = OpLoad %v2int %coord %60 = OpSGreaterThanEqual %v2bool %57 %59 %58 = OpAll %bool %60 - OpStore %x_88_phi %58 + OpStore %x_88 %58 OpSelectionMerge %62 None OpBranchConditional %58 %63 %62 %63 = OpLabel @@ -264,10 +264,10 @@ note: reading from module-scope private variable 'dimInner_1' may result in a no %68 = OpAll %bool %69 OpStore %x_87 %68 %70 = OpLoad %bool %x_87 - OpStore %x_88_phi %70 + OpStore %x_88 %70 OpBranch %62 %62 = OpLabel - %71 = OpLoad %bool %x_88_phi + %71 = OpLoad %bool %x_88 OpReturnValue %71 OpFunctionEnd %mm_readA_i1_i1_ = OpFunction %float None %72 @@ -477,7 +477,7 @@ note: reading from module-scope private variable 'dimInner_1' may result in a no %param_8 = OpVariable %_ptr_Function_int Function %11 %param_9 = OpVariable %_ptr_Function_float Function %83 %x_393 = OpVariable %_ptr_Function_bool Function %54 - %x_394_phi = OpVariable %_ptr_Function_bool Function %54 + %x_394 = OpVariable %_ptr_Function_bool Function %54 %294 = OpAccessChain %_ptr_Private_uint %gl_LocalInvocationID %uint_1 %295 = OpLoad %uint %294 %296 = OpBitcast %int %295 @@ -869,7 +869,7 @@ note: reading from module-scope private variable 'dimInner_1' may result in a no %539 = OpLoad %int %dimBOuter %540 = OpIAdd %int %536 %537 %541 = OpSLessThan %bool %540 %539 - OpStore %x_394_phi %541 + OpStore %x_394 %541 OpSelectionMerge %542 None OpBranchConditional %541 %543 %542 %543 = OpLabel @@ -880,10 +880,10 @@ note: reading from module-scope private variable 'dimInner_1' may result in a no %549 = OpSLessThan %bool %548 %547 OpStore %x_393 %549 %550 = OpLoad %bool %x_393 - OpStore %x_394_phi %550 + OpStore %x_394 %550 OpBranch %542 %542 = OpLabel - %551 = OpLoad %bool %x_394_phi + %551 = OpLoad %bool %x_394 OpSelectionMerge %552 None OpBranchConditional %551 %553 %552 %553 = OpLabel diff --git a/test/tint/bug/tint/943.spvasm.expected.wgsl b/test/tint/bug/tint/943.spvasm.expected.wgsl index 645db5af61..fbb2eba486 100644 --- a/test/tint/bug/tint/943.spvasm.expected.wgsl +++ b/test/tint/bug/tint/943.spvasm.expected.wgsl @@ -61,17 +61,16 @@ var batch : i32; fn coordsInBounds_vi2_vi2_(coord : ptr>, shape : ptr>) -> bool { var x_87 : bool; - var x_88_phi : bool; + var x_88 : bool; let x_76 : vec2 = *(coord); let x_81 : bool = all((x_76 >= vec2(0i, 0i))); - x_88_phi = x_81; + x_88 = x_81; if (x_81) { let x_84 : vec2 = *(coord); let x_85 : vec2 = *(shape); x_87 = all((x_84 < x_85)); - x_88_phi = x_87; + x_88 = x_87; } - let x_88 : bool = x_88_phi; return x_88; } @@ -448,7 +447,7 @@ fn mm_matMul_i1_i1_i1_(dimAOuter : ptr, dimInner : ptr, dimInner : ptr