tint: Implement constant expression structures
Bug: tint:1611
Change-Id: Id04c31ade297a68e7e2941efafbd812ba631fc41
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/95946
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/src/tint/resolver/resolver.cc b/src/tint/resolver/resolver.cc
index 9891f29..12fca5a 100644
--- a/src/tint/resolver/resolver.cc
+++ b/src/tint/resolver/resolver.cc
@@ -1943,13 +1943,13 @@
sem::Expression* Resolver::MemberAccessor(const ast::MemberAccessorExpression* expr) {
auto* structure = sem_.TypeOf(expr->structure);
auto* storage_ty = structure->UnwrapRef();
- auto* source_var = sem_.Get(expr->structure)->SourceVariable();
+ auto* object = sem_.Get(expr->structure);
+ auto* source_var = object->SourceVariable();
const sem::Type* ret = nullptr;
std::vector<uint32_t> swizzle;
// Object may be a side-effecting expression (e.g. function call).
- auto* object = sem_.Get(expr->structure);
bool has_side_effects = object && object->HasSideEffects();
if (auto* str = storage_ty->As<sem::Struct>()) {
@@ -1976,7 +1976,7 @@
ret = builder_->create<sem::Reference>(ret, ref->StorageClass(), ref->Access());
}
- sem::Constant* val = nullptr; // TODO(crbug.com/tint/1611): Add structure support.
+ auto* val = EvaluateMemberAccessValue(object, member);
return builder_->create<sem::StructMemberAccess>(expr, ret, current_statement_, val, object,
member, has_side_effects, source_var);
}
diff --git a/src/tint/resolver/resolver.h b/src/tint/resolver/resolver.h
index 9a9811f..20f487c 100644
--- a/src/tint/resolver/resolver.h
+++ b/src/tint/resolver/resolver.h
@@ -66,6 +66,7 @@
class IfStatement;
class LoopStatement;
class Statement;
+class StructMember;
class SwitchStatement;
class TypeConstructor;
class WhileStatement;
@@ -218,6 +219,8 @@
const sem::Type* ty); // Note: ty is not an array or structure
const sem::Constant* EvaluateIndexValue(const sem::Expression* obj, const sem::Expression* idx);
const sem::Constant* EvaluateLiteralValue(const ast::LiteralExpression*, const sem::Type*);
+ const sem::Constant* EvaluateMemberAccessValue(const sem::Expression* obj,
+ const sem::StructMember* member);
const sem::Constant* EvaluateSwizzleValue(const sem::Expression* vector,
const sem::Type* type,
const std::vector<uint32_t>& indices);
diff --git a/src/tint/resolver/resolver_constants.cc b/src/tint/resolver/resolver_constants.cc
index 798d116..c5798be 100644
--- a/src/tint/resolver/resolver_constants.cc
+++ b/src/tint/resolver/resolver_constants.cc
@@ -22,6 +22,7 @@
#include "src/tint/sem/member_accessor_expression.h"
#include "src/tint/sem/type_constructor.h"
#include "src/tint/utils/compiler_macros.h"
+#include "src/tint/utils/map.h"
#include "src/tint/utils/transform.h"
using namespace tint::number_suffixes; // NOLINT
@@ -277,6 +278,24 @@
}
return nullptr;
},
+ [&](const sem::Struct* s) -> const Constant* {
+ std::unordered_map<sem::Type*, const Constant*> zero_by_type;
+ std::vector<const Constant*> zeros;
+ zeros.reserve(s->Members().size());
+ for (auto* member : s->Members()) {
+ auto* zero = utils::GetOrCreate(zero_by_type, member->Type(),
+ [&] { return ZeroValue(builder, member->Type()); });
+ if (!zero) {
+ return nullptr;
+ }
+ zeros.emplace_back(zero);
+ }
+ if (zero_by_type.size() == 1) {
+ // All members were of the same type, so the zero value is the same for all members.
+ return builder.create<Splat>(type, zeros[0], s->Members().size());
+ }
+ return CreateComposite(builder, s, std::move(zeros));
+ },
[&](Default) -> const Constant* {
return TypeDispatch(type, [&](auto zero) -> const Constant* {
return CreateElement(builder, type, zero);
@@ -335,6 +354,9 @@
bool all_equal = true;
auto* first = elements.front();
for (auto* el : elements) {
+ if (!el) {
+ return nullptr;
+ }
if (!any_zero && el->AnyZero()) {
any_zero = true;
}
@@ -395,13 +417,7 @@
return ZeroValue(*builder_, ty);
}
- uint32_t el_count = 0;
- auto* el_ty = sem::Type::ElementOf(ty, &el_count);
- if (!el_ty) {
- return nullptr; // Target type does not support constant values
- }
-
- if (args.size() == 1) {
+ if (auto* el_ty = sem::Type::ElementOf(ty); el_ty && args.size() == 1) {
// Type constructor or conversion that takes a single argument.
auto& src = args[0]->Declaration()->source;
auto* arg = static_cast<const Constant*>(args[0]->ConstantValue());
@@ -431,33 +447,25 @@
return nullptr;
}
- // Multiple arguments. Must be a type constructor.
-
- std::vector<const Constant*> els; // The constant elements for the composite constant.
- els.reserve(std::min<uint32_t>(el_count, 256u)); // min() as el_count is unbounded input
-
// Helper for pushing all the argument constants to `els`.
- auto push_all_args = [&] {
- for (auto* expr : args) {
- auto* arg = static_cast<const Constant*>(expr->ConstantValue());
- if (!arg) {
- return;
- }
- els.emplace_back(arg);
- }
+ auto args_as_constants = [&] {
+ return utils::Transform(
+ args, [&](auto* expr) { return static_cast<const Constant*>(expr->ConstantValue()); });
};
- // TODO(crbug.com/tint/1611): Add structure support.
+ // Multiple arguments. Must be a type constructor.
- Switch(
+ return Switch(
ty, // What's the target type being constructed?
- [&](const sem::Vector*) {
+ [&](const sem::Vector*) -> const Constant* {
// Vector can be constructed with a mix of scalars / abstract numerics and smaller
// vectors.
+ std::vector<const Constant*> els;
+ els.reserve(args.size());
for (auto* expr : args) {
auto* arg = static_cast<const Constant*>(expr->ConstantValue());
if (!arg) {
- return;
+ return nullptr;
}
auto* arg_ty = arg->Type();
if (auto* arg_vec = arg_ty->As<sem::Vector>()) {
@@ -465,7 +473,7 @@
for (uint32_t i = 0; i < arg_vec->Width(); i++) {
auto* el = static_cast<const Constant*>(arg->Index(i));
if (!el) {
- return;
+ return nullptr;
}
els.emplace_back(el);
}
@@ -473,12 +481,15 @@
els.emplace_back(arg);
}
}
+ return CreateComposite(*builder_, ty, std::move(els));
},
- [&](const sem::Matrix* m) {
+ [&](const sem::Matrix* m) -> const Constant* {
// Matrix can be constructed with a set of scalars / abstract numerics, or column
// vectors.
if (args.size() == m->columns() * m->rows()) {
// Matrix built from scalars / abstract numerics
+ std::vector<const Constant*> els;
+ els.reserve(args.size());
for (uint32_t c = 0; c < m->columns(); c++) {
std::vector<const Constant*> column;
column.reserve(m->rows());
@@ -486,28 +497,25 @@
auto* arg =
static_cast<const Constant*>(args[r + c * m->rows()]->ConstantValue());
if (!arg) {
- return;
+ return nullptr;
}
column.emplace_back(arg);
}
els.push_back(CreateComposite(*builder_, m->ColumnType(), std::move(column)));
}
- } else if (args.size() == m->columns()) {
- // Matrix built from column vectors
- push_all_args();
+ return CreateComposite(*builder_, ty, std::move(els));
}
+ // Matrix built from column vectors
+ return CreateComposite(*builder_, ty, args_as_constants());
},
[&](const sem::Array*) {
// Arrays must be constructed using a list of elements
- push_all_args();
+ return CreateComposite(*builder_, ty, args_as_constants());
+ },
+ [&](const sem::Struct*) {
+ // Structures must be constructed using a list of elements
+ return CreateComposite(*builder_, ty, args_as_constants());
});
-
- if (els.size() != el_count) {
- // If the number of constant elements doesn't match the type, then something went wrong.
- return nullptr;
- }
- // Construct and return either a Composite or Splat.
- return CreateComposite(*builder_, ty, std::move(els));
}
const sem::Constant* Resolver::EvaluateIndexValue(const sem::Expression* obj_expr,
@@ -538,6 +546,15 @@
return obj_val->Index(static_cast<size_t>(idx));
}
+const sem::Constant* Resolver::EvaluateMemberAccessValue(const sem::Expression* obj_expr,
+ const sem::StructMember* member) {
+ auto obj_val = obj_expr->ConstantValue();
+ if (!obj_val) {
+ return {};
+ }
+ return obj_val->Index(static_cast<size_t>(member->Index()));
+}
+
const sem::Constant* Resolver::EvaluateSwizzleValue(const sem::Expression* vec_expr,
const sem::Type* type,
const std::vector<uint32_t>& indices) {
@@ -546,7 +563,7 @@
return nullptr;
}
if (indices.size() == 1) {
- return static_cast<const Constant*>(vec_val->Index(indices[0]));
+ return static_cast<const Constant*>(vec_val->Index(static_cast<size_t>(indices[0])));
} else {
auto values = utils::Transform(
indices, [&](uint32_t i) { return static_cast<const Constant*>(vec_val->Index(i)); });
diff --git a/src/tint/resolver/resolver_constants_test.cc b/src/tint/resolver/resolver_constants_test.cc
index b8ef1b1..1774a16 100644
--- a/src/tint/resolver/resolver_constants_test.cc
+++ b/src/tint/resolver/resolver_constants_test.cc
@@ -84,6 +84,7 @@
TEST_F(ResolverConstantsTest, Scalar_f16) {
Enable(ast::Extension::kF16);
+
auto* expr = Expr(9.9_h);
WrapInFunction(expr);
@@ -217,6 +218,7 @@
TEST_F(ResolverConstantsTest, Vec3_ZeroInit_f16) {
Enable(ast::Extension::kF16);
+
auto* expr = vec3<f16>();
WrapInFunction(expr);
@@ -383,6 +385,7 @@
TEST_F(ResolverConstantsTest, Vec3_Splat_f16) {
Enable(ast::Extension::kF16);
+
auto* expr = vec3<f16>(9.9_h);
WrapInFunction(expr);
@@ -550,6 +553,7 @@
TEST_F(ResolverConstantsTest, Vec3_FullConstruct_f16) {
Enable(ast::Extension::kF16);
+
auto* expr = vec3<f16>(1_h, 2_h, 3_h);
WrapInFunction(expr);
@@ -848,6 +852,7 @@
TEST_F(ResolverConstantsTest, Vec3_MixConstruct_f16) {
Enable(ast::Extension::kF16);
+
auto* expr = vec3<f16>(1_h, vec2<f16>(2_h, 3_h));
WrapInFunction(expr);
@@ -882,6 +887,7 @@
TEST_F(ResolverConstantsTest, Vec3_MixConstruct_f16_all_10) {
Enable(ast::Extension::kF16);
+
auto* expr = vec3<f16>(10_h, vec2<f16>(10_h, 10_h));
WrapInFunction(expr);
@@ -916,6 +922,7 @@
TEST_F(ResolverConstantsTest, Vec3_MixConstruct_f16_all_positive_0) {
Enable(ast::Extension::kF16);
+
auto* expr = vec3<f16>(0_h, vec2<f16>(0_h, 0_h));
WrapInFunction(expr);
@@ -950,6 +957,7 @@
TEST_F(ResolverConstantsTest, Vec3_MixConstruct_f16_all_negative_0) {
Enable(ast::Extension::kF16);
+
auto* expr = vec3<f16>(vec2<f16>(-0_h, -0_h), -0_h);
WrapInFunction(expr);
@@ -984,6 +992,7 @@
TEST_F(ResolverConstantsTest, Vec3_MixConstruct_f16_mixed_sign_0) {
Enable(ast::Extension::kF16);
+
auto* expr = vec3<f16>(0_h, vec2<f16>(-0_h, 0_h));
WrapInFunction(expr);
@@ -1183,6 +1192,7 @@
TEST_F(ResolverConstantsTest, Vec3_Convert_f16_to_i32) {
Enable(ast::Extension::kF16);
+
auto* expr = vec3<i32>(vec3<f16>(1.1_h, 2.2_h, 3.3_h));
WrapInFunction(expr);
@@ -1217,6 +1227,7 @@
TEST_F(ResolverConstantsTest, Vec3_Convert_u32_to_f16) {
Enable(ast::Extension::kF16);
+
auto* expr = vec3<f16>(vec3<u32>(10_u, 20_u, 30_u));
WrapInFunction(expr);
@@ -1715,6 +1726,48 @@
EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(2)->As<f32>(), 0_f);
}
+TEST_F(ResolverConstantsTest, Array_Struct_f32_Zero) {
+ Structure("S", {
+ Member("m1", ty.f32()),
+ Member("m2", ty.f32()),
+ });
+ auto* expr = Construct(ty.array(ty.type_name("S"), 2_u));
+ WrapInFunction(expr);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ auto* sem = Sem().Get(expr);
+ ASSERT_NE(sem, nullptr);
+ auto* arr = sem->Type()->As<sem::Array>();
+ ASSERT_NE(arr, nullptr);
+ EXPECT_TRUE(arr->ElemType()->Is<sem::Struct>());
+ EXPECT_EQ(arr->Count(), 2u);
+ EXPECT_TYPE(sem->ConstantValue()->Type(), sem->Type());
+ EXPECT_TRUE(sem->ConstantValue()->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->AllZero());
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Index(0)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Index(0)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Index(0)->AllZero());
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(0)->As<f32>(), 0_f);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Index(1)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Index(1)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Index(1)->AllZero());
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(1)->As<f32>(), 0_f);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Index(0)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Index(0)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Index(0)->AllZero());
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(0)->As<f32>(), 0_f);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Index(1)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Index(1)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Index(1)->AllZero());
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(1)->As<f32>(), 0_f);
+}
+
TEST_F(ResolverConstantsTest, Array_i32_Elements) {
auto* expr = Construct(ty.array<i32, 4>(), 10_i, 20_i, 30_i, 40_i);
WrapInFunction(expr);
@@ -1816,6 +1869,523 @@
EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(2)->As<f32>(), 6_f);
}
+TEST_F(ResolverConstantsTest, Array_Struct_f32_Elements) {
+ Structure("S", {
+ Member("m1", ty.f32()),
+ Member("m2", ty.f32()),
+ });
+ auto* expr = Construct(ty.array(ty.type_name("S"), 2_u), //
+ Construct(ty.type_name("S"), 1_f, 2_f), //
+ Construct(ty.type_name("S"), 3_f, 4_f));
+ WrapInFunction(expr);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ auto* sem = Sem().Get(expr);
+ ASSERT_NE(sem, nullptr);
+ auto* arr = sem->Type()->As<sem::Array>();
+ ASSERT_NE(arr, nullptr);
+ EXPECT_TRUE(arr->ElemType()->Is<sem::Struct>());
+ EXPECT_EQ(arr->Count(), 2u);
+ EXPECT_TYPE(sem->ConstantValue()->Type(), sem->Type());
+ EXPECT_FALSE(sem->ConstantValue()->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->AllZero());
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Index(0)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->Index(0)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->Index(0)->AllZero());
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(0)->As<f32>(), 1_f);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Index(1)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->Index(1)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->Index(1)->AllZero());
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(1)->As<f32>(), 2_f);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Index(0)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(1)->Index(0)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(1)->Index(0)->AllZero());
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(0)->As<f32>(), 3_f);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Index(1)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(1)->Index(1)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(1)->Index(1)->AllZero());
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(1)->As<f32>(), 4_f);
+}
+
+TEST_F(ResolverConstantsTest, Struct_I32s_ZeroInit) {
+ Structure("S", {Member("m1", ty.i32()), Member("m2", ty.i32()), Member("m3", ty.i32())});
+ auto* expr = Construct(ty.type_name("S"));
+ WrapInFunction(expr);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ auto* sem = Sem().Get(expr);
+ ASSERT_NE(sem, nullptr);
+ auto* str = sem->Type()->As<sem::Struct>();
+ ASSERT_NE(str, nullptr);
+ EXPECT_EQ(str->Members().size(), 3u);
+ ASSERT_NE(sem->ConstantValue(), nullptr);
+ EXPECT_TYPE(sem->ConstantValue()->Type(), sem->Type());
+ EXPECT_TRUE(sem->ConstantValue()->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->AllZero());
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Type()->Is<sem::I32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->As<i32>(), 0_i);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Type()->Is<sem::I32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->As<i32>(), 0_i);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->Type()->Is<sem::I32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(2)->As<i32>(), 0_i);
+}
+
+TEST_F(ResolverConstantsTest, Struct_MixedScalars_ZeroInit) {
+ Enable(ast::Extension::kF16);
+
+ Structure("S", {
+ Member("m1", ty.i32()),
+ Member("m2", ty.u32()),
+ Member("m3", ty.f32()),
+ Member("m4", ty.f16()),
+ Member("m5", ty.bool_()),
+ });
+ auto* expr = Construct(ty.type_name("S"));
+ WrapInFunction(expr);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ auto* sem = Sem().Get(expr);
+ ASSERT_NE(sem, nullptr);
+ auto* str = sem->Type()->As<sem::Struct>();
+ ASSERT_NE(str, nullptr);
+ EXPECT_EQ(str->Members().size(), 5u);
+ ASSERT_NE(sem->ConstantValue(), nullptr);
+ EXPECT_TYPE(sem->ConstantValue()->Type(), sem->Type());
+ EXPECT_FALSE(sem->ConstantValue()->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->AllZero());
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Type()->Is<sem::I32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->As<i32>(), 0_i);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Type()->Is<sem::U32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->As<u32>(), 0_u);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->Type()->Is<sem::F32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(2)->As<f32>(), 0._f);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(3)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(3)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(3)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(3)->Type()->Is<sem::F16>());
+ EXPECT_EQ(sem->ConstantValue()->Index(3)->As<f16>(), 0._h);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->Type()->Is<sem::Bool>());
+ EXPECT_EQ(sem->ConstantValue()->Index(4)->As<bool>(), false);
+}
+
+TEST_F(ResolverConstantsTest, Struct_VectorF32s_ZeroInit) {
+ Structure("S", {
+ Member("m1", ty.vec3<f32>()),
+ Member("m2", ty.vec3<f32>()),
+ Member("m3", ty.vec3<f32>()),
+ });
+ auto* expr = Construct(ty.type_name("S"));
+ WrapInFunction(expr);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ auto* sem = Sem().Get(expr);
+ ASSERT_NE(sem, nullptr);
+ auto* str = sem->Type()->As<sem::Struct>();
+ ASSERT_NE(str, nullptr);
+ EXPECT_EQ(str->Members().size(), 3u);
+ ASSERT_NE(sem->ConstantValue(), nullptr);
+ EXPECT_TYPE(sem->ConstantValue()->Type(), sem->Type());
+ EXPECT_TRUE(sem->ConstantValue()->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->AllZero());
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Type()->Is<sem::Vector>());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Type()->As<sem::Vector>()->type()->Is<sem::F32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(0)->As<f32>(), 0._f);
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(1)->As<f32>(), 0._f);
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(2)->As<f32>(), 0._f);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Type()->Is<sem::Vector>());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Type()->As<sem::Vector>()->type()->Is<sem::F32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(0)->As<f32>(), 0._f);
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(1)->As<f32>(), 0._f);
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(2)->As<f32>(), 0._f);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->Type()->Is<sem::Vector>());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->Type()->As<sem::Vector>()->type()->Is<sem::F32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(2)->Index(0)->As<f32>(), 0._f);
+ EXPECT_EQ(sem->ConstantValue()->Index(2)->Index(1)->As<f32>(), 0._f);
+ EXPECT_EQ(sem->ConstantValue()->Index(2)->Index(2)->As<f32>(), 0._f);
+}
+
+TEST_F(ResolverConstantsTest, Struct_MixedVectors_ZeroInit) {
+ Enable(ast::Extension::kF16);
+
+ Structure("S", {
+ Member("m1", ty.vec2<i32>()),
+ Member("m2", ty.vec3<u32>()),
+ Member("m3", ty.vec4<f32>()),
+ Member("m4", ty.vec3<f16>()),
+ Member("m5", ty.vec2<bool>()),
+ });
+ auto* expr = Construct(ty.type_name("S"));
+ WrapInFunction(expr);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ auto* sem = Sem().Get(expr);
+ ASSERT_NE(sem, nullptr);
+ auto* str = sem->Type()->As<sem::Struct>();
+ ASSERT_NE(str, nullptr);
+ EXPECT_EQ(str->Members().size(), 5u);
+ ASSERT_NE(sem->ConstantValue(), nullptr);
+ EXPECT_TYPE(sem->ConstantValue()->Type(), sem->Type());
+ EXPECT_FALSE(sem->ConstantValue()->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->AllZero());
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Type()->Is<sem::Vector>());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Type()->As<sem::Vector>()->type()->Is<sem::I32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(0)->As<i32>(), 0_i);
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(1)->As<i32>(), 0_i);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Type()->Is<sem::Vector>());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Type()->As<sem::Vector>()->type()->Is<sem::U32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(0)->As<u32>(), 0_u);
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(1)->As<u32>(), 0_u);
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(2)->As<u32>(), 0_u);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->Type()->Is<sem::Vector>());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->Type()->As<sem::Vector>()->type()->Is<sem::F32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(2)->Index(0)->As<f32>(), 0._f);
+ EXPECT_EQ(sem->ConstantValue()->Index(2)->Index(1)->As<f32>(), 0._f);
+ EXPECT_EQ(sem->ConstantValue()->Index(2)->Index(2)->As<f32>(), 0._f);
+ EXPECT_EQ(sem->ConstantValue()->Index(2)->Index(3)->As<f32>(), 0._f);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(3)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(3)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(3)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(3)->Type()->Is<sem::Vector>());
+ EXPECT_TRUE(sem->ConstantValue()->Index(3)->Type()->As<sem::Vector>()->type()->Is<sem::F16>());
+ EXPECT_EQ(sem->ConstantValue()->Index(3)->Index(0)->As<f16>(), 0._h);
+ EXPECT_EQ(sem->ConstantValue()->Index(3)->Index(1)->As<f16>(), 0._h);
+ EXPECT_EQ(sem->ConstantValue()->Index(3)->Index(2)->As<f16>(), 0._h);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->Type()->Is<sem::Vector>());
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->Type()->As<sem::Vector>()->type()->Is<sem::Bool>());
+ EXPECT_EQ(sem->ConstantValue()->Index(4)->Index(0)->As<bool>(), false);
+ EXPECT_EQ(sem->ConstantValue()->Index(4)->Index(1)->As<bool>(), false);
+}
+
+TEST_F(ResolverConstantsTest, Struct_Struct_ZeroInit) {
+ Structure("Inner", {
+ Member("m1", ty.i32()),
+ Member("m2", ty.u32()),
+ Member("m3", ty.f32()),
+ });
+
+ Structure("Outer", {
+ Member("m1", ty.type_name("Inner")),
+ Member("m2", ty.type_name("Inner")),
+ });
+ auto* expr = Construct(ty.type_name("Outer"));
+ WrapInFunction(expr);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ auto* sem = Sem().Get(expr);
+ ASSERT_NE(sem, nullptr);
+ auto* str = sem->Type()->As<sem::Struct>();
+ ASSERT_NE(str, nullptr);
+ EXPECT_EQ(str->Members().size(), 2u);
+ ASSERT_NE(sem->ConstantValue(), nullptr);
+ EXPECT_TYPE(sem->ConstantValue()->Type(), sem->Type());
+ EXPECT_TRUE(sem->ConstantValue()->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->AllZero());
+
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Type()->Is<sem::Struct>());
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(0)->As<i32>(), 0_i);
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(1)->As<u32>(), 0_u);
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(2)->As<f32>(), 0_f);
+
+ EXPECT_FALSE(sem->ConstantValue()->Index(1)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Type()->Is<sem::Struct>());
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(0)->As<i32>(), 0_i);
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(1)->As<u32>(), 0_u);
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(2)->As<f32>(), 0_f);
+}
+
+TEST_F(ResolverConstantsTest, Struct_MixedScalars_Construct) {
+ Enable(ast::Extension::kF16);
+
+ Structure("S", {
+ Member("m1", ty.i32()),
+ Member("m2", ty.u32()),
+ Member("m3", ty.f32()),
+ Member("m4", ty.f16()),
+ Member("m5", ty.bool_()),
+ });
+ auto* expr = Construct(ty.type_name("S"), 1_i, 2_u, 3_f, 4_h, false);
+ WrapInFunction(expr);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ auto* sem = Sem().Get(expr);
+ ASSERT_NE(sem, nullptr);
+ auto* str = sem->Type()->As<sem::Struct>();
+ ASSERT_NE(str, nullptr);
+ EXPECT_EQ(str->Members().size(), 5u);
+ ASSERT_NE(sem->ConstantValue(), nullptr);
+ EXPECT_TYPE(sem->ConstantValue()->Type(), sem->Type());
+ EXPECT_FALSE(sem->ConstantValue()->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->AllZero());
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Type()->Is<sem::I32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->As<i32>(), 1_i);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(1)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(1)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Type()->Is<sem::U32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->As<u32>(), 2_u);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(2)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(2)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->Type()->Is<sem::F32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(2)->As<f32>(), 3._f);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(3)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(3)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(3)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(3)->Type()->Is<sem::F16>());
+ EXPECT_EQ(sem->ConstantValue()->Index(3)->As<f16>(), 4._h);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->Type()->Is<sem::Bool>());
+ EXPECT_EQ(sem->ConstantValue()->Index(4)->As<bool>(), false);
+}
+
+TEST_F(ResolverConstantsTest, Struct_MixedVectors_Construct) {
+ Enable(ast::Extension::kF16);
+
+ Structure("S", {
+ Member("m1", ty.vec2<i32>()),
+ Member("m2", ty.vec3<u32>()),
+ Member("m3", ty.vec4<f32>()),
+ Member("m4", ty.vec3<f16>()),
+ Member("m5", ty.vec2<bool>()),
+ });
+ auto* expr = Construct(ty.type_name("S"), vec2<i32>(1_i), vec3<u32>(2_u), vec4<f32>(3_f),
+ vec3<f16>(4_h), vec2<bool>(false));
+ WrapInFunction(expr);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ auto* sem = Sem().Get(expr);
+ ASSERT_NE(sem, nullptr);
+ auto* str = sem->Type()->As<sem::Struct>();
+ ASSERT_NE(str, nullptr);
+ EXPECT_EQ(str->Members().size(), 5u);
+ ASSERT_NE(sem->ConstantValue(), nullptr);
+ EXPECT_TYPE(sem->ConstantValue()->Type(), sem->Type());
+ EXPECT_FALSE(sem->ConstantValue()->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->AllZero());
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Type()->Is<sem::Vector>());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Type()->As<sem::Vector>()->type()->Is<sem::I32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(0)->As<i32>(), 1_i);
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(1)->As<i32>(), 1_i);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(1)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(1)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Type()->Is<sem::Vector>());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Type()->As<sem::Vector>()->type()->Is<sem::U32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(0)->As<u32>(), 2_u);
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(1)->As<u32>(), 2_u);
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(2)->As<u32>(), 2_u);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(2)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(2)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->Type()->Is<sem::Vector>());
+ EXPECT_TRUE(sem->ConstantValue()->Index(2)->Type()->As<sem::Vector>()->type()->Is<sem::F32>());
+ EXPECT_EQ(sem->ConstantValue()->Index(2)->Index(0)->As<f32>(), 3._f);
+ EXPECT_EQ(sem->ConstantValue()->Index(2)->Index(1)->As<f32>(), 3._f);
+ EXPECT_EQ(sem->ConstantValue()->Index(2)->Index(2)->As<f32>(), 3._f);
+ EXPECT_EQ(sem->ConstantValue()->Index(2)->Index(3)->As<f32>(), 3._f);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(3)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(3)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(3)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(3)->Type()->Is<sem::Vector>());
+ EXPECT_TRUE(sem->ConstantValue()->Index(3)->Type()->As<sem::Vector>()->type()->Is<sem::F16>());
+ EXPECT_EQ(sem->ConstantValue()->Index(3)->Index(0)->As<f16>(), 4._h);
+ EXPECT_EQ(sem->ConstantValue()->Index(3)->Index(1)->As<f16>(), 4._h);
+ EXPECT_EQ(sem->ConstantValue()->Index(3)->Index(2)->As<f16>(), 4._h);
+
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->AnyZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->Type()->Is<sem::Vector>());
+ EXPECT_TRUE(sem->ConstantValue()->Index(4)->Type()->As<sem::Vector>()->type()->Is<sem::Bool>());
+ EXPECT_EQ(sem->ConstantValue()->Index(4)->Index(0)->As<bool>(), false);
+ EXPECT_EQ(sem->ConstantValue()->Index(4)->Index(1)->As<bool>(), false);
+}
+
+TEST_F(ResolverConstantsTest, Struct_Struct_Construct) {
+ Structure("Inner", {
+ Member("m1", ty.i32()),
+ Member("m2", ty.u32()),
+ Member("m3", ty.f32()),
+ });
+
+ Structure("Outer", {
+ Member("m1", ty.type_name("Inner")),
+ Member("m2", ty.type_name("Inner")),
+ });
+ auto* expr = Construct(ty.type_name("Outer"), //
+ Construct(ty.type_name("Inner"), 1_i, 2_u, 3_f),
+ Construct(ty.type_name("Inner"), 4_i, 0_u, 6_f));
+ WrapInFunction(expr);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ auto* sem = Sem().Get(expr);
+ ASSERT_NE(sem, nullptr);
+ auto* str = sem->Type()->As<sem::Struct>();
+ ASSERT_NE(str, nullptr);
+ EXPECT_EQ(str->Members().size(), 2u);
+ ASSERT_NE(sem->ConstantValue(), nullptr);
+ EXPECT_TYPE(sem->ConstantValue()->Type(), sem->Type());
+ EXPECT_FALSE(sem->ConstantValue()->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->AllZero());
+
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Type()->Is<sem::Struct>());
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(0)->As<i32>(), 1_i);
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(1)->As<u32>(), 2_u);
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(2)->As<f32>(), 3_f);
+
+ EXPECT_FALSE(sem->ConstantValue()->Index(1)->AllEqual());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(1)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Type()->Is<sem::Struct>());
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(0)->As<i32>(), 4_i);
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(1)->As<u32>(), 0_u);
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(2)->As<f32>(), 6_f);
+}
+
+TEST_F(ResolverConstantsTest, Struct_Array_Construct) {
+ Structure("S", {
+ Member("m1", ty.array<i32, 2>()),
+ Member("m2", ty.array<f32, 3>()),
+ });
+ auto* expr = Construct(ty.type_name("S"), //
+ Construct(ty.array<i32, 2>(), 1_i, 2_i),
+ Construct(ty.array<f32, 3>(), 1_f, 2_f, 3_f));
+ WrapInFunction(expr);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ auto* sem = Sem().Get(expr);
+ ASSERT_NE(sem, nullptr);
+ auto* str = sem->Type()->As<sem::Struct>();
+ ASSERT_NE(str, nullptr);
+ EXPECT_EQ(str->Members().size(), 2u);
+ ASSERT_NE(sem->ConstantValue(), nullptr);
+ EXPECT_TYPE(sem->ConstantValue()->Type(), sem->Type());
+ EXPECT_FALSE(sem->ConstantValue()->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->AllZero());
+
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(0)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(0)->Type()->Is<sem::Array>());
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(0)->As<i32>(), 1_i);
+ EXPECT_EQ(sem->ConstantValue()->Index(0)->Index(1)->As<u32>(), 2_i);
+
+ EXPECT_FALSE(sem->ConstantValue()->Index(1)->AllEqual());
+ EXPECT_FALSE(sem->ConstantValue()->Index(1)->AnyZero());
+ EXPECT_FALSE(sem->ConstantValue()->Index(1)->AllZero());
+ EXPECT_TRUE(sem->ConstantValue()->Index(1)->Type()->Is<sem::Array>());
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(0)->As<i32>(), 1_f);
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(1)->As<u32>(), 2_f);
+ EXPECT_EQ(sem->ConstantValue()->Index(1)->Index(2)->As<f32>(), 3_f);
+}
+
////////////////////////////////////////////////////////////////////////////////////////////////////
// Indexing
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -2302,5 +2872,59 @@
}
}
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Member accessing
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TEST_F(ResolverConstantsTest, MemberAccess) {
+ Structure("Inner", {
+ Member("i1", ty.i32()),
+ Member("i2", ty.u32()),
+ Member("i3", ty.f32()),
+ });
+
+ Structure("Outer", {
+ Member("o1", ty.type_name("Inner")),
+ Member("o2", ty.type_name("Inner")),
+ });
+ auto* outer_expr = Construct(ty.type_name("Outer"), //
+ Construct(ty.type_name("Inner"), 1_i, 2_u, 3_f),
+ Construct(ty.type_name("Inner")));
+ auto* o1_expr = MemberAccessor(outer_expr, "o1");
+ auto* i2_expr = MemberAccessor(o1_expr, "i2");
+ WrapInFunction(i2_expr);
+
+ EXPECT_TRUE(r()->Resolve()) << r()->error();
+
+ auto* outer = Sem().Get(outer_expr);
+ ASSERT_NE(outer, nullptr);
+ auto* str = outer->Type()->As<sem::Struct>();
+ ASSERT_NE(str, nullptr);
+ EXPECT_EQ(str->Members().size(), 2u);
+ ASSERT_NE(outer->ConstantValue(), nullptr);
+ EXPECT_TYPE(outer->ConstantValue()->Type(), outer->Type());
+ EXPECT_FALSE(outer->ConstantValue()->AllEqual());
+ EXPECT_TRUE(outer->ConstantValue()->AnyZero());
+ EXPECT_FALSE(outer->ConstantValue()->AllZero());
+
+ auto* o1 = Sem().Get(o1_expr);
+ ASSERT_NE(o1->ConstantValue(), nullptr);
+ EXPECT_FALSE(o1->ConstantValue()->AllEqual());
+ EXPECT_FALSE(o1->ConstantValue()->AnyZero());
+ EXPECT_FALSE(o1->ConstantValue()->AllZero());
+ EXPECT_TRUE(o1->ConstantValue()->Type()->Is<sem::Struct>());
+ EXPECT_EQ(o1->ConstantValue()->Index(0)->As<i32>(), 1_i);
+ EXPECT_EQ(o1->ConstantValue()->Index(1)->As<u32>(), 2_u);
+ EXPECT_EQ(o1->ConstantValue()->Index(2)->As<f32>(), 3_f);
+
+ auto* i2 = Sem().Get(i2_expr);
+ ASSERT_NE(i2->ConstantValue(), nullptr);
+ EXPECT_TRUE(i2->ConstantValue()->AllEqual());
+ EXPECT_FALSE(i2->ConstantValue()->AnyZero());
+ EXPECT_FALSE(i2->ConstantValue()->AllZero());
+ EXPECT_TRUE(i2->ConstantValue()->Type()->Is<sem::U32>());
+ EXPECT_EQ(i2->ConstantValue()->As<u32>(), 2_u);
+}
+
} // namespace
} // namespace tint::resolver
diff --git a/src/tint/resolver/variable_test.cc b/src/tint/resolver/variable_test.cc
index 7eb0dea..49c1f8b 100644
--- a/src/tint/resolver/variable_test.cc
+++ b/src/tint/resolver/variable_test.cc
@@ -892,6 +892,8 @@
}
TEST_F(ResolverVariableTest, LocalConst_ExplicitType_Decls) {
+ Structure("S", {Member("m", ty.u32())});
+
auto* c_i32 = Const("a", ty.i32(), Expr(0_i));
auto* c_u32 = Const("b", ty.u32(), Expr(0_u));
auto* c_f32 = Const("c", ty.f32(), Expr(0_f));
@@ -899,8 +901,9 @@
auto* c_vu32 = Const("e", ty.vec3<u32>(), vec3<u32>());
auto* c_vf32 = Const("f", ty.vec3<f32>(), vec3<f32>());
auto* c_mf32 = Const("g", ty.mat3x3<f32>(), mat3x3<f32>());
+ auto* c_s = Const("h", ty.type_name("S"), Construct(ty.type_name("S")));
- WrapInFunction(c_i32, c_u32, c_f32, c_vi32, c_vu32, c_vf32, c_mf32);
+ WrapInFunction(c_i32, c_u32, c_f32, c_vi32, c_vu32, c_vf32, c_mf32, c_s);
ASSERT_TRUE(r()->Resolve()) << r()->error();
@@ -911,6 +914,7 @@
EXPECT_EQ(Sem().Get(c_vu32)->Declaration(), c_vu32);
EXPECT_EQ(Sem().Get(c_vf32)->Declaration(), c_vf32);
EXPECT_EQ(Sem().Get(c_mf32)->Declaration(), c_mf32);
+ EXPECT_EQ(Sem().Get(c_s)->Declaration(), c_s);
ASSERT_TRUE(TypeOf(c_i32)->Is<sem::I32>());
ASSERT_TRUE(TypeOf(c_u32)->Is<sem::U32>());
@@ -919,6 +923,7 @@
ASSERT_TRUE(TypeOf(c_vu32)->Is<sem::Vector>());
ASSERT_TRUE(TypeOf(c_vf32)->Is<sem::Vector>());
ASSERT_TRUE(TypeOf(c_mf32)->Is<sem::Matrix>());
+ ASSERT_TRUE(TypeOf(c_s)->Is<sem::Struct>());
EXPECT_TRUE(Sem().Get(c_i32)->ConstantValue()->AllZero());
EXPECT_TRUE(Sem().Get(c_u32)->ConstantValue()->AllZero());
@@ -927,9 +932,12 @@
EXPECT_TRUE(Sem().Get(c_vu32)->ConstantValue()->AllZero());
EXPECT_TRUE(Sem().Get(c_vf32)->ConstantValue()->AllZero());
EXPECT_TRUE(Sem().Get(c_mf32)->ConstantValue()->AllZero());
+ EXPECT_TRUE(Sem().Get(c_s)->ConstantValue()->AllZero());
}
TEST_F(ResolverVariableTest, LocalConst_ImplicitType_Decls) {
+ Structure("S", {Member("m", ty.u32())});
+
auto* c_i32 = Const("a", nullptr, Expr(0_i));
auto* c_u32 = Const("b", nullptr, Expr(0_u));
auto* c_f32 = Const("c", nullptr, Expr(0_f));
@@ -946,9 +954,10 @@
Construct(ty.vec(nullptr, 3), Expr(0._a)),
Construct(ty.vec(nullptr, 3), Expr(0._a)),
Construct(ty.vec(nullptr, 3), Expr(0._a))));
+ auto* c_s = Const("m", nullptr, Construct(ty.type_name("S")));
WrapInFunction(c_i32, c_u32, c_f32, c_ai, c_af, c_vi32, c_vu32, c_vf32, c_vai, c_vaf, c_mf32,
- c_maf32);
+ c_maf32, c_s);
ASSERT_TRUE(r()->Resolve()) << r()->error();
@@ -964,6 +973,7 @@
EXPECT_EQ(Sem().Get(c_vaf)->Declaration(), c_vaf);
EXPECT_EQ(Sem().Get(c_mf32)->Declaration(), c_mf32);
EXPECT_EQ(Sem().Get(c_maf32)->Declaration(), c_maf32);
+ EXPECT_EQ(Sem().Get(c_s)->Declaration(), c_s);
ASSERT_TRUE(TypeOf(c_i32)->Is<sem::I32>());
ASSERT_TRUE(TypeOf(c_u32)->Is<sem::U32>());
@@ -977,6 +987,7 @@
ASSERT_TRUE(TypeOf(c_vaf)->Is<sem::Vector>());
ASSERT_TRUE(TypeOf(c_mf32)->Is<sem::Matrix>());
ASSERT_TRUE(TypeOf(c_maf32)->Is<sem::Matrix>());
+ ASSERT_TRUE(TypeOf(c_s)->Is<sem::Struct>());
EXPECT_TRUE(Sem().Get(c_i32)->ConstantValue()->AllZero());
EXPECT_TRUE(Sem().Get(c_u32)->ConstantValue()->AllZero());
@@ -990,6 +1001,7 @@
EXPECT_TRUE(Sem().Get(c_vaf)->ConstantValue()->AllZero());
EXPECT_TRUE(Sem().Get(c_mf32)->ConstantValue()->AllZero());
EXPECT_TRUE(Sem().Get(c_maf32)->ConstantValue()->AllZero());
+ EXPECT_TRUE(Sem().Get(c_s)->ConstantValue()->AllZero());
}
TEST_F(ResolverVariableTest, LocalConst_PropagateConstValue) {
diff --git a/src/tint/resolver/variable_validation_test.cc b/src/tint/resolver/variable_validation_test.cc
index 79b269c..b538db0 100644
--- a/src/tint/resolver/variable_validation_test.cc
+++ b/src/tint/resolver/variable_validation_test.cc
@@ -365,23 +365,6 @@
EXPECT_EQ(r()->error(), "12:34 error: missing matrix element type");
}
-TEST_F(ResolverVariableValidationTest, ConstStructure) {
- auto* s = Structure("S", {Member("m", ty.i32())});
- auto* c = Const("c", ty.Of(s), Construct(Source{{12, 34}}, ty.Of(s)));
- WrapInFunction(c);
-
- EXPECT_FALSE(r()->Resolve());
- EXPECT_EQ(r()->error(), R"(12:34 error: 'const' initializer must be constant expression)");
-}
-
-TEST_F(ResolverVariableValidationTest, GlobalConstStructure) {
- auto* s = Structure("S", {Member("m", ty.i32())});
- GlobalConst("c", ty.Of(s), Construct(Source{{12, 34}}, ty.Of(s)));
-
- EXPECT_FALSE(r()->Resolve());
- EXPECT_EQ(r()->error(), R"(12:34 error: 'const' initializer must be constant expression)");
-}
-
TEST_F(ResolverVariableValidationTest, ConstInitWithVar) {
auto* v = Var("v", nullptr, Expr(1_i));
auto* c = Const("c", nullptr, Expr(Source{{12, 34}}, v));
diff --git a/src/tint/sem/constant.h b/src/tint/sem/constant.h
index b46127c..875864f 100644
--- a/src/tint/sem/constant.h
+++ b/src/tint/sem/constant.h
@@ -39,11 +39,15 @@
virtual const sem::Type* Type() const = 0;
/// @returns the value of this Constant, if this constant is of a scalar value or abstract
- /// numeric, otherwsie std::monostate.
+ /// numeric, otherwise std::monostate.
virtual std::variant<std::monostate, AInt, AFloat> Value() const = 0;
/// @returns the child constant element with the given index, or nullptr if the constant has no
/// children, or the index is out of bounds.
+ /// For arrays, this returns the i'th element of the array.
+ /// For vectors, this returns the i'th element of the vector.
+ /// For matrices, this returns the i'th column vector of the matrix.
+ /// For structures, this returns the i'th member field of the structure.
virtual const Constant* Index(size_t) const = 0;
/// @returns true if child elements of this constant are positive-zero valued.
diff --git a/src/tint/writer/glsl/generator_impl.cc b/src/tint/writer/glsl/generator_impl.cc
index 01cbba0..767fecb 100644
--- a/src/tint/writer/glsl/generator_impl.cc
+++ b/src/tint/writer/glsl/generator_impl.cc
@@ -862,15 +862,10 @@
return EmitZeroValue(out, type);
}
- auto it = structure_builders_.find(As<sem::Struct>(type));
- if (it != structure_builders_.end()) {
- out << it->second << "(";
- } else {
- if (!EmitType(out, type, ast::StorageClass::kNone, ast::Access::kReadWrite, "")) {
- return false;
- }
- out << "(";
+ if (!EmitType(out, type, ast::StorageClass::kNone, ast::Access::kReadWrite, "")) {
+ return false;
}
+ ScopedParen sp(out);
bool first = true;
for (auto* arg : call->Arguments()) {
@@ -884,7 +879,6 @@
}
}
- out << ")";
return true;
}
@@ -2300,6 +2294,24 @@
return true;
},
+ [&](const sem::Struct* s) {
+ if (!EmitType(out, s, ast::StorageClass::kNone, ast::Access::kUndefined, "")) {
+ return false;
+ }
+
+ ScopedParen sp(out);
+
+ for (size_t i = 0; i < s->Members().size(); i++) {
+ if (i > 0) {
+ out << ", ";
+ }
+ if (!EmitConstant(out, constant->Index(i))) {
+ return false;
+ }
+ }
+
+ return true;
+ },
[&](Default) {
diagnostics_.add_error(
diag::System::Writer,
diff --git a/src/tint/writer/glsl/generator_impl.h b/src/tint/writer/glsl/generator_impl.h
index 153e316..58a0e50 100644
--- a/src/tint/writer/glsl/generator_impl.h
+++ b/src/tint/writer/glsl/generator_impl.h
@@ -520,7 +520,6 @@
std::function<bool()> emit_continuing_;
std::unordered_map<DMAIntrinsic, std::string, DMAIntrinsic::Hasher> dma_intrinsics_;
std::unordered_map<const sem::Builtin*, std::string> builtins_;
- std::unordered_map<const sem::Struct*, std::string> structure_builders_;
std::unordered_map<const sem::Vector*, std::string> dynamic_vector_write_;
std::unordered_map<const sem::Vector*, std::string> int_dot_funcs_;
std::unordered_map<const sem::Type*, std::string> float_modulo_funcs_;
diff --git a/src/tint/writer/hlsl/generator_impl.cc b/src/tint/writer/hlsl/generator_impl.cc
index c9861a1..0a6a196 100644
--- a/src/tint/writer/hlsl/generator_impl.cc
+++ b/src/tint/writer/hlsl/generator_impl.cc
@@ -1142,11 +1142,7 @@
call->Arguments().size() == 1 &&
ctor->Parameters()[0]->Type()->is_scalar();
- auto it = structure_builders_.find(As<sem::Struct>(type));
- if (it != structure_builders_.end()) {
- out << it->second << "(";
- brackets = false;
- } else if (brackets) {
+ if (brackets) {
out << "{";
} else {
if (!EmitType(out, type, ast::StorageClass::kNone, ast::Access::kReadWrite, "")) {
@@ -3219,6 +3215,30 @@
return true;
},
+ [&](const sem::Struct* s) {
+ if (constant->AllZero()) {
+ out << "(";
+ if (!EmitType(out, s, ast::StorageClass::kNone, ast::Access::kUndefined, "")) {
+ return false;
+ }
+ out << ")0";
+ return true;
+ }
+
+ out << "{";
+ TINT_DEFER(out << "}");
+
+ for (size_t i = 0; i < s->Members().size(); i++) {
+ if (i > 0) {
+ out << ", ";
+ }
+ if (!EmitConstant(out, constant->Index(i))) {
+ return false;
+ }
+ }
+
+ return true;
+ },
[&](Default) {
diagnostics_.add_error(
diag::System::Writer,
diff --git a/src/tint/writer/hlsl/generator_impl.h b/src/tint/writer/hlsl/generator_impl.h
index bf2debe..74ce70c 100644
--- a/src/tint/writer/hlsl/generator_impl.h
+++ b/src/tint/writer/hlsl/generator_impl.h
@@ -543,7 +543,6 @@
std::function<bool()> emit_continuing_;
std::unordered_map<const sem::Matrix*, std::string> matrix_scalar_ctors_;
std::unordered_map<const sem::Builtin*, std::string> builtins_;
- std::unordered_map<const sem::Struct*, std::string> structure_builders_;
std::unordered_map<const sem::Vector*, std::string> dynamic_vector_write_;
std::unordered_map<const sem::Matrix*, std::string> dynamic_matrix_vector_write_;
std::unordered_map<const sem::Matrix*, std::string> dynamic_matrix_scalar_write_;
diff --git a/src/tint/writer/msl/generator_impl.cc b/src/tint/writer/msl/generator_impl.cc
index e2b14a6..2af36c9 100644
--- a/src/tint/writer/msl/generator_impl.cc
+++ b/src/tint/writer/msl/generator_impl.cc
@@ -1676,14 +1676,13 @@
return false;
}
- if (constant->AllZero()) {
- out << "{}";
- return true;
- }
-
out << "{";
TINT_DEFER(out << "}");
+ if (constant->AllZero()) {
+ return true;
+ }
+
for (size_t i = 0; i < a->Count(); i++) {
if (i > 0) {
out << ", ";
@@ -1695,6 +1694,27 @@
return true;
},
+ [&](const sem::Struct* s) {
+ out << "{";
+ TINT_DEFER(out << "}");
+
+ if (constant->AllZero()) {
+ return true;
+ }
+
+ auto& members = s->Members();
+ for (size_t i = 0; i < members.size(); i++) {
+ if (i > 0) {
+ out << ", ";
+ }
+ out << "." << program_->Symbols().NameFor(members[i]->Name()) << "=";
+ if (!EmitConstant(out, constant->Index(i))) {
+ return false;
+ }
+ }
+
+ return true;
+ },
[&](Default) {
diagnostics_.add_error(
diag::System::Writer,
diff --git a/src/tint/writer/spirv/builder.cc b/src/tint/writer/spirv/builder.cc
index b34fec3..92fcf78 100644
--- a/src/tint/writer/spirv/builder.cc
+++ b/src/tint/writer/spirv/builder.cc
@@ -1770,6 +1770,7 @@
[&](const sem::Vector* v) { return composite(v->Width()); },
[&](const sem::Matrix* m) { return composite(m->columns()); },
[&](const sem::Array* a) { return composite(a->Count()); },
+ [&](const sem::Struct* s) { return composite(s->Members().size()); },
[&](Default) {
error_ = "unhandled constant type: " + builder_.FriendlyName(ty);
return false;
diff --git a/src/tint/writer/spirv/builder_accessor_expression_test.cc b/src/tint/writer/spirv/builder_accessor_expression_test.cc
index 8996b8d..23dc783 100644
--- a/src/tint/writer/spirv/builder_accessor_expression_test.cc
+++ b/src/tint/writer/spirv/builder_accessor_expression_test.cc
@@ -47,7 +47,8 @@
)");
EXPECT_EQ(DumpInstructions(b.functions()[0].variables()), R"(%12 = OpVariable %13 Function %14
)");
- EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), R"(%11 = OpCompositeExtract %6 %10 1
+ EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
+ R"(%11 = OpCompositeExtract %6 %10 1
OpStore %12 %11
OpReturn
)");
@@ -773,7 +774,8 @@
)");
EXPECT_EQ(DumpInstructions(b.functions()[0].variables()), R"(%18 = OpVariable %19 Function %20
)");
- EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), R"(%17 = OpCompositeExtract %6 %14 1
+ EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
+ R"(%17 = OpCompositeExtract %6 %14 1
OpStore %18 %17
OpReturn
)");
@@ -1009,11 +1011,10 @@
%1 = OpTypeFunction %2
%6 = OpTypeFloat 32
%5 = OpTypeStruct %6 %6
-%7 = OpConstantNull %6
-%8 = OpConstantComposite %5 %7 %7
+%7 = OpConstantNull %5
)");
EXPECT_EQ(DumpInstructions(b.functions()[0].variables()), R"()");
- EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), R"(%9 = OpCompositeExtract %6 %8 1
+ EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), R"(%8 = OpCompositeExtract %6 %7 1
OpReturn
)");
@@ -1052,14 +1053,12 @@
%7 = OpTypeFloat 32
%6 = OpTypeStruct %7 %7
%5 = OpTypeStruct %6
-%8 = OpConstantNull %7
-%9 = OpConstantComposite %6 %8 %8
-%10 = OpConstantComposite %5 %9
+%8 = OpConstantNull %5
)");
EXPECT_EQ(DumpInstructions(b.functions()[0].variables()), R"()");
EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
- R"(%11 = OpCompositeExtract %6 %10 0
-%12 = OpCompositeExtract %7 %11 1
+ R"(%9 = OpCompositeExtract %6 %8 0
+%10 = OpCompositeExtract %7 %9 1
OpReturn
)");
diff --git a/test/tint/array/assign_to_function_var.wgsl.expected.glsl b/test/tint/array/assign_to_function_var.wgsl.expected.glsl
index 40c0163..ef532a6 100644
--- a/test/tint/array/assign_to_function_var.wgsl.expected.glsl
+++ b/test/tint/array/assign_to_function_var.wgsl.expected.glsl
@@ -23,7 +23,7 @@
}
S ret_struct_arr() {
- S tint_symbol_2 = S(ivec4[4](ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0)));
+ S tint_symbol_2 = S(ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0)));
return tint_symbol_2;
}
diff --git a/test/tint/array/assign_to_private_var.wgsl.expected.glsl b/test/tint/array/assign_to_private_var.wgsl.expected.glsl
index 33061b3..6a18417 100644
--- a/test/tint/array/assign_to_private_var.wgsl.expected.glsl
+++ b/test/tint/array/assign_to_private_var.wgsl.expected.glsl
@@ -25,7 +25,7 @@
}
S ret_struct_arr() {
- S tint_symbol_2 = S(ivec4[4](ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0)));
+ S tint_symbol_2 = S(ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0)));
return tint_symbol_2;
}
diff --git a/test/tint/array/assign_to_storage_var.wgsl.expected.glsl b/test/tint/array/assign_to_storage_var.wgsl.expected.glsl
index e8aa8f1..bda5283 100644
--- a/test/tint/array/assign_to_storage_var.wgsl.expected.glsl
+++ b/test/tint/array/assign_to_storage_var.wgsl.expected.glsl
@@ -33,7 +33,7 @@
}
S ret_struct_arr() {
- S tint_symbol_3 = S(ivec4[4](ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0)));
+ S tint_symbol_3 = S(ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0)));
return tint_symbol_3;
}
diff --git a/test/tint/array/assign_to_workgroup_var.wgsl.expected.glsl b/test/tint/array/assign_to_workgroup_var.wgsl.expected.glsl
index 4197eee..e32aa22 100644
--- a/test/tint/array/assign_to_workgroup_var.wgsl.expected.glsl
+++ b/test/tint/array/assign_to_workgroup_var.wgsl.expected.glsl
@@ -25,7 +25,7 @@
}
S ret_struct_arr() {
- S tint_symbol_2 = S(ivec4[4](ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0)));
+ S tint_symbol_2 = S(ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0)));
return tint_symbol_2;
}
diff --git a/test/tint/bug/tint/1118.wgsl.expected.glsl b/test/tint/bug/tint/1118.wgsl.expected.glsl
index 1452be7..a39c375 100644
--- a/test/tint/bug/tint/1118.wgsl.expected.glsl
+++ b/test/tint/bug/tint/1118.wgsl.expected.glsl
@@ -131,7 +131,7 @@
fClipDistance4 = fClipDistance4_param;
main_1();
if (tint_discard) {
- main_out tint_symbol_1 = main_out(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+ main_out tint_symbol_1 = main_out(vec4(0.0f));
return tint_symbol_1;
}
main_out tint_symbol_2 = main_out(glFragColor);
diff --git a/test/tint/bug/tint/749.spvasm.expected.spvasm b/test/tint/bug/tint/749.spvasm.expected.spvasm
index 70a28b1..2953b7a 100644
--- a/test/tint/bug/tint/749.spvasm.expected.spvasm
+++ b/test/tint/bug/tint/749.spvasm.expected.spvasm
@@ -1,10 +1,10 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 1769
+; Bound: 1768
; Schema: 0
OpCapability Shader
- %1636 = OpExtInstImport "GLSL.std.450"
+ %1635 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %gl_FragCoord_param_1 %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
@@ -94,35 +94,34 @@
%uint_0 = OpConstant %uint 0
%_ptr_Private_int = OpTypePointer Private %int
%float_1 = OpConstant %float 1
- %96 = OpConstantNull %_arr_int_uint_10
- %97 = OpConstantComposite %QuicksortObject %96
- %148 = OpTypeFunction %int %_ptr_Function_int %_ptr_Function_int
+ %146 = OpTypeFunction %int %_ptr_Function_int %_ptr_Function_int
%_ptr_Function_v2float = OpTypePointer Function %v2float
- %162 = OpConstantNull %v2float
+ %160 = OpConstantNull %v2float
%_ptr_Function_v3float = OpTypePointer Function %v3float
- %165 = OpConstantNull %v3float
- %183 = OpConstantComposite %v3float %float_3 %float_1 %float_3
+ %163 = OpConstantNull %v3float
+ %181 = OpConstantComposite %v3float %float_3 %float_1 %float_3
%uint_1 = OpConstant %uint 1
%int_10 = OpConstant %int 10
- %219 = OpConstantComposite %v2float %float_2 %float_3
+ %217 = OpConstantComposite %v2float %float_2 %float_3
%_ptr_Function_float = OpTypePointer Function %float
%bool = OpTypeBool
%int_1 = OpConstant %int 1
- %404 = OpTypeFunction %void
+ %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
- %418 = OpConstantComposite %v2float %float_2 %float_2
+ %417 = OpConstantComposite %v2float %float_2 %float_2
%int_n1 = OpConstant %int -1
- %423 = OpConstantComposite %v2float %float_1 %float_1
- %500 = OpConstantNull %uint
- %710 = OpConstantComposite %v2float %float_1 %float_2
+ %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
- %891 = OpConstantComposite %v3float %float_1 %float_2 %float_3
- %914 = OpConstantNull %float
- %916 = OpConstantComposite %v2float %float_3 %float_2
+ %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
- %965 = OpConstantComposite %v2float %float_3 %914
+ %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
@@ -134,7 +133,7 @@
%int_8 = OpConstant %int 8
%uint_9 = OpConstant %uint 9
%main_out = OpTypeStruct %v4float
- %1756 = OpTypeFunction %main_out %v4float
+ %1755 = OpTypeFunction %main_out %v4float
%swap_i1_i1_ = OpFunction %void None %23
%i = OpFunctionParameter %_ptr_Function_int
%j = OpFunctionParameter %_ptr_Function_int
@@ -202,75 +201,75 @@
%93 = OpAccessChain %_ptr_Private_int %obj %uint_0 %80
%94 = OpLoad %int %93
%95 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
+ OpStore %obj %15
OpStore %obj %95
- %98 = OpCompositeExtract %float %88 0
- %99 = OpCompositeExtract %float %88 0
- %100 = OpCompositeConstruct %v2float %98 %99
+ %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 = OpCompositeExtract %float %50 2
- %103 = OpCompositeExtract %float %50 0
- %104 = OpCompositeConstruct %v3float %101 %102 %103
- %105 = OpAccessChain %_ptr_Private_int %obj %uint_0 %74
- OpStore %105 %94
- %106 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %106
- %107 = OpCompositeExtract %float %88 1
- %108 = OpCompositeExtract %float %88 2
- %109 = OpCompositeExtract %float %88 0
- %110 = OpCompositeConstruct %v3float %107 %108 %109
- %112 = OpLoad %int %i
+ %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 %112
- %116 = OpLoad %int %j
- %117 = OpLoad %int %temp
+ OpStore %i %110
+ %114 = OpLoad %int %j
+ %115 = OpLoad %int %temp
OpStore %temp %31
- OpStore %temp %117
- %118 = OpCompositeExtract %float %110 2
- %119 = OpCompositeExtract %float %110 1
- %120 = OpCompositeConstruct %v2float %118 %119
+ 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
- %122 = OpLoad %int %121
- %123 = OpAccessChain %_ptr_Private_int %obj %uint_0 %80
- OpStore %123 %31
- %124 = OpAccessChain %_ptr_Private_int %obj %uint_0 %80
- OpStore %124 %122
- %125 = OpLoad %int %temp
- %127 = OpLoad %int %j
+ 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 %127
- %130 = OpCompositeExtract %float %100 0
- %131 = OpCompositeExtract %float %88 1
- %132 = OpCompositeExtract %float %88 0
- %133 = OpCompositeConstruct %v3float %130 %131 %132
+ 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
- %135 = OpLoad %int %134
- %136 = OpAccessChain %_ptr_Private_int %obj %uint_0 %74
- OpStore %136 %31
- %137 = OpAccessChain %_ptr_Private_int %obj %uint_0 %74
- OpStore %137 %135
- %138 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %138
- %139 = OpCompositeExtract %float %104 0
- %140 = OpCompositeExtract %float %104 1
- %141 = OpCompositeExtract %float %104 0
- %142 = OpCompositeConstruct %v3float %139 %140 %141
+ 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
- %144 = OpLoad %int %143
- %145 = OpAccessChain %_ptr_Private_int %obj %uint_0 %80
- OpStore %145 %31
- %146 = OpAccessChain %_ptr_Private_int %obj %uint_0 %80
- OpStore %146 %144
- %147 = OpAccessChain %_ptr_Private_int %obj %uint_0 %116
- OpStore %147 %125
+ 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 %148
+%performPartition_i1_i1_ = OpFunction %int None %146
%l = OpFunctionParameter %_ptr_Function_int
%h = OpFunctionParameter %_ptr_Function_int
- %152 = OpLabel
+ %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
@@ -278,2302 +277,2302 @@
%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 %162
- %x_538 = OpVariable %_ptr_Function_v3float Function %165
- %167 = OpLoad %int %h
+ %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 %167
- %171 = OpLoad %int %h
- %173 = OpLoad %int %l
+ OpStore %h %165
+ %169 = OpLoad %int %h
+ %171 = OpLoad %int %l
OpStore %l %31
- OpStore %l %173
- %176 = OpAccessChain %_ptr_Private_int %obj %uint_0 %171
- %177 = OpLoad %int %176
- %178 = OpAccessChain %_ptr_Private_int %obj %uint_0 %171
- OpStore %178 %31
- %179 = OpAccessChain %_ptr_Private_int %obj %uint_0 %171
- OpStore %179 %177
- %180 = OpAccessChain %_ptr_Private_int %obj %uint_0 %171
- %181 = OpLoad %int %180
- %182 = OpLoad %int %param_3
+ 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 %182
- %184 = OpLoad %int %param_1
+ OpStore %param_3 %180
+ %182 = OpLoad %int %param_1
OpStore %param_1 %31
- OpStore %param_1 %184
- OpStore %pivot %181
- %186 = OpLoad %int %l
- %188 = OpLoad %int %h
+ OpStore %param_1 %182
+ OpStore %pivot %179
+ %184 = OpLoad %int %l
+ %186 = OpLoad %int %h
OpStore %h %31
- OpStore %h %188
- %191 = OpLoad %int %j_1
+ OpStore %h %186
+ %189 = OpLoad %int %j_1
OpStore %j_1 %31
- OpStore %j_1 %191
- %192 = OpCompositeExtract %float %183 1
- %193 = OpCompositeExtract %float %183 2
- %194 = OpCompositeExtract %float %183 1
- %195 = OpCompositeConstruct %v3float %192 %193 %194
- %197 = OpLoad %int %l
+ 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 %197
- %200 = OpBitcast %int %uint_1
- %202 = OpISub %int %186 %200
- OpStore %i_1 %202
- %204 = OpLoad %int %l
- %205 = OpCompositeExtract %float %183 0
- %206 = OpCompositeExtract %float %183 2
- %207 = OpCompositeExtract %float %195 0
- %208 = OpCompositeConstruct %v3float %205 %206 %207
+ 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
- %210 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %210
+ %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
- OpLoopMerge %212 %213 None
- OpBranch %214
- %214 = OpLabel
- %215 = OpLoad %int %pivot
- OpStore %pivot %31
- OpStore %pivot %215
- %216 = OpLoad %int %param_1
- OpStore %param_1 %31
- OpStore %param_1 %216
- %217 = OpLoad %int %j_1
- %218 = OpLoad %int %pivot
- OpStore %pivot %31
- OpStore %pivot %218
- OpStore %x_537 %219
- %220 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %220
- %222 = OpLoad %int %h
- %224 = OpLoad %int %h
+ %316 = OpLoad %int %h
OpStore %h %31
- OpStore %h %224
- %227 = OpLoad %int %param
+ 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 %227
- %228 = OpLoad %int %j_1
+ 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 %228
- %229 = OpCompositeExtract %float %183 0
- %231 = OpAccessChain %_ptr_Function_float %x_537 %uint_1
- %232 = OpLoad %float %231
- %233 = OpCompositeExtract %float %183 2
- %234 = OpCompositeConstruct %v3float %229 %232 %233
- OpStore %x_538 %234
- %235 = OpLoad %int %param
- OpStore %param %31
- OpStore %param %235
- %236 = OpBitcast %int %uint_1
- %237 = OpISub %int %222 %236
- %238 = OpSLessThanEqual %bool %217 %237
- OpSelectionMerge %240 None
- OpBranchConditional %238 %241 %242
- %241 = OpLabel
- OpBranch %240
- %242 = OpLabel
- OpBranch %212
- %240 = OpLabel
- %243 = OpLoad %int %j_1
- %244 = OpAccessChain %_ptr_Private_int %obj %uint_0 %171
- %245 = OpLoad %int %244
- %246 = OpAccessChain %_ptr_Private_int %obj %uint_0 %171
- OpStore %246 %31
- %247 = OpAccessChain %_ptr_Private_int %obj %uint_0 %171
- OpStore %247 %245
- %249 = OpLoad %int %h
- OpStore %h %31
- OpStore %h %249
- %252 = OpAccessChain %_ptr_Function_float %x_537 %uint_0
- %253 = OpLoad %float %252
- %254 = OpCompositeExtract %float %195 2
- %255 = OpAccessChain %_ptr_Function_float %x_537 %uint_0
- %256 = OpLoad %float %255
- %257 = OpCompositeConstruct %v3float %253 %254 %256
- %258 = OpLoad %int %param_1
+ 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 %258
- %259 = OpAccessChain %_ptr_Private_int %obj %uint_0 %243
- %260 = OpLoad %int %259
- %261 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %261
- %262 = OpLoad %int %pivot
- %263 = OpCompositeExtract %float %183 2
- %264 = OpCompositeConstruct %v2float %float_2 %263
- %265 = OpLoad %int %i_1
- OpStore %i_1 %31
- OpStore %i_1 %265
- %267 = OpLoad %int %l
- OpStore %l %31
- OpStore %l %267
- %270 = OpCompositeExtract %float %183 1
- %271 = OpCompositeExtract %float %183 0
- %272 = OpCompositeExtract %float %183 1
- %273 = OpCompositeConstruct %v3float %270 %271 %272
- %274 = OpLoad %int %pivot
+ 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 %274
- %275 = OpSLessThanEqual %bool %260 %262
- OpSelectionMerge %276 None
- OpBranchConditional %275 %277 %276
- %277 = OpLabel
- %278 = OpCompositeExtract %float %273 2
- %279 = OpCompositeExtract %float %273 0
- %280 = OpCompositeExtract %float %273 0
- %281 = OpCompositeConstruct %v3float %278 %279 %280
- %282 = OpLoad %int %param_3
- OpStore %param_3 %31
- OpStore %param_3 %282
- %283 = OpLoad %int %i_1
- %284 = OpLoad %int %pivot
- OpStore %pivot %31
- OpStore %pivot %284
- %285 = OpCompositeExtract %float %257 0
- %286 = OpCompositeExtract %float %273 1
- %287 = OpCompositeConstruct %v2float %285 %286
- %288 = OpLoad %int %i_1
+ 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 %288
- %289 = OpLoad %int %param
- OpStore %param %31
- OpStore %param %289
- %290 = OpBitcast %int %uint_1
- %291 = OpIAdd %int %283 %290
- OpStore %i_1 %291
- %293 = OpLoad %int %l
+ 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 %293
- %296 = OpCompositeExtract %float %264 0
- %297 = OpCompositeConstruct %v3float %float_3 %float_2 %296
- %298 = OpLoad %int %i_1
- %299 = OpAccessChain %_ptr_Function_float %x_537 %uint_1
- %300 = OpLoad %float %299
- %301 = OpAccessChain %_ptr_Function_float %x_538 %uint_0
- %302 = OpLoad %float %301
- %303 = OpCompositeConstruct %v2float %300 %302
- %304 = OpLoad %int %param
- OpStore %param %31
- OpStore %param %304
- OpStore %param %298
- %305 = OpLoad %int %param
- OpStore %param %31
- OpStore %param %305
- %306 = OpCompositeExtract %float %303 0
- %307 = OpCompositeExtract %float %303 0
- %308 = OpCompositeConstruct %v2float %306 %307
- %309 = OpLoad %int %i_1
- OpStore %i_1 %31
- OpStore %i_1 %309
- %310 = OpLoad %int %j_1
- OpStore %param_1 %310
- %311 = OpLoad %int %param_3
- OpStore %param_3 %31
- OpStore %param_3 %311
- %312 = OpFunctionCall %void %swap_i1_i1_ %param %param_1
- %315 = OpLoad %int %param_1
+ 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 %315
- OpBranch %276
- %276 = OpLabel
- %316 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %316
- OpBranch %213
- %213 = OpLabel
- %318 = OpLoad %int %h
- OpStore %h %31
- OpStore %h %318
- %321 = OpLoad %int %j_1
- %323 = OpLoad %int %h
- OpStore %h %31
- OpStore %h %323
- %326 = OpCompositeExtract %float %257 0
- %327 = OpCompositeExtract %float %273 2
- %328 = OpCompositeExtract %float %273 2
- %329 = OpCompositeConstruct %v3float %326 %327 %328
- %330 = OpAccessChain %_ptr_Private_int %obj %uint_0 %243
- %331 = OpLoad %int %330
- %332 = OpAccessChain %_ptr_Private_int %obj %uint_0 %243
- OpStore %332 %31
- %333 = OpAccessChain %_ptr_Private_int %obj %uint_0 %243
- OpStore %333 %331
- %334 = OpLoad %int %param
+ OpStore %param_1 %395
+ %396 = OpLoad %int %i_1
+ %397 = OpLoad %int %param
OpStore %param %31
- OpStore %param %334
- %336 = OpIAdd %int %int_1 %321
- OpStore %j_1 %336
- %337 = OpLoad %int %param_1
- OpStore %param_1 %31
- OpStore %param_1 %337
- %338 = OpCompositeExtract %float %273 1
- %339 = OpCompositeExtract %float %273 2
- %340 = OpCompositeExtract %float %273 0
- %341 = OpCompositeConstruct %v3float %338 %339 %340
- %342 = OpAccessChain %_ptr_Private_int %obj %uint_0 %243
- %343 = OpLoad %int %342
- %344 = OpAccessChain %_ptr_Private_int %obj %uint_0 %243
- OpStore %344 %31
- %345 = OpAccessChain %_ptr_Private_int %obj %uint_0 %243
- OpStore %345 %343
- OpBranch %211
- %212 = OpLabel
- %346 = OpLoad %int %i_1
- %347 = OpAccessChain %_ptr_Private_int %obj %uint_0 %171
- %348 = OpLoad %int %347
- %349 = OpAccessChain %_ptr_Private_int %obj %uint_0 %171
- OpStore %349 %31
- %350 = OpAccessChain %_ptr_Private_int %obj %uint_0 %171
- OpStore %350 %348
- %351 = OpCompositeExtract %float %183 0
- %352 = OpCompositeExtract %float %183 1
- %353 = OpCompositeConstruct %v2float %351 %352
- %354 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %354
- %356 = OpLoad %int %h
- OpStore %h %31
- OpStore %h %356
- %359 = OpIAdd %int %int_1 %346
- OpStore %i_1 %359
- %360 = OpLoad %int %param_1
- OpStore %param_1 %31
- OpStore %param_1 %360
- %361 = OpLoad %int %i_1
- %362 = OpLoad %int %j_1
+ 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 %362
- %363 = OpCompositeExtract %float %183 0
- %364 = OpCompositeExtract %float %183 0
- %365 = OpCompositeConstruct %v2float %363 %364
- %366 = OpLoad %int %param_1
- OpStore %param_1 %31
- OpStore %param_1 %366
- OpStore %param_2 %361
- %367 = OpCompositeExtract %float %183 1
- %368 = OpCompositeExtract %float %208 0
- %369 = OpCompositeConstruct %v2float %367 %368
- %370 = OpLoad %int %pivot
- OpStore %pivot %31
- OpStore %pivot %370
- %372 = OpLoad %int %h
- %373 = OpCompositeExtract %float %365 0
- %374 = OpCompositeExtract %float %353 1
- %375 = OpCompositeConstruct %v2float %373 %374
- %377 = OpLoad %int %h
- OpStore %h %31
- OpStore %h %377
- OpStore %param_3 %372
- %380 = OpLoad %int %i_1
- OpStore %i_1 %31
- OpStore %i_1 %380
- %381 = OpCompositeExtract %float %353 1
- %382 = OpCompositeExtract %float %375 0
- %383 = OpCompositeConstruct %v2float %381 %382
- %385 = OpLoad %int %h
- OpStore %h %31
- OpStore %h %385
- %388 = OpFunctionCall %void %swap_i1_i1_ %param_2 %param_3
- %392 = OpLoad %int %l
- OpStore %l %31
- OpStore %l %392
- %395 = OpCompositeExtract %float %208 2
- %396 = OpCompositeConstruct %v2float %395 %float_2
- %397 = OpLoad %int %param_1
- OpStore %param_1 %31
- OpStore %param_1 %397
- %398 = OpLoad %int %i_1
- %399 = OpLoad %int %param
- OpStore %param %31
- OpStore %param %399
- %400 = OpCompositeExtract %float %183 1
- %401 = OpCompositeExtract %float %183 0
- %402 = OpCompositeConstruct %v2float %400 %401
- %403 = OpLoad %int %j_1
- OpStore %j_1 %31
- OpStore %j_1 %403
- OpReturnValue %398
+ OpStore %j_1 %401
+ OpReturnValue %396
OpFunctionEnd
- %quicksort_ = OpFunction %void None %404
- %406 = OpLabel
+ %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 %96
+ %stack = OpVariable %_ptr_Function__arr_int_uint_10 Function %412
%param_5 = OpVariable %_ptr_Function_int Function %31
OpStore %l_1 %31
- %415 = OpLoad %int %param_5
+ %414 = OpLoad %int %param_5
OpStore %param_5 %31
- OpStore %param_5 %415
+ OpStore %param_5 %414
OpStore %h_1 %int_9
- %417 = OpLoad %_arr_int_uint_10 %stack
- OpStore %stack %96
- OpStore %stack %417
- %419 = OpLoad %int %param_5
+ %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 %419
+ OpStore %param_5 %418
OpStore %top %int_n1
- %421 = OpLoad %int %p
+ %420 = OpLoad %int %p
OpStore %p %31
- OpStore %p %421
- %422 = OpLoad %int %top
- %424 = OpLoad %int %p
+ OpStore %p %420
+ %421 = OpLoad %int %top
+ %423 = OpLoad %int %p
OpStore %p %31
- OpStore %p %424
- %425 = OpBitcast %int %uint_1
- %426 = OpIAdd %int %422 %425
- %427 = OpLoad %int %top
+ OpStore %p %423
+ %424 = OpBitcast %int %uint_1
+ %425 = OpIAdd %int %421 %424
+ %426 = OpLoad %int %top
OpStore %top %31
- OpStore %top %427
- %428 = OpCompositeExtract %float %418 1
- %429 = OpCompositeExtract %float %423 1
- %430 = OpCompositeConstruct %v2float %428 %429
- %431 = OpLoad %int %param_4
- OpStore %param_4 %31
- OpStore %param_4 %431
OpStore %top %426
- %432 = OpLoad %int %h_1
- OpStore %h_1 %31
- OpStore %h_1 %432
- %433 = OpCompositeExtract %float %423 1
- %434 = OpCompositeExtract %float %423 0
- %435 = OpCompositeExtract %float %423 0
- %436 = OpCompositeConstruct %v3float %433 %434 %435
- %437 = OpLoad %int %param_4
+ %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 %437
- %438 = OpLoad %int %l_1
- %439 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %439
- %440 = OpCompositeExtract %float %436 1
- %441 = OpCompositeExtract %float %436 0
- %442 = OpCompositeExtract %float %423 0
- %443 = OpCompositeConstruct %v3float %440 %441 %442
- %444 = OpLoad %_arr_int_uint_10 %stack
- OpStore %stack %96
- OpStore %stack %444
- %445 = OpCompositeExtract %float %418 1
- %446 = OpCompositeExtract %float %418 1
- %447 = OpCompositeExtract %float %418 1
- %448 = OpCompositeConstruct %v3float %445 %446 %447
- %449 = OpLoad %int %l_1
+ 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
- %450 = OpAccessChain %_ptr_Function_int %stack %426
- OpStore %450 %438
- %451 = OpLoad %int %param_5
+ %449 = OpAccessChain %_ptr_Function_int %stack %425
+ OpStore %449 %437
+ %450 = OpLoad %int %param_5
OpStore %param_5 %31
- OpStore %param_5 %451
- %452 = OpLoad %int %top
- %453 = OpLoad %int %param_4
+ OpStore %param_5 %450
+ %451 = OpLoad %int %top
+ %452 = OpLoad %int %param_4
OpStore %param_4 %31
- OpStore %param_4 %453
- %454 = OpCompositeExtract %float %430 1
- %455 = OpCompositeConstruct %v3float %float_3 %454 %float_2
- %456 = OpAccessChain %_ptr_Function_int %stack %426
- %457 = OpLoad %int %456
- %458 = OpAccessChain %_ptr_Function_int %stack %426
- OpStore %458 %31
- %459 = OpAccessChain %_ptr_Function_int %stack %426
- OpStore %459 %457
- %460 = OpIAdd %int %452 %int_1
- %461 = OpAccessChain %_ptr_Function_int %stack %426
- %462 = OpLoad %int %461
- %463 = OpAccessChain %_ptr_Function_int %stack %426
- OpStore %463 %31
- %464 = OpAccessChain %_ptr_Function_int %stack %426
- OpStore %464 %462
- %465 = OpCompositeExtract %float %436 0
- %466 = OpCompositeExtract %float %436 2
- %467 = OpCompositeExtract %float %418 1
- %468 = OpCompositeConstruct %v3float %465 %466 %467
- OpStore %top %460
- %469 = OpLoad %int %param_4
+ 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 %469
- %470 = OpLoad %int %h_1
- %471 = OpLoad %int %param_4
+ OpStore %param_4 %468
+ %469 = OpLoad %int %h_1
+ %470 = OpLoad %int %param_4
OpStore %param_4 %31
- OpStore %param_4 %471
- %472 = OpCompositeExtract %float %430 0
- %473 = OpCompositeExtract %float %448 0
- %474 = OpCompositeExtract %float %430 1
- %475 = OpCompositeConstruct %v3float %472 %473 %474
- %476 = OpLoad %int %l_1
+ 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 %476
- %477 = OpLoad %int %param_5
+ OpStore %l_1 %475
+ %476 = OpLoad %int %param_5
OpStore %param_5 %31
- OpStore %param_5 %477
- %478 = OpCompositeExtract %float %475 2
- %479 = OpCompositeExtract %float %475 2
- %480 = OpCompositeConstruct %v2float %478 %479
- %481 = OpLoad %int %p
+ 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 %481
- %482 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %482 %470
- OpBranch %483
- %483 = OpLabel
- OpLoopMerge %484 %485 None
- OpBranch %486
- %486 = OpLabel
- %487 = OpCompositeExtract %float %468 0
- %488 = OpCompositeExtract %float %468 0
- %489 = OpCompositeExtract %float %468 0
- %490 = OpCompositeConstruct %v3float %487 %488 %489
- %491 = OpLoad %int %h_1
- OpStore %h_1 %31
- OpStore %h_1 %491
- %492 = OpLoad %_arr_int_uint_10 %stack
- OpStore %stack %96
- OpStore %stack %492
- %493 = OpLoad %int %top
- %494 = OpLoad %_arr_int_uint_10 %stack
- OpStore %stack %96
- OpStore %stack %494
- %495 = OpCompositeExtract %float %430 0
- %496 = OpCompositeExtract %float %475 2
- %497 = OpCompositeConstruct %v2float %495 %496
- %498 = OpLoad %int %param_4
- OpStore %param_4 %31
- OpStore %param_4 %498
- %499 = OpBitcast %int %500
- %501 = OpSGreaterThanEqual %bool %493 %499
- OpSelectionMerge %502 None
- OpBranchConditional %501 %503 %504
- %503 = OpLabel
- OpBranch %502
- %504 = OpLabel
- OpBranch %484
- %502 = OpLabel
- %505 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %505
- %506 = OpCompositeExtract %float %436 1
- %507 = OpCompositeExtract %float %436 0
- %508 = OpCompositeExtract %float %468 1
- %509 = OpCompositeConstruct %v3float %506 %507 %508
- %510 = OpLoad %int %param_4
- OpStore %param_4 %31
- OpStore %param_4 %510
- %511 = OpLoad %int %top
- %512 = OpCompositeExtract %float %480 0
- %513 = OpCompositeExtract %float %497 1
- %514 = OpCompositeExtract %float %480 0
- %515 = OpCompositeConstruct %v3float %512 %513 %514
- %516 = OpLoad %int %h_1
- OpStore %h_1 %31
- OpStore %h_1 %516
- %517 = OpCompositeExtract %float %418 0
- %518 = OpCompositeExtract %float %418 0
- %519 = OpCompositeConstruct %v2float %517 %518
- %520 = OpLoad %int %p
- OpStore %p %31
- OpStore %p %520
- %521 = OpBitcast %int %uint_1
- %522 = OpISub %int %511 %521
- OpStore %top %522
- %523 = OpLoad %int %p
- OpStore %p %31
- OpStore %p %523
- %524 = OpAccessChain %_ptr_Function_int %stack %426
- %525 = OpLoad %int %524
- %526 = OpAccessChain %_ptr_Function_int %stack %426
- OpStore %526 %31
- %527 = OpAccessChain %_ptr_Function_int %stack %426
- OpStore %527 %525
- %528 = OpAccessChain %_ptr_Function_int %stack %511
- %529 = OpLoad %int %528
- %530 = OpLoad %_arr_int_uint_10 %stack
- OpStore %stack %96
- OpStore %stack %530
- %531 = OpCompositeExtract %float %436 1
- %532 = OpCompositeExtract %float %436 0
- %533 = OpCompositeExtract %float %475 1
- %534 = OpCompositeConstruct %v3float %531 %532 %533
- %535 = OpLoad %int %l_1
- OpStore %l_1 %31
- OpStore %l_1 %535
- OpStore %h_1 %529
- %536 = OpLoad %_arr_int_uint_10 %stack
- OpStore %stack %96
- OpStore %stack %536
- %537 = OpCompositeExtract %float %455 1
- %538 = OpCompositeExtract %float %448 1
- %539 = OpCompositeConstruct %v2float %537 %538
- %540 = OpLoad %int %p
- OpStore %p %31
- OpStore %p %540
- %541 = OpLoad %int %top
- %542 = OpLoad %int %param_4
- OpStore %param_4 %31
- OpStore %param_4 %542
- %543 = OpAccessChain %_ptr_Function_int %stack %460
- %544 = OpLoad %int %543
- %545 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %545 %31
- %546 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %546 %544
- %547 = OpISub %int %541 %int_1
- OpStore %top %547
- %548 = OpLoad %int %param_5
- OpStore %param_5 %31
- OpStore %param_5 %548
- %549 = OpCompositeExtract %float %519 1
- %550 = OpCompositeExtract %float %480 0
- %551 = OpCompositeExtract %float %519 1
- %552 = OpCompositeConstruct %v3float %549 %550 %551
- %553 = OpLoad %int %h_1
- OpStore %h_1 %31
- OpStore %h_1 %553
- %554 = OpCompositeExtract %float %475 1
- %555 = OpCompositeExtract %float %475 2
- %556 = OpCompositeConstruct %v2float %554 %555
- %557 = OpAccessChain %_ptr_Function_int %stack %460
- %558 = OpLoad %int %557
- %559 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %559 %31
- %560 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %560 %558
- %561 = OpAccessChain %_ptr_Function_int %stack %541
- %562 = OpLoad %int %561
- %563 = OpLoad %int %p
- OpStore %p %31
- OpStore %p %563
- %564 = OpCompositeExtract %float %219 1
- %565 = OpCompositeExtract %float %219 1
- %566 = OpCompositeExtract %float %480 0
- %567 = OpCompositeConstruct %v3float %564 %565 %566
- %568 = OpLoad %int %param_5
- OpStore %param_5 %31
- OpStore %param_5 %568
- OpStore %l_1 %562
- %569 = OpLoad %int %top
- OpStore %top %31
- OpStore %top %569
- %570 = OpLoad %int %l_1
- OpStore %param_4 %570
- %571 = OpAccessChain %_ptr_Function_int %stack %511
- %572 = OpLoad %int %571
- %573 = OpAccessChain %_ptr_Function_int %stack %511
- OpStore %573 %31
- %574 = OpAccessChain %_ptr_Function_int %stack %511
- OpStore %574 %572
- %575 = OpCompositeExtract %float %515 1
- %576 = OpCompositeExtract %float %515 2
- %577 = OpCompositeConstruct %v2float %575 %576
- %578 = OpLoad %int %h_1
- %579 = OpCompositeExtract %float %430 0
- %580 = OpCompositeConstruct %v2float %579 %float_2
- OpStore %param_5 %578
- %581 = OpAccessChain %_ptr_Function_int %stack %460
- %582 = OpLoad %int %581
- %583 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %583 %31
- %584 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %584 %582
- %585 = OpFunctionCall %int %performPartition_i1_i1_ %param_4 %param_5
- %588 = OpCompositeExtract %float %497 0
- %589 = OpCompositeExtract %float %509 0
- %590 = OpCompositeConstruct %v2float %588 %589
- %591 = OpLoad %int %param_5
- OpStore %param_5 %31
- OpStore %param_5 %591
- OpStore %p %585
- %592 = OpLoad %int %param_4
- OpStore %param_4 %31
- OpStore %param_4 %592
- %593 = OpLoad %int %p
- %594 = OpLoad %int %h_1
- OpStore %h_1 %31
- OpStore %h_1 %594
- %595 = OpCompositeExtract %float %509 1
- %596 = OpCompositeExtract %float %509 1
- %597 = OpCompositeConstruct %v2float %595 %596
- %598 = OpLoad %int %l_1
- OpStore %l_1 %31
- OpStore %l_1 %598
- %599 = OpLoad %int %h_1
- OpStore %h_1 %31
- OpStore %h_1 %599
- %600 = OpLoad %int %l_1
- %601 = OpAccessChain %_ptr_Function_int %stack %511
- %602 = OpLoad %int %601
- %603 = OpAccessChain %_ptr_Function_int %stack %511
- OpStore %603 %31
- %604 = OpAccessChain %_ptr_Function_int %stack %511
- OpStore %604 %602
- %605 = OpLoad %int %h_1
- OpStore %h_1 %31
- OpStore %h_1 %605
- %606 = OpCompositeExtract %float %497 1
- %607 = OpCompositeExtract %float %219 0
- %608 = OpCompositeConstruct %v2float %606 %607
- %609 = OpAccessChain %_ptr_Function_int %stack %460
- %610 = OpLoad %int %609
- %611 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %611 %31
- %612 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %612 %610
- %613 = OpBitcast %int %uint_1
- %614 = OpISub %int %593 %613
- %615 = OpSGreaterThan %bool %614 %600
- OpSelectionMerge %616 None
- OpBranchConditional %615 %617 %616
- %617 = OpLabel
- %618 = OpLoad %int %param_4
- OpStore %param_4 %31
- OpStore %param_4 %618
- %619 = OpLoad %int %top
- %620 = OpCompositeExtract %float %534 1
- %621 = OpCompositeExtract %float %418 1
- %622 = OpCompositeConstruct %v2float %620 %621
- %623 = OpAccessChain %_ptr_Function_int %stack %460
- %624 = OpLoad %int %623
- %625 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %625 %31
- %626 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %626 %624
- %627 = OpLoad %_arr_int_uint_10 %stack
- OpStore %stack %96
- OpStore %stack %627
- %628 = OpCompositeExtract %float %515 2
- %629 = OpCompositeExtract %float %515 1
- %630 = OpCompositeConstruct %v2float %628 %629
- %631 = OpCompositeExtract %float %597 1
- %632 = OpCompositeExtract %float %577 0
- %633 = OpCompositeExtract %float %577 0
- %634 = OpCompositeConstruct %v3float %631 %632 %633
- %635 = OpLoad %int %l_1
- %636 = OpAccessChain %_ptr_Function_int %stack %541
- %637 = OpLoad %int %636
- %638 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %638 %31
- %639 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %639 %637
- %640 = OpCompositeExtract %float %475 0
- %641 = OpCompositeExtract %float %634 0
- %642 = OpCompositeConstruct %v2float %640 %641
- %643 = OpLoad %int %param_5
- OpStore %param_5 %31
- OpStore %param_5 %643
- %644 = OpIAdd %int %int_1 %619
- %645 = OpAccessChain %_ptr_Function_int %stack %511
- %646 = OpLoad %int %645
- %647 = OpAccessChain %_ptr_Function_int %stack %511
- OpStore %647 %31
- %648 = OpAccessChain %_ptr_Function_int %stack %511
- OpStore %648 %646
- %649 = OpCompositeExtract %float %490 1
- %650 = OpCompositeExtract %float %490 1
- %651 = OpCompositeExtract %float %468 0
- %652 = OpCompositeConstruct %v3float %649 %650 %651
- %653 = OpLoad %int %param_5
- OpStore %param_5 %31
- OpStore %param_5 %653
- %654 = OpAccessChain %_ptr_Function_int %stack %644
- OpStore %654 %635
- %655 = OpLoad %int %top
- %656 = OpAccessChain %_ptr_Function_int %stack %460
- %657 = OpLoad %int %656
- %658 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %658 %31
- %659 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %659 %657
- %660 = OpCompositeExtract %float %556 1
- %661 = OpCompositeExtract %float %556 0
- %662 = OpCompositeConstruct %v2float %660 %661
- %663 = OpAccessChain %_ptr_Function_int %stack %644
- %664 = OpLoad %int %663
- %665 = OpAccessChain %_ptr_Function_int %stack %644
- OpStore %665 %31
- %666 = OpAccessChain %_ptr_Function_int %stack %644
- OpStore %666 %664
- %668 = OpBitcast %uint %655
- %669 = OpIAdd %uint %uint_1 %668
- %667 = OpBitcast %int %669
- %670 = OpAccessChain %_ptr_Function_int %stack %460
- %671 = OpLoad %int %670
- %672 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %672 %31
- %673 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %673 %671
- %674 = OpCompositeExtract %float %567 2
- %675 = OpCompositeExtract %float %662 1
- %676 = OpCompositeExtract %float %567 2
- %677 = OpCompositeConstruct %v3float %674 %675 %676
- %678 = OpLoad %int %h_1
- OpStore %h_1 %31
- OpStore %h_1 %678
- OpStore %top %667
- %679 = OpLoad %_arr_int_uint_10 %stack
- OpStore %stack %96
- OpStore %stack %679
- %680 = OpLoad %int %p
- %681 = OpCompositeExtract %float %567 0
- %682 = OpCompositeExtract %float %219 1
- %683 = OpCompositeConstruct %v2float %681 %682
- %684 = OpAccessChain %_ptr_Function_int %stack %541
- %685 = OpLoad %int %684
- %686 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %686 %31
- %687 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %687 %685
- %688 = OpAccessChain %_ptr_Function_int %stack %541
- %689 = OpLoad %int %688
- %690 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %690 %31
- %691 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %691 %689
- %692 = OpAccessChain %_ptr_Function_int %stack %667
- %693 = OpBitcast %int %uint_1
- %694 = OpISub %int %680 %693
- OpStore %692 %694
- %695 = OpAccessChain %_ptr_Function_int %stack %426
- %696 = OpLoad %int %695
- %697 = OpAccessChain %_ptr_Function_int %stack %426
- OpStore %697 %31
- %698 = OpAccessChain %_ptr_Function_int %stack %426
- OpStore %698 %696
- %699 = OpCompositeExtract %float %515 2
- %700 = OpCompositeExtract %float %515 1
- %701 = OpCompositeConstruct %v2float %699 %700
- %702 = OpAccessChain %_ptr_Function_int %stack %667
- %703 = OpLoad %int %702
- %704 = OpAccessChain %_ptr_Function_int %stack %667
- OpStore %704 %31
- %705 = OpAccessChain %_ptr_Function_int %stack %667
- OpStore %705 %703
- OpBranch %616
- %616 = OpLabel
- %706 = OpAccessChain %_ptr_Function_int %stack %426
- %707 = OpLoad %int %706
- %708 = OpAccessChain %_ptr_Function_int %stack %426
- OpStore %708 %31
- %709 = OpAccessChain %_ptr_Function_int %stack %426
- OpStore %709 %707
- %711 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %711
- %712 = OpLoad %int %p
- %713 = OpAccessChain %_ptr_Function_int %stack %541
- %714 = OpLoad %int %713
- %715 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %715 %31
- %716 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %716 %714
- %717 = OpCompositeExtract %float %534 2
- %718 = OpCompositeExtract %float %418 0
- %719 = OpCompositeExtract %float %418 1
- %720 = OpCompositeConstruct %v3float %717 %718 %719
- %721 = OpLoad %int %p
- OpStore %p %31
- OpStore %p %721
- %722 = OpCompositeExtract %float %468 2
- %723 = OpCompositeExtract %float %468 0
- %724 = OpCompositeExtract %float %556 0
- %725 = OpCompositeConstruct %v3float %722 %723 %724
- %726 = OpAccessChain %_ptr_Function_int %stack %541
- %727 = OpLoad %int %726
- %728 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %728 %31
- %729 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %729 %727
- %730 = OpLoad %int %h_1
- %731 = OpLoad %int %top
- OpStore %top %31
- OpStore %top %731
- %732 = OpCompositeExtract %float %443 2
- %733 = OpCompositeExtract %float %509 0
- %734 = OpCompositeExtract %float %443 0
- %735 = OpCompositeConstruct %v3float %732 %733 %734
- %736 = OpAccessChain %_ptr_Function_int %stack %460
- %737 = OpLoad %int %736
- %738 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %738 %31
- %739 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %739 %737
- %740 = OpLoad %int %p
- OpStore %p %31
- OpStore %p %740
- %742 = OpBitcast %uint %712
- %743 = OpIAdd %uint %uint_1 %742
- %741 = OpBitcast %int %743
- %744 = OpSLessThan %bool %741 %730
- OpSelectionMerge %745 None
- OpBranchConditional %744 %746 %745
- %746 = OpLabel
- %747 = OpAccessChain %_ptr_Function_int %stack %541
- %748 = OpLoad %int %747
- %749 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %749 %31
- %750 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %750 %748
- %751 = OpCompositeExtract %float %710 1
- %752 = OpCompositeExtract %float %608 0
- %753 = OpCompositeConstruct %v2float %751 %752
- %754 = OpLoad %int %l_1
- OpStore %l_1 %31
- OpStore %l_1 %754
- %755 = OpLoad %int %top
- %756 = OpAccessChain %_ptr_Function_int %stack %541
- %757 = OpLoad %int %756
- %758 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %758 %31
- %759 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %759 %757
- %760 = OpCompositeExtract %float %455 1
- %761 = OpCompositeExtract %float %443 1
- %762 = OpCompositeExtract %float %443 1
- %763 = OpCompositeConstruct %v3float %760 %761 %762
- %764 = OpIAdd %int %755 %int_1
- %765 = OpLoad %int %param_5
- OpStore %param_5 %31
- OpStore %param_5 %765
- OpStore %top %764
- %766 = OpAccessChain %_ptr_Function_int %stack %541
- %767 = OpLoad %int %766
- %768 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %768 %31
- %769 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %769 %767
- %770 = OpLoad %int %p
- %771 = OpLoad %int %param_5
- OpStore %param_5 %31
- OpStore %param_5 %771
- %772 = OpCompositeExtract %float %443 2
- %773 = OpCompositeExtract %float %443 0
- %774 = OpCompositeExtract %float %509 0
- %775 = OpCompositeConstruct %v3float %772 %773 %774
- %776 = OpLoad %int %p
- OpStore %p %31
- OpStore %p %776
- %777 = OpCompositeExtract %float %418 0
- %778 = OpCompositeExtract %float %597 0
- %779 = OpCompositeExtract %float %597 0
- %780 = OpCompositeConstruct %v3float %777 %778 %779
- %781 = OpAccessChain %_ptr_Function_int %stack %460
- %782 = OpLoad %int %781
- %783 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %783 %31
- %784 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %784 %782
- %785 = OpAccessChain %_ptr_Function_int %stack %511
- %786 = OpLoad %int %785
- %787 = OpAccessChain %_ptr_Function_int %stack %511
- OpStore %787 %31
- %788 = OpAccessChain %_ptr_Function_int %stack %511
- OpStore %788 %786
- %789 = OpCompositeExtract %float %468 0
- %790 = OpCompositeExtract %float %468 1
- %791 = OpCompositeConstruct %v2float %789 %790
- %792 = OpAccessChain %_ptr_Function_int %stack %764
- %794 = OpBitcast %uint %770
- %795 = OpIAdd %uint %uint_1 %794
- %793 = OpBitcast %int %795
- OpStore %792 %793
- %796 = OpLoad %_arr_int_uint_10 %stack
- OpStore %stack %96
- OpStore %stack %796
- %797 = OpLoad %int %top
- %798 = OpAccessChain %_ptr_Function_int %stack %541
- %799 = OpLoad %int %798
- %800 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %800 %31
- %801 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %801 %799
- %802 = OpCompositeExtract %float %480 1
- %803 = OpCompositeExtract %float %775 1
- %804 = OpCompositeConstruct %v2float %802 %803
- %805 = OpLoad %_arr_int_uint_10 %stack
- OpStore %stack %96
- OpStore %stack %805
- %806 = OpBitcast %int %uint_1
- %807 = OpIAdd %int %797 %806
- %808 = OpAccessChain %_ptr_Function_int %stack %764
- %809 = OpLoad %int %808
- %810 = OpAccessChain %_ptr_Function_int %stack %764
- OpStore %810 %31
- %811 = OpAccessChain %_ptr_Function_int %stack %764
- OpStore %811 %809
- OpStore %top %807
- %812 = OpLoad %int %param_4
- OpStore %param_4 %31
- OpStore %param_4 %812
- %813 = OpLoad %int %h_1
- %814 = OpAccessChain %_ptr_Function_int %stack %460
- %815 = OpLoad %int %814
- %816 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %816 %31
- %817 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %817 %815
- %818 = OpAccessChain %_ptr_Function_int %stack %426
- %819 = OpLoad %int %818
- %820 = OpAccessChain %_ptr_Function_int %stack %426
- OpStore %820 %31
- %821 = OpAccessChain %_ptr_Function_int %stack %426
- OpStore %821 %819
- %822 = OpAccessChain %_ptr_Function_int %stack %807
- OpStore %822 %813
- %823 = OpAccessChain %_ptr_Function_int %stack %541
- %824 = OpLoad %int %823
- %825 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %825 %31
- %826 = OpAccessChain %_ptr_Function_int %stack %541
- OpStore %826 %824
- %827 = OpCompositeExtract %float %509 1
- %828 = OpCompositeExtract %float %475 0
- %829 = OpCompositeExtract %float %475 0
- %830 = OpCompositeConstruct %v3float %827 %828 %829
- %831 = OpLoad %int %l_1
- OpStore %l_1 %31
- OpStore %l_1 %831
- OpBranch %745
- %745 = OpLabel
- %832 = OpAccessChain %_ptr_Function_int %stack %460
- %833 = OpLoad %int %832
- %834 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %834 %31
- %835 = OpAccessChain %_ptr_Function_int %stack %460
- OpStore %835 %833
+ 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
- %836 = OpLoad %int %l_1
- OpStore %l_1 %31
- OpStore %l_1 %836
- %837 = OpCompositeExtract %float %468 2
- %838 = OpCompositeExtract %float %475 0
- %839 = OpCompositeConstruct %v2float %837 %838
- %840 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %840
- OpBranch %483
- %484 = OpLabel
- %841 = OpLoad %int %h_1
+ %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 %841
+ 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 %404
- %843 = OpLabel
- %color = OpVariable %_ptr_Function_v3float Function %165
+ %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 %162
- %847 = OpLoad %v2float %uv
- OpStore %uv %162
- OpStore %uv %847
+ %uv = OpVariable %_ptr_Function_v2float Function %160
+ %846 = OpLoad %v2float %uv
+ OpStore %uv %160
+ OpStore %uv %846
OpStore %i_2 %31
- %848 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %848
- OpSelectionMerge %850 None
- OpBranchConditional %true %851 %850
- %851 = OpLabel
- %852 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %852
- %853 = OpLoad %int %i_2
- %854 = OpLoad %v2float %uv
- OpStore %uv %162
- OpStore %uv %854
- %855 = OpLoad %v3float %color
- OpStore %color %165
- OpStore %color %855
- %856 = OpCompositeExtract %float %423 1
- %857 = OpCompositeExtract %float %423 1
- %858 = OpCompositeConstruct %v2float %856 %857
- %859 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %859
- OpBranch %850
+ %847 = OpLoad %QuicksortObject %obj
+ OpStore %obj %15
+ OpStore %obj %847
+ OpSelectionMerge %849 None
+ OpBranchConditional %true %850 %849
%850 = OpLabel
- %860 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %860
- %861 = OpLoad %int %i_2
+ %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 %861
- %862 = OpFunctionCall %void %quicksort_
- %863 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %863
- %864 = OpLoad %v4float %gl_FragCoord
+ 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 %162
+ OpStore %uv %160
OpStore %uv %865
- %866 = OpLoad %v2float %uv
- OpStore %uv %162
- OpStore %uv %866
- %867 = OpCompositeExtract %float %864 0
- %868 = OpCompositeExtract %float %864 1
- %869 = OpCompositeConstruct %v2float %867 %868
- %870 = OpCompositeExtract %float %869 1
- %871 = OpCompositeExtract %float %162 1
- %872 = OpCompositeExtract %float %162 1
- %873 = OpCompositeConstruct %v3float %870 %871 %872
- %874 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %874
- %875 = OpLoad %v2float %uv
- OpStore %uv %162
- OpStore %uv %875
- %877 = OpAccessChain %_ptr_Uniform_v2float %x_188 %uint_0
- %878 = OpLoad %v2float %877
- %879 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %879
- %880 = OpCompositeExtract %float %864 1
- %881 = OpCompositeExtract %float %864 3
- %882 = OpCompositeConstruct %v3float %880 %float_3 %881
- %883 = OpLoad %v3float %color
- OpStore %color %165
- OpStore %color %883
- %884 = OpFDiv %v2float %869 %878
- %885 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %885
- %886 = OpCompositeExtract %float %162 0
- %887 = OpCompositeExtract %float %869 1
- %888 = OpCompositeConstruct %v2float %886 %887
+ %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 %165
- %890 = OpLoad %v3float %color
- OpStore %color %165
- OpStore %color %890
+ OpStore %color %163
OpStore %color %889
- OpStore %uv %884
+ OpStore %color %888
+ OpStore %uv %883
+ OpStore %color %890
+ %891 = OpLoad %v3float %color
+ OpStore %color %163
OpStore %color %891
- %892 = OpLoad %v3float %color
- OpStore %color %165
- OpStore %color %892
- %893 = OpCompositeExtract %float %869 0
- %894 = OpCompositeExtract %float %869 1
- %895 = OpCompositeExtract %float %162 1
- %896 = OpCompositeConstruct %v3float %893 %894 %895
- %897 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %897
- %898 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- %899 = OpLoad %int %898
- %900 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %900 %31
- %901 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %901 %899
- %902 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- %903 = OpLoad %int %902
- %904 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %904
- %905 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- %906 = OpLoad %int %905
- %907 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %907 %31
- %908 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %908 %906
- %909 = OpAccessChain %_ptr_Function_float %color %uint_0
- %910 = OpLoad %float %909
- %911 = OpAccessChain %_ptr_Function_float %color %uint_0
- %912 = OpLoad %float %911
- %913 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %913 %914
- %915 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %915 %912
- %917 = OpLoad %int %i_2
+ %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 %917
- %918 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %918
- %919 = OpCompositeExtract %float %896 0
- %920 = OpCompositeExtract %float %888 0
- %921 = OpCompositeExtract %float %888 1
- %922 = OpCompositeConstruct %v3float %919 %920 %921
- %923 = OpAccessChain %_ptr_Function_float %color %uint_0
- %924 = OpConvertSToF %float %903
- %925 = OpFAdd %float %910 %924
- OpStore %923 %925
+ 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 %162
+ OpStore %uv %160
OpStore %uv %926
- %927 = OpLoad %v2float %uv
- OpStore %uv %162
- OpStore %uv %927
- %928 = OpCompositeExtract %float %864 1
- %929 = OpCompositeExtract %float %864 1
- %930 = OpCompositeConstruct %v2float %928 %929
- %931 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %932 = OpLoad %float %931
- %933 = OpCompositeExtract %float %884 1
- %934 = OpCompositeExtract %float %884 0
- %935 = OpCompositeConstruct %v2float %933 %934
- %936 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %937 = OpLoad %float %936
+ %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 %914
- %939 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %939 %937
- %940 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %940
- %942 = OpFOrdGreaterThan %bool %932 %float_0_25
- OpSelectionMerge %943 None
- OpBranchConditional %942 %944 %943
- %944 = OpLabel
- %945 = OpLoad %int %i_2
- OpStore %i_2 %31
- OpStore %i_2 %945
- %946 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- %947 = OpLoad %int %946
- %948 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %948 %31
- %949 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %949 %947
- %950 = OpCompositeExtract %float %873 1
- %951 = OpCompositeExtract %float %873 1
- %952 = OpCompositeConstruct %v3float %914 %950 %951
- %953 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %954 = OpLoad %float %953
- %955 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %955 %914
- %956 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %956 %954
- %957 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_1
- %958 = OpLoad %int %957
- %959 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %959
- %960 = OpCompositeExtract %float %930 0
- %961 = OpCompositeExtract %float %930 0
- %962 = OpCompositeConstruct %v2float %960 %961
- %963 = OpLoad %v2float %uv
- OpStore %uv %162
- OpStore %uv %963
- %964 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %964
- %966 = OpLoad %int %i_2
- OpStore %i_2 %31
- OpStore %i_2 %966
- %967 = OpAccessChain %_ptr_Function_float %color %31
- %968 = OpLoad %float %967
- %969 = OpAccessChain %_ptr_Function_float %color %31
- %970 = OpLoad %float %969
- %971 = OpAccessChain %_ptr_Function_float %color %31
- OpStore %971 %914
- %972 = OpAccessChain %_ptr_Function_float %color %31
- OpStore %972 %970
- %973 = OpLoad %v3float %color
- OpStore %color %165
- OpStore %color %973
- %974 = OpLoad %v3float %color
- OpStore %color %165
- OpStore %color %974
- %975 = OpCompositeExtract %float %930 1
- %976 = OpCompositeExtract %float %930 1
- %977 = OpCompositeExtract %float %162 1
- %978 = OpCompositeConstruct %v3float %975 %976 %977
- %979 = OpAccessChain %_ptr_Function_float %color %31
- %980 = OpLoad %float %979
- %981 = OpAccessChain %_ptr_Function_float %color %31
- OpStore %981 %914
- %982 = OpAccessChain %_ptr_Function_float %color %31
- OpStore %982 %980
- %983 = OpAccessChain %_ptr_Function_float %color %uint_0
- %984 = OpConvertSToF %float %958
- %985 = OpFAdd %float %984 %968
- OpStore %983 %985
- %986 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- %987 = OpLoad %int %986
- %988 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %988 %31
- %989 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %989 %987
- OpBranch %943
+ 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
- %990 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %991 = OpLoad %float %990
+ %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 %914
+ OpStore %992 %990
%993 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %993 %991
- %994 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %995 = OpLoad %float %994
+ %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 %914
+ OpStore %996 %994
%997 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %997 %995
- %998 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %999 = OpLoad %float %998
- %1000 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1001 = OpLoad %float %1000
+ %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 %914
- %1003 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1003 %1001
- %1004 = OpCompositeExtract %float %922 2
- %1005 = OpCompositeExtract %float %922 1
- %1006 = OpCompositeExtract %float %922 1
- %1007 = OpCompositeConstruct %v3float %1004 %1005 %1006
- %1008 = OpLoad %v2float %uv
- OpStore %uv %162
- OpStore %uv %1008
- %1009 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1010 = OpLoad %float %1009
+ 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 %914
+ OpStore %1011 %1009
%1012 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1012 %1010
- %1013 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1014 = OpLoad %float %1013
+ %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 %914
- %1016 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1016 %1014
- %1018 = OpFOrdGreaterThan %bool %999 %float_0_5
- OpSelectionMerge %1019 None
- OpBranchConditional %1018 %1020 %1019
- %1020 = OpLabel
- %1021 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1022 = OpLoad %float %1021
- %1023 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1023 %914
- %1024 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1024 %1022
- %1025 = OpCompositeExtract %float %162 0
- %1026 = OpCompositeExtract %float %162 0
- %1027 = OpCompositeConstruct %v2float %1025 %1026
- %1028 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1029 = OpLoad %float %1028
- %1030 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1030 %914
- %1031 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1031 %1029
- %1032 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1033 = OpLoad %float %1032
- %1034 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1034 %914
- %1035 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1035 %1033
- %1036 = OpCompositeExtract %float %922 0
- %1037 = OpCompositeExtract %float %922 2
- %1038 = OpCompositeExtract %float %162 1
- %1039 = OpCompositeConstruct %v3float %1036 %1037 %1038
- %1040 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1041 = OpLoad %float %1040
- %1042 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1042 %914
- %1043 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1043 %1041
- %1045 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_2
- %1046 = OpLoad %int %1045
- %1047 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1048 = OpLoad %float %1047
- %1049 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1049 %914
- %1050 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1050 %1048
- %1051 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1052 = OpLoad %float %1051
- %1053 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1053 %914
- %1054 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1054 %1052
- %1055 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_2
- %1056 = OpLoad %int %1055
- %1057 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_2
- OpStore %1057 %31
- %1058 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_2
- OpStore %1058 %1056
- %1059 = OpCompositeExtract %float %888 1
- %1060 = OpCompositeExtract %float %878 0
- %1061 = OpCompositeConstruct %v2float %1059 %1060
- %1062 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1063 = OpLoad %float %1062
- %1064 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1064 %914
- %1065 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1065 %1063
- %1066 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1067 = OpLoad %float %1066
- %1068 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_2
- %1069 = OpLoad %int %1068
- %1070 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_2
- OpStore %1070 %31
- %1071 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_2
- OpStore %1071 %1069
- %1072 = OpCompositeExtract %float %1039 0
- %1073 = OpCompositeExtract %float %869 0
- %1074 = OpCompositeConstruct %v2float %1072 %1073
- %1075 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1076 = OpLoad %float %1075
- %1077 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1077 %914
- %1078 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1078 %1076
- %1079 = OpLoad %int %i_2
- OpStore %i_2 %31
- OpStore %i_2 %1079
- %1080 = OpCompositeExtract %float %935 1
- %1081 = OpCompositeConstruct %v2float %1080 %914
- %1082 = OpLoad %int %i_2
- OpStore %i_2 %31
- OpStore %i_2 %1082
- %1083 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1084 = OpConvertSToF %float %1046
- %1085 = OpFAdd %float %1084 %1067
- OpStore %1083 %1085
- %1086 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1087 = OpLoad %float %1086
- %1088 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1088 %914
- %1089 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1089 %1087
- OpBranch %1019
+ OpStore %1015 %1013
+ %1017 = OpFOrdGreaterThan %bool %998 %float_0_5
+ OpSelectionMerge %1018 None
+ OpBranchConditional %1017 %1019 %1018
%1019 = OpLabel
- %1090 = OpLoad %int %i_2
+ %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 %1090
- %1091 = OpCompositeExtract %float %878 0
- %1092 = OpCompositeExtract %float %878 0
- %1093 = OpCompositeConstruct %v2float %1091 %1092
- %1094 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1095 = OpLoad %float %1094
+ 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 %914
- %1097 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1097 %1095
- %1098 = OpAccessChain %_ptr_Function_float %uv %31
- %1099 = OpLoad %float %1098
- %1100 = OpLoad %v3float %color
- OpStore %color %165
- OpStore %color %1100
- %1101 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1102 = OpLoad %float %1101
+ 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 %914
- %1104 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1104 %1102
- %1106 = OpFOrdGreaterThan %bool %1099 %float_0_75
- OpSelectionMerge %1107 None
- OpBranchConditional %1106 %1108 %1107
- %1108 = OpLabel
- %1109 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1110 = OpLoad %float %1109
- %1111 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1111 %914
- %1112 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1112 %1110
- %1114 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_3
- %1115 = OpLoad %int %1114
- %1116 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1117 = OpLoad %float %1116
- %1118 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1118 %914
- %1119 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1119 %1117
- %1120 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %1120
- %1121 = OpCompositeExtract %float %1093 0
- %1122 = OpCompositeExtract %float %1093 0
- %1123 = OpCompositeExtract %float %1093 0
- %1124 = OpCompositeConstruct %v3float %1121 %1122 %1123
- %1125 = OpAccessChain %_ptr_Function_float %uv %31
- %1126 = OpLoad %float %1125
- %1127 = OpAccessChain %_ptr_Function_float %uv %31
- OpStore %1127 %914
- %1128 = OpAccessChain %_ptr_Function_float %uv %31
- OpStore %1128 %1126
- %1129 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1130 = OpLoad %float %1129
- %1131 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1131 %914
- %1132 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1132 %1130
- %1133 = OpAccessChain %_ptr_Function_float %color %uint_2
- %1134 = OpLoad %float %1133
- %1135 = OpLoad %v3float %color
- OpStore %color %165
- OpStore %color %1135
- %1136 = OpCompositeExtract %float %1093 0
- %1137 = OpCompositeExtract %float %878 1
- %1138 = OpCompositeExtract %float %1093 1
- %1139 = OpCompositeConstruct %v3float %1136 %1137 %1138
- %1140 = OpAccessChain %_ptr_Function_float %color %uint_2
- %1141 = OpLoad %float %1140
- %1142 = OpAccessChain %_ptr_Function_float %color %uint_2
- OpStore %1142 %914
- %1143 = OpAccessChain %_ptr_Function_float %color %uint_2
- OpStore %1143 %1141
- %1144 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- %1145 = OpLoad %int %1144
- %1146 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %1146 %31
- %1147 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %1147 %1145
- %1148 = OpAccessChain %_ptr_Function_float %color %uint_2
- %1149 = OpLoad %float %1148
- %1150 = OpAccessChain %_ptr_Function_float %color %uint_2
- OpStore %1150 %914
- %1151 = OpAccessChain %_ptr_Function_float %color %uint_2
- OpStore %1151 %1149
- %1152 = OpAccessChain %_ptr_Function_float %color %uint_2
- %1153 = OpConvertSToF %float %1115
- %1154 = OpFAdd %float %1134 %1153
- OpStore %1152 %1154
- %1155 = OpLoad %v2float %uv
- OpStore %uv %162
- OpStore %uv %1155
- %1156 = OpCompositeExtract %float %162 1
- %1157 = OpCompositeExtract %float %162 1
- %1158 = OpCompositeConstruct %v2float %1156 %1157
- OpBranch %1107
+ OpStore %1103 %1101
+ %1105 = OpFOrdGreaterThan %bool %1098 %float_0_75
+ OpSelectionMerge %1106 None
+ OpBranchConditional %1105 %1107 %1106
%1107 = OpLabel
- %1159 = OpAccessChain %_ptr_Function_float %uv %31
- %1160 = OpLoad %float %1159
+ %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 %914
- %1162 = OpAccessChain %_ptr_Function_float %uv %31
- OpStore %1162 %1160
- %1163 = OpCompositeExtract %float %930 0
- %1164 = OpCompositeExtract %float %930 1
- %1165 = OpCompositeExtract %float %930 1
- %1166 = OpCompositeConstruct %v3float %1163 %1164 %1165
- %1168 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4
- %1169 = OpLoad %int %1168
- %1170 = OpAccessChain %_ptr_Function_float %uv %31
- %1171 = OpLoad %float %1170
+ 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 %914
- %1173 = OpAccessChain %_ptr_Function_float %uv %31
- OpStore %1173 %1171
- %1174 = OpLoad %v3float %color
- OpStore %color %165
- OpStore %color %1174
- %1175 = OpCompositeExtract %float %162 1
- %1176 = OpCompositeExtract %float %922 0
- %1177 = OpCompositeExtract %float %922 0
- %1178 = OpCompositeConstruct %v3float %1175 %1176 %1177
- %1179 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4
- %1180 = OpLoad %int %1179
+ 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 %31
- %1182 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4
- OpStore %1182 %1180
- %1183 = OpCompositeExtract %float %878 0
- %1184 = OpCompositeExtract %float %864 2
- %1185 = OpCompositeConstruct %v2float %1183 %1184
- %1186 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1187 = OpLoad %float %1186
+ 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 %914
- %1189 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1189 %1187
- %1190 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1191 = OpLoad %float %1190
- %1192 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1193 = OpLoad %float %1192
+ 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 %914
- %1195 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1195 %1193
- %1196 = OpCompositeExtract %float %1093 0
- %1197 = OpCompositeExtract %float %888 0
- %1198 = OpCompositeConstruct %v2float %1196 %1197
- %1199 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1200 = OpLoad %float %1199
+ 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 %914
- %1202 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1202 %1200
- %1203 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1204 = OpLoad %float %1203
+ 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 %914
- %1206 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1206 %1204
- %1207 = OpCompositeExtract %float %896 2
- %1208 = OpCompositeExtract %float %1007 1
- %1209 = OpCompositeConstruct %v2float %1207 %1208
- %1210 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1211 = OpConvertSToF %float %1169
- %1212 = OpFAdd %float %1191 %1211
- OpStore %1210 %1212
- %1213 = OpCompositeExtract %float %1166 0
- %1214 = OpCompositeConstruct %v3float %914 %1213 %914
- %1215 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1216 = OpLoad %float %1215
+ 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 %914
- %1218 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1218 %1216
- %1219 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1220 = OpLoad %float %1219
+ 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 %914
- %1222 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1222 %1220
- %1223 = OpCompositeExtract %float %1166 0
- %1224 = OpCompositeExtract %float %1166 1
- %1225 = OpCompositeConstruct %v2float %1223 %1224
- %1226 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1227 = OpLoad %float %1226
+ 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 %914
+ OpStore %1228 %1226
%1229 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1229 %1227
- %1230 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1231 = OpLoad %float %1230
- %1232 = OpLoad %int %i_2
+ %1230 = OpLoad %float %1229
+ %1231 = OpLoad %int %i_2
OpStore %i_2 %31
- OpStore %i_2 %1232
- %1233 = OpCompositeExtract %float %930 1
- %1234 = OpCompositeConstruct %v3float %914 %1233 %914
- %1235 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- %1236 = OpLoad %int %1235
- %1237 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %1237 %31
- %1238 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %1238 %1236
- %1239 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1240 = OpLoad %float %1239
+ 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 %914
- %1242 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1242 %1240
- %1243 = OpCompositeExtract %float %162 0
- %1244 = OpCompositeExtract %float %162 0
- %1245 = OpCompositeConstruct %v3float %1243 %1244 %914
- %1246 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1247 = OpLoad %float %1246
+ 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 %914
- %1249 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1249 %1247
- %1250 = OpFOrdGreaterThan %bool %1231 %float_0_25
- OpSelectionMerge %1251 None
- OpBranchConditional %1250 %1252 %1251
- %1252 = OpLabel
- %1253 = OpCompositeExtract %float %162 0
- %1254 = OpCompositeExtract %float %1245 2
- %1255 = OpCompositeConstruct %v2float %1253 %1254
- %1256 = OpLoad %v3float %color
- OpStore %color %165
- OpStore %color %1256
- %1258 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_5
- %1259 = OpLoad %int %1258
- %1260 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1261 = OpLoad %float %1260
+ 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 %914
- %1263 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1263 %1261
+ 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 = OpLoad %int %i_2
- OpStore %i_2 %31
- OpStore %i_2 %1265
- %1266 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1267 = OpLoad %float %1266
- %1268 = OpAccessChain %_ptr_Function_float %uv %31
- %1269 = OpLoad %float %1268
+ %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 %914
- %1271 = OpAccessChain %_ptr_Function_float %uv %31
- OpStore %1271 %1269
- %1272 = OpCompositeExtract %float %935 0
- %1273 = OpCompositeExtract %float %1198 1
- %1274 = OpCompositeExtract %float %935 1
- %1275 = OpCompositeConstruct %v3float %1272 %1273 %1274
- %1276 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %1276
- %1277 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1278 = OpLoad %float %1277
+ 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 %914
- %1280 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1280 %1278
- %1281 = OpLoad %int %i_2
+ OpStore %1279 %1277
+ %1280 = OpLoad %int %i_2
OpStore %i_2 %31
- OpStore %i_2 %1281
- %1282 = OpCompositeExtract %float %864 3
- %1283 = OpCompositeExtract %float %864 3
- %1284 = OpCompositeExtract %float %884 0
- %1285 = OpCompositeConstruct %v3float %1282 %1283 %1284
- %1286 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1287 = OpLoad %float %1286
+ 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 %914
- %1289 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1289 %1287
- %1290 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1291 = OpConvertSToF %float %1259
- %1292 = OpFAdd %float %1291 %1267
- OpStore %1290 %1292
- %1293 = OpCompositeExtract %float %930 1
- %1294 = OpCompositeExtract %float %888 0
- %1295 = OpCompositeExtract %float %930 1
- %1296 = OpCompositeConstruct %v3float %1293 %1294 %1295
- %1297 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1298 = OpLoad %float %1297
+ 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 %914
- %1300 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1300 %1298
- OpBranch %1251
- %1251 = OpLabel
- %1301 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1302 = OpLoad %float %1301
+ 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 %914
- %1304 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1304 %1302
- %1305 = OpCompositeExtract %float %1093 0
- %1306 = OpCompositeExtract %float %888 1
- %1307 = OpCompositeExtract %float %888 0
- %1308 = OpCompositeConstruct %v3float %1305 %1306 %1307
- %1309 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1310 = OpLoad %float %1309
+ 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 %914
- %1312 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1312 %1310
- %1313 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4
- %1314 = OpLoad %int %1313
+ 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 %31
- %1316 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4
- OpStore %1316 %1314
- %1317 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1318 = OpLoad %float %1317
- %1319 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- %1320 = OpLoad %int %1319
- %1321 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %1321 %31
- %1322 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %1322 %1320
- %1323 = OpFOrdGreaterThan %bool %1318 %float_0_5
- OpSelectionMerge %1324 None
- OpBranchConditional %1323 %1325 %1324
- %1325 = OpLabel
- %1326 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1327 = OpLoad %float %1326
- %1328 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1328 %914
- %1329 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1329 %1327
- %1330 = OpCompositeExtract %float %1245 1
- %1331 = OpCompositeExtract %float %935 1
- %1332 = OpCompositeConstruct %v2float %1330 %1331
- %1333 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1334 = OpLoad %float %1333
- %1335 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1335 %914
- %1336 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1336 %1334
- %1337 = OpCompositeExtract %float %882 2
- %1338 = OpCompositeExtract %float %882 1
- %1339 = OpCompositeConstruct %v2float %1337 %1338
- %1340 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1341 = OpLoad %float %1340
- %1342 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1342 %914
- %1343 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1343 %1341
- %1345 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_6
- %1346 = OpLoad %int %1345
- %1347 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1348 = OpLoad %float %1347
- %1349 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1349 %914
- %1350 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1350 %1348
- %1351 = OpLoad %int %i_2
- OpStore %i_2 %31
- OpStore %i_2 %1351
- %1352 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4
- %1353 = OpLoad %int %1352
- %1354 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4
- OpStore %1354 %31
- %1355 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4
- OpStore %1355 %1353
- %1356 = OpCompositeExtract %float %1178 2
- %1357 = OpCompositeExtract %float %1178 1
- %1358 = OpCompositeConstruct %v2float %1356 %1357
- %1359 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1360 = OpLoad %float %1359
- %1361 = OpLoad %v2float %uv
- OpStore %uv %162
- OpStore %uv %1361
- %1362 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1363 = OpLoad %float %1362
- %1364 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1364 %914
- %1365 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1365 %1363
- %1366 = OpCompositeExtract %float %1198 1
- %1367 = OpCompositeExtract %float %1198 0
- %1368 = OpCompositeConstruct %v2float %1366 %1367
- %1369 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_6
- %1370 = OpLoad %int %1369
- %1371 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_6
- OpStore %1371 %31
- %1372 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_6
- OpStore %1372 %1370
- %1373 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_6
- %1374 = OpLoad %int %1373
- %1375 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_6
- OpStore %1375 %31
- %1376 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_6
- OpStore %1376 %1374
- %1377 = OpCompositeExtract %float %1245 2
- %1378 = OpCompositeExtract %float %1245 2
- %1379 = OpCompositeConstruct %v2float %1377 %1378
- %1380 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %1380
- %1381 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1382 = OpConvertSToF %float %1346
- %1383 = OpFAdd %float %1382 %1360
- OpStore %1381 %1383
- %1384 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1385 = OpLoad %float %1384
- %1386 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1386 %914
- %1387 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1387 %1385
- %1388 = OpCompositeExtract %float %930 0
- %1389 = OpCompositeConstruct %v2float %float_2 %1388
- %1390 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1391 = OpLoad %float %1390
- %1392 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1392 %914
- %1393 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1393 %1391
- OpBranch %1324
+ 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
- %1394 = OpCompositeExtract %float %935 1
- %1395 = OpCompositeExtract %float %935 1
- %1396 = OpCompositeConstruct %v2float %1394 %1395
- %1397 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1398 = OpLoad %float %1397
+ %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 %914
- %1400 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1400 %1398
- %1401 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1402 = OpLoad %float %1401
- %1403 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %1403
- %1404 = OpCompositeExtract %float %1198 0
- %1405 = OpCompositeExtract %float %1198 1
- %1406 = OpCompositeConstruct %v2float %1404 %1405
- %1407 = OpAccessChain %_ptr_Function_float %uv %31
- %1408 = OpLoad %float %1407
+ 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 %914
- %1410 = OpAccessChain %_ptr_Function_float %uv %31
- OpStore %1410 %1408
- %1411 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1412 = OpLoad %float %1411
+ 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 %914
- %1414 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1414 %1412
- %1415 = OpCompositeExtract %float %878 0
- %1416 = OpCompositeExtract %float %878 1
- %1417 = OpCompositeExtract %float %878 1
- %1418 = OpCompositeConstruct %v3float %1415 %1416 %1417
- %1419 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4
- %1420 = OpLoad %int %1419
+ 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 %31
- %1422 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4
- OpStore %1422 %1420
- %1423 = OpFOrdGreaterThan %bool %1402 %float_0_75
- OpSelectionMerge %1424 None
- OpBranchConditional %1423 %1425 %1424
- %1425 = OpLabel
- %1426 = OpLoad %v3float %color
- OpStore %color %165
- OpStore %color %1426
- %1427 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1428 = OpLoad %float %1427
- %1429 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1429 %914
- %1430 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1430 %1428
- %1431 = OpCompositeExtract %float %884 1
- %1432 = OpCompositeExtract %float %884 0
- %1433 = OpCompositeExtract %float %884 1
- %1434 = OpCompositeConstruct %v3float %1431 %1432 %1433
- %1435 = OpLoad %v3float %color
- OpStore %color %165
- OpStore %color %1435
- %1437 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_7
- %1438 = OpLoad %int %1437
- %1439 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1440 = OpLoad %float %1439
- %1441 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1441 %914
- %1442 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1442 %1440
- %1443 = OpCompositeExtract %float %1198 0
- %1444 = OpCompositeExtract %float %1093 1
- %1445 = OpCompositeExtract %float %1093 0
- %1446 = OpCompositeConstruct %v3float %1443 %1444 %1445
- %1447 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1448 = OpLoad %float %1447
- %1449 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1449 %914
- %1450 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1450 %1448
- %1451 = OpCompositeExtract %float %1214 0
- %1452 = OpCompositeExtract %float %162 1
- %1453 = OpCompositeConstruct %v2float %1451 %1452
- %1454 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- %1455 = OpLoad %int %1454
- %1456 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %1456 %31
- %1457 = OpAccessChain %_ptr_Private_int %obj %uint_0 %500
- OpStore %1457 %1455
- %1458 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1459 = OpLoad %float %1458
- %1460 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1460 %914
- %1461 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1461 %1459
- %1462 = OpCompositeExtract %float %1225 0
- %1463 = OpCompositeExtract %float %1225 1
- %1464 = OpCompositeExtract %float %1225 0
- %1465 = OpCompositeConstruct %v3float %1462 %1463 %1464
- %1466 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1467 = OpLoad %float %1466
- %1468 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1468 %914
- %1469 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1469 %1467
- %1470 = OpAccessChain %_ptr_Function_float %color %uint_2
- %1471 = OpLoad %float %1470
- %1472 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1473 = OpLoad %float %1472
- %1474 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1474 %914
- %1475 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1475 %1473
- %1476 = OpCompositeExtract %float %864 0
- %1477 = OpCompositeExtract %float %864 1
- %1478 = OpCompositeConstruct %v2float %1476 %1477
- %1479 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1480 = OpLoad %float %1479
- %1481 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1481 %914
- %1482 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1482 %1480
- %1483 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1484 = OpLoad %float %1483
- %1485 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1485 %914
- %1486 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1486 %1484
- %1487 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1488 = OpLoad %float %1487
- %1489 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1489 %914
- %1490 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1490 %1488
- %1491 = OpCompositeExtract %float %1478 1
- %1492 = OpCompositeExtract %float %1478 1
- %1493 = OpCompositeExtract %float %1418 2
- %1494 = OpCompositeConstruct %v3float %1491 %1492 %1493
- %1495 = OpAccessChain %_ptr_Function_float %color %uint_2
- %1496 = OpLoad %float %1495
- %1497 = OpAccessChain %_ptr_Function_float %color %uint_2
- OpStore %1497 %914
- %1498 = OpAccessChain %_ptr_Function_float %color %uint_2
- OpStore %1498 %1496
- %1499 = OpAccessChain %_ptr_Function_float %color %uint_2
- %1500 = OpConvertSToF %float %1438
- %1501 = OpFAdd %float %1500 %1471
- OpStore %1499 %1501
- %1502 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1503 = OpLoad %float %1502
- %1504 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1504 %914
- %1505 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1505 %1503
- %1506 = OpCompositeExtract %float %922 0
- %1507 = OpCompositeExtract %float %922 2
- %1508 = OpCompositeConstruct %v2float %1506 %1507
- %1509 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1510 = OpLoad %float %1509
- %1511 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1511 %914
- %1512 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1512 %1510
- OpBranch %1424
+ OpStore %1421 %1419
+ %1422 = OpFOrdGreaterThan %bool %1401 %float_0_75
+ OpSelectionMerge %1423 None
+ OpBranchConditional %1422 %1424 %1423
%1424 = OpLabel
- %1513 = OpLoad %int %i_2
+ %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 %1513
- %1514 = OpCompositeExtract %float %896 1
- %1515 = OpCompositeExtract %float %884 1
- %1516 = OpCompositeConstruct %v2float %1514 %1515
- %1517 = OpLoad %v2float %uv
- OpStore %uv %162
- OpStore %uv %1517
- %1519 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_8
- %1520 = OpLoad %int %1519
- %1521 = OpLoad %int %i_2
+ 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 %1521
- %1522 = OpCompositeExtract %float %869 0
- %1523 = OpCompositeExtract %float %896 2
- %1524 = OpCompositeConstruct %v2float %1522 %1523
- %1525 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_8
- %1526 = OpLoad %int %1525
+ 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 %31
- %1528 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_8
- OpStore %1528 %1526
- %1529 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1530 = OpLoad %float %1529
+ 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 %914
- %1532 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1532 %1530
- %1533 = OpCompositeExtract %float %922 1
- %1534 = OpCompositeConstruct %v2float %1533 %914
- %1535 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1536 = OpLoad %float %1535
+ 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 %914
- %1538 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1538 %1536
- %1539 = OpCompositeExtract %float %1534 0
- %1540 = OpCompositeExtract %float %1534 1
- %1541 = OpCompositeExtract %float %1534 0
- %1542 = OpCompositeConstruct %v3float %1539 %1540 %1541
- %1543 = OpAccessChain %_ptr_Function_float %color %uint_2
- %1544 = OpLoad %float %1543
+ 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 %914
+ OpStore %1545 %1543
%1546 = OpAccessChain %_ptr_Function_float %color %uint_2
- OpStore %1546 %1544
- %1547 = OpAccessChain %_ptr_Function_float %color %uint_2
- %1548 = OpLoad %float %1547
- %1549 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1550 = OpLoad %float %1549
+ %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 %914
- %1552 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1552 %1550
- %1553 = OpCompositeExtract %float %1406 0
- %1554 = OpCompositeExtract %float %1396 0
- %1555 = OpCompositeConstruct %v2float %1553 %1554
- %1556 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4
- %1557 = OpLoad %int %1556
+ 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 %31
- %1559 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4
- OpStore %1559 %1557
- %1560 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1561 = OpLoad %float %1560
+ 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 %914
- %1563 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1563 %1561
- %1564 = OpCompositeExtract %float %162 0
- %1565 = OpCompositeExtract %float %162 0
- %1566 = OpCompositeConstruct %v2float %1564 %1565
- %1567 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1568 = OpLoad %float %1567
+ 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 %914
- %1570 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1570 %1568
- %1571 = OpAccessChain %_ptr_Function_float %color %uint_2
- %1572 = OpConvertSToF %float %1520
- %1573 = OpFAdd %float %1548 %1572
- OpStore %1571 %1573
- %1574 = OpLoad %v2float %uv
- OpStore %uv %162
- OpStore %uv %1574
- %1575 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1576 = OpLoad %float %1575
+ 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 %914
- %1578 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1578 %1576
- %1579 = OpCompositeExtract %float %162 1
- %1580 = OpCompositeExtract %float %162 0
- %1581 = OpCompositeExtract %float %1555 1
- %1582 = OpCompositeConstruct %v3float %1579 %1580 %1581
- %1583 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1584 = OpLoad %float %1583
+ 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 %914
+ OpStore %1585 %1583
%1586 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1586 %1584
- %1587 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1588 = OpLoad %float %1587
- %1589 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1590 = OpLoad %float %1589
+ %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 %914
- %1592 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1592 %1590
- %1593 = OpCompositeExtract %float %1524 1
- %1594 = OpCompositeExtract %float %1524 0
- %1595 = OpCompositeExtract %float %873 2
- %1596 = OpCompositeConstruct %v3float %1593 %1594 %1595
- %1597 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1598 = OpLoad %float %1597
+ 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 %914
+ OpStore %1599 %1597
%1600 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1600 %1598
- %1601 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1602 = OpLoad %float %1601
- %1603 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1604 = OpLoad %float %1603
+ %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 %914
- %1606 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1606 %1604
- %1607 = OpAccessChain %_ptr_Function_float %color %uint_2
- %1608 = OpLoad %float %1607
+ 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 %914
- %1610 = OpAccessChain %_ptr_Function_float %color %uint_2
- OpStore %1610 %1608
- %1611 = OpCompositeExtract %float %1308 1
- %1612 = OpCompositeExtract %float %1308 2
- %1613 = OpCompositeConstruct %v3float %float_2 %1611 %1612
- %1614 = OpAccessChain %_ptr_Function_float %color %uint_2
- %1615 = OpLoad %float %1614
+ 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 %914
- %1617 = OpAccessChain %_ptr_Function_float %color %uint_2
- OpStore %1617 %1615
- %1618 = OpLoad %int %i_2
+ OpStore %1616 %1614
+ %1617 = OpLoad %int %i_2
OpStore %i_2 %31
- OpStore %i_2 %1618
- %1619 = OpCompositeExtract %float %1308 2
- %1620 = OpCompositeExtract %float %1308 1
- %1621 = OpCompositeConstruct %v2float %1619 %1620
- %1622 = OpLoad %v3float %color
- OpStore %color %165
- OpStore %color %1622
- %1623 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1624 = OpLoad %float %1623
+ 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 %914
- %1626 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1626 %1624
- %1627 = OpCompositeExtract %float %935 1
- %1628 = OpCompositeExtract %float %935 1
- %1629 = OpCompositeExtract %float %935 1
- %1630 = OpCompositeConstruct %v3float %1627 %1628 %1629
- %1631 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4
- %1632 = OpLoad %int %1631
+ 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 %31
- %1634 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_4
- OpStore %1634 %1632
- %1637 = OpFSub %float %1588 %1602
- %1635 = OpExtInst %float %1636 FAbs %1637
- %1638 = OpFOrdLessThan %bool %1635 %float_0_25
- OpSelectionMerge %1639 None
- OpBranchConditional %1638 %1640 %1639
- %1640 = OpLabel
- %1641 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1642 = OpLoad %float %1641
- %1643 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1643 %914
- %1644 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1644 %1642
- %1645 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %1645
- %1646 = OpCompositeExtract %float %1542 2
- %1647 = OpCompositeExtract %float %1542 0
- %1648 = OpCompositeExtract %float %873 0
- %1649 = OpCompositeConstruct %v3float %1646 %1647 %1648
- %1650 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_8
- %1651 = OpLoad %int %1650
- %1652 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_8
- OpStore %1652 %31
- %1653 = OpAccessChain %_ptr_Private_int %obj %uint_0 %int_8
- OpStore %1653 %1651
- %1655 = OpAccessChain %_ptr_Private_int %obj %uint_0 %uint_9
- %1656 = OpLoad %int %1655
- %1657 = OpCompositeExtract %float %1185 1
- %1658 = OpCompositeExtract %float %1185 1
- %1659 = OpCompositeExtract %float %1185 1
- %1660 = OpCompositeConstruct %v3float %1657 %1658 %1659
- %1661 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1662 = OpLoad %float %1661
- %1663 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1663 %914
- %1664 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1664 %1662
- %1665 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1666 = OpLoad %float %1665
- %1667 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1668 = OpLoad %float %1667
- %1669 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1669 %914
- %1670 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1670 %1668
- %1671 = OpCompositeExtract %float %1516 0
- %1672 = OpCompositeExtract %float %1516 1
- %1673 = OpCompositeConstruct %v2float %1671 %1672
- %1674 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1675 = OpLoad %float %1674
- %1676 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1676 %914
- %1677 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1677 %1675
- %1678 = OpLoad %v3float %color
- OpStore %color %165
- OpStore %color %1678
- %1679 = OpCompositeExtract %float %916 0
- %1680 = OpCompositeExtract %float %916 0
- %1681 = OpCompositeConstruct %v2float %1679 %1680
- %1682 = OpLoad %v2float %uv
- OpStore %uv %162
- OpStore %uv %1682
- %1683 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1684 = OpLoad %float %1683
- %1685 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1685 %914
- %1686 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1686 %1684
- %1687 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1688 = OpConvertSToF %float %1656
- %1689 = OpFAdd %float %1688 %1666
- OpStore %1687 %1689
- %1690 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1691 = OpLoad %float %1690
- %1692 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1692 %914
- %1693 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1693 %1691
- %1694 = OpCompositeExtract %float %1245 1
- %1695 = OpCompositeExtract %float %1582 0
- %1696 = OpCompositeExtract %float %1245 0
- %1697 = OpCompositeConstruct %v3float %1694 %1695 %1696
- %1698 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1699 = OpLoad %float %1698
- %1700 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1700 %914
- %1701 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1701 %1699
- OpBranch %1639
+ 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
- %1702 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1703 = OpLoad %float %1702
+ %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 %914
- %1705 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1705 %1703
- %1706 = OpLoad %v3float %color
- %1707 = OpAccessChain %_ptr_Function_float %uv %31
- %1708 = OpLoad %float %1707
+ 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 %914
- %1710 = OpAccessChain %_ptr_Function_float %uv %31
- OpStore %1710 %1708
- %1711 = OpCompositeExtract %float %162 0
- %1712 = OpCompositeExtract %float %162 0
- %1713 = OpCompositeExtract %float %162 1
- %1714 = OpCompositeConstruct %v3float %1711 %1712 %1713
- %1715 = OpExtInst %v3float %1636 Normalize %1706
- %1716 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1717 = OpLoad %float %1716
+ 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 %914
- %1719 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1719 %1717
+ OpStore %1718 %1716
+ %1719 = OpLoad %QuicksortObject %obj
+ OpStore %obj %15
+ OpStore %obj %1719
%1720 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
+ OpStore %obj %15
OpStore %obj %1720
- %1721 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %1721
- %1722 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1723 = OpLoad %float %1722
+ %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 %914
- %1725 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1725 %1723
- %1726 = OpCompositeExtract %float %1555 1
- %1727 = OpCompositeExtract %float %1714 1
- %1728 = OpCompositeConstruct %v2float %1726 %1727
- %1729 = OpAccessChain %_ptr_Function_float %color %uint_1
- %1730 = OpLoad %float %1729
+ 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 %914
- %1732 = OpAccessChain %_ptr_Function_float %color %uint_1
- OpStore %1732 %1730
- %1733 = OpCompositeExtract %float %1715 0
- %1734 = OpCompositeExtract %float %1715 1
- %1735 = OpCompositeExtract %float %1715 2
- %1736 = OpCompositeConstruct %v4float %1733 %1734 %1735 %float_1
- %1737 = OpAccessChain %_ptr_Function_float %uv %uint_1
- %1738 = OpLoad %float %1737
+ 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 %914
- %1740 = OpAccessChain %_ptr_Function_float %uv %uint_1
- OpStore %1740 %1738
- %1741 = OpCompositeExtract %float %1728 1
- %1742 = OpCompositeConstruct %v3float %float_2 %float_2 %1741
- %1743 = OpAccessChain %_ptr_Function_float %uv %uint_0
- %1744 = OpLoad %float %1743
+ 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 %914
- %1746 = OpAccessChain %_ptr_Function_float %uv %uint_0
- OpStore %1746 %1744
- OpStore %x_GLF_color %1736
- %1747 = OpLoad %QuicksortObject %obj
- OpStore %obj %97
- OpStore %obj %1747
- %1748 = OpCompositeExtract %float %1736 3
- %1749 = OpCompositeExtract %float %1736 1
- %1750 = OpCompositeExtract %float %1406 0
- %1751 = OpCompositeConstruct %v3float %1748 %1749 %1750
- %1752 = OpAccessChain %_ptr_Function_float %color %uint_0
- %1753 = OpLoad %float %1752
+ 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 %914
- %1755 = OpAccessChain %_ptr_Function_float %color %uint_0
- OpStore %1755 %1753
+ OpStore %1754 %1752
OpReturn
OpFunctionEnd
- %main_inner = OpFunction %main_out None %1756
+ %main_inner = OpFunction %main_out None %1755
%gl_FragCoord_param = OpFunctionParameter %v4float
- %1760 = OpLabel
+ %1759 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
- %1761 = OpFunctionCall %void %main_1
- %1762 = OpLoad %v4float %x_GLF_color
- %1763 = OpCompositeConstruct %main_out %1762
- OpReturnValue %1763
+ %1760 = OpFunctionCall %void %main_1
+ %1761 = OpLoad %v4float %x_GLF_color
+ %1762 = OpCompositeConstruct %main_out %1761
+ OpReturnValue %1762
OpFunctionEnd
- %main = OpFunction %void None %404
- %1765 = OpLabel
- %1767 = OpLoad %v4float %gl_FragCoord_param_1
- %1766 = OpFunctionCall %main_out %main_inner %1767
- %1768 = OpCompositeExtract %v4float %1766 0
- OpStore %x_GLF_color_1_1 %1768
+ %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
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.hlsl
index a385d05..d818bce 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.hlsl
@@ -19,7 +19,7 @@
void atomicCompareExchangeWeak_1bd40a() {
- x__atomic_compare_exchange_resulti32 res = {0, false};
+ x__atomic_compare_exchange_resulti32 res = (x__atomic_compare_exchange_resulti32)0;
const atomic_compare_exchange_weak_ret_type tint_symbol = tint_atomicCompareExchangeWeak(sb_rw, 0u, 1, 1);
const int old_value_1 = tint_symbol.old_value;
const int x_19 = old_value_1;
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.msl
index 3961fdd..f1db132 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.msl
@@ -26,7 +26,7 @@
};
void atomicCompareExchangeWeak_1bd40a(device SB_RW_atomic* const tint_symbol_2) {
- x__atomic_compare_exchange_resulti32 res = {.old_value=0, .exchanged=false};
+ x__atomic_compare_exchange_resulti32 res = {};
atomic_compare_exchange_resulti32 const tint_symbol = atomicCompareExchangeWeak_1(&((*(tint_symbol_2)).arg_0), 1, 1);
int const old_value_1 = tint_symbol.old_value;
int const x_19 = old_value_1;
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.spvasm b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.spvasm
index 97cc672..f323843 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.spvasm
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 43
+; Bound: 40
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -40,11 +40,8 @@
%5 = OpTypeFunction %void
%bool = OpTypeBool
%x__atomic_compare_exchange_resulti32 = OpTypeStruct %int %bool
- %11 = OpConstantNull %int
- %12 = OpConstantNull %bool
- %13 = OpConstantComposite %x__atomic_compare_exchange_resulti32 %11 %12
+ %11 = OpConstantNull %x__atomic_compare_exchange_resulti32
%_ptr_Function_x__atomic_compare_exchange_resulti32 = OpTypePointer Function %x__atomic_compare_exchange_resulti32
- %16 = OpConstantNull %x__atomic_compare_exchange_resulti32
%__atomic_compare_exchange_resulti32 = OpTypeStruct %int %bool
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
@@ -53,35 +50,35 @@
%int_1 = OpConstant %int 1
%atomicCompareExchangeWeak_1bd40a = OpFunction %void None %5
%8 = OpLabel
- %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resulti32 Function %16
- OpStore %res %13
- %24 = OpAccessChain %_ptr_StorageBuffer_int %sb_rw %uint_0
- %26 = OpAtomicCompareExchange %int %24 %uint_1 %uint_0 %uint_0 %int_1 %int_1
- %27 = OpIEqual %bool %26 %int_1
- %17 = OpCompositeConstruct %__atomic_compare_exchange_resulti32 %26 %27
- %28 = OpCompositeExtract %int %17 0
- %29 = OpIEqual %bool %28 %int_1
- %30 = OpCompositeConstruct %x__atomic_compare_exchange_resulti32 %28 %29
- OpStore %res %30
+ %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resulti32 Function %11
+ OpStore %res %11
+ %21 = OpAccessChain %_ptr_StorageBuffer_int %sb_rw %uint_0
+ %23 = OpAtomicCompareExchange %int %21 %uint_1 %uint_0 %uint_0 %int_1 %int_1
+ %24 = OpIEqual %bool %23 %int_1
+ %14 = OpCompositeConstruct %__atomic_compare_exchange_resulti32 %23 %24
+ %25 = OpCompositeExtract %int %14 0
+ %26 = OpIEqual %bool %25 %int_1
+ %27 = OpCompositeConstruct %x__atomic_compare_exchange_resulti32 %25 %26
+ OpStore %res %27
OpReturn
OpFunctionEnd
%fragment_main_1 = OpFunction %void None %5
- %32 = OpLabel
- %33 = OpFunctionCall %void %atomicCompareExchangeWeak_1bd40a
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %atomicCompareExchangeWeak_1bd40a
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %5
- %35 = OpLabel
- %36 = OpFunctionCall %void %fragment_main_1
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %fragment_main_1
OpReturn
OpFunctionEnd
%compute_main_1 = OpFunction %void None %5
- %38 = OpLabel
- %39 = OpFunctionCall %void %atomicCompareExchangeWeak_1bd40a
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %atomicCompareExchangeWeak_1bd40a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %5
- %41 = OpLabel
- %42 = OpFunctionCall %void %compute_main_1
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %compute_main_1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.hlsl
index c36984d..5d1bfd6 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.hlsl
@@ -19,7 +19,7 @@
void atomicCompareExchangeWeak_63d8e6() {
- x__atomic_compare_exchange_resultu32 res = {0u, false};
+ x__atomic_compare_exchange_resultu32 res = (x__atomic_compare_exchange_resultu32)0;
const atomic_compare_exchange_weak_ret_type tint_symbol = tint_atomicCompareExchangeWeak(sb_rw, 0u, 1u, 1u);
const uint old_value_1 = tint_symbol.old_value;
const uint x_17 = old_value_1;
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.msl
index b06f2f9..2bc40c6 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.msl
@@ -26,7 +26,7 @@
};
void atomicCompareExchangeWeak_63d8e6(device SB_RW_atomic* const tint_symbol_2) {
- x__atomic_compare_exchange_resultu32 res = {.old_value=0u, .exchanged=false};
+ x__atomic_compare_exchange_resultu32 res = {};
atomic_compare_exchange_resultu32 const tint_symbol = atomicCompareExchangeWeak_1(&((*(tint_symbol_2)).arg_0), 1u, 1u);
uint const old_value_1 = tint_symbol.old_value;
uint const x_17 = old_value_1;
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.spvasm b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.spvasm
index bb4e843..2070e93 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.spvasm
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 41
+; Bound: 38
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -40,46 +40,43 @@
%5 = OpTypeFunction %void
%bool = OpTypeBool
%x__atomic_compare_exchange_resultu32 = OpTypeStruct %uint %bool
- %11 = OpConstantNull %uint
- %12 = OpConstantNull %bool
- %13 = OpConstantComposite %x__atomic_compare_exchange_resultu32 %11 %12
+ %11 = OpConstantNull %x__atomic_compare_exchange_resultu32
%_ptr_Function_x__atomic_compare_exchange_resultu32 = OpTypePointer Function %x__atomic_compare_exchange_resultu32
- %16 = OpConstantNull %x__atomic_compare_exchange_resultu32
%__atomic_compare_exchange_resultu32 = OpTypeStruct %uint %bool
%uint_1 = OpConstant %uint 1
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%atomicCompareExchangeWeak_63d8e6 = OpFunction %void None %5
%8 = OpLabel
- %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resultu32 Function %16
- OpStore %res %13
- %23 = OpAccessChain %_ptr_StorageBuffer_uint %sb_rw %uint_0
- %24 = OpAtomicCompareExchange %uint %23 %uint_1 %uint_0 %uint_0 %uint_1 %uint_1
- %25 = OpIEqual %bool %24 %uint_1
- %17 = OpCompositeConstruct %__atomic_compare_exchange_resultu32 %24 %25
- %26 = OpCompositeExtract %uint %17 0
- %27 = OpIEqual %bool %26 %uint_1
- %28 = OpCompositeConstruct %x__atomic_compare_exchange_resultu32 %26 %27
- OpStore %res %28
+ %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resultu32 Function %11
+ OpStore %res %11
+ %20 = OpAccessChain %_ptr_StorageBuffer_uint %sb_rw %uint_0
+ %21 = OpAtomicCompareExchange %uint %20 %uint_1 %uint_0 %uint_0 %uint_1 %uint_1
+ %22 = OpIEqual %bool %21 %uint_1
+ %14 = OpCompositeConstruct %__atomic_compare_exchange_resultu32 %21 %22
+ %23 = OpCompositeExtract %uint %14 0
+ %24 = OpIEqual %bool %23 %uint_1
+ %25 = OpCompositeConstruct %x__atomic_compare_exchange_resultu32 %23 %24
+ OpStore %res %25
OpReturn
OpFunctionEnd
%fragment_main_1 = OpFunction %void None %5
- %30 = OpLabel
- %31 = OpFunctionCall %void %atomicCompareExchangeWeak_63d8e6
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %atomicCompareExchangeWeak_63d8e6
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %5
- %33 = OpLabel
- %34 = OpFunctionCall %void %fragment_main_1
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %fragment_main_1
OpReturn
OpFunctionEnd
%compute_main_1 = OpFunction %void None %5
- %36 = OpLabel
- %37 = OpFunctionCall %void %atomicCompareExchangeWeak_63d8e6
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %atomicCompareExchangeWeak_63d8e6
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %5
- %39 = OpLabel
- %40 = OpFunctionCall %void %compute_main_1
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %compute_main_1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.hlsl
index 03640dd..dae580e 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.hlsl
@@ -11,7 +11,7 @@
groupshared int arg_0;
void atomicCompareExchangeWeak_e88938() {
- x__atomic_compare_exchange_resulti32 res = {0, false};
+ x__atomic_compare_exchange_resulti32 res = (x__atomic_compare_exchange_resulti32)0;
atomic_compare_exchange_resulti32 atomic_result = (atomic_compare_exchange_resulti32)0;
int atomic_compare_value = 1;
InterlockedCompareExchange(arg_0, atomic_compare_value, 1, atomic_result.old_value);
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl
index 4cfcd1c..0f9da57 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl
@@ -18,7 +18,7 @@
};
void atomicCompareExchangeWeak_e88938(threadgroup atomic_int* const tint_symbol_2) {
- x__atomic_compare_exchange_resulti32 res = {.old_value=0, .exchanged=false};
+ x__atomic_compare_exchange_resulti32 res = {};
atomic_compare_exchange_resulti32 const tint_symbol = atomicCompareExchangeWeak_1(tint_symbol_2, 1, 1);
int const old_value_1 = tint_symbol.old_value;
int const x_18 = old_value_1;
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.spvasm b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.spvasm
index a9201f5..f82b2cb 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.spvasm
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 57
+; Bound: 55
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,56 +42,54 @@
%10 = OpTypeFunction %void
%bool = OpTypeBool
%x__atomic_compare_exchange_resulti32 = OpTypeStruct %int %bool
- %16 = OpConstantNull %int
- %17 = OpConstantNull %bool
- %18 = OpConstantComposite %x__atomic_compare_exchange_resulti32 %16 %17
+ %16 = OpConstantNull %x__atomic_compare_exchange_resulti32
%_ptr_Function_x__atomic_compare_exchange_resulti32 = OpTypePointer Function %x__atomic_compare_exchange_resulti32
- %21 = OpConstantNull %x__atomic_compare_exchange_resulti32
%__atomic_compare_exchange_resulti32 = OpTypeStruct %int %bool
%uint_2 = OpConstant %uint 2
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
- %33 = OpTypeFunction %void %uint
+ %30 = OpTypeFunction %void %uint
+ %36 = OpConstantNull %int
%uint_264 = OpConstant %uint 264
%atomicCompareExchangeWeak_e88938 = OpFunction %void None %10
%13 = OpLabel
- %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resulti32 Function %21
- OpStore %res %18
- %28 = OpAtomicCompareExchange %int %arg_0 %uint_2 %uint_0 %uint_0 %int_1 %int_1
- %29 = OpIEqual %bool %28 %int_1
- %22 = OpCompositeConstruct %__atomic_compare_exchange_resulti32 %28 %29
- %30 = OpCompositeExtract %int %22 0
- %31 = OpIEqual %bool %30 %int_1
- %32 = OpCompositeConstruct %x__atomic_compare_exchange_resulti32 %30 %31
- OpStore %res %32
+ %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resulti32 Function %16
+ OpStore %res %16
+ %25 = OpAtomicCompareExchange %int %arg_0 %uint_2 %uint_0 %uint_0 %int_1 %int_1
+ %26 = OpIEqual %bool %25 %int_1
+ %19 = OpCompositeConstruct %__atomic_compare_exchange_resulti32 %25 %26
+ %27 = OpCompositeExtract %int %19 0
+ %28 = OpIEqual %bool %27 %int_1
+ %29 = OpCompositeConstruct %x__atomic_compare_exchange_resulti32 %27 %28
+ OpStore %res %29
OpReturn
OpFunctionEnd
-%compute_main_inner = OpFunction %void None %33
+%compute_main_inner = OpFunction %void None %30
%local_invocation_index = OpFunctionParameter %uint
- %36 = OpLabel
- OpAtomicStore %arg_0 %uint_2 %uint_0 %16
+ %33 = OpLabel
+ OpAtomicStore %arg_0 %uint_2 %uint_0 %36
OpControlBarrier %uint_2 %uint_2 %uint_264
- %41 = OpFunctionCall %void %atomicCompareExchangeWeak_e88938
+ %39 = OpFunctionCall %void %atomicCompareExchangeWeak_e88938
OpReturn
OpFunctionEnd
%compute_main_1 = OpFunction %void None %10
- %43 = OpLabel
- %44 = OpLoad %uint %local_invocation_index_1
- %45 = OpFunctionCall %void %compute_main_inner %44
+ %41 = OpLabel
+ %42 = OpLoad %uint %local_invocation_index_1
+ %43 = OpFunctionCall %void %compute_main_inner %42
OpReturn
OpFunctionEnd
-%compute_main_inner_1 = OpFunction %void None %33
+%compute_main_inner_1 = OpFunction %void None %30
%local_invocation_index_1_param = OpFunctionParameter %uint
- %48 = OpLabel
- OpAtomicStore %arg_0 %uint_2 %uint_0 %16
+ %46 = OpLabel
+ OpAtomicStore %arg_0 %uint_2 %uint_0 %36
OpControlBarrier %uint_2 %uint_2 %uint_264
OpStore %local_invocation_index_1 %local_invocation_index_1_param
- %52 = OpFunctionCall %void %compute_main_1
+ %50 = OpFunctionCall %void %compute_main_1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %10
- %54 = OpLabel
- %56 = OpLoad %uint %local_invocation_index_1_param_1
- %55 = OpFunctionCall %void %compute_main_inner_1 %56
+ %52 = OpLabel
+ %54 = OpLoad %uint %local_invocation_index_1_param_1
+ %53 = OpFunctionCall %void %compute_main_inner_1 %54
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.hlsl
index 1c61811..b4fbb77 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.hlsl
@@ -11,7 +11,7 @@
groupshared uint arg_0;
void atomicCompareExchangeWeak_83580d() {
- x__atomic_compare_exchange_resultu32 res = {0u, false};
+ x__atomic_compare_exchange_resultu32 res = (x__atomic_compare_exchange_resultu32)0;
atomic_compare_exchange_resultu32 atomic_result = (atomic_compare_exchange_resultu32)0;
uint atomic_compare_value = 1u;
InterlockedCompareExchange(arg_0, atomic_compare_value, 1u, atomic_result.old_value);
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl
index 0f6a268..476bc81 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl
@@ -18,7 +18,7 @@
};
void atomicCompareExchangeWeak_83580d(threadgroup atomic_uint* const tint_symbol_2) {
- x__atomic_compare_exchange_resultu32 res = {.old_value=0u, .exchanged=false};
+ x__atomic_compare_exchange_resultu32 res = {};
atomic_compare_exchange_resultu32 const tint_symbol = atomicCompareExchangeWeak_1(tint_symbol_2, 1u, 1u);
uint const old_value_1 = tint_symbol.old_value;
uint const x_17 = old_value_1;
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.spvasm b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.spvasm
index 26382e3..9c927f2 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.spvasm
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 55
+; Bound: 53
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,55 +41,53 @@
%9 = OpTypeFunction %void
%bool = OpTypeBool
%x__atomic_compare_exchange_resultu32 = OpTypeStruct %uint %bool
- %15 = OpConstantNull %bool
- %16 = OpConstantComposite %x__atomic_compare_exchange_resultu32 %6 %15
+ %15 = OpConstantNull %x__atomic_compare_exchange_resultu32
%_ptr_Function_x__atomic_compare_exchange_resultu32 = OpTypePointer Function %x__atomic_compare_exchange_resultu32
- %19 = OpConstantNull %x__atomic_compare_exchange_resultu32
%__atomic_compare_exchange_resultu32 = OpTypeStruct %uint %bool
%uint_2 = OpConstant %uint 2
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
- %31 = OpTypeFunction %void %uint
+ %29 = OpTypeFunction %void %uint
%uint_264 = OpConstant %uint 264
%atomicCompareExchangeWeak_83580d = OpFunction %void None %9
%12 = OpLabel
- %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resultu32 Function %19
- OpStore %res %16
- %26 = OpAtomicCompareExchange %uint %arg_0 %uint_2 %uint_0 %uint_0 %uint_1 %uint_1
+ %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resultu32 Function %15
+ OpStore %res %15
+ %24 = OpAtomicCompareExchange %uint %arg_0 %uint_2 %uint_0 %uint_0 %uint_1 %uint_1
+ %25 = OpIEqual %bool %24 %uint_1
+ %18 = OpCompositeConstruct %__atomic_compare_exchange_resultu32 %24 %25
+ %26 = OpCompositeExtract %uint %18 0
%27 = OpIEqual %bool %26 %uint_1
- %20 = OpCompositeConstruct %__atomic_compare_exchange_resultu32 %26 %27
- %28 = OpCompositeExtract %uint %20 0
- %29 = OpIEqual %bool %28 %uint_1
- %30 = OpCompositeConstruct %x__atomic_compare_exchange_resultu32 %28 %29
- OpStore %res %30
+ %28 = OpCompositeConstruct %x__atomic_compare_exchange_resultu32 %26 %27
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%compute_main_inner = OpFunction %void None %31
+%compute_main_inner = OpFunction %void None %29
%local_invocation_index = OpFunctionParameter %uint
- %34 = OpLabel
+ %32 = OpLabel
OpAtomicStore %arg_0 %uint_2 %uint_0 %6
OpControlBarrier %uint_2 %uint_2 %uint_264
- %39 = OpFunctionCall %void %atomicCompareExchangeWeak_83580d
+ %37 = OpFunctionCall %void %atomicCompareExchangeWeak_83580d
OpReturn
OpFunctionEnd
%compute_main_1 = OpFunction %void None %9
- %41 = OpLabel
- %42 = OpLoad %uint %local_invocation_index_1
- %43 = OpFunctionCall %void %compute_main_inner %42
+ %39 = OpLabel
+ %40 = OpLoad %uint %local_invocation_index_1
+ %41 = OpFunctionCall %void %compute_main_inner %40
OpReturn
OpFunctionEnd
-%compute_main_inner_1 = OpFunction %void None %31
+%compute_main_inner_1 = OpFunction %void None %29
%local_invocation_index_1_param = OpFunctionParameter %uint
- %46 = OpLabel
+ %44 = OpLabel
OpAtomicStore %arg_0 %uint_2 %uint_0 %6
OpControlBarrier %uint_2 %uint_2 %uint_264
OpStore %local_invocation_index_1 %local_invocation_index_1_param
- %50 = OpFunctionCall %void %compute_main_1
+ %48 = OpFunctionCall %void %compute_main_1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
- %52 = OpLabel
- %54 = OpLoad %uint %local_invocation_index_1_param_1
- %53 = OpFunctionCall %void %compute_main_inner_1 %54
+ %50 = OpLabel
+ %52 = OpLoad %uint %local_invocation_index_1_param_1
+ %51 = OpFunctionCall %void %compute_main_inner_1 %52
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.hlsl
index b121c66..d2d0b54 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.hlsl
@@ -21,7 +21,7 @@
void atomicCompareExchangeWeak_1bd40a() {
int arg_1 = 0;
int arg_2 = 0;
- x__atomic_compare_exchange_resulti32 res = {0, false};
+ x__atomic_compare_exchange_resulti32 res = (x__atomic_compare_exchange_resulti32)0;
arg_1 = 1;
arg_2 = 1;
const int x_23 = arg_2;
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.msl
index fa2d372..089a584 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.msl
@@ -28,7 +28,7 @@
void atomicCompareExchangeWeak_1bd40a(device SB_RW_atomic* const tint_symbol_2) {
int arg_1 = 0;
int arg_2 = 0;
- x__atomic_compare_exchange_resulti32 res = {.old_value=0, .exchanged=false};
+ x__atomic_compare_exchange_resulti32 res = {};
arg_1 = 1;
arg_2 = 1;
int const x_23 = arg_2;
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.spvasm b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.spvasm
index dde3fc2..0c17de2 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.spvasm
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 48
+; Bound: 46
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -44,10 +44,8 @@
%_ptr_Function_int = OpTypePointer Function %int
%bool = OpTypeBool
%x__atomic_compare_exchange_resulti32 = OpTypeStruct %int %bool
- %15 = OpConstantNull %bool
- %16 = OpConstantComposite %x__atomic_compare_exchange_resulti32 %9 %15
+ %15 = OpConstantNull %x__atomic_compare_exchange_resulti32
%_ptr_Function_x__atomic_compare_exchange_resulti32 = OpTypePointer Function %x__atomic_compare_exchange_resulti32
- %19 = OpConstantNull %x__atomic_compare_exchange_resulti32
%int_1 = OpConstant %int 1
%__atomic_compare_exchange_resulti32 = OpTypeStruct %int %bool
%uint = OpTypeInt 32 0
@@ -58,41 +56,41 @@
%8 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %9
%arg_2 = OpVariable %_ptr_Function_int Function %9
- %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resulti32 Function %19
+ %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resulti32 Function %15
OpStore %arg_1 %9
OpStore %arg_2 %9
- OpStore %res %16
+ OpStore %res %15
OpStore %arg_1 %int_1
OpStore %arg_2 %int_1
- %21 = OpLoad %int %arg_2
- %22 = OpLoad %int %arg_1
- %30 = OpAccessChain %_ptr_StorageBuffer_int %sb_rw %uint_0
- %31 = OpAtomicCompareExchange %int %30 %uint_1 %uint_0 %uint_0 %21 %22
- %32 = OpIEqual %bool %31 %21
- %23 = OpCompositeConstruct %__atomic_compare_exchange_resulti32 %31 %32
- %33 = OpCompositeExtract %int %23 0
- %34 = OpIEqual %bool %33 %21
- %35 = OpCompositeConstruct %x__atomic_compare_exchange_resulti32 %33 %34
- OpStore %res %35
+ %19 = OpLoad %int %arg_2
+ %20 = OpLoad %int %arg_1
+ %28 = OpAccessChain %_ptr_StorageBuffer_int %sb_rw %uint_0
+ %29 = OpAtomicCompareExchange %int %28 %uint_1 %uint_0 %uint_0 %19 %20
+ %30 = OpIEqual %bool %29 %19
+ %21 = OpCompositeConstruct %__atomic_compare_exchange_resulti32 %29 %30
+ %31 = OpCompositeExtract %int %21 0
+ %32 = OpIEqual %bool %31 %19
+ %33 = OpCompositeConstruct %x__atomic_compare_exchange_resulti32 %31 %32
+ OpStore %res %33
OpReturn
OpFunctionEnd
%fragment_main_1 = OpFunction %void None %5
- %37 = OpLabel
- %38 = OpFunctionCall %void %atomicCompareExchangeWeak_1bd40a
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %atomicCompareExchangeWeak_1bd40a
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %5
- %40 = OpLabel
- %41 = OpFunctionCall %void %fragment_main_1
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %fragment_main_1
OpReturn
OpFunctionEnd
%compute_main_1 = OpFunction %void None %5
- %43 = OpLabel
- %44 = OpFunctionCall %void %atomicCompareExchangeWeak_1bd40a
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %atomicCompareExchangeWeak_1bd40a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %5
- %46 = OpLabel
- %47 = OpFunctionCall %void %compute_main_1
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %compute_main_1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.hlsl
index 7a9c971..b219eb1 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.hlsl
@@ -21,7 +21,7 @@
void atomicCompareExchangeWeak_63d8e6() {
uint arg_1 = 0u;
uint arg_2 = 0u;
- x__atomic_compare_exchange_resultu32 res = {0u, false};
+ x__atomic_compare_exchange_resultu32 res = (x__atomic_compare_exchange_resultu32)0;
arg_1 = 1u;
arg_2 = 1u;
const uint x_21 = arg_2;
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.msl
index 39de0ea..666d14a 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.msl
@@ -28,7 +28,7 @@
void atomicCompareExchangeWeak_63d8e6(device SB_RW_atomic* const tint_symbol_2) {
uint arg_1 = 0u;
uint arg_2 = 0u;
- x__atomic_compare_exchange_resultu32 res = {.old_value=0u, .exchanged=false};
+ x__atomic_compare_exchange_resultu32 res = {};
arg_1 = 1u;
arg_2 = 1u;
uint const x_21 = arg_2;
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.spvasm b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.spvasm
index 9cce848..279b70f 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.spvasm
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 46
+; Bound: 44
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -44,10 +44,8 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%bool = OpTypeBool
%x__atomic_compare_exchange_resultu32 = OpTypeStruct %uint %bool
- %15 = OpConstantNull %bool
- %16 = OpConstantComposite %x__atomic_compare_exchange_resultu32 %9 %15
+ %15 = OpConstantNull %x__atomic_compare_exchange_resultu32
%_ptr_Function_x__atomic_compare_exchange_resultu32 = OpTypePointer Function %x__atomic_compare_exchange_resultu32
- %19 = OpConstantNull %x__atomic_compare_exchange_resultu32
%uint_1 = OpConstant %uint 1
%__atomic_compare_exchange_resultu32 = OpTypeStruct %uint %bool
%uint_0 = OpConstant %uint 0
@@ -56,41 +54,41 @@
%8 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %9
%arg_2 = OpVariable %_ptr_Function_uint Function %9
- %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resultu32 Function %19
+ %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resultu32 Function %15
OpStore %arg_1 %9
OpStore %arg_2 %9
- OpStore %res %16
+ OpStore %res %15
OpStore %arg_1 %uint_1
OpStore %arg_2 %uint_1
- %21 = OpLoad %uint %arg_2
- %22 = OpLoad %uint %arg_1
- %28 = OpAccessChain %_ptr_StorageBuffer_uint %sb_rw %uint_0
- %29 = OpAtomicCompareExchange %uint %28 %uint_1 %uint_0 %uint_0 %21 %22
- %30 = OpIEqual %bool %29 %21
- %23 = OpCompositeConstruct %__atomic_compare_exchange_resultu32 %29 %30
- %31 = OpCompositeExtract %uint %23 0
- %32 = OpIEqual %bool %31 %21
- %33 = OpCompositeConstruct %x__atomic_compare_exchange_resultu32 %31 %32
- OpStore %res %33
+ %19 = OpLoad %uint %arg_2
+ %20 = OpLoad %uint %arg_1
+ %26 = OpAccessChain %_ptr_StorageBuffer_uint %sb_rw %uint_0
+ %27 = OpAtomicCompareExchange %uint %26 %uint_1 %uint_0 %uint_0 %19 %20
+ %28 = OpIEqual %bool %27 %19
+ %21 = OpCompositeConstruct %__atomic_compare_exchange_resultu32 %27 %28
+ %29 = OpCompositeExtract %uint %21 0
+ %30 = OpIEqual %bool %29 %19
+ %31 = OpCompositeConstruct %x__atomic_compare_exchange_resultu32 %29 %30
+ OpStore %res %31
OpReturn
OpFunctionEnd
%fragment_main_1 = OpFunction %void None %5
- %35 = OpLabel
- %36 = OpFunctionCall %void %atomicCompareExchangeWeak_63d8e6
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %atomicCompareExchangeWeak_63d8e6
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %5
- %38 = OpLabel
- %39 = OpFunctionCall %void %fragment_main_1
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %fragment_main_1
OpReturn
OpFunctionEnd
%compute_main_1 = OpFunction %void None %5
- %41 = OpLabel
- %42 = OpFunctionCall %void %atomicCompareExchangeWeak_63d8e6
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %atomicCompareExchangeWeak_63d8e6
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %5
- %44 = OpLabel
- %45 = OpFunctionCall %void %compute_main_1
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %compute_main_1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.hlsl
index 55ac417..afd64c0 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.hlsl
@@ -13,7 +13,7 @@
void atomicCompareExchangeWeak_e88938() {
int arg_1 = 0;
int arg_2 = 0;
- x__atomic_compare_exchange_resulti32 res = {0, false};
+ x__atomic_compare_exchange_resulti32 res = (x__atomic_compare_exchange_resulti32)0;
arg_1 = 1;
arg_2 = 1;
const int x_22 = arg_2;
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl
index 52cfd0f..8310273 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl
@@ -20,7 +20,7 @@
void atomicCompareExchangeWeak_e88938(threadgroup atomic_int* const tint_symbol_2) {
int arg_1 = 0;
int arg_2 = 0;
- x__atomic_compare_exchange_resulti32 res = {.old_value=0, .exchanged=false};
+ x__atomic_compare_exchange_resulti32 res = {};
arg_1 = 1;
arg_2 = 1;
int const x_22 = arg_2;
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.spvasm b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.spvasm
index ceae3b5..b6cb96d 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.spvasm
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 62
+; Bound: 60
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,63 +46,61 @@
%_ptr_Function_int = OpTypePointer Function %int
%bool = OpTypeBool
%x__atomic_compare_exchange_resulti32 = OpTypeStruct %int %bool
- %20 = OpConstantNull %bool
- %21 = OpConstantComposite %x__atomic_compare_exchange_resulti32 %14 %20
+ %20 = OpConstantNull %x__atomic_compare_exchange_resulti32
%_ptr_Function_x__atomic_compare_exchange_resulti32 = OpTypePointer Function %x__atomic_compare_exchange_resulti32
- %24 = OpConstantNull %x__atomic_compare_exchange_resulti32
%int_1 = OpConstant %int 1
%__atomic_compare_exchange_resulti32 = OpTypeStruct %int %bool
%uint_2 = OpConstant %uint 2
%uint_0 = OpConstant %uint 0
- %38 = OpTypeFunction %void %uint
+ %36 = OpTypeFunction %void %uint
%uint_264 = OpConstant %uint 264
%atomicCompareExchangeWeak_e88938 = OpFunction %void None %10
%13 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %14
%arg_2 = OpVariable %_ptr_Function_int Function %14
- %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resulti32 Function %24
+ %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resulti32 Function %20
OpStore %arg_1 %14
OpStore %arg_2 %14
- OpStore %res %21
+ OpStore %res %20
OpStore %arg_1 %int_1
OpStore %arg_2 %int_1
- %26 = OpLoad %int %arg_2
- %27 = OpLoad %int %arg_1
- %33 = OpAtomicCompareExchange %int %arg_0 %uint_2 %uint_0 %uint_0 %26 %27
- %34 = OpIEqual %bool %33 %26
- %28 = OpCompositeConstruct %__atomic_compare_exchange_resulti32 %33 %34
- %35 = OpCompositeExtract %int %28 0
- %36 = OpIEqual %bool %35 %26
- %37 = OpCompositeConstruct %x__atomic_compare_exchange_resulti32 %35 %36
- OpStore %res %37
+ %24 = OpLoad %int %arg_2
+ %25 = OpLoad %int %arg_1
+ %31 = OpAtomicCompareExchange %int %arg_0 %uint_2 %uint_0 %uint_0 %24 %25
+ %32 = OpIEqual %bool %31 %24
+ %26 = OpCompositeConstruct %__atomic_compare_exchange_resulti32 %31 %32
+ %33 = OpCompositeExtract %int %26 0
+ %34 = OpIEqual %bool %33 %24
+ %35 = OpCompositeConstruct %x__atomic_compare_exchange_resulti32 %33 %34
+ OpStore %res %35
OpReturn
OpFunctionEnd
-%compute_main_inner = OpFunction %void None %38
+%compute_main_inner = OpFunction %void None %36
%local_invocation_index = OpFunctionParameter %uint
- %41 = OpLabel
+ %39 = OpLabel
OpAtomicStore %arg_0 %uint_2 %uint_0 %14
OpControlBarrier %uint_2 %uint_2 %uint_264
- %46 = OpFunctionCall %void %atomicCompareExchangeWeak_e88938
+ %44 = OpFunctionCall %void %atomicCompareExchangeWeak_e88938
OpReturn
OpFunctionEnd
%compute_main_1 = OpFunction %void None %10
- %48 = OpLabel
- %49 = OpLoad %uint %local_invocation_index_1
- %50 = OpFunctionCall %void %compute_main_inner %49
+ %46 = OpLabel
+ %47 = OpLoad %uint %local_invocation_index_1
+ %48 = OpFunctionCall %void %compute_main_inner %47
OpReturn
OpFunctionEnd
-%compute_main_inner_1 = OpFunction %void None %38
+%compute_main_inner_1 = OpFunction %void None %36
%local_invocation_index_1_param = OpFunctionParameter %uint
- %53 = OpLabel
+ %51 = OpLabel
OpAtomicStore %arg_0 %uint_2 %uint_0 %14
OpControlBarrier %uint_2 %uint_2 %uint_264
OpStore %local_invocation_index_1 %local_invocation_index_1_param
- %57 = OpFunctionCall %void %compute_main_1
+ %55 = OpFunctionCall %void %compute_main_1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %10
- %59 = OpLabel
- %61 = OpLoad %uint %local_invocation_index_1_param_1
- %60 = OpFunctionCall %void %compute_main_inner_1 %61
+ %57 = OpLabel
+ %59 = OpLoad %uint %local_invocation_index_1_param_1
+ %58 = OpFunctionCall %void %compute_main_inner_1 %59
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.hlsl
index 6a120b1..0a1e026 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.hlsl
@@ -13,7 +13,7 @@
void atomicCompareExchangeWeak_83580d() {
uint arg_1 = 0u;
uint arg_2 = 0u;
- x__atomic_compare_exchange_resultu32 res = {0u, false};
+ x__atomic_compare_exchange_resultu32 res = (x__atomic_compare_exchange_resultu32)0;
arg_1 = 1u;
arg_2 = 1u;
const uint x_21 = arg_2;
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl
index b788874..542f76a 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl
@@ -20,7 +20,7 @@
void atomicCompareExchangeWeak_83580d(threadgroup atomic_uint* const tint_symbol_2) {
uint arg_1 = 0u;
uint arg_2 = 0u;
- x__atomic_compare_exchange_resultu32 res = {.old_value=0u, .exchanged=false};
+ x__atomic_compare_exchange_resultu32 res = {};
arg_1 = 1u;
arg_2 = 1u;
uint const x_21 = arg_2;
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.spvasm b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.spvasm
index a2d0294..14223f7 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.spvasm
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 58
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -44,63 +44,61 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%bool = OpTypeBool
%x__atomic_compare_exchange_resultu32 = OpTypeStruct %uint %bool
- %18 = OpConstantNull %bool
- %19 = OpConstantComposite %x__atomic_compare_exchange_resultu32 %6 %18
+ %18 = OpConstantNull %x__atomic_compare_exchange_resultu32
%_ptr_Function_x__atomic_compare_exchange_resultu32 = OpTypePointer Function %x__atomic_compare_exchange_resultu32
- %22 = OpConstantNull %x__atomic_compare_exchange_resultu32
%uint_1 = OpConstant %uint 1
%__atomic_compare_exchange_resultu32 = OpTypeStruct %uint %bool
%uint_2 = OpConstant %uint 2
%uint_0 = OpConstant %uint 0
- %36 = OpTypeFunction %void %uint
+ %34 = OpTypeFunction %void %uint
%uint_264 = OpConstant %uint 264
%atomicCompareExchangeWeak_83580d = OpFunction %void None %9
%12 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %6
%arg_2 = OpVariable %_ptr_Function_uint Function %6
- %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resultu32 Function %22
+ %res = OpVariable %_ptr_Function_x__atomic_compare_exchange_resultu32 Function %18
OpStore %arg_1 %6
OpStore %arg_2 %6
- OpStore %res %19
+ OpStore %res %18
OpStore %arg_1 %uint_1
OpStore %arg_2 %uint_1
- %24 = OpLoad %uint %arg_2
- %25 = OpLoad %uint %arg_1
- %31 = OpAtomicCompareExchange %uint %arg_0 %uint_2 %uint_0 %uint_0 %24 %25
- %32 = OpIEqual %bool %31 %24
- %26 = OpCompositeConstruct %__atomic_compare_exchange_resultu32 %31 %32
- %33 = OpCompositeExtract %uint %26 0
- %34 = OpIEqual %bool %33 %24
- %35 = OpCompositeConstruct %x__atomic_compare_exchange_resultu32 %33 %34
- OpStore %res %35
+ %22 = OpLoad %uint %arg_2
+ %23 = OpLoad %uint %arg_1
+ %29 = OpAtomicCompareExchange %uint %arg_0 %uint_2 %uint_0 %uint_0 %22 %23
+ %30 = OpIEqual %bool %29 %22
+ %24 = OpCompositeConstruct %__atomic_compare_exchange_resultu32 %29 %30
+ %31 = OpCompositeExtract %uint %24 0
+ %32 = OpIEqual %bool %31 %22
+ %33 = OpCompositeConstruct %x__atomic_compare_exchange_resultu32 %31 %32
+ OpStore %res %33
OpReturn
OpFunctionEnd
-%compute_main_inner = OpFunction %void None %36
+%compute_main_inner = OpFunction %void None %34
%local_invocation_index = OpFunctionParameter %uint
- %39 = OpLabel
+ %37 = OpLabel
OpAtomicStore %arg_0 %uint_2 %uint_0 %6
OpControlBarrier %uint_2 %uint_2 %uint_264
- %44 = OpFunctionCall %void %atomicCompareExchangeWeak_83580d
+ %42 = OpFunctionCall %void %atomicCompareExchangeWeak_83580d
OpReturn
OpFunctionEnd
%compute_main_1 = OpFunction %void None %9
- %46 = OpLabel
- %47 = OpLoad %uint %local_invocation_index_1
- %48 = OpFunctionCall %void %compute_main_inner %47
+ %44 = OpLabel
+ %45 = OpLoad %uint %local_invocation_index_1
+ %46 = OpFunctionCall %void %compute_main_inner %45
OpReturn
OpFunctionEnd
-%compute_main_inner_1 = OpFunction %void None %36
+%compute_main_inner_1 = OpFunction %void None %34
%local_invocation_index_1_param = OpFunctionParameter %uint
- %51 = OpLabel
+ %49 = OpLabel
OpAtomicStore %arg_0 %uint_2 %uint_0 %6
OpControlBarrier %uint_2 %uint_2 %uint_264
OpStore %local_invocation_index_1 %local_invocation_index_1_param
- %55 = OpFunctionCall %void %compute_main_1
+ %53 = OpFunctionCall %void %compute_main_1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
- %57 = OpLabel
- %59 = OpLoad %uint %local_invocation_index_1_param_1
- %58 = OpFunctionCall %void %compute_main_inner_1 %59
+ %55 = OpLabel
+ %57 = OpLoad %uint %local_invocation_index_1_param_1
+ %56 = OpFunctionCall %void %compute_main_inner_1 %57
OpReturn
OpFunctionEnd
diff --git a/test/tint/shader_io/interpolate_integers.wgsl.expected.glsl b/test/tint/shader_io/interpolate_integers.wgsl.expected.glsl
index c7c2312..85155cf 100644
--- a/test/tint/shader_io/interpolate_integers.wgsl.expected.glsl
+++ b/test/tint/shader_io/interpolate_integers.wgsl.expected.glsl
@@ -13,7 +13,7 @@
};
Interface vert_main() {
- Interface tint_symbol = Interface(0, 0u, ivec4(0, 0, 0, 0), uvec4(0u, 0u, 0u, 0u), vec4(0.0f, 0.0f, 0.0f, 0.0f));
+ Interface tint_symbol = Interface(0, 0u, ivec4(0), uvec4(0u), vec4(0.0f));
return tint_symbol;
}
diff --git a/test/tint/shader_io/interpolate_return_struct.wgsl.expected.glsl b/test/tint/shader_io/interpolate_return_struct.wgsl.expected.glsl
index 3d4342d..6c59947 100644
--- a/test/tint/shader_io/interpolate_return_struct.wgsl.expected.glsl
+++ b/test/tint/shader_io/interpolate_return_struct.wgsl.expected.glsl
@@ -21,7 +21,7 @@
};
Out tint_symbol_1() {
- Out tint_symbol_3 = Out(vec4(0.0f, 0.0f, 0.0f, 0.0f), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
+ Out tint_symbol_3 = Out(vec4(0.0f), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
return tint_symbol_3;
}
diff --git a/test/tint/shader_io/invariant_struct_member.wgsl.expected.glsl b/test/tint/shader_io/invariant_struct_member.wgsl.expected.glsl
index e271779..d8f17f6 100644
--- a/test/tint/shader_io/invariant_struct_member.wgsl.expected.glsl
+++ b/test/tint/shader_io/invariant_struct_member.wgsl.expected.glsl
@@ -5,7 +5,7 @@
};
Out tint_symbol() {
- Out tint_symbol_1 = Out(vec4(0.0f, 0.0f, 0.0f, 0.0f));
+ Out tint_symbol_1 = Out(vec4(0.0f));
return tint_symbol_1;
}
diff --git a/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.glsl b/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.glsl
index 9c10364..2274dde 100644
--- a/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.glsl
+++ b/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.glsl
@@ -20,7 +20,7 @@
}
void tint_symbol() {
- S x = S(ivec4[4](ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0), ivec4(0, 0, 0, 0)));
+ S x = S(ivec4[4](ivec4(0), ivec4(0), ivec4(0), ivec4(0)));
int tint_symbol_3 = foo();
int tint_symbol_1_save = tint_symbol_3;
int tint_symbol_2 = bar();
diff --git a/test/tint/statements/for/condition/struct_ctor.wgsl.expected.spvasm b/test/tint/statements/for/condition/struct_ctor.wgsl.expected.spvasm
index 0ad5b63..e2595cc 100644
--- a/test/tint/statements/for/condition/struct_ctor.wgsl.expected.spvasm
+++ b/test/tint/statements/for/condition/struct_ctor.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 25
+; Bound: 22
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -10,17 +10,12 @@
OpName %unused_entry_point "unused_entry_point"
OpName %f "f"
OpName %i "i"
- OpName %S "S"
- OpMemberName %S 0 "i"
- OpMemberDecorate %S 0 Offset 0
%void = OpTypeVoid
%1 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%10 = OpConstantNull %int
- %S = OpTypeStruct %int
%int_1 = OpConstant %int 1
- %19 = OpConstantComposite %S %int_1
%bool = OpTypeBool
%unused_entry_point = OpFunction %void None %1
%4 = OpLabel
@@ -35,14 +30,13 @@
OpBranch %14
%14 = OpLabel
%16 = OpLoad %int %i
- %20 = OpCompositeExtract %int %19 0
- %21 = OpSLessThan %bool %16 %20
- %15 = OpLogicalNot %bool %21
- OpSelectionMerge %23 None
- OpBranchConditional %15 %24 %23
- %24 = OpLabel
+ %18 = OpSLessThan %bool %16 %int_1
+ %15 = OpLogicalNot %bool %18
+ OpSelectionMerge %20 None
+ OpBranchConditional %15 %21 %20
+ %21 = OpLabel
OpBranch %12
- %23 = OpLabel
+ %20 = OpLabel
OpBranch %13
%13 = OpLabel
OpBranch %11
diff --git a/test/tint/statements/for/continuing/struct_ctor.wgsl.expected.spvasm b/test/tint/statements/for/continuing/struct_ctor.wgsl.expected.spvasm
index 26437b1..446eb42 100644
--- a/test/tint/statements/for/continuing/struct_ctor.wgsl.expected.spvasm
+++ b/test/tint/statements/for/continuing/struct_ctor.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 26
+; Bound: 23
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -10,9 +10,6 @@
OpName %unused_entry_point "unused_entry_point"
OpName %f "f"
OpName %i "i"
- OpName %S "S"
- OpMemberName %S 0 "i"
- OpMemberDecorate %S 0 Offset 0
%void = OpTypeVoid
%1 = OpTypeFunction %void
%int = OpTypeInt 32 1
@@ -20,9 +17,7 @@
%_ptr_Function_int = OpTypePointer Function %int
%bool = OpTypeBool
%17 = OpConstantNull %bool
- %S = OpTypeStruct %int
%int_1 = OpConstant %int 1
- %23 = OpConstantComposite %S %int_1
%unused_entry_point = OpFunction %void None %1
%4 = OpLabel
OpReturn
@@ -45,9 +40,8 @@
OpBranch %13
%13 = OpLabel
%20 = OpLoad %int %i
- %24 = OpCompositeExtract %int %23 0
- %25 = OpIAdd %int %20 %24
- OpStore %i %25
+ %22 = OpIAdd %int %20 %int_1
+ OpStore %i %22
OpBranch %11
%12 = OpLabel
OpReturn
diff --git a/test/tint/statements/for/initializer/struct_ctor.wgsl.expected.spvasm b/test/tint/statements/for/initializer/struct_ctor.wgsl.expected.spvasm
index 6ed9f80..d150616 100644
--- a/test/tint/statements/for/initializer/struct_ctor.wgsl.expected.spvasm
+++ b/test/tint/statements/for/initializer/struct_ctor.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 24
+; Bound: 21
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -9,43 +9,37 @@
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %unused_entry_point "unused_entry_point"
OpName %f "f"
- OpName %S "S"
- OpMemberName %S 0 "i"
OpName %i "i"
- OpMemberDecorate %S 0 Offset 0
%void = OpTypeVoid
%1 = OpTypeFunction %void
%int = OpTypeInt 32 1
- %S = OpTypeStruct %int
%int_1 = OpConstant %int 1
- %10 = OpConstantComposite %S %int_1
%_ptr_Function_int = OpTypePointer Function %int
- %14 = OpConstantNull %int
+ %11 = OpConstantNull %int
%bool = OpTypeBool
- %21 = OpConstantNull %bool
+ %18 = OpConstantNull %bool
%unused_entry_point = OpFunction %void None %1
%4 = OpLabel
OpReturn
OpFunctionEnd
%f = OpFunction %void None %1
%6 = OpLabel
- %i = OpVariable %_ptr_Function_int Function %14
- %11 = OpCompositeExtract %int %10 0
- OpStore %i %11
+ %i = OpVariable %_ptr_Function_int Function %11
+ OpStore %i %int_1
+ OpBranch %12
+ %12 = OpLabel
+ OpLoopMerge %13 %14 None
OpBranch %15
%15 = OpLabel
- OpLoopMerge %16 %17 None
- OpBranch %18
- %18 = OpLabel
- %19 = OpLogicalNot %bool %21
- OpSelectionMerge %22 None
- OpBranchConditional %19 %23 %22
- %23 = OpLabel
- OpBranch %16
- %22 = OpLabel
- OpBranch %17
- %17 = OpLabel
- OpBranch %15
- %16 = OpLabel
+ %16 = OpLogicalNot %bool %18
+ OpSelectionMerge %19 None
+ OpBranchConditional %16 %20 %19
+ %20 = OpLabel
+ OpBranch %13
+ %19 = OpLabel
+ OpBranch %14
+ %14 = OpLabel
+ OpBranch %12
+ %13 = OpLabel
OpReturn
OpFunctionEnd
diff --git a/test/tint/struct/type_constructor.wgsl.expected.spvasm b/test/tint/struct/type_constructor.wgsl.expected.spvasm
index 2cd32dd..22a96ee 100644
--- a/test/tint/struct/type_constructor.wgsl.expected.spvasm
+++ b/test/tint/struct/type_constructor.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 74
+; Bound: 68
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -58,20 +58,18 @@
%27 = OpConstantComposite %S1 %int_7 %int_8 %int_9 %int_10
%28 = OpConstantComposite %S2 %int_6 %27
%29 = OpConstantComposite %S3 %int_1 %21 %28
- %43 = OpConstantNull %S2
- %45 = OpConstantComposite %S2 %int_1 %21
+ %37 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%T = OpTypeStruct %_arr_int_uint_2
%_arr_T_uint_2 = OpTypeArray %T %uint_2
- %59 = OpConstantNull %_arr_T_uint_2
- %60 = OpConstantComposite %_arr_int_uint_2 %int_1 %int_2
- %61 = OpConstantComposite %T %60
- %62 = OpConstantComposite %_arr_int_uint_2 %int_3 %int_4
- %63 = OpConstantComposite %T %62
- %64 = OpConstantComposite %_arr_T_uint_2 %61 %63
- %65 = OpConstantNull %int
+ %54 = OpConstantNull %_arr_T_uint_2
+ %55 = OpConstantComposite %_arr_int_uint_2 %int_1 %int_2
+ %56 = OpConstantComposite %T %55
+ %57 = OpConstantComposite %_arr_int_uint_2 %int_3 %int_4
+ %58 = OpConstantComposite %T %57
+ %59 = OpConstantComposite %_arr_T_uint_2 %56 %58
%main = OpFunction %void None %1
%4 = OpLabel
%14 = OpIAdd %int %int_42 %int_1
@@ -84,28 +82,24 @@
%34 = OpCompositeConstruct %S1 %int_2 %int_42 %30 %33
%35 = OpCompositeConstruct %S2 %int_6 %13
%36 = OpCompositeConstruct %S3 %int_1 %34 %35
- %37 = OpCompositeExtract %int %8 0
- %38 = OpCompositeExtract %int %13 1
- %39 = OpIAdd %int %int_42 %int_1
- %40 = OpCompositeExtract %int %13 3
- %41 = OpCompositeConstruct %S1 %int_1 %int_42 %39 %40
- %42 = OpCompositeExtract %int %41 2
+ %38 = OpIAdd %int %int_42 %int_1
+ %39 = OpCompositeExtract %int %13 3
+ %40 = OpCompositeConstruct %S1 %int_1 %int_42 %38 %39
+ %41 = OpCompositeExtract %int %40 2
+ %42 = OpIAdd %int %int_42 %int_1
+ %43 = OpCompositeExtract %S2 %29 2
%44 = OpCompositeExtract %S1 %43 1
- %46 = OpCompositeExtract %S1 %45 1
- %47 = OpIAdd %int %int_42 %int_1
- %48 = OpCompositeExtract %S2 %29 2
- %49 = OpCompositeExtract %S1 %48 1
- %50 = OpCompositeExtract %int %49 3
- %51 = OpCompositeConstruct %S1 %int_2 %int_42 %47 %50
- %52 = OpCompositeConstruct %S2 %int_1 %51
- %53 = OpCompositeExtract %S1 %52 1
- %66 = OpCompositeExtract %T %64 0
- %67 = OpCompositeExtract %_arr_int_uint_2 %66 0
- %68 = OpCompositeExtract %int %67 0
- %69 = OpIAdd %int %68 %int_1
- %70 = OpCompositeConstruct %_arr_int_uint_2 %int_1 %69
- %71 = OpCompositeConstruct %T %70
- %72 = OpCompositeExtract %T %64 1
- %73 = OpCompositeConstruct %_arr_T_uint_2 %71 %72
+ %45 = OpCompositeExtract %int %44 3
+ %46 = OpCompositeConstruct %S1 %int_2 %int_42 %42 %45
+ %47 = OpCompositeConstruct %S2 %int_1 %46
+ %48 = OpCompositeExtract %S1 %47 1
+ %60 = OpCompositeExtract %T %59 0
+ %61 = OpCompositeExtract %_arr_int_uint_2 %60 0
+ %62 = OpCompositeExtract %int %61 0
+ %63 = OpIAdd %int %62 %int_1
+ %64 = OpCompositeConstruct %_arr_int_uint_2 %int_1 %63
+ %65 = OpCompositeConstruct %T %64
+ %66 = OpCompositeExtract %T %59 1
+ %67 = OpCompositeConstruct %_arr_T_uint_2 %65 %66
OpReturn
OpFunctionEnd
diff --git a/test/tint/types/struct_members.wgsl.expected.glsl b/test/tint/types/struct_members.wgsl.expected.glsl
index f7d2db8..eebcdc6 100644
--- a/test/tint/types/struct_members.wgsl.expected.glsl
+++ b/test/tint/types/struct_members.wgsl.expected.glsl
@@ -18,7 +18,7 @@
};
void tint_symbol() {
- S s = S(false, 0, 0u, 0.0f, ivec2(0, 0), uvec3(0u, 0u, 0u), vec4(0.0f, 0.0f, 0.0f, 0.0f), mat2x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f), S_inner(0.0f));
+ S s = S(false, 0, 0u, 0.0f, ivec2(0), uvec3(0u), vec4(0.0f), mat2x3(vec3(0.0f), vec3(0.0f)), float[4](0.0f, 0.0f, 0.0f, 0.0f), S_inner(0.0f));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;