tint/writer/msl: Inline constant expressions

This is required to handle materialized values, and for constant
expressions.

Bug: tint:1504
Change-Id: Ic3ac62317241fa6f7009360128f222aeb56f62e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92083
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2022-06-01 10:08:29 +00:00 committed by Dawn LUCI CQ
parent 2e22d9285c
commit cb6ddd2aa6
1012 changed files with 1950 additions and 1852 deletions

View File

@ -36,12 +36,12 @@
#include "src/tint/sem/atomic.h" #include "src/tint/sem/atomic.h"
#include "src/tint/sem/bool.h" #include "src/tint/sem/bool.h"
#include "src/tint/sem/call.h" #include "src/tint/sem/call.h"
#include "src/tint/sem/constant.h"
#include "src/tint/sem/depth_multisampled_texture.h" #include "src/tint/sem/depth_multisampled_texture.h"
#include "src/tint/sem/depth_texture.h" #include "src/tint/sem/depth_texture.h"
#include "src/tint/sem/f32.h" #include "src/tint/sem/f32.h"
#include "src/tint/sem/function.h" #include "src/tint/sem/function.h"
#include "src/tint/sem/i32.h" #include "src/tint/sem/i32.h"
#include "src/tint/sem/materialize.h"
#include "src/tint/sem/matrix.h" #include "src/tint/sem/matrix.h"
#include "src/tint/sem/member_accessor_expression.h" #include "src/tint/sem/member_accessor_expression.h"
#include "src/tint/sem/module.h" #include "src/tint/sem/module.h"
@ -86,6 +86,31 @@ bool last_is_break_or_fallthrough(const ast::BlockStatement* stmts) {
return IsAnyOf<ast::BreakStatement, ast::FallthroughStatement>(stmts->Last()); return IsAnyOf<ast::BreakStatement, ast::FallthroughStatement>(stmts->Last());
} }
void PrintF32(std::ostream& out, float value) {
// Note: Currently inf and nan should not be constructable, but this is implemented for the day
// we support them.
if (std::isinf(value)) {
out << (value >= 0 ? "INFINITY" : "-INFINITY");
} else if (std::isnan(value)) {
out << "NAN";
} else {
out << FloatToString(value) << "f";
}
}
void PrintI32(std::ostream& out, int32_t value) {
// MSL (and C++) parse `-2147483648` as a `long` because it parses unary minus and `2147483648`
// as separate tokens, and the latter doesn't fit into an (32-bit) `int`.
// WGSL, on the other hand, parses this as an `i32`.
// To avoid issues with `long` to `int` casts, emit `(-2147483647 - 1)` instead, which ensures
// the expression type is `int`.
if (auto int_min = std::numeric_limits<int32_t>::min(); value == int_min) {
out << "(" << int_min + 1 << " - 1)";
} else {
out << value;
}
}
class ScopedBitCast { class ScopedBitCast {
public: public:
ScopedBitCast(GeneratorImpl* generator, ScopedBitCast(GeneratorImpl* generator,
@ -551,12 +576,7 @@ bool GeneratorImpl::EmitBreak(const ast::BreakStatement*) {
} }
bool GeneratorImpl::EmitCall(std::ostream& out, const ast::CallExpression* expr) { bool GeneratorImpl::EmitCall(std::ostream& out, const ast::CallExpression* expr) {
auto* sem = program_->Sem().Get(expr); auto* call = program_->Sem().Get<sem::Call>(expr);
if (auto* m = sem->As<sem::Materialize>()) {
// TODO(crbug.com/tint/1504): Just emit the constant value.
sem = m->Expr();
}
auto* call = sem->As<sem::Call>();
auto* target = call->Target(); auto* target = call->Target();
return Switch( return Switch(
target, [&](const sem::Function* func) { return EmitFunctionCall(out, call, func); }, target, [&](const sem::Function* func) { return EmitFunctionCall(out, call, func); },
@ -1522,8 +1542,7 @@ bool GeneratorImpl::EmitZeroValue(std::ostream& out, const sem::Type* type) {
if (!EmitType(out, mat, "")) { if (!EmitType(out, mat, "")) {
return false; return false;
} }
out << "("; ScopedParen sp(out);
TINT_DEFER(out << ")");
return EmitZeroValue(out, mat->type()); return EmitZeroValue(out, mat->type());
}, },
[&](const sem::Array* arr) { [&](const sem::Array* arr) {
@ -1543,6 +1562,92 @@ bool GeneratorImpl::EmitZeroValue(std::ostream& out, const sem::Type* type) {
}); });
} }
bool GeneratorImpl::EmitConstant(std::ostream& out, const sem::Constant& constant) {
auto emit_bool = [&](size_t element_idx) {
out << (constant.Element<AInt>(element_idx) ? "true" : "false");
return true;
};
auto emit_f32 = [&](size_t element_idx) {
PrintF32(out, static_cast<float>(constant.Element<AFloat>(element_idx)));
return true;
};
auto emit_i32 = [&](size_t element_idx) {
PrintI32(out, static_cast<int32_t>(constant.Element<AInt>(element_idx).value));
return true;
};
auto emit_u32 = [&](size_t element_idx) {
out << constant.Element<AInt>(element_idx).value << "u";
return true;
};
auto emit_vector = [&](const sem::Vector* vec_ty, size_t start, size_t end) {
if (!EmitType(out, vec_ty, "")) {
return false;
}
ScopedParen sp(out);
auto emit_els = [&](auto emit_el) {
if (constant.AllEqual(start, end)) {
return emit_el(start);
}
for (size_t i = start; i < end; i++) {
if (i > start) {
out << ", ";
}
if (!emit_el(i)) {
return false;
}
}
return true;
};
return Switch(
vec_ty->type(), //
[&](const sem::Bool*) { return emit_els(emit_bool); }, //
[&](const sem::F32*) { return emit_els(emit_f32); }, //
[&](const sem::I32*) { return emit_els(emit_i32); }, //
[&](const sem::U32*) { return emit_els(emit_u32); }, //
[&](Default) {
diagnostics_.add_error(diag::System::Writer,
"unhandled constant vector element type: " +
builder_.FriendlyName(vec_ty->type()));
return false;
});
};
auto emit_matrix = [&](const sem::Matrix* m) {
if (!EmitType(out, constant.Type(), "")) {
return false;
}
ScopedParen sp(out);
for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
if (column_idx > 0) {
out << ", ";
}
size_t start = m->rows() * column_idx;
size_t end = m->rows() * (column_idx + 1);
if (!emit_vector(m->ColumnType(), start, end)) {
return false;
}
}
return true;
};
return Switch(
constant.Type(), //
[&](const sem::Bool*) { return emit_bool(0); }, //
[&](const sem::F32*) { return emit_f32(0); }, //
[&](const sem::I32*) { return emit_i32(0); }, //
[&](const sem::U32*) { return emit_u32(0); }, //
[&](const sem::Vector* v) { return emit_vector(v, 0, constant.ElementCount()); }, //
[&](const sem::Matrix* m) { return emit_matrix(m); }, //
[&](Default) {
diagnostics_.add_error(
diag::System::Writer,
"unhandled constant type: " + builder_.FriendlyName(constant.Type()));
return false;
});
}
bool GeneratorImpl::EmitLiteral(std::ostream& out, const ast::LiteralExpression* lit) { bool GeneratorImpl::EmitLiteral(std::ostream& out, const ast::LiteralExpression* lit) {
return Switch( return Switch(
lit, lit,
@ -1551,32 +1656,14 @@ bool GeneratorImpl::EmitLiteral(std::ostream& out, const ast::LiteralExpression*
return true; return true;
}, },
[&](const ast::FloatLiteralExpression* l) { [&](const ast::FloatLiteralExpression* l) {
auto f32 = static_cast<float>(l->value); PrintF32(out, static_cast<float>(l->value));
if (std::isinf(f32)) {
out << (f32 >= 0 ? "INFINITY" : "-INFINITY");
} else if (std::isnan(f32)) {
out << "NAN";
} else {
out << FloatToString(f32) << "f";
}
return true; return true;
}, },
[&](const ast::IntLiteralExpression* i) { [&](const ast::IntLiteralExpression* i) {
switch (i->suffix) { switch (i->suffix) {
case ast::IntLiteralExpression::Suffix::kNone: case ast::IntLiteralExpression::Suffix::kNone:
case ast::IntLiteralExpression::Suffix::kI: { case ast::IntLiteralExpression::Suffix::kI: {
// MSL (and C++) parse `-2147483648` as a `long` because it parses PrintI32(out, static_cast<int32_t>(i->value));
// unary minus and `2147483648` as separate tokens, and the latter
// doesn't fit into an (32-bit) `int`. WGSL, OTOH, parses this as an
// `i32`. To avoid issues with `long` to `int` casts, emit
// `(2147483647 - 1)` instead, which ensures the expression type is
// `int`.
const auto int_min = std::numeric_limits<int32_t>::min();
if (i->value == int_min) {
out << "(" << int_min + 1 << " - 1)";
} else {
out << i->value;
}
return true; return true;
} }
case ast::IntLiteralExpression::Suffix::kU: { case ast::IntLiteralExpression::Suffix::kU: {
@ -1594,6 +1681,11 @@ bool GeneratorImpl::EmitLiteral(std::ostream& out, const ast::LiteralExpression*
} }
bool GeneratorImpl::EmitExpression(std::ostream& out, const ast::Expression* expr) { bool GeneratorImpl::EmitExpression(std::ostream& out, const ast::Expression* expr) {
if (auto* sem = builder_.Sem().Get(expr)) {
if (auto constant = sem->ConstantValue()) {
return EmitConstant(out, constant);
}
}
return Switch( return Switch(
expr, expr,
[&](const ast::IndexAccessorExpression* a) { // [&](const ast::IndexAccessorExpression* a) { //

View File

@ -45,6 +45,7 @@
// Forward declarations // Forward declarations
namespace tint::sem { namespace tint::sem {
class Call; class Call;
class Constant;
class Builtin; class Builtin;
class TypeConstructor; class TypeConstructor;
class TypeConversion; class TypeConversion;
@ -250,6 +251,11 @@ class GeneratorImpl : public TextGenerator {
/// @param stmt the statement to emit /// @param stmt the statement to emit
/// @returns true if the statement was successfully emitted /// @returns true if the statement was successfully emitted
bool EmitIf(const ast::IfStatement* stmt); bool EmitIf(const ast::IfStatement* stmt);
/// Handles a constant value
/// @param out the output stream
/// @param constant the constant value to emit
/// @returns true if the constant value was successfully emitted
bool EmitConstant(std::ostream& out, const sem::Constant& constant);
/// Handles a literal /// Handles a literal
/// @param out the output of the expression stream /// @param out the output of the expression stream
/// @param lit the literal to emit /// @param lit the literal to emit

View File

@ -184,7 +184,7 @@ std::string expected_texture_overload(ast::builtin::test::ValidTextureOverload o
case ValidTextureOverload::kSampleGrad2dF32: case ValidTextureOverload::kSampleGrad2dF32:
return R"(texture.sample(sampler, float2(1.0f, 2.0f), gradient2d(float2(3.0f, 4.0f), float2(5.0f, 6.0f))))"; return R"(texture.sample(sampler, float2(1.0f, 2.0f), gradient2d(float2(3.0f, 4.0f), float2(5.0f, 6.0f))))";
case ValidTextureOverload::kSampleGrad2dOffsetF32: case ValidTextureOverload::kSampleGrad2dOffsetF32:
return R"(texture.sample(sampler, float2(1.0f, 2.0f), gradient2d(float2(3.0f, 4.0f), float2(5.0f, 6.0f)), int2(7, 7)))"; return R"(texture.sample(sampler, float2(1.0f, 2.0f), gradient2d(float2(3.0f, 4.0f), float2(5.0f, 6.0f)), int2(7)))";
case ValidTextureOverload::kSampleGrad2dArrayF32: case ValidTextureOverload::kSampleGrad2dArrayF32:
return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, gradient2d(float2(4.0f, 5.0f), float2(6.0f, 7.0f))))"; return R"(texture.sample(sampler, float2(1.0f, 2.0f), 3, gradient2d(float2(4.0f, 5.0f), float2(6.0f, 7.0f))))";
case ValidTextureOverload::kSampleGrad2dArrayOffsetF32: case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:

View File

@ -29,7 +29,7 @@ TEST_F(MslGeneratorImplTest, EmitExpression_Cast_Scalar) {
std::stringstream out; std::stringstream out;
ASSERT_TRUE(gen.EmitExpression(out, cast)) << gen.error(); ASSERT_TRUE(gen.EmitExpression(out, cast)) << gen.error();
EXPECT_EQ(out.str(), "float(1)"); EXPECT_EQ(out.str(), "1.0f");
} }
TEST_F(MslGeneratorImplTest, EmitExpression_Cast_Vector) { TEST_F(MslGeneratorImplTest, EmitExpression_Cast_Vector) {
@ -40,7 +40,7 @@ TEST_F(MslGeneratorImplTest, EmitExpression_Cast_Vector) {
std::stringstream out; std::stringstream out;
ASSERT_TRUE(gen.EmitExpression(out, cast)) << gen.error(); ASSERT_TRUE(gen.EmitExpression(out, cast)) << gen.error();
EXPECT_EQ(out.str(), "float3(int3(1, 2, 3))"); EXPECT_EQ(out.str(), "float3(1.0f, 2.0f, 3.0f)");
} }
TEST_F(MslGeneratorImplTest, EmitExpression_Cast_IntMin) { TEST_F(MslGeneratorImplTest, EmitExpression_Cast_IntMin) {
@ -51,7 +51,7 @@ TEST_F(MslGeneratorImplTest, EmitExpression_Cast_IntMin) {
std::stringstream out; std::stringstream out;
ASSERT_TRUE(gen.EmitExpression(out, cast)) << gen.error(); ASSERT_TRUE(gen.EmitExpression(out, cast)) << gen.error();
EXPECT_EQ(out.str(), "uint((-2147483647 - 1))"); EXPECT_EQ(out.str(), "0u");
} }
} // namespace } // namespace

View File

@ -67,7 +67,7 @@ TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Float) {
GeneratorImpl& gen = Build(); GeneratorImpl& gen = Build();
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_THAT(gen.result(), HasSubstr("float(-0.000012f)")); EXPECT_THAT(gen.result(), HasSubstr("-0.000012f"));
} }
TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Bool) { TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Bool) {
@ -76,7 +76,7 @@ TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Bool) {
GeneratorImpl& gen = Build(); GeneratorImpl& gen = Build();
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_THAT(gen.result(), HasSubstr("bool(true)")); EXPECT_THAT(gen.result(), HasSubstr("true"));
} }
TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Int) { TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Int) {
@ -85,7 +85,7 @@ TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Int) {
GeneratorImpl& gen = Build(); GeneratorImpl& gen = Build();
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_THAT(gen.result(), HasSubstr("int(-12345)")); EXPECT_THAT(gen.result(), HasSubstr("-12345"));
} }
TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Uint) { TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Uint) {
@ -94,7 +94,7 @@ TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Uint) {
GeneratorImpl& gen = Build(); GeneratorImpl& gen = Build();
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_THAT(gen.result(), HasSubstr("uint(12345u)")); EXPECT_THAT(gen.result(), HasSubstr("12345u"));
} }
TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Vec) { TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Vec) {
@ -112,7 +112,7 @@ TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Vec_Empty) {
GeneratorImpl& gen = Build(); GeneratorImpl& gen = Build();
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_THAT(gen.result(), HasSubstr("float3()")); EXPECT_THAT(gen.result(), HasSubstr("float3(0.0f)"));
} }
TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Mat) { TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Mat) {
@ -134,7 +134,7 @@ TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Mat_Empty) {
GeneratorImpl& gen = Build(); GeneratorImpl& gen = Build();
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_THAT(gen.result(), HasSubstr("float4x4()")); EXPECT_THAT(gen.result(), HasSubstr("float4x4(float4(0.0f), float4(0.0f)"));
} }
TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Array) { TEST_F(MslGeneratorImplTest, EmitConstructor_Type_Array) {

View File

@ -207,7 +207,7 @@ struct tint_symbol {
}; };
Interface vert_main_inner() { Interface vert_main_inner() {
Interface const tint_symbol_3 = {.col1=0.5f, .col2=0.25f, .pos=float4()}; Interface const tint_symbol_3 = {.col1=0.5f, .col2=0.25f, .pos=float4(0.0f)};
return tint_symbol_3; return tint_symbol_3;
} }

View File

@ -157,7 +157,7 @@ struct tint_symbol_3 {
void comp_main_inner(uint local_invocation_index, threadgroup float2x2* const tint_symbol) { void comp_main_inner(uint local_invocation_index, threadgroup float2x2* const tint_symbol) {
{ {
*(tint_symbol) = float2x2(); *(tint_symbol) = float2x2(float2(0.0f), float2(0.0f));
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
float2x2 const x = *(tint_symbol); float2x2 const x = *(tint_symbol);
@ -199,7 +199,7 @@ struct tint_symbol_3 {
void comp_main_inner(uint local_invocation_index, threadgroup tint_array_wrapper* const tint_symbol) { void comp_main_inner(uint local_invocation_index, threadgroup tint_array_wrapper* const tint_symbol) {
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) { for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
uint const i = idx; uint const i = idx;
(*(tint_symbol)).arr[i] = float2x2(); (*(tint_symbol)).arr[i] = float2x2(float2(0.0f), float2(0.0f));
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
tint_array_wrapper const x = *(tint_symbol); tint_array_wrapper const x = *(tint_symbol);
@ -333,9 +333,9 @@ struct tint_symbol_23 {
void main1_inner(uint local_invocation_index, threadgroup float2x2* const tint_symbol, threadgroup float2x3* const tint_symbol_1, threadgroup float2x4* const tint_symbol_2) { void main1_inner(uint local_invocation_index, threadgroup float2x2* const tint_symbol, threadgroup float2x3* const tint_symbol_1, threadgroup float2x4* const tint_symbol_2) {
{ {
*(tint_symbol) = float2x2(); *(tint_symbol) = float2x2(float2(0.0f), float2(0.0f));
*(tint_symbol_1) = float2x3(); *(tint_symbol_1) = float2x3(float3(0.0f), float3(0.0f));
*(tint_symbol_2) = float2x4(); *(tint_symbol_2) = float2x4(float4(0.0f), float4(0.0f));
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
float2x2 const a1 = *(tint_symbol); float2x2 const a1 = *(tint_symbol);
@ -353,9 +353,9 @@ kernel void main1(threadgroup tint_symbol_7* tint_symbol_4 [[threadgroup(0)]], u
void main2_inner(uint local_invocation_index_1, threadgroup float3x2* const tint_symbol_8, threadgroup float3x3* const tint_symbol_9, threadgroup float3x4* const tint_symbol_10) { void main2_inner(uint local_invocation_index_1, threadgroup float3x2* const tint_symbol_8, threadgroup float3x3* const tint_symbol_9, threadgroup float3x4* const tint_symbol_10) {
{ {
*(tint_symbol_8) = float3x2(); *(tint_symbol_8) = float3x2(float2(0.0f), float2(0.0f), float2(0.0f));
*(tint_symbol_9) = float3x3(); *(tint_symbol_9) = float3x3(float3(0.0f), float3(0.0f), float3(0.0f));
*(tint_symbol_10) = float3x4(); *(tint_symbol_10) = float3x4(float4(0.0f), float4(0.0f), float4(0.0f));
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
float3x2 const a1 = *(tint_symbol_8); float3x2 const a1 = *(tint_symbol_8);
@ -373,9 +373,9 @@ kernel void main2(threadgroup tint_symbol_15* tint_symbol_12 [[threadgroup(0)]],
void main3_inner(uint local_invocation_index_2, threadgroup float4x2* const tint_symbol_16, threadgroup float4x3* const tint_symbol_17, threadgroup float4x4* const tint_symbol_18) { void main3_inner(uint local_invocation_index_2, threadgroup float4x2* const tint_symbol_16, threadgroup float4x3* const tint_symbol_17, threadgroup float4x4* const tint_symbol_18) {
{ {
*(tint_symbol_16) = float4x2(); *(tint_symbol_16) = float4x2(float2(0.0f), float2(0.0f), float2(0.0f), float2(0.0f));
*(tint_symbol_17) = float4x3(); *(tint_symbol_17) = float4x3(float3(0.0f), float3(0.0f), float3(0.0f), float3(0.0f));
*(tint_symbol_18) = float4x4(); *(tint_symbol_18) = float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f));
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
float4x2 const a1 = *(tint_symbol_16); float4x2 const a1 = *(tint_symbol_16);

View File

@ -48,7 +48,7 @@ TEST_F(MslGeneratorImplTest, Emit_VariableDeclStatement_Const) {
gen.increment_indent(); gen.increment_indent();
ASSERT_TRUE(gen.EmitStatement(stmt)) << gen.error(); ASSERT_TRUE(gen.EmitStatement(stmt)) << gen.error();
EXPECT_EQ(gen.result(), " float const a = float();\n"); EXPECT_EQ(gen.result(), " float const a = 0.0f;\n");
} }
TEST_F(MslGeneratorImplTest, Emit_VariableDeclStatement_Array) { TEST_F(MslGeneratorImplTest, Emit_VariableDeclStatement_Array) {
@ -132,7 +132,7 @@ TEST_F(MslGeneratorImplTest, Emit_VariableDeclStatement_Initializer_Private) {
GeneratorImpl& gen = SanitizeAndBuild(); GeneratorImpl& gen = SanitizeAndBuild();
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_THAT(gen.result(), HasSubstr("thread float tint_symbol_1 = initializer;\n")); EXPECT_THAT(gen.result(), HasSubstr("thread float tint_symbol_1 = 0.0f;\n float const tint_symbol = tint_symbol_1;\n return;\n"));
} }
TEST_F(MslGeneratorImplTest, Emit_VariableDeclStatement_Workgroup) { TEST_F(MslGeneratorImplTest, Emit_VariableDeclStatement_Workgroup) {
@ -158,7 +158,7 @@ TEST_F(MslGeneratorImplTest, Emit_VariableDeclStatement_Initializer_ZeroVec) {
GeneratorImpl& gen = Build(); GeneratorImpl& gen = Build();
ASSERT_TRUE(gen.EmitStatement(stmt)) << gen.error(); ASSERT_TRUE(gen.EmitStatement(stmt)) << gen.error();
EXPECT_EQ(gen.result(), R"(float3 a = float3(); EXPECT_EQ(gen.result(), R"(float3 a = float3(0.0f);
)"); )");
} }

View File

@ -3,7 +3,7 @@
using namespace metal; using namespace metal;
kernel void tint_symbol() { kernel void tint_symbol() {
float3x3 const m = float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f)); float3x3 const m = float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));
float3 const v = m[1]; float3 const v = float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f))[1];
float const f = v[1]; float const f = v[1];
return; return;
} }

View File

@ -3,9 +3,9 @@
using namespace metal; using namespace metal;
kernel void tint_symbol() { kernel void tint_symbol() {
float3 const v = float3(1.0f, 2.0f, 3.0f); float3 const v = float3(1.0f, 2.0f, 3.0f);
float const scalar = v[1]; float const scalar = float3(1.0f, 2.0f, 3.0f)[1];
float2 const swizzle2 = float3(v).xz; float2 const swizzle2 = float3(float3(1.0f, 2.0f, 3.0f)).xz;
float3 const swizzle3 = float3(v).xzy; float3 const swizzle3 = float3(float3(1.0f, 2.0f, 3.0f)).xzy;
return; return;
} }

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void main_1() { void main_1() {
float3x3 m = float3x3(); float3x3 m = float3x3(float3(0.0f), float3(0.0f), float3(0.0f));
float3 const x_15 = m[1]; float3 const x_15 = m[1];
float const x_16 = x_15[1]; float const x_16 = x_15[1];
return; return;

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void main_1() { void main_1() {
float3 v = float3(); float3 v = float3(0.0f);
float const x_14 = v[1]; float const x_14 = v[1];
float3 const x_16 = v; float3 const x_16 = v;
float2 const x_17 = float2(x_16[0], x_16[2]); float2 const x_17 = float2(x_16[0], x_16[2]);

View File

@ -21,7 +21,7 @@ kernel void tint_symbol() {
int const x = 42; int const x = 42;
tint_array_wrapper const empty = {.arr={}}; tint_array_wrapper const empty = {.arr={}};
tint_array_wrapper const nonempty = {.arr={1, 2, 3, 4}}; tint_array_wrapper const nonempty = {.arr={1, 2, 3, 4}};
tint_array_wrapper const nonempty_with_expr = {.arr={1, x, as_type<int>((as_type<uint>(x) + as_type<uint>(1))), nonempty.arr[3]}}; tint_array_wrapper const nonempty_with_expr = {.arr={1, 42, as_type<int>((as_type<uint>(42) + as_type<uint>(1))), nonempty.arr[3]}};
tint_array_wrapper_1 const nested_empty = {.arr={}}; tint_array_wrapper_1 const nested_empty = {.arr={}};
tint_array_wrapper const tint_symbol_1 = {.arr={1, 2, 3, 4}}; tint_array_wrapper const tint_symbol_1 = {.arr={1, 2, 3, 4}};
tint_array_wrapper const tint_symbol_2 = {.arr={5, 6, 7, 8}}; tint_array_wrapper const tint_symbol_2 = {.arr={5, 6, 7, 8}};
@ -32,7 +32,7 @@ kernel void tint_symbol() {
tint_array_wrapper const tint_symbol_7 = {.arr={21, 22, 23, 24}}; tint_array_wrapper const tint_symbol_7 = {.arr={21, 22, 23, 24}};
tint_array_wrapper_2 const tint_symbol_8 = {.arr={tint_symbol_5, tint_symbol_6, tint_symbol_7}}; tint_array_wrapper_2 const tint_symbol_8 = {.arr={tint_symbol_5, tint_symbol_6, tint_symbol_7}};
tint_array_wrapper_1 const nested_nonempty = {.arr={tint_symbol_4, tint_symbol_8}}; tint_array_wrapper_1 const nested_nonempty = {.arr={tint_symbol_4, tint_symbol_8}};
tint_array_wrapper const tint_symbol_9 = {.arr={1, 2, x, as_type<int>((as_type<uint>(x) + as_type<uint>(1)))}}; tint_array_wrapper const tint_symbol_9 = {.arr={1, 2, 42, as_type<int>((as_type<uint>(42) + as_type<uint>(1)))}};
tint_array_wrapper const tint_symbol_10 = {.arr={5, 6, nonempty.arr[2], as_type<int>((as_type<uint>(nonempty.arr[3]) + as_type<uint>(1)))}}; tint_array_wrapper const tint_symbol_10 = {.arr={5, 6, nonempty.arr[2], as_type<int>((as_type<uint>(nonempty.arr[3]) + as_type<uint>(1)))}};
tint_array_wrapper_2 const tint_symbol_11 = {.arr={tint_symbol_9, tint_symbol_10, nonempty}}; tint_array_wrapper_2 const tint_symbol_11 = {.arr={tint_symbol_9, tint_symbol_10, nonempty}};
tint_array_wrapper_1 const nested_nonempty_with_expr = {.arr={tint_symbol_11, nested_nonempty.arr[1]}}; tint_array_wrapper_1 const nested_nonempty_with_expr = {.arr={tint_symbol_11, nested_nonempty.arr[1]}};
@ -40,7 +40,7 @@ kernel void tint_symbol() {
int const subexpr_empty = tint_symbol_12.arr[1]; int const subexpr_empty = tint_symbol_12.arr[1];
tint_array_wrapper const tint_symbol_13 = {.arr={1, 2, 3, 4}}; tint_array_wrapper const tint_symbol_13 = {.arr={1, 2, 3, 4}};
int const subexpr_nonempty = tint_symbol_13.arr[2]; int const subexpr_nonempty = tint_symbol_13.arr[2];
tint_array_wrapper const tint_symbol_14 = {.arr={1, x, as_type<int>((as_type<uint>(x) + as_type<uint>(1))), nonempty.arr[3]}}; tint_array_wrapper const tint_symbol_14 = {.arr={1, 42, as_type<int>((as_type<uint>(42) + as_type<uint>(1))), nonempty.arr[3]}};
int const subexpr_nonempty_with_expr = tint_symbol_14.arr[2]; int const subexpr_nonempty_with_expr = tint_symbol_14.arr[2];
tint_array_wrapper_3 const tint_symbol_15 = {.arr={}}; tint_array_wrapper_3 const tint_symbol_15 = {.arr={}};
tint_array_wrapper const subexpr_nested_empty = tint_symbol_15.arr[1]; tint_array_wrapper const subexpr_nested_empty = tint_symbol_15.arr[1];
@ -48,7 +48,7 @@ kernel void tint_symbol() {
tint_array_wrapper const tint_symbol_17 = {.arr={5, 6, 7, 8}}; tint_array_wrapper const tint_symbol_17 = {.arr={5, 6, 7, 8}};
tint_array_wrapper_3 const tint_symbol_18 = {.arr={tint_symbol_16, tint_symbol_17}}; tint_array_wrapper_3 const tint_symbol_18 = {.arr={tint_symbol_16, tint_symbol_17}};
tint_array_wrapper const subexpr_nested_nonempty = tint_symbol_18.arr[1]; tint_array_wrapper const subexpr_nested_nonempty = tint_symbol_18.arr[1];
tint_array_wrapper const tint_symbol_19 = {.arr={1, x, as_type<int>((as_type<uint>(x) + as_type<uint>(1))), nonempty.arr[3]}}; tint_array_wrapper const tint_symbol_19 = {.arr={1, 42, as_type<int>((as_type<uint>(42) + as_type<uint>(1))), nonempty.arr[3]}};
tint_array_wrapper_3 const tint_symbol_20 = {.arr={tint_symbol_19, nested_nonempty.arr[1].arr[2]}}; tint_array_wrapper_3 const tint_symbol_20 = {.arr={tint_symbol_19, nested_nonempty.arr[1].arr[2]}};
tint_array_wrapper const subexpr_nested_nonempty_with_expr = tint_symbol_20.arr[1]; tint_array_wrapper const subexpr_nested_nonempty_with_expr = tint_symbol_20.arr[1];
return; return;

View File

@ -34,14 +34,14 @@ struct S {
}; };
void tint_symbol_inner(uint idx, device S* const tint_symbol_2) { void tint_symbol_inner(uint idx, device S* const tint_symbol_2) {
(*(tint_symbol_2)).arr[idx].a = int3(); (*(tint_symbol_2)).arr[idx].a = int3(0);
(*(tint_symbol_2)).arr[idx].b = int(); (*(tint_symbol_2)).arr[idx].b = 0;
(*(tint_symbol_2)).arr[idx].c = uint3(); (*(tint_symbol_2)).arr[idx].c = uint3(0u);
(*(tint_symbol_2)).arr[idx].d = uint(); (*(tint_symbol_2)).arr[idx].d = 0u;
(*(tint_symbol_2)).arr[idx].e = float3(); (*(tint_symbol_2)).arr[idx].e = float3(0.0f);
(*(tint_symbol_2)).arr[idx].f = float(); (*(tint_symbol_2)).arr[idx].f = 0.0f;
(*(tint_symbol_2)).arr[idx].g = float2x3(); (*(tint_symbol_2)).arr[idx].g = float2x3(float3(0.0f), float3(0.0f));
(*(tint_symbol_2)).arr[idx].h = float3x2(); (*(tint_symbol_2)).arr[idx].h = float3x2(float2(0.0f), float2(0.0f), float2(0.0f));
tint_array_wrapper const tint_symbol_1 = {.arr={}}; tint_array_wrapper const tint_symbol_1 = {.arr={}};
(*(tint_symbol_2)).arr[idx].i = tint_symbol_1; (*(tint_symbol_2)).arr[idx].i = tint_symbol_1;
} }

View File

@ -35,14 +35,14 @@ struct S {
}; };
kernel void tint_symbol(device S* tint_symbol_3 [[buffer(0)]]) { kernel void tint_symbol(device S* tint_symbol_3 [[buffer(0)]]) {
(*(tint_symbol_3)).a = int3(); (*(tint_symbol_3)).a = int3(0);
(*(tint_symbol_3)).b = int(); (*(tint_symbol_3)).b = 0;
(*(tint_symbol_3)).c = uint3(); (*(tint_symbol_3)).c = uint3(0u);
(*(tint_symbol_3)).d = uint(); (*(tint_symbol_3)).d = 0u;
(*(tint_symbol_3)).e = float3(); (*(tint_symbol_3)).e = float3(0.0f);
(*(tint_symbol_3)).f = float(); (*(tint_symbol_3)).f = 0.0f;
(*(tint_symbol_3)).g = float2x3(); (*(tint_symbol_3)).g = float2x3(float3(0.0f), float3(0.0f));
(*(tint_symbol_3)).h = float3x2(); (*(tint_symbol_3)).h = float3x2(float2(0.0f), float2(0.0f), float2(0.0f));
Inner const tint_symbol_1 = {}; Inner const tint_symbol_1 = {};
(*(tint_symbol_3)).i = tint_symbol_1; (*(tint_symbol_3)).i = tint_symbol_1;
tint_array_wrapper const tint_symbol_2 = {.arr={}}; tint_array_wrapper const tint_symbol_2 = {.arr={}};

View File

@ -24,7 +24,7 @@ struct tint_symbol_3 {
float4 tint_symbol_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, VertexInputs1 inputs1) { float4 tint_symbol_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, VertexInputs1 inputs1) {
uint const foo = (inputs0.vertex_index + instance_index); uint const foo = (inputs0.vertex_index + instance_index);
return float4(); return float4(0.0f);
} }
vertex tint_symbol_3 tint_symbol(uint vertex_index [[vertex_id]], uint instance_index [[instance_id]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { vertex tint_symbol_3 tint_symbol(uint vertex_index [[vertex_id]], uint instance_index [[instance_id]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {

View File

@ -35,7 +35,7 @@ struct tint_array_wrapper {
VertexOutputs vs_main_inner(uint VertexIndex, const constant Uniforms* const tint_symbol_5) { VertexOutputs vs_main_inner(uint VertexIndex, const constant Uniforms* const tint_symbol_5) {
tint_array_wrapper texcoord = {.arr={float2(-0.5f, 0.0f), float2(1.5f, 0.0f), float2(0.5f, 2.0f)}}; tint_array_wrapper texcoord = {.arr={float2(-0.5f, 0.0f), float2(1.5f, 0.0f), float2(0.5f, 2.0f)}};
VertexOutputs output = {}; VertexOutputs output = {};
output.position = float4(((texcoord.arr[VertexIndex] * 2.0f) - float2(1.0f, 1.0f)), 0.0f, 1.0f); output.position = float4(((texcoord.arr[VertexIndex] * 2.0f) - float2(1.0f)), 0.0f, 1.0f);
bool flipY = ((*(tint_symbol_5)).u_scale[1] < 0.0f); bool flipY = ((*(tint_symbol_5)).u_scale[1] < 0.0f);
if (flipY) { if (flipY) {
output.texcoords = ((((texcoord.arr[VertexIndex] * (*(tint_symbol_5)).u_scale) + (*(tint_symbol_5)).u_offset) * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f)); output.texcoords = ((((texcoord.arr[VertexIndex] * (*(tint_symbol_5)).u_scale) + (*(tint_symbol_5)).u_offset) * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f));
@ -62,10 +62,10 @@ struct tint_symbol_3 {
}; };
float4 fs_main_inner(float2 texcoord, thread bool* const tint_symbol_7, texture2d<float, access::sample> tint_symbol_8, sampler tint_symbol_9) { float4 fs_main_inner(float2 texcoord, thread bool* const tint_symbol_7, texture2d<float, access::sample> tint_symbol_8, sampler tint_symbol_9) {
float2 clampedTexcoord = clamp(texcoord, float2(0.0f, 0.0f), float2(1.0f, 1.0f)); float2 clampedTexcoord = clamp(texcoord, float2(0.0f), float2(1.0f));
if (!(all((clampedTexcoord == texcoord)))) { if (!(all((clampedTexcoord == texcoord)))) {
*(tint_symbol_7) = true; *(tint_symbol_7) = true;
return float4(); return float4(0.0f);
} }
float4 srcColor = tint_symbol_8.sample(tint_symbol_9, texcoord); float4 srcColor = tint_symbol_8.sample(tint_symbol_9, texcoord);
return srcColor; return srcColor;

View File

@ -20,7 +20,7 @@ struct Result {
void f_inner(uint local_invocation_index, threadgroup S* const tint_symbol, device Result* const tint_symbol_1, const constant UBO* const tint_symbol_2) { void f_inner(uint local_invocation_index, threadgroup S* const tint_symbol, device Result* const tint_symbol_1, const constant UBO* const tint_symbol_2) {
for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) { for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) {
uint const i = idx; uint const i = idx;
(*(tint_symbol)).data.arr[i] = int(); (*(tint_symbol)).data.arr[i] = 0;
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
(*(tint_symbol_1)).out = (*(tint_symbol)).data.arr[(*(tint_symbol_2)).dynamic_idx]; (*(tint_symbol_1)).out = (*(tint_symbol)).data.arr[(*(tint_symbol_2)).dynamic_idx];

View File

@ -20,7 +20,7 @@ struct Result {
void f_inner(uint local_invocation_index, threadgroup S* const tint_symbol, const constant UBO* const tint_symbol_1, device Result* const tint_symbol_2) { void f_inner(uint local_invocation_index, threadgroup S* const tint_symbol, const constant UBO* const tint_symbol_1, device Result* const tint_symbol_2) {
for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) { for(uint idx = local_invocation_index; (idx < 64u); idx = (idx + 1u)) {
uint const i = idx; uint const i = idx;
(*(tint_symbol)).data.arr[i] = int(); (*(tint_symbol)).data.arr[i] = 0;
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
(*(tint_symbol)).data.arr[(*(tint_symbol_1)).dynamic_idx] = 1; (*(tint_symbol)).data.arr[(*(tint_symbol_1)).dynamic_idx] = 1;

View File

@ -4,7 +4,7 @@ using namespace metal;
int f(int x, thread bool* const tint_symbol_5) { int f(int x, thread bool* const tint_symbol_5) {
if ((x == 10)) { if ((x == 10)) {
*(tint_symbol_5) = true; *(tint_symbol_5) = true;
return int(); return 0;
} }
return x; return x;
} }
@ -22,7 +22,7 @@ int tint_symbol_inner(int3 x, thread bool* const tint_symbol_6) {
while (true) { while (true) {
int const r = f(y, tint_symbol_6); int const r = f(y, tint_symbol_6);
if (*(tint_symbol_6)) { if (*(tint_symbol_6)) {
return int(); return 0;
} }
if ((r == 0)) { if ((r == 0)) {
break; break;

View File

@ -4,7 +4,7 @@ using namespace metal;
kernel void f() { kernel void f() {
int const a = 1; int const a = 1;
int const b = 0; int const b = 0;
int const c = (a / b); int const c = (1 / 0);
return; return;
} }

View File

@ -68,25 +68,25 @@ void main_1(thread float* const tint_symbol_7, thread bool* const tint_symbol_8,
return; return;
} }
float4 const x_34 = (*(tint_symbol_10)).vEyePosition; float4 const x_34 = (*(tint_symbol_10)).vEyePosition;
float3 const x_38 = float3(0.0f, 0.0f, 0.0f); float3 const x_38 = float3(0.0f);
viewDirectionW = normalize((float3(x_34[0], x_34[1], x_34[2]) - x_38)); viewDirectionW = normalize((float3(x_34[0], x_34[1], x_34[2]) - float3(0.0f)));
baseColor = float4(1.0f, 1.0f, 1.0f, 1.0f); baseColor = float4(1.0f);
float4 const x_52 = (*(tint_symbol_11)).vDiffuseColor; float4 const x_52 = (*(tint_symbol_11)).vDiffuseColor;
diffuseColor = float3(x_52[0], x_52[1], x_52[2]); diffuseColor = float3(x_52[0], x_52[1], x_52[2]);
float const x_60 = (*(tint_symbol_11)).vDiffuseColor[3]; float const x_60 = (*(tint_symbol_11)).vDiffuseColor[3];
alpha = x_60; alpha = x_60;
float3 const x_62 = float3(0.0f, 0.0f, 0.0f); float3 const x_62 = float3(0.0f);
float3 const x_64 = float3(0.0f, 0.0f, 0.0f); float3 const x_64 = float3(0.0f);
normalW = normalize(-(cross(dfdx(x_62), dfdy(x_64)))); normalW = normalize(-(cross(dfdx(float3(0.0f)), dfdy(float3(0.0f)))));
uvOffset = float2(0.0f, 0.0f); uvOffset = float2(0.0f);
float4 const x_74 = float4(0.0f, 0.0f, 0.0f, 0.0f); float4 const x_74 = float4(0.0f);
float4 const x_76 = baseColor; float4 const x_76 = baseColor;
float3 const x_78 = (float3(x_76[0], x_76[1], x_76[2]) * float3(x_74[0], x_74[1], x_74[2])); float3 const x_78 = (float3(x_76[0], x_76[1], x_76[2]) * float3(float4(0.0f)[0], float4(0.0f)[1], float4(0.0f)[2]));
float4 const x_79 = baseColor; float4 const x_79 = baseColor;
baseColor = float4(x_78[0], x_78[1], x_78[2], x_79[3]); baseColor = float4(x_78[0], x_78[1], x_78[2], x_79[3]);
baseAmbientColor = float3(1.0f, 1.0f, 1.0f); baseAmbientColor = float3(1.0f);
glossiness = 0.0f; glossiness = 0.0f;
diffuseBase = float3(0.0f, 0.0f, 0.0f); diffuseBase = float3(0.0f);
shadow = 1.0f; shadow = 1.0f;
refractionColor = float4(0.0f, 0.0f, 0.0f, 1.0f); refractionColor = float4(0.0f, 0.0f, 0.0f, 1.0f);
reflectionColor = float4(0.0f, 0.0f, 0.0f, 1.0f); reflectionColor = float4(0.0f, 0.0f, 0.0f, 1.0f);
@ -97,8 +97,8 @@ void main_1(thread float* const tint_symbol_7, thread bool* const tint_symbol_8,
float3 const x_99 = emissiveColor; float3 const x_99 = emissiveColor;
float3 const x_103 = (*(tint_symbol_11)).vAmbientColor; float3 const x_103 = (*(tint_symbol_11)).vAmbientColor;
float4 const x_108 = baseColor; float4 const x_108 = baseColor;
finalDiffuse = (clamp((((x_96 * x_97) + x_99) + x_103), float3(0.0f, 0.0f, 0.0f), float3(1.0f, 1.0f, 1.0f)) * float3(x_108[0], x_108[1], x_108[2])); finalDiffuse = (clamp((((x_96 * x_97) + x_99) + x_103), float3(0.0f), float3(1.0f)) * float3(x_108[0], x_108[1], x_108[2]));
finalSpecular = float3(0.0f, 0.0f, 0.0f); finalSpecular = float3(0.0f);
float3 const x_113 = finalDiffuse; float3 const x_113 = finalDiffuse;
float3 const x_114 = baseAmbientColor; float3 const x_114 = baseAmbientColor;
float3 const x_116 = finalSpecular; float3 const x_116 = finalSpecular;
@ -108,7 +108,7 @@ void main_1(thread float* const tint_symbol_7, thread bool* const tint_symbol_8,
float const x_124 = alpha; float const x_124 = alpha;
color = float4(x_123[0], x_123[1], x_123[2], x_124); color = float4(x_123[0], x_123[1], x_123[2], x_124);
float4 const x_129 = color; float4 const x_129 = color;
float3 const x_132 = fmax(float3(x_129[0], x_129[1], x_129[2]), float3(0.0f, 0.0f, 0.0f)); float3 const x_132 = fmax(float3(x_129[0], x_129[1], x_129[2]), float3(0.0f));
float4 const x_133 = color; float4 const x_133 = color;
color = float4(x_132[0], x_132[1], x_132[2], x_133[3]); color = float4(x_132[0], x_132[1], x_132[2], x_133[3]);
float const x_140 = (*(tint_symbol_12)).visibility; float const x_140 = (*(tint_symbol_12)).visibility;

View File

@ -84,11 +84,11 @@ void tint_symbol_inner(uint3 GlobalInvocationID, const constant Config* const ti
int const TILE_SIZE = 16; int const TILE_SIZE = 16;
int const TILE_COUNT_X = 2; int const TILE_COUNT_X = 2;
int const TILE_COUNT_Y = 2; int const TILE_COUNT_Y = 2;
for(int y_1 = 0; (y_1 < TILE_COUNT_Y); y_1 = as_type<int>((as_type<uint>(y_1) + as_type<uint>(1)))) { for(int y_1 = 0; (y_1 < 2); y_1 = as_type<int>((as_type<uint>(y_1) + as_type<uint>(1)))) {
for(int x_1 = 0; (x_1 < TILE_COUNT_X); x_1 = as_type<int>((as_type<uint>(x_1) + as_type<uint>(1)))) { for(int x_1 = 0; (x_1 < 2); x_1 = as_type<int>((as_type<uint>(x_1) + as_type<uint>(1)))) {
int2 tilePixel0Idx = int2(as_type<int>((as_type<uint>(x_1) * as_type<uint>(TILE_SIZE))), as_type<int>((as_type<uint>(y_1) * as_type<uint>(TILE_SIZE)))); int2 tilePixel0Idx = int2(as_type<int>((as_type<uint>(x_1) * as_type<uint>(16))), as_type<int>((as_type<uint>(y_1) * as_type<uint>(16))));
float2 floorCoord = (((2.0f * float2(tilePixel0Idx)) / float4((*(tint_symbol_3)).fullScreenSize).xy) - float2(1.0f)); float2 floorCoord = (((2.0f * float2(tilePixel0Idx)) / float4((*(tint_symbol_3)).fullScreenSize).xy) - float2(1.0f));
float2 ceilCoord = (((2.0f * float2(as_type<int2>((as_type<uint2>(tilePixel0Idx) + as_type<uint2>(int2(TILE_SIZE)))))) / float4((*(tint_symbol_3)).fullScreenSize).xy) - float2(1.0f)); float2 ceilCoord = (((2.0f * float2(as_type<int2>((as_type<uint2>(tilePixel0Idx) + as_type<uint2>(int2(16)))))) / float4((*(tint_symbol_3)).fullScreenSize).xy) - float2(1.0f));
float2 viewFloorCoord = float2((((-(viewNear) * floorCoord[0]) - (M[2][0] * viewNear)) / M[0][0]), (((-(viewNear) * floorCoord[1]) - (M[2][1] * viewNear)) / M[1][1])); float2 viewFloorCoord = float2((((-(viewNear) * floorCoord[0]) - (M[2][0] * viewNear)) / M[0][0]), (((-(viewNear) * floorCoord[1]) - (M[2][1] * viewNear)) / M[1][1]));
float2 viewCeilCoord = float2((((-(viewNear) * ceilCoord[0]) - (M[2][0] * viewNear)) / M[0][0]), (((-(viewNear) * ceilCoord[1]) - (M[2][1] * viewNear)) / M[1][1])); float2 viewCeilCoord = float2((((-(viewNear) * ceilCoord[0]) - (M[2][0] * viewNear)) / M[0][0]), (((-(viewNear) * ceilCoord[1]) - (M[2][1] * viewNear)) / M[1][1]));
frustumPlanes.arr[0] = float4(1.0f, 0.0f, (-(viewFloorCoord[0]) / viewNear), 0.0f); frustumPlanes.arr[0] = float4(1.0f, 0.0f, (-(viewFloorCoord[0]) / viewNear), 0.0f);
@ -117,7 +117,7 @@ void tint_symbol_inner(uint3 GlobalInvocationID, const constant Config* const ti
dp = (dp + fmin(0.0f, dot(p, frustumPlanes.arr[i]))); dp = (dp + fmin(0.0f, dot(p, frustumPlanes.arr[i])));
} }
if ((dp >= 0.0f)) { if ((dp >= 0.0f)) {
uint tileId = uint(as_type<int>((as_type<uint>(x_1) + as_type<uint>(as_type<int>((as_type<uint>(y_1) * as_type<uint>(TILE_COUNT_X))))))); uint tileId = uint(as_type<int>((as_type<uint>(x_1) + as_type<uint>(as_type<int>((as_type<uint>(y_1) * as_type<uint>(2)))))));
if (((tileId < 0u) || (tileId >= (*(tint_symbol_1)).numTiles))) { if (((tileId < 0u) || (tileId >= (*(tint_symbol_1)).numTiles))) {
continue; continue;
} }

View File

@ -11,7 +11,7 @@ bug/tint/1369.wgsl:9:9 warning: code is unreachable
using namespace metal; using namespace metal;
bool call_discard(thread bool* const tint_symbol) { bool call_discard(thread bool* const tint_symbol) {
*(tint_symbol) = true; *(tint_symbol) = true;
return bool(); return false;
return true; return true;
} }

View File

@ -26,20 +26,20 @@ bool test_int_S1_c0_b(const constant UniformBuffer* const tint_symbol_5) {
ok = true; ok = true;
x_41_phi = false; x_41_phi = false;
if (true) { if (true) {
x_40 = all(((int4(0, 0, 0, 0) / int4(x_27, x_27, x_27, x_27)) == int4(0, 0, 0, 0))); x_40 = all(((int4(0) / int4(x_27, x_27, x_27, x_27)) == int4(0)));
x_41_phi = x_40; x_41_phi = x_40;
} }
bool const x_41 = x_41_phi; bool const x_41 = x_41_phi;
ok = x_41; ok = x_41;
int4 const x_44 = int4(x_27, x_27, x_27, x_27); int4 const x_44 = int4(x_27, x_27, x_27, x_27);
val = x_44; val = x_44;
int4 const x_47 = as_type<int4>((as_type<uint4>(x_44) + as_type<uint4>(int4(1, 1, 1, 1)))); int4 const x_47 = as_type<int4>((as_type<uint4>(x_44) + as_type<uint4>(int4(1))));
val = x_47; val = x_47;
int4 const x_48 = as_type<int4>((as_type<uint4>(x_47) - as_type<uint4>(int4(1, 1, 1, 1)))); int4 const x_48 = as_type<int4>((as_type<uint4>(x_47) - as_type<uint4>(int4(1))));
val = x_48; val = x_48;
int4 const x_49 = as_type<int4>((as_type<uint4>(x_48) + as_type<uint4>(int4(1, 1, 1, 1)))); int4 const x_49 = as_type<int4>((as_type<uint4>(x_48) + as_type<uint4>(int4(1))));
val = x_49; val = x_49;
int4 const x_50 = as_type<int4>((as_type<uint4>(x_49) - as_type<uint4>(int4(1, 1, 1, 1)))); int4 const x_50 = as_type<int4>((as_type<uint4>(x_49) - as_type<uint4>(int4(1))));
val = x_50; val = x_50;
x_55_phi = false; x_55_phi = false;
if (x_41) { if (x_41) {
@ -48,13 +48,13 @@ bool test_int_S1_c0_b(const constant UniformBuffer* const tint_symbol_5) {
} }
bool const x_55 = x_55_phi; bool const x_55 = x_55_phi;
ok = x_55; ok = x_55;
int4 const x_58 = as_type<int4>((as_type<uint4>(x_50) * as_type<uint4>(int4(2, 2, 2, 2)))); int4 const x_58 = as_type<int4>((as_type<uint4>(x_50) * as_type<uint4>(int4(2))));
val = x_58; val = x_58;
int4 const x_59 = (x_58 / int4(2, 2, 2, 2)); int4 const x_59 = (x_58 / int4(2));
val = x_59; val = x_59;
int4 const x_60 = as_type<int4>((as_type<uint4>(x_59) * as_type<uint4>(int4(2, 2, 2, 2)))); int4 const x_60 = as_type<int4>((as_type<uint4>(x_59) * as_type<uint4>(int4(2))));
val = x_60; val = x_60;
int4 const x_61 = (x_60 / int4(2, 2, 2, 2)); int4 const x_61 = (x_60 / int4(2));
val = x_61; val = x_61;
x_66_phi = false; x_66_phi = false;
if (x_55) { if (x_55) {
@ -88,20 +88,20 @@ void main_1(thread float4* const tint_symbol_6, const constant UniformBuffer* co
x_9_ok = true; x_9_ok = true;
x_87_phi = false; x_87_phi = false;
if (true) { if (true) {
x_86 = all(((float4(0.0f, 0.0f, 0.0f, 0.0f) / float4(x_77, x_77, x_77, x_77)) == float4(0.0f, 0.0f, 0.0f, 0.0f))); x_86 = all(((float4(0.0f) / float4(x_77, x_77, x_77, x_77)) == float4(0.0f)));
x_87_phi = x_86; x_87_phi = x_86;
} }
bool const x_87 = x_87_phi; bool const x_87 = x_87_phi;
x_9_ok = x_87; x_9_ok = x_87;
float4 const x_89 = float4(x_77, x_77, x_77, x_77); float4 const x_89 = float4(x_77, x_77, x_77, x_77);
x_10_val = x_89; x_10_val = x_89;
float4 const x_92 = (x_89 + float4(1.0f, 1.0f, 1.0f, 1.0f)); float4 const x_92 = (x_89 + float4(1.0f));
x_10_val = x_92; x_10_val = x_92;
float4 const x_93 = (x_92 - float4(1.0f, 1.0f, 1.0f, 1.0f)); float4 const x_93 = (x_92 - float4(1.0f));
x_10_val = x_93; x_10_val = x_93;
float4 const x_94 = (x_93 + float4(1.0f, 1.0f, 1.0f, 1.0f)); float4 const x_94 = (x_93 + float4(1.0f));
x_10_val = x_94; x_10_val = x_94;
float4 const x_95 = (x_94 - float4(1.0f, 1.0f, 1.0f, 1.0f)); float4 const x_95 = (x_94 - float4(1.0f));
x_10_val = x_95; x_10_val = x_95;
x_100_phi = false; x_100_phi = false;
if (x_87) { if (x_87) {
@ -110,13 +110,13 @@ void main_1(thread float4* const tint_symbol_6, const constant UniformBuffer* co
} }
bool const x_100 = x_100_phi; bool const x_100 = x_100_phi;
x_9_ok = x_100; x_9_ok = x_100;
float4 const x_103 = (x_95 * float4(2.0f, 2.0f, 2.0f, 2.0f)); float4 const x_103 = (x_95 * float4(2.0f));
x_10_val = x_103; x_10_val = x_103;
float4 const x_104 = (x_103 / float4(2.0f, 2.0f, 2.0f, 2.0f)); float4 const x_104 = (x_103 / float4(2.0f));
x_10_val = x_104; x_10_val = x_104;
float4 const x_105 = (x_104 * float4(2.0f, 2.0f, 2.0f, 2.0f)); float4 const x_105 = (x_104 * float4(2.0f));
x_10_val = x_105; x_10_val = x_105;
float4 const x_106 = (x_105 / float4(2.0f, 2.0f, 2.0f, 2.0f)); float4 const x_106 = (x_105 / float4(2.0f));
x_10_val = x_106; x_10_val = x_106;
x_111_phi = false; x_111_phi = false;
if (x_100) { if (x_100) {

View File

@ -8,7 +8,7 @@ struct tint_symbol_1 {
float4 tint_symbol_inner() { float4 tint_symbol_inner() {
float3 light = float3(1.200000048f, 1.0f, 2.0f); float3 light = float3(1.200000048f, 1.0f, 2.0f);
float3 negative_light = -(light); float3 negative_light = -(light);
return float4(); return float4(0.0f);
} }
vertex tint_symbol_1 tint_symbol() { vertex tint_symbol_1 tint_symbol() {

View File

@ -22,7 +22,7 @@ float4 tint_symbol_inner(uint gl_VertexIndex, const constant vertexUniformBuffer
float2x2 const x_23 = (*(tint_symbol_3)).transform1; float2x2 const x_23 = (*(tint_symbol_3)).transform1;
float2x2 const x_28 = (*(tint_symbol_4)).transform2; float2x2 const x_28 = (*(tint_symbol_4)).transform2;
uint const x_46 = gl_VertexIndex; uint const x_46 = gl_VertexIndex;
tint_array_wrapper const tint_symbol_2 = {.arr={float2(-1.0f, 1.0f), float2(1.0f, 1.0f), float2(-1.0f, -1.0f)}}; tint_array_wrapper const tint_symbol_2 = {.arr={float2(-1.0f, 1.0f), float2(1.0f), float2(-1.0f)}};
indexable = tint_symbol_2; indexable = tint_symbol_2;
float2 const x_51 = indexable.arr[x_46]; float2 const x_51 = indexable.arr[x_46];
float2 const x_52 = (float2x2((x_23[0u] + x_28[0u]), (x_23[1u] + x_28[1u])) * x_51); float2 const x_52 = (float2x2((x_23[0u] + x_28[0u]), (x_23[1u] + x_28[1u])) * x_51);

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
void main_1(texture2d<uint, access::sample> tint_symbol_1, texture2d<uint, access::write> tint_symbol_2) { void main_1(texture2d<uint, access::sample> tint_symbol_1, texture2d<uint, access::write> tint_symbol_2) {
uint4 srcValue = 0u; uint4 srcValue = 0u;
uint4 const x_18 = tint_symbol_1.read(uint2(int2(0, 0)), 0); uint4 const x_18 = tint_symbol_1.read(uint2(int2(0)), 0);
srcValue = x_18; srcValue = x_18;
uint const x_22 = srcValue[0]; uint const x_22 = srcValue[0];
srcValue[0] = (x_22 + as_type<uint>(1)); srcValue[0] = (x_22 + as_type<uint>(1));
uint4 const x_27 = srcValue; uint4 const x_27 = srcValue;
tint_symbol_2.write(x_27, uint2(int2(0, 0))); tint_symbol_2.write(x_27, uint2(int2(0)));
return; return;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
kernel void tint_symbol(texture2d<uint, access::sample> tint_symbol_1 [[texture(0)]], texture2d<uint, access::write> tint_symbol_2 [[texture(1)]]) { kernel void tint_symbol(texture2d<uint, access::sample> tint_symbol_1 [[texture(0)]], texture2d<uint, access::write> tint_symbol_2 [[texture(1)]]) {
uint4 srcValue = 0u; uint4 srcValue = 0u;
uint4 const x_22 = tint_symbol_1.read(uint2(int2(0, 0)), 0); uint4 const x_22 = tint_symbol_1.read(uint2(int2(0)), 0);
srcValue = x_22; srcValue = x_22;
uint const x_24 = srcValue[0]; uint const x_24 = srcValue[0];
uint const x_25 = (x_24 + 1u); uint const x_25 = (x_24 + 1u);
uint4 const x_27 = srcValue; uint4 const x_27 = srcValue;
tint_symbol_2.write(uint4(x_27).xxxx, uint2(int2(0, 0))); tint_symbol_2.write(uint4(x_27).xxxx, uint2(int2(0)));
return; return;
} }

View File

@ -35,9 +35,9 @@ void tint_symbol_inner(uint3 GlobalInvocationID, texture2d<float, access::sample
} }
uint outputIndex = ((GlobalInvocationID[1] * uint(size[0])) + GlobalInvocationID[0]); uint outputIndex = ((GlobalInvocationID[1] * uint(size[0])) + GlobalInvocationID[0]);
if (success) { if (success) {
(*(tint_symbol_5)).result[outputIndex] = uint(1); (*(tint_symbol_5)).result[outputIndex] = 1u;
} else { } else {
(*(tint_symbol_5)).result[outputIndex] = uint(0); (*(tint_symbol_5)).result[outputIndex] = 0u;
} }
} }

View File

@ -805,7 +805,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
int i_2 = 0; int i_2 = 0;
float2 uv = 0.0f; float2 uv = 0.0f;
float2 const x_717 = uv; float2 const x_717 = uv;
uv = float2(0.0f, 0.0f); uv = float2(0.0f);
uv = x_717; uv = x_717;
i_2 = 0; i_2 = 0;
QuicksortObject const x_721 = *(tint_symbol_84); QuicksortObject const x_721 = *(tint_symbol_84);
@ -822,10 +822,10 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
float2 const x_431 = float2(float3(1.0f, 2.0f, 3.0f)[0], float3(1.0f, 2.0f, 3.0f)[0]); float2 const x_431 = float2(float3(1.0f, 2.0f, 3.0f)[0], float3(1.0f, 2.0f, 3.0f)[0]);
int const x_158 = i_2; int const x_158 = i_2;
float2 const x_723 = uv; float2 const x_723 = uv;
uv = float2(0.0f, 0.0f); uv = float2(0.0f);
uv = x_723; uv = x_723;
float3 const x_725 = color; float3 const x_725 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
color = x_725; color = x_725;
float2 const x_432 = float2(x_431[1], x_431[1]); float2 const x_432 = float2(x_431[1], x_431[1]);
QuicksortObject const x_726 = *(tint_symbol_84); QuicksortObject const x_726 = *(tint_symbol_84);
@ -839,7 +839,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
QuicksortObject const tint_symbol_43 = {.numbers=tint_symbol_42}; QuicksortObject const tint_symbol_43 = {.numbers=tint_symbol_42};
*(tint_symbol_84) = tint_symbol_43; *(tint_symbol_84) = tint_symbol_43;
*(tint_symbol_84) = x_756; *(tint_symbol_84) = x_756;
float2 const x_446 = float2(float2()[0], float2()[0]); float2 const x_446 = float2(float2(0.0f)[0], float2(0.0f)[0]);
int const x_757 = i_2; int const x_757 = i_2;
i_2 = 0; i_2 = 0;
i_2 = x_757; i_2 = x_757;
@ -851,11 +851,11 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
*(tint_symbol_84) = x_758; *(tint_symbol_84) = x_758;
float4 const x_184 = *(tint_symbol_85); float4 const x_184 = *(tint_symbol_85);
float2 const x_759 = uv; float2 const x_759 = uv;
uv = float2(0.0f, 0.0f); uv = float2(0.0f);
uv = x_759; uv = x_759;
float2 const x_447 = float2(float2()[1], float2()[1]); float2 const x_447 = float2(float2(0.0f)[1], float2(0.0f)[1]);
float2 const x_760 = uv; float2 const x_760 = uv;
uv = float2(0.0f, 0.0f); uv = float2(0.0f);
uv = x_760; uv = x_760;
float2 const x_185 = float2(x_184[0], x_184[1]); float2 const x_185 = float2(x_184[0], x_184[1]);
float3 const x_448 = float3(x_185[1], x_446[1], x_446[1]); float3 const x_448 = float3(x_185[1], x_446[1], x_446[1]);
@ -865,7 +865,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
*(tint_symbol_84) = tint_symbol_47; *(tint_symbol_84) = tint_symbol_47;
*(tint_symbol_84) = x_761; *(tint_symbol_84) = x_761;
float2 const x_762 = uv; float2 const x_762 = uv;
uv = float2(0.0f, 0.0f); uv = float2(0.0f);
uv = x_762; uv = x_762;
float2 const x_191 = (*(tint_symbol_86)).resolution; float2 const x_191 = (*(tint_symbol_86)).resolution;
QuicksortObject const x_763 = *(tint_symbol_84); QuicksortObject const x_763 = *(tint_symbol_84);
@ -875,7 +875,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
*(tint_symbol_84) = x_763; *(tint_symbol_84) = x_763;
float3 const x_449 = float3(x_184[1], float3(1.0f, 2.0f, 3.0f)[2], x_184[3]); float3 const x_449 = float3(x_184[1], float3(1.0f, 2.0f, 3.0f)[2], x_184[3]);
float3 const x_764 = color; float3 const x_764 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
color = x_764; color = x_764;
float2 const x_192 = (x_185 / x_191); float2 const x_192 = (x_185 / x_191);
QuicksortObject const x_765 = *(tint_symbol_84); QuicksortObject const x_765 = *(tint_symbol_84);
@ -885,15 +885,15 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
*(tint_symbol_84) = x_765; *(tint_symbol_84) = x_765;
float2 const x_450 = float2(x_447[0], x_185[1]); float2 const x_450 = float2(x_447[0], x_185[1]);
float3 const x_766 = color; float3 const x_766 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
float3 const x_767 = color; float3 const x_767 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
color = x_767; color = x_767;
color = x_766; color = x_766;
uv = x_192; uv = x_192;
color = float3(1.0f, 2.0f, 3.0f); color = float3(1.0f, 2.0f, 3.0f);
float3 const x_768 = color; float3 const x_768 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
color = x_768; color = x_768;
float3 const x_451 = float3(x_185[0], x_185[1], x_446[1]); float3 const x_451 = float3(x_185[0], x_185[1], x_446[1]);
QuicksortObject const x_769 = *(tint_symbol_84); QuicksortObject const x_769 = *(tint_symbol_84);
@ -929,10 +929,10 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
float3 const x_453 = float3(x_451[0], x_450[0], x_450[1]); float3 const x_453 = float3(x_451[0], x_450[0], x_450[1]);
color[0] = (x_206 + float(x_201)); color[0] = (x_206 + float(x_201));
float2 const x_776 = uv; float2 const x_776 = uv;
uv = float2(0.0f, 0.0f); uv = float2(0.0f);
uv = x_776; uv = x_776;
float2 const x_777 = uv; float2 const x_777 = uv;
uv = float2(0.0f, 0.0f); uv = float2(0.0f);
uv = x_777; uv = x_777;
float2 const x_454 = float2(x_184[1], x_184[1]); float2 const x_454 = float2(x_184[1], x_184[1]);
float const x_210 = uv[0]; float const x_210 = uv[0];
@ -952,7 +952,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
int const x_781 = (*(tint_symbol_84)).numbers.arr[0u]; int const x_781 = (*(tint_symbol_84)).numbers.arr[0u];
(*(tint_symbol_84)).numbers.arr[0u] = 0; (*(tint_symbol_84)).numbers.arr[0u] = 0;
(*(tint_symbol_84)).numbers.arr[0u] = x_781; (*(tint_symbol_84)).numbers.arr[0u] = x_781;
float3 const x_456 = float3(float2()[1], x_448[1], x_448[1]); float3 const x_456 = float3(float2(0.0f)[1], x_448[1], x_448[1]);
float const x_782 = uv[0]; float const x_782 = uv[0];
uv[0] = 0.0f; uv[0] = 0.0f;
uv[0] = x_782; uv[0] = x_782;
@ -964,14 +964,14 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
*(tint_symbol_84) = x_783; *(tint_symbol_84) = x_783;
float2 const x_457 = float2(x_454[0], x_454[0]); float2 const x_457 = float2(x_454[0], x_454[0]);
float2 const x_784 = uv; float2 const x_784 = uv;
uv = float2(0.0f, 0.0f); uv = float2(0.0f);
uv = x_784; uv = x_784;
QuicksortObject const x_785 = *(tint_symbol_84); QuicksortObject const x_785 = *(tint_symbol_84);
tint_array_wrapper const tint_symbol_62 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; tint_array_wrapper const tint_symbol_62 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
QuicksortObject const tint_symbol_63 = {.numbers=tint_symbol_62}; QuicksortObject const tint_symbol_63 = {.numbers=tint_symbol_62};
*(tint_symbol_84) = tint_symbol_63; *(tint_symbol_84) = tint_symbol_63;
*(tint_symbol_84) = x_785; *(tint_symbol_84) = x_785;
float2 const x_458 = float2(float3(1.0f, 2.0f, 3.0f)[2], float2()[1]); float2 const x_458 = float2(float3(1.0f, 2.0f, 3.0f)[2], float2(0.0f)[1]);
int const x_786 = i_2; int const x_786 = i_2;
i_2 = 0; i_2 = 0;
i_2 = x_786; i_2 = x_786;
@ -980,10 +980,10 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
color[0] = 0.0f; color[0] = 0.0f;
color[0] = x_787; color[0] = x_787;
float3 const x_788 = color; float3 const x_788 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
color = x_788; color = x_788;
float3 const x_789 = color; float3 const x_789 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
color = x_789; color = x_789;
float3 const x_459 = float3(x_454[1], x_454[1], x_447[1]); float3 const x_459 = float3(x_454[1], x_454[1], x_447[1]);
float const x_790 = color[0]; float const x_790 = color[0];
@ -1006,12 +1006,12 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
uv[0] = x_794; uv[0] = x_794;
float3 const x_460 = float3(x_453[2], x_453[1], x_453[1]); float3 const x_460 = float3(x_453[2], x_453[1], x_453[1]);
float2 const x_795 = uv; float2 const x_795 = uv;
uv = float2(0.0f, 0.0f); uv = float2(0.0f);
uv = x_795; uv = x_795;
float const x_796 = uv[0]; float const x_796 = uv[0];
uv[0] = 0.0f; uv[0] = 0.0f;
uv[0] = x_796; uv[0] = x_796;
float2 const x_461 = float2(float2()[1], float2()[1]); float2 const x_461 = float2(float2(0.0f)[1], float2(0.0f)[1]);
float const x_797 = uv[0]; float const x_797 = uv[0];
uv[0] = 0.0f; uv[0] = 0.0f;
uv[0] = x_797; uv[0] = x_797;
@ -1055,7 +1055,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
int const x_808 = i_2; int const x_808 = i_2;
i_2 = 0; i_2 = 0;
i_2 = x_808; i_2 = x_808;
float2 const x_466 = float2(x_455[1], float2()[1]); float2 const x_466 = float2(x_455[1], float2(0.0f)[1]);
int const x_809 = i_2; int const x_809 = i_2;
i_2 = 0; i_2 = 0;
i_2 = x_809; i_2 = x_809;
@ -1073,7 +1073,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
uv[0] = x_812; uv[0] = x_812;
float const x_238 = uv[0]; float const x_238 = uv[0];
float3 const x_813 = color; float3 const x_813 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
color = x_813; color = x_813;
float const x_814 = color[0]; float const x_814 = color[0];
color[0] = 0.0f; color[0] = 0.0f;
@ -1100,7 +1100,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
uv[0] = x_819; uv[0] = x_819;
float const x_249 = color[2]; float const x_249 = color[2];
float3 const x_820 = color; float3 const x_820 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
color = x_820; color = x_820;
float3 const x_469 = float3(x_467[0], x_191[1], x_467[1]); float3 const x_469 = float3(x_467[0], x_191[1], x_467[1]);
float const x_821 = color[2]; float const x_821 = color[2];
@ -1109,13 +1109,13 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
int const x_822 = (*(tint_symbol_84)).numbers.arr[0u]; int const x_822 = (*(tint_symbol_84)).numbers.arr[0u];
(*(tint_symbol_84)).numbers.arr[0u] = 0; (*(tint_symbol_84)).numbers.arr[0u] = 0;
(*(tint_symbol_84)).numbers.arr[0u] = x_822; (*(tint_symbol_84)).numbers.arr[0u] = x_822;
float2 const x_470 = float2(float2()[0], float2()[1]); float2 const x_470 = float2(float2(0.0f)[0], float2(0.0f)[1]);
float const x_823 = color[2]; float const x_823 = color[2];
color[2] = 0.0f; color[2] = 0.0f;
color[2] = x_823; color[2] = x_823;
color[2] = (x_249 + float(x_245)); color[2] = (x_249 + float(x_245));
float2 const x_824 = uv; float2 const x_824 = uv;
uv = float2(0.0f, 0.0f); uv = float2(0.0f);
uv = x_824; uv = x_824;
float2 const x_471 = float2(x_470[1], x_470[1]); float2 const x_471 = float2(x_470[1], x_470[1]);
} }
@ -1128,7 +1128,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
uv[0] = 0.0f; uv[0] = 0.0f;
uv[0] = x_826; uv[0] = x_826;
float3 const x_827 = color; float3 const x_827 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
color = x_827; color = x_827;
float3 const x_473 = float3(x_446[1], x_453[0], x_453[0]); float3 const x_473 = float3(x_446[1], x_453[0], x_453[0]);
int const x_828 = (*(tint_symbol_84)).numbers.arr[4]; int const x_828 = (*(tint_symbol_84)).numbers.arr[4];
@ -1151,7 +1151,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
color[0] = x_832; color[0] = x_832;
float2 const x_476 = float2(x_451[2], x_460[1]); float2 const x_476 = float2(x_451[2], x_460[1]);
color[1] = (x_257 + float(x_254)); color[1] = (x_257 + float(x_254));
float3 const x_477 = float3(float2()[0], x_472[0], float2()[1]); float3 const x_477 = float3(float2(0.0f)[0], x_472[0], float2(0.0f)[1]);
float const x_833 = uv[0]; float const x_833 = uv[0];
uv[0] = 0.0f; uv[0] = 0.0f;
uv[0] = x_833; uv[0] = x_833;
@ -1166,21 +1166,21 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
int const x_836 = i_2; int const x_836 = i_2;
i_2 = 0; i_2 = 0;
i_2 = x_836; i_2 = x_836;
float3 const x_479 = float3(float2()[1], x_454[1], float2()[0]); float3 const x_479 = float3(float2(0.0f)[1], x_454[1], float2(0.0f)[0]);
int const x_837 = (*(tint_symbol_84)).numbers.arr[0u]; int const x_837 = (*(tint_symbol_84)).numbers.arr[0u];
(*(tint_symbol_84)).numbers.arr[0u] = 0; (*(tint_symbol_84)).numbers.arr[0u] = 0;
(*(tint_symbol_84)).numbers.arr[0u] = x_837; (*(tint_symbol_84)).numbers.arr[0u] = x_837;
float const x_838 = color[1]; float const x_838 = color[1];
color[1] = 0.0f; color[1] = 0.0f;
color[1] = x_838; color[1] = x_838;
float3 const x_480 = float3(x_446[0], x_446[0], float2()[1]); float3 const x_480 = float3(x_446[0], x_446[0], float2(0.0f)[1]);
float const x_839 = uv[0]; float const x_839 = uv[0];
uv[0] = 0.0f; uv[0] = 0.0f;
uv[0] = x_839; uv[0] = x_839;
if ((x_261 > 0.25f)) { if ((x_261 > 0.25f)) {
float2 const x_481 = float2(x_447[0], x_480[2]); float2 const x_481 = float2(x_447[0], x_480[2]);
float3 const x_840 = color; float3 const x_840 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
color = x_840; color = x_840;
int const x_267 = (*(tint_symbol_84)).numbers.arr[5u]; int const x_267 = (*(tint_symbol_84)).numbers.arr[5u];
float const x_841 = color[0]; float const x_841 = color[0];
@ -1257,7 +1257,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
float2 const x_488 = float2(x_473[2], x_473[1]); float2 const x_488 = float2(x_473[2], x_473[1]);
float const x_283 = color[1]; float const x_283 = color[1];
float2 const x_860 = uv; float2 const x_860 = uv;
uv = float2(0.0f, 0.0f); uv = float2(0.0f);
uv = x_860; uv = x_860;
float const x_861 = color[0]; float const x_861 = color[0];
color[0] = 0.0f; color[0] = 0.0f;
@ -1307,14 +1307,14 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
(*(tint_symbol_84)).numbers.arr[4] = x_871; (*(tint_symbol_84)).numbers.arr[4] = x_871;
if ((x_287 > 0.75f)) { if ((x_287 > 0.75f)) {
float3 const x_872 = color; float3 const x_872 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
color = x_872; color = x_872;
float const x_873 = color[0]; float const x_873 = color[0];
color[0] = 0.0f; color[0] = 0.0f;
color[0] = x_873; color[0] = x_873;
float3 const x_495 = float3(x_192[1], x_192[0], x_192[1]); float3 const x_495 = float3(x_192[1], x_192[0], x_192[1]);
float3 const x_874 = color; float3 const x_874 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
color = x_874; color = x_874;
int const x_293 = (*(tint_symbol_84)).numbers.arr[7]; int const x_293 = (*(tint_symbol_84)).numbers.arr[7];
float const x_875 = uv[0]; float const x_875 = uv[0];
@ -1367,7 +1367,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
i_2 = x_887; i_2 = x_887;
float2 const x_502 = float2(x_451[1], x_192[1]); float2 const x_502 = float2(x_451[1], x_192[1]);
float2 const x_888 = uv; float2 const x_888 = uv;
uv = float2(0.0f, 0.0f); uv = float2(0.0f);
uv = x_888; uv = x_888;
int const x_301 = (*(tint_symbol_84)).numbers.arr[8]; int const x_301 = (*(tint_symbol_84)).numbers.arr[8];
int const x_889 = i_2; int const x_889 = i_2;
@ -1380,7 +1380,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
float const x_891 = color[1]; float const x_891 = color[1];
color[1] = 0.0f; color[1] = 0.0f;
color[1] = x_891; color[1] = x_891;
float2 const x_504 = float2(x_453[1], float2()[0]); float2 const x_504 = float2(x_453[1], float2(0.0f)[0]);
float const x_892 = color[0]; float const x_892 = color[0];
color[0] = 0.0f; color[0] = 0.0f;
color[0] = x_892; color[0] = x_892;
@ -1405,7 +1405,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
color[1] = x_897; color[1] = x_897;
color[2] = (x_304 + float(x_301)); color[2] = (x_304 + float(x_301));
float2 const x_898 = uv; float2 const x_898 = uv;
uv = float2(0.0f, 0.0f); uv = float2(0.0f);
uv = x_898; uv = x_898;
float const x_899 = uv[0]; float const x_899 = uv[0];
uv[0] = 0.0f; uv[0] = 0.0f;
@ -1438,7 +1438,7 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
i_2 = x_906; i_2 = x_906;
float2 const x_511 = float2(x_485[2], x_485[1]); float2 const x_511 = float2(x_485[2], x_485[1]);
float3 const x_907 = color; float3 const x_907 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
color = x_907; color = x_907;
float const x_908 = uv[1]; float const x_908 = uv[1];
uv[1] = 0.0f; uv[1] = 0.0f;
@ -1474,16 +1474,16 @@ void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const t
color[0] = 0.0f; color[0] = 0.0f;
color[0] = x_915; color[0] = x_915;
float3 const x_916 = color; float3 const x_916 = color;
color = float3(0.0f, 0.0f, 0.0f); color = float3(0.0f);
color = x_916; color = x_916;
float2 const x_516 = float2(x_452[0], x_452[0]); float2 const x_516 = float2(x_452[0], x_452[0]);
float2 const x_917 = uv; float2 const x_917 = uv;
uv = float2(0.0f, 0.0f); uv = float2(0.0f);
uv = x_917; uv = x_917;
float const x_918 = uv[0]; float const x_918 = uv[0];
uv[0] = 0.0f; uv[0] = 0.0f;
uv[0] = x_918; uv[0] = x_918;
float3 const x_517 = float3(float2()[0], float2()[0], float2()[1]); float3 const x_517 = float3(float2(0.0f)[0], float2(0.0f)[0], float2(0.0f)[1]);
color[0] = (float(x_317) + x_320); color[0] = (float(x_317) + x_320);
float const x_919 = color[0]; float const x_919 = color[0];
color[0] = 0.0f; color[0] = 0.0f;

View File

@ -2,8 +2,8 @@
using namespace metal; using namespace metal;
void f() { void f() {
float4x4 const m = float4x4(float4(1.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)); float4x4 const m = float4x4(float4(1.0f), float4(1.0f), float4(1.0f), float4(1.0f));
float4 const v1 = m[0]; float4 const v1 = float4x4(float4(1.0f), float4(1.0f), float4(1.0f), float4(1.0f))[0];
float const a = v1[0]; float const a = v1[0];
} }

View File

@ -20,11 +20,11 @@ struct tint_array_wrapper_1 {
}; };
Output tint_symbol_inner(uint VertexIndex, uint InstanceIndex) { Output tint_symbol_inner(uint VertexIndex, uint InstanceIndex) {
tint_array_wrapper const zv = {.arr={float2(0.200000003f, 0.200000003f), float2(0.300000012f, 0.300000012f), float2(-0.100000001f, -0.100000001f), float2(1.100000024f, 1.100000024f)}}; tint_array_wrapper const zv = {.arr={float2(0.200000003f), float2(0.300000012f), float2(-0.100000001f), float2(1.100000024f)}};
float const z = zv.arr[InstanceIndex][0]; float const z = zv.arr[InstanceIndex][0];
Output output = {}; Output output = {};
output.Position = float4(0.5f, 0.5f, z, 1.0f); output.Position = float4(0.5f, 0.5f, z, 1.0f);
tint_array_wrapper_1 const colors = {.arr={float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; tint_array_wrapper_1 const colors = {.arr={float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f)}};
output.color = colors.arr[InstanceIndex]; output.color = colors.arr[InstanceIndex];
return output; return output;
} }

View File

@ -5,6 +5,6 @@ void f() {
int i = 0; int i = 0;
int j = 0; int j = 0;
float2x2 const m = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)); float2x2 const m = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f));
float const f_1 = m[i][j]; float const f_1 = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))[i][j];
} }

View File

@ -8,7 +8,7 @@ struct Result {
constant uint width = 128u; constant uint width = 128u;
void tint_symbol_inner(uint3 GlobalInvocationId, device Result* const tint_symbol_1, depth2d<float, access::sample> tint_symbol_2) { void tint_symbol_inner(uint3 GlobalInvocationId, device Result* const tint_symbol_1, depth2d<float, access::sample> tint_symbol_2) {
(*(tint_symbol_1)).values[((GlobalInvocationId[1] * width) + GlobalInvocationId[0])] = tint_symbol_2.read(uint2(int2(int(GlobalInvocationId[0]), int(GlobalInvocationId[1]))), 0); (*(tint_symbol_1)).values[((GlobalInvocationId[1] * 128u) + GlobalInvocationId[0])] = tint_symbol_2.read(uint2(int2(int(GlobalInvocationId[0]), int(GlobalInvocationId[1]))), 0);
} }
kernel void tint_symbol(device Result* tint_symbol_3 [[buffer(0)]], depth2d<float, access::sample> tint_symbol_4 [[texture(0)]], uint3 GlobalInvocationId [[thread_position_in_grid]]) { kernel void tint_symbol(device Result* tint_symbol_3 [[buffer(0)]], depth2d<float, access::sample> tint_symbol_4 [[texture(0)]], uint3 GlobalInvocationId [[thread_position_in_grid]]) {

View File

@ -24,7 +24,7 @@ void tint_symbol_inner(uint3 GlobalInvocationID, texture2d<float, access::sample
float4 const nonCoveredColor = float4(0.0f, 1.0f, 0.0f, 1.0f); float4 const nonCoveredColor = float4(0.0f, 1.0f, 0.0f, 1.0f);
bool success = true; bool success = true;
if (((((dstTexCoord[0] < (*(tint_symbol_9)).dstCopyOrigin[0]) || (dstTexCoord[1] < (*(tint_symbol_9)).dstCopyOrigin[1])) || (dstTexCoord[0] >= ((*(tint_symbol_9)).dstCopyOrigin[0] + (*(tint_symbol_9)).copySize[0]))) || (dstTexCoord[1] >= ((*(tint_symbol_9)).dstCopyOrigin[1] + (*(tint_symbol_9)).copySize[1])))) { if (((((dstTexCoord[0] < (*(tint_symbol_9)).dstCopyOrigin[0]) || (dstTexCoord[1] < (*(tint_symbol_9)).dstCopyOrigin[1])) || (dstTexCoord[0] >= ((*(tint_symbol_9)).dstCopyOrigin[0] + (*(tint_symbol_9)).copySize[0]))) || (dstTexCoord[1] >= ((*(tint_symbol_9)).dstCopyOrigin[1] + (*(tint_symbol_9)).copySize[1])))) {
success = (success && all((tint_symbol_8.read(uint2(int2(dstTexCoord)), 0) == nonCoveredColor))); success = (success && all((tint_symbol_8.read(uint2(int2(dstTexCoord)), 0) == float4(0.0f, 1.0f, 0.0f, 1.0f))));
} else { } else {
uint2 srcTexCoord = ((dstTexCoord - (*(tint_symbol_9)).dstCopyOrigin) + (*(tint_symbol_9)).srcCopyOrigin); uint2 srcTexCoord = ((dstTexCoord - (*(tint_symbol_9)).dstCopyOrigin) + (*(tint_symbol_9)).srcCopyOrigin);
if (((*(tint_symbol_9)).dstTextureFlipY == 1u)) { if (((*(tint_symbol_9)).dstTextureFlipY == 1u)) {

View File

@ -64,60 +64,60 @@ void tint_symbol_inner(uint3 local_id, uint3 global_id, uint local_invocation_in
for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 256u)) { for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 256u)) {
uint const i = (idx / 64u); uint const i = (idx / 64u);
uint const i_1 = (idx % 64u); uint const i_1 = (idx % 64u);
(*(tint_symbol_9)).arr[i].arr[i_1] = float(); (*(tint_symbol_9)).arr[i].arr[i_1] = 0.0f;
(*(tint_symbol_10)).arr[i].arr[i_1] = float(); (*(tint_symbol_10)).arr[i].arr[i_1] = 0.0f;
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
uint const tileRow = (local_id[1] * RowPerThread); uint const tileRow = (local_id[1] * 4u);
uint const tileCol = (local_id[0] * ColPerThread); uint const tileCol = (local_id[0] * 4u);
uint const globalRow = (global_id[1] * RowPerThread); uint const globalRow = (global_id[1] * 4u);
uint const globalCol = (global_id[0] * ColPerThread); uint const globalCol = (global_id[0] * 4u);
uint const numTiles = ((((*(tint_symbol_11)).dimInner - 1u) / TileInner) + 1u); uint const numTiles = ((((*(tint_symbol_11)).dimInner - 1u) / 64u) + 1u);
tint_array_wrapper_2 acc = {}; tint_array_wrapper_2 acc = {};
float ACached = 0.0f; float ACached = 0.0f;
tint_array_wrapper_3 BCached = {}; tint_array_wrapper_3 BCached = {};
for(uint index = 0u; (index < (RowPerThread * ColPerThread)); index = (index + 1u)) { for(uint index = 0u; (index < (4u * 4u)); index = (index + 1u)) {
acc.arr[index] = 0.0f; acc.arr[index] = 0.0f;
} }
uint const ColPerThreadA = (TileInner / 16u); uint const ColPerThreadA = (64u / 16u);
uint const tileColA = (local_id[0] * ColPerThreadA); uint const tileColA = (local_id[0] * ColPerThreadA);
uint const RowPerThreadB = (TileInner / 16u); uint const RowPerThreadB = (64u / 16u);
uint const tileRowB = (local_id[1] * RowPerThreadB); uint const tileRowB = (local_id[1] * RowPerThreadB);
for(uint t = 0u; (t < numTiles); t = (t + 1u)) { for(uint t = 0u; (t < numTiles); t = (t + 1u)) {
for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) { for(uint innerRow = 0u; (innerRow < 4u); innerRow = (innerRow + 1u)) {
for(uint innerCol = 0u; (innerCol < ColPerThreadA); innerCol = (innerCol + 1u)) { for(uint innerCol = 0u; (innerCol < ColPerThreadA); innerCol = (innerCol + 1u)) {
uint const inputRow = (tileRow + innerRow); uint const inputRow = (tileRow + innerRow);
uint const inputCol = (tileColA + innerCol); uint const inputCol = (tileColA + innerCol);
float const tint_symbol_1 = mm_readA((globalRow + innerRow), ((t * TileInner) + inputCol), tint_symbol_11, tint_symbol_12); float const tint_symbol_1 = mm_readA((globalRow + innerRow), ((t * 64u) + inputCol), tint_symbol_11, tint_symbol_12);
(*(tint_symbol_9)).arr[inputRow].arr[inputCol] = tint_symbol_1; (*(tint_symbol_9)).arr[inputRow].arr[inputCol] = tint_symbol_1;
} }
} }
for(uint innerRow = 0u; (innerRow < RowPerThreadB); innerRow = (innerRow + 1u)) { for(uint innerRow = 0u; (innerRow < RowPerThreadB); innerRow = (innerRow + 1u)) {
for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) { for(uint innerCol = 0u; (innerCol < 4u); innerCol = (innerCol + 1u)) {
uint const inputRow = (tileRowB + innerRow); uint const inputRow = (tileRowB + innerRow);
uint const inputCol = (tileCol + innerCol); uint const inputCol = (tileCol + innerCol);
float const tint_symbol_2 = mm_readB(((t * TileInner) + inputRow), (globalCol + innerCol), tint_symbol_11, tint_symbol_13); float const tint_symbol_2 = mm_readB(((t * 64u) + inputRow), (globalCol + innerCol), tint_symbol_11, tint_symbol_13);
(*(tint_symbol_10)).arr[innerCol].arr[inputCol] = tint_symbol_2; (*(tint_symbol_10)).arr[innerCol].arr[inputCol] = tint_symbol_2;
} }
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
for(uint k = 0u; (k < TileInner); k = (k + 1u)) { for(uint k = 0u; (k < 64u); k = (k + 1u)) {
for(uint inner = 0u; (inner < ColPerThread); inner = (inner + 1u)) { for(uint inner = 0u; (inner < 4u); inner = (inner + 1u)) {
BCached.arr[inner] = (*(tint_symbol_10)).arr[k].arr[(tileCol + inner)]; BCached.arr[inner] = (*(tint_symbol_10)).arr[k].arr[(tileCol + inner)];
} }
for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) { for(uint innerRow = 0u; (innerRow < 4u); innerRow = (innerRow + 1u)) {
ACached = (*(tint_symbol_9)).arr[(tileRow + innerRow)].arr[k]; ACached = (*(tint_symbol_9)).arr[(tileRow + innerRow)].arr[k];
for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) { for(uint innerCol = 0u; (innerCol < 4u); innerCol = (innerCol + 1u)) {
uint const index = ((innerRow * ColPerThread) + innerCol); uint const index = ((innerRow * 4u) + innerCol);
acc.arr[index] = (acc.arr[index] + (ACached * BCached.arr[innerCol])); acc.arr[index] = (acc.arr[index] + (ACached * BCached.arr[innerCol]));
} }
} }
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
} }
for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) { for(uint innerRow = 0u; (innerRow < 4u); innerRow = (innerRow + 1u)) {
for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) { for(uint innerCol = 0u; (innerCol < 4u); innerCol = (innerCol + 1u)) {
uint const index = ((innerRow * ColPerThread) + innerCol); uint const index = ((innerRow * 4u) + innerCol);
mm_write((globalRow + innerRow), (globalCol + innerCol), acc.arr[index], tint_symbol_11, tint_symbol_14); mm_write((globalRow + innerRow), (globalCol + innerCol), acc.arr[index], tint_symbol_11, tint_symbol_14);
} }
} }

View File

@ -22,7 +22,7 @@ void tint_symbol_inner(uint3 WorkGroupID, uint3 LocalInvocationID, uint local_in
for(uint idx = local_invocation_index; (idx < 1024u); idx = (idx + 64u)) { for(uint idx = local_invocation_index; (idx < 1024u); idx = (idx + 64u)) {
uint const i_1 = (idx / 256u); uint const i_1 = (idx / 256u);
uint const i_2 = (idx % 256u); uint const i_2 = (idx % 256u);
(*(tint_symbol_1)).arr[i_1].arr[i_2] = float3(); (*(tint_symbol_1)).arr[i_1].arr[i_2] = float3(0.0f);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
uint const filterOffset = (((*(tint_symbol_2)).filterDim - 1u) / 2u); uint const filterOffset = (((*(tint_symbol_2)).filterDim - 1u) / 2u);
@ -34,7 +34,7 @@ void tint_symbol_inner(uint3 WorkGroupID, uint3 LocalInvocationID, uint local_in
if (((*(tint_symbol_4)).value != 0u)) { if (((*(tint_symbol_4)).value != 0u)) {
loadIndex = int2(loadIndex).yx; loadIndex = int2(loadIndex).yx;
} }
(*(tint_symbol_1)).arr[r].arr[((4u * LocalInvocationID[0]) + c)] = float4(tint_symbol_3.sample(tint_symbol_5, ((float2(loadIndex) + float2(0.25f, 0.25f)) / float2(dims)), level(0.0f))).rgb; (*(tint_symbol_1)).arr[r].arr[((4u * LocalInvocationID[0]) + c)] = float4(tint_symbol_3.sample(tint_symbol_5, ((float2(loadIndex) + float2(0.25f)) / float2(dims)), level(0.0f))).rgb;
} }
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
@ -46,7 +46,7 @@ void tint_symbol_inner(uint3 WorkGroupID, uint3 LocalInvocationID, uint local_in
} }
uint const center = ((4u * LocalInvocationID[0]) + c); uint const center = ((4u * LocalInvocationID[0]) + c);
if ((((center >= filterOffset) && (center < (256u - filterOffset))) && all((writeIndex < dims)))) { if ((((center >= filterOffset) && (center < (256u - filterOffset))) && all((writeIndex < dims)))) {
float3 acc = float3(0.0f, 0.0f, 0.0f); float3 acc = float3(0.0f);
for(uint f = 0u; (f < (*(tint_symbol_2)).filterDim); f = (f + 1u)) { for(uint f = 0u; (f < (*(tint_symbol_2)).filterDim); f = (f + 1u)) {
uint i = ((center + f) - filterOffset); uint i = ((center + f) - filterOffset);
acc = (acc + ((1.0f / float((*(tint_symbol_2)).filterDim)) * (*(tint_symbol_1)).arr[r].arr[i])); acc = (acc + ((1.0f / float((*(tint_symbol_2)).filterDim)) * (*(tint_symbol_1)).arr[r].arr[i]));

View File

@ -48,7 +48,7 @@ bool coordsInBounds_vi2_vi2_(thread int2* const coord, thread int2* const shape)
bool x_87 = false; bool x_87 = false;
bool x_88_phi = false; bool x_88_phi = false;
int2 const x_76 = *(coord); int2 const x_76 = *(coord);
bool const x_81 = all((x_76 >= int2(0, 0))); bool const x_81 = all((x_76 >= int2(0)));
x_88_phi = x_81; x_88_phi = x_81;
if (x_81) { if (x_81) {
int2 const x_84 = *(coord); int2 const x_84 = *(coord);
@ -497,12 +497,12 @@ void tint_symbol_1_inner(uint3 gl_LocalInvocationID_param, uint3 gl_GlobalInvoca
{ {
uint const i_1 = local_invocation_index; uint const i_1 = local_invocation_index;
uint const i_2 = (local_invocation_index % 1u); uint const i_2 = (local_invocation_index % 1u);
(*(tint_symbol_43)).arr[i_1].arr[i_2] = float(); (*(tint_symbol_43)).arr[i_1].arr[i_2] = 0.0f;
} }
for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 64u)) { for(uint idx = local_invocation_index; (idx < 4096u); idx = (idx + 64u)) {
uint const i = (idx / 64u); uint const i = (idx / 64u);
uint const i_1 = (idx % 64u); uint const i_1 = (idx % 64u);
(*(tint_symbol_44)).arr[i].arr[i_1] = float(); (*(tint_symbol_44)).arr[i].arr[i_1] = 0.0f;
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
*(tint_symbol_45) = gl_LocalInvocationID_param; *(tint_symbol_45) = gl_LocalInvocationID_param;

View File

@ -49,7 +49,7 @@ float4x4 getFrameData_f1_(thread float* const frameID, const constant LeftOver*
float4 const x_47 = tint_symbol_6.sample(tint_symbol_7, float2(x_44, 0.25f), bias(0.0f)); float4 const x_47 = tint_symbol_6.sample(tint_symbol_7, float2(x_44, 0.25f), bias(0.0f));
float const x_51 = fX; float const x_51 = fX;
float4 const x_54 = tint_symbol_6.sample(tint_symbol_7, float2(x_51, 0.5f), bias(0.0f)); float4 const x_54 = tint_symbol_6.sample(tint_symbol_7, float2(x_51, 0.5f), bias(0.0f));
return float4x4(float4(x_40[0], x_40[1], x_40[2], x_40[3]), float4(x_47[0], x_47[1], x_47[2], x_47[3]), float4(x_54[0], x_54[1], x_54[2], x_54[3]), float4(float4(0.0f, 0.0f, 0.0f, 0.0f)[0], float4(0.0f, 0.0f, 0.0f, 0.0f)[1], float4(0.0f, 0.0f, 0.0f, 0.0f)[2], float4(0.0f, 0.0f, 0.0f, 0.0f)[3])); return float4x4(float4(x_40[0], x_40[1], x_40[2], x_40[3]), float4(x_47[0], x_47[1], x_47[2], x_47[3]), float4(x_54[0], x_54[1], x_54[2], x_54[3]), float4(float4(0.0f)[0], float4(0.0f)[1], float4(0.0f)[2], float4(0.0f)[3]));
} }
void main_1(thread float2* const tint_symbol_8, const constant LeftOver* const tint_symbol_9, texture2d<float, access::sample> tint_symbol_10, sampler tint_symbol_11, texture2d<float, access::sample> tint_symbol_12, texture2d<float, access::sample> tint_symbol_13, sampler tint_symbol_14, thread float* const tint_symbol_15, texture2d<float, access::sample> tint_symbol_16, sampler tint_symbol_17, texture2d<float, access::sample> tint_symbol_18, sampler tint_symbol_19, thread float4* const tint_symbol_20) { void main_1(thread float2* const tint_symbol_8, const constant LeftOver* const tint_symbol_9, texture2d<float, access::sample> tint_symbol_10, sampler tint_symbol_11, texture2d<float, access::sample> tint_symbol_12, texture2d<float, access::sample> tint_symbol_13, sampler tint_symbol_14, thread float* const tint_symbol_15, texture2d<float, access::sample> tint_symbol_16, sampler tint_symbol_17, texture2d<float, access::sample> tint_symbol_18, sampler tint_symbol_19, thread float4* const tint_symbol_20) {
@ -71,7 +71,7 @@ void main_1(thread float2* const tint_symbol_8, const constant LeftOver* const t
float4 nc = 0.0f; float4 nc = 0.0f;
float alpha = 0.0f; float alpha = 0.0f;
float3 mixed = 0.0f; float3 mixed = 0.0f;
color = float4(0.0f, 0.0f, 0.0f, 0.0f); color = float4(0.0f);
float2 const x_86 = *(tint_symbol_8); float2 const x_86 = *(tint_symbol_8);
tileUV = fract(x_86); tileUV = fract(x_86);
float const x_91 = tileUV[1]; float const x_91 = tileUV[1];
@ -79,11 +79,11 @@ void main_1(thread float2* const tint_symbol_8, const constant LeftOver* const t
float2 const x_95 = *(tint_symbol_8); float2 const x_95 = *(tint_symbol_8);
tileID = floor(x_95); tileID = floor(x_95);
float2 const x_101 = (*(tint_symbol_9)).spriteMapSize; float2 const x_101 = (*(tint_symbol_9)).spriteMapSize;
sheetUnits = (float2(1.0f, 1.0f) / x_101); sheetUnits = (float2(1.0f) / x_101);
float const x_106 = (*(tint_symbol_9)).spriteCount; float const x_106 = (*(tint_symbol_9)).spriteCount;
spriteUnits = (1.0f / x_106); spriteUnits = (1.0f / x_106);
float2 const x_111 = (*(tint_symbol_9)).stageSize; float2 const x_111 = (*(tint_symbol_9)).stageSize;
stageUnits = (float2(1.0f, 1.0f) / x_111); stageUnits = (float2(1.0f) / x_111);
i = 0; i = 0;
while (true) { while (true) {
int const x_122 = i; int const x_122 = i;
@ -96,14 +96,14 @@ void main_1(thread float2* const tint_symbol_8, const constant LeftOver* const t
case 1: { case 1: {
float2 const x_150 = tileID; float2 const x_150 = tileID;
float2 const x_154 = (*(tint_symbol_9)).stageSize; float2 const x_154 = (*(tint_symbol_9)).stageSize;
float4 const x_156 = tint_symbol_10.sample(tint_symbol_11, ((x_150 + float2(0.5f, 0.5f)) / x_154), bias(0.0f)); float4 const x_156 = tint_symbol_10.sample(tint_symbol_11, ((x_150 + float2(0.5f)) / x_154), bias(0.0f));
frameID_1 = x_156[0]; frameID_1 = x_156[0];
break; break;
} }
case 0: { case 0: {
float2 const x_136 = tileID; float2 const x_136 = tileID;
float2 const x_140 = (*(tint_symbol_9)).stageSize; float2 const x_140 = (*(tint_symbol_9)).stageSize;
float4 const x_142 = tint_symbol_12.sample(tint_symbol_11, ((x_136 + float2(0.5f, 0.5f)) / x_140), bias(0.0f)); float4 const x_142 = tint_symbol_12.sample(tint_symbol_11, ((x_136 + float2(0.5f)) / x_140), bias(0.0f));
frameID_1 = x_142[0]; frameID_1 = x_142[0];
break; break;
} }

View File

@ -149,7 +149,7 @@ float3 perturbNormal_mf33_vf3_f1_(thread float3x3* const cotangentFrame_1, threa
float3 const x_119 = *(textureSample); float3 const x_119 = *(textureSample);
float3x3 const x_125 = *(cotangentFrame_1); float3x3 const x_125 = *(cotangentFrame_1);
param = x_125; param = x_125;
param_1 = ((x_119 * 2.0f) - float3(1.0f, 1.0f, 1.0f)); param_1 = ((x_119 * 2.0f) - float3(1.0f));
float const x_128 = *(scale_1); float const x_128 = *(scale_1);
param_2 = x_128; param_2 = x_128;
float3 const x_129 = perturbNormalBase_mf33_vf3_f1_(&(param), &(param_1), &(param_2)); float3 const x_129 = perturbNormalBase_mf33_vf3_f1_(&(param), &(param_1), &(param_2));
@ -239,7 +239,7 @@ void main_1(thread float* const tint_symbol_5, thread float3* const tint_symbol_
float3 specularOutput = 0.0f; float3 specularOutput = 0.0f;
float3 output3 = 0.0f; float3 output3 = 0.0f;
*(tint_symbol_5) = 100.0f; *(tint_symbol_5) = 100.0f;
*(tint_symbol_6) = float3(0.5f, 0.5f, 0.5f); *(tint_symbol_6) = float3(0.5f);
float2 const x_261 = *(tint_symbol_7); float2 const x_261 = *(tint_symbol_7);
float4 const x_262 = tint_symbol_8.sample(tint_symbol_9, x_261); float4 const x_262 = tint_symbol_8.sample(tint_symbol_9, x_261);
tempTextureRead = x_262; tempTextureRead = x_262;
@ -249,8 +249,8 @@ void main_1(thread float* const tint_symbol_5, thread float3* const tint_symbol_
float3 const x_279 = (*(tint_symbol_10)).u_cameraPosition; float3 const x_279 = (*(tint_symbol_10)).u_cameraPosition;
float4 const x_282 = *(tint_symbol_11); float4 const x_282 = *(tint_symbol_11);
output5 = normalize((x_279 - float3(x_282[0], x_282[1], x_282[2]))); output5 = normalize((x_279 - float3(x_282[0], x_282[1], x_282[2])));
output4 = float4(0.0f, 0.0f, 0.0f, 0.0f); output4 = float4(0.0f);
uvOffset = float2(0.0f, 0.0f); uvOffset = float2(0.0f);
float const x_292 = (*(tint_symbol_10)).u_bumpStrength; float const x_292 = (*(tint_symbol_10)).u_bumpStrength;
normalScale = (1.0f / x_292); normalScale = (1.0f / x_292);
bool const x_298 = *(tint_symbol_12); bool const x_298 = *(tint_symbol_12);
@ -302,8 +302,8 @@ void main_1(thread float* const tint_symbol_5, thread float3* const tint_symbol_
float const x_374 = numSamples; float const x_374 = numSamples;
stepSize = (1.0f / x_374); stepSize = (1.0f / x_374);
currRayHeight = 1.0f; currRayHeight = 1.0f;
vCurrOffset = float2(0.0f, 0.0f); vCurrOffset = float2(0.0f);
vLastOffset = float2(0.0f, 0.0f); vLastOffset = float2(0.0f);
lastSampledHeight = 1.0f; lastSampledHeight = 1.0f;
currSampledHeight = 1.0f; currSampledHeight = 1.0f;
i = 0; i = 0;
@ -384,8 +384,8 @@ void main_1(thread float* const tint_symbol_5, thread float3* const tint_symbol_
shadow = 1.0f; shadow = 1.0f;
float const x_488 = *(tint_symbol_5); float const x_488 = *(tint_symbol_5);
glossiness_1 = (1.0f * x_488); glossiness_1 = (1.0f * x_488);
diffuseBase = float3(0.0f, 0.0f, 0.0f); diffuseBase = float3(0.0f);
specularBase = float3(0.0f, 0.0f, 0.0f); specularBase = float3(0.0f);
float4 const x_494 = output4; float4 const x_494 = output4;
normalW = float3(x_494[0], x_494[1], x_494[2]); normalW = float3(x_494[0], x_494[1], x_494[2]);
float3 const x_501 = viewDirectionW_1; float3 const x_501 = viewDirectionW_1;

View File

@ -8,7 +8,7 @@ int3 tint_extract_bits(int3 v, uint offset, uint count) {
} }
void f_1() { void f_1() {
int3 v = int3(); int3 v = int3(0);
uint offset_1 = 0u; uint offset_1 = 0u;
uint count = 0u; uint count = 0u;
int3 const x_17 = v; int3 const x_17 = v;

View File

@ -8,7 +8,7 @@ uint3 tint_extract_bits(uint3 v, uint offset, uint count) {
} }
void f_1() { void f_1() {
uint3 v = uint3(); uint3 v = uint3(0u);
uint offset_1 = 0u; uint offset_1 = 0u;
uint count = 0u; uint count = 0u;
uint3 const x_16 = v; uint3 const x_16 = v;

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void abs_002533() { void abs_002533() {
float4 res = fabs(float4()); float4 res = fabs(float4(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
abs_002533(); abs_002533();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void abs_005174() { void abs_005174() {
float3 res = fabs(float3()); float3 res = fabs(float3(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
abs_005174(); abs_005174();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void abs_1ce782() { void abs_1ce782() {
uint4 res = abs(uint4()); uint4 res = abs(uint4(0u));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
abs_1ce782(); abs_1ce782();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void abs_1e9d53() { void abs_1e9d53() {
float2 res = fabs(float2()); float2 res = fabs(float2(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
abs_1e9d53(); abs_1e9d53();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
abs_467cd1(); abs_467cd1();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
abs_4ad288(); abs_4ad288();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void abs_5ad50a() { void abs_5ad50a() {
int3 res = abs(int3()); int3 res = abs(int3(0));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
abs_5ad50a(); abs_5ad50a();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void abs_7326de() { void abs_7326de() {
uint3 res = abs(uint3()); uint3 res = abs(uint3(0u));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
abs_7326de(); abs_7326de();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void abs_7f28e6() { void abs_7f28e6() {
uint2 res = abs(uint2()); uint2 res = abs(uint2(0u));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
abs_7f28e6(); abs_7f28e6();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void abs_7faa9e() { void abs_7faa9e() {
int2 res = abs(int2()); int2 res = abs(int2(0));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
abs_7faa9e(); abs_7faa9e();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void abs_9c80a6() { void abs_9c80a6() {
int4 res = abs(int4()); int4 res = abs(int4(0));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
abs_9c80a6(); abs_9c80a6();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
abs_b96037(); abs_b96037();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
acos_489247(); acos_489247();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void acos_8e2acf() { void acos_8e2acf() {
float4 res = acos(float4()); float4 res = acos(float4(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
acos_8e2acf(); acos_8e2acf();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void acos_a610c4() { void acos_a610c4() {
float3 res = acos(float3()); float3 res = acos(float3(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
acos_a610c4(); acos_a610c4();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void acos_dfc915() { void acos_dfc915() {
float2 res = acos(float2()); float2 res = acos(float2(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
acos_dfc915(); acos_dfc915();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void all_353d6a() { void all_353d6a() {
bool res = all(bool()); bool res = all(false);
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
all_353d6a(); all_353d6a();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void all_986c7b() { void all_986c7b() {
bool res = all(bool4()); bool res = all(bool4(false));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
all_986c7b(); all_986c7b();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void all_bd2dba() { void all_bd2dba() {
bool res = all(bool3()); bool res = all(bool3(false));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
all_bd2dba(); all_bd2dba();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void all_f46790() { void all_f46790() {
bool res = all(bool2()); bool res = all(bool2(false));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
all_f46790(); all_f46790();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void any_083428() { void any_083428() {
bool res = any(bool4()); bool res = any(bool4(false));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
any_083428(); any_083428();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void any_0e3e58() { void any_0e3e58() {
bool res = any(bool2()); bool res = any(bool2(false));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
any_0e3e58(); any_0e3e58();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void any_2ab91a() { void any_2ab91a() {
bool res = any(bool()); bool res = any(false);
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
any_2ab91a(); any_2ab91a();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void any_e755c1() { void any_e755c1() {
bool res = any(bool3()); bool res = any(bool3(false));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
any_e755c1(); any_e755c1();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -19,7 +19,7 @@ struct tint_symbol {
float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) { float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) {
arrayLength_1588cd(tint_symbol_4); arrayLength_1588cd(tint_symbol_4);
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) { vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) {

View File

@ -19,7 +19,7 @@ struct tint_symbol {
float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) { float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) {
arrayLength_61b1c7(tint_symbol_4); arrayLength_61b1c7(tint_symbol_4);
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) { vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) {

View File

@ -19,7 +19,7 @@ struct tint_symbol {
float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) { float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) {
arrayLength_a0f5ca(tint_symbol_4); arrayLength_a0f5ca(tint_symbol_4);
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) { vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) {

View File

@ -19,7 +19,7 @@ struct tint_symbol {
float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) { float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) {
arrayLength_cdd123(tint_symbol_4); arrayLength_cdd123(tint_symbol_4);
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) { vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) {

View File

@ -19,7 +19,7 @@ struct tint_symbol {
float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) { float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) {
arrayLength_cfca0a(tint_symbol_4); arrayLength_cfca0a(tint_symbol_4);
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) { vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) {

View File

@ -19,7 +19,7 @@ struct tint_symbol {
float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) { float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) {
arrayLength_eb510f(tint_symbol_4); arrayLength_eb510f(tint_symbol_4);
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) { vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void asin_064953() { void asin_064953() {
float4 res = asin(float4()); float4 res = asin(float4(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
asin_064953(); asin_064953();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void asin_7b6a44() { void asin_7b6a44() {
float2 res = asin(float2()); float2 res = asin(float2(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
asin_7b6a44(); asin_7b6a44();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void asin_8cd9c9() { void asin_8cd9c9() {
float3 res = asin(float3()); float3 res = asin(float3(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
asin_8cd9c9(); asin_8cd9c9();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
asin_c0c272(); asin_c0c272();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
atan_02979a(); atan_02979a();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void atan_331e6d() { void atan_331e6d() {
float3 res = atan(float3()); float3 res = atan(float3(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
atan_331e6d(); atan_331e6d();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void atan_a8b696() { void atan_a8b696() {
float4 res = atan(float4()); float4 res = atan(float4(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
atan_a8b696(); atan_a8b696();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void atan_ad96e4() { void atan_ad96e4() {
float2 res = atan(float2()); float2 res = atan(float2(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
atan_ad96e4(); atan_ad96e4();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void atan2_57fb13() { void atan2_57fb13() {
float2 res = atan2(float2(), float2()); float2 res = atan2(float2(0.0f), float2(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
atan2_57fb13(); atan2_57fb13();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
atan2_96057c(); atan2_96057c();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void atan2_a70d0d() { void atan2_a70d0d() {
float3 res = atan2(float3(), float3()); float3 res = atan2(float3(0.0f), float3(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
atan2_a70d0d(); atan2_a70d0d();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void atan2_ae713e() { void atan2_ae713e() {
float4 res = atan2(float4(), float4()); float4 res = atan2(float4(0.0f), float4(0.0f));
} }
struct tint_symbol { struct tint_symbol {
@ -11,7 +11,7 @@ struct tint_symbol {
float4 vertex_main_inner() { float4 vertex_main_inner() {
atan2_ae713e(); atan2_ae713e();
return float4(); return float4(0.0f);
} }
vertex tint_symbol vertex_main() { vertex tint_symbol vertex_main() {

View File

@ -7,7 +7,7 @@ void atomicAdd_794055(threadgroup atomic_int* const tint_symbol) {
void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicAdd_794055(tint_symbol_1); atomicAdd_794055(tint_symbol_1);

View File

@ -7,7 +7,7 @@ void atomicAdd_d5db1d(threadgroup atomic_uint* const tint_symbol) {
void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0u, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicAdd_d5db1d(tint_symbol_1); atomicAdd_d5db1d(tint_symbol_1);

View File

@ -7,7 +7,7 @@ void atomicAnd_34edd3(threadgroup atomic_uint* const tint_symbol) {
void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0u, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicAnd_34edd3(tint_symbol_1); atomicAnd_34edd3(tint_symbol_1);

View File

@ -7,7 +7,7 @@ void atomicAnd_45a819(threadgroup atomic_int* const tint_symbol) {
void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicAnd_45a819(tint_symbol_1); atomicAnd_45a819(tint_symbol_1);

View File

@ -19,7 +19,7 @@ void atomicCompareExchangeWeak_83580d(threadgroup atomic_uint* const tint_symbol
void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0u, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicCompareExchangeWeak_83580d(tint_symbol_1); atomicCompareExchangeWeak_83580d(tint_symbol_1);

View File

@ -19,7 +19,7 @@ void atomicCompareExchangeWeak_e88938(threadgroup atomic_int* const tint_symbol)
void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicCompareExchangeWeak_e88938(tint_symbol_1); atomicCompareExchangeWeak_e88938(tint_symbol_1);

View File

@ -7,7 +7,7 @@ void atomicExchange_0a5dca(threadgroup atomic_uint* const tint_symbol) {
void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0u, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicExchange_0a5dca(tint_symbol_1); atomicExchange_0a5dca(tint_symbol_1);

View File

@ -7,7 +7,7 @@ void atomicExchange_e114ba(threadgroup atomic_int* const tint_symbol) {
void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicExchange_e114ba(tint_symbol_1); atomicExchange_e114ba(tint_symbol_1);

View File

@ -7,7 +7,7 @@ void atomicLoad_361bf1(threadgroup atomic_uint* const tint_symbol) {
void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0u, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicLoad_361bf1(tint_symbol_1); atomicLoad_361bf1(tint_symbol_1);

View File

@ -7,7 +7,7 @@ void atomicLoad_afcc03(threadgroup atomic_int* const tint_symbol) {
void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicLoad_afcc03(tint_symbol_1); atomicLoad_afcc03(tint_symbol_1);

View File

@ -7,7 +7,7 @@ void atomicMax_a89cc3(threadgroup atomic_int* const tint_symbol) {
void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicMax_a89cc3(tint_symbol_1); atomicMax_a89cc3(tint_symbol_1);

View File

@ -7,7 +7,7 @@ void atomicMax_beccfc(threadgroup atomic_uint* const tint_symbol) {
void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0u, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicMax_beccfc(tint_symbol_1); atomicMax_beccfc(tint_symbol_1);

View File

@ -7,7 +7,7 @@ void atomicMin_278235(threadgroup atomic_int* const tint_symbol) {
void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_int* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, int(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicMin_278235(tint_symbol_1); atomicMin_278235(tint_symbol_1);

View File

@ -7,7 +7,7 @@ void atomicMin_69d383(threadgroup atomic_uint* const tint_symbol) {
void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0u, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicMin_69d383(tint_symbol_1); atomicMin_69d383(tint_symbol_1);

View File

@ -7,7 +7,7 @@ void atomicOr_5e3d61(threadgroup atomic_uint* const tint_symbol) {
void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) { void compute_main_inner(uint local_invocation_index, threadgroup atomic_uint* const tint_symbol_1) {
{ {
atomic_store_explicit(tint_symbol_1, uint(), memory_order_relaxed); atomic_store_explicit(tint_symbol_1, 0u, memory_order_relaxed);
} }
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
atomicOr_5e3d61(tint_symbol_1); atomicOr_5e3d61(tint_symbol_1);

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