msl: Handle buffer variables in transform
This removes a lot of awkward logic from the MSL writer, and means that we now handle all module-scope variables with the same transform. Change-Id: I782e36a4b88dafbc3f8364f7caa7f95c6ae3f5f1 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67643 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
c6ce5785d0
commit
e548db90f6
|
@ -808,7 +808,7 @@ struct TestParams {
|
||||||
struct TestWithParams : resolver::ResolverTestWithParam<TestParams> {};
|
struct TestWithParams : resolver::ResolverTestWithParam<TestParams> {};
|
||||||
|
|
||||||
using ResolverFunctionParameterValidationTest = TestWithParams;
|
using ResolverFunctionParameterValidationTest = TestWithParams;
|
||||||
TEST_P(ResolverFunctionParameterValidationTest, SotrageClass) {
|
TEST_P(ResolverFunctionParameterValidationTest, StorageClass) {
|
||||||
auto& param = GetParam();
|
auto& param = GetParam();
|
||||||
auto* ptr_type = ty.pointer(Source{{12, 34}}, ty.i32(), param.storage_class);
|
auto* ptr_type = ty.pointer(Source{{12, 34}}, ty.i32(), param.storage_class);
|
||||||
auto* arg = Param(Source{{12, 34}}, "p", ptr_type);
|
auto* arg = Param(Source{{12, 34}}, "p", ptr_type);
|
||||||
|
|
|
@ -1235,7 +1235,9 @@ bool Resolver::ValidateFunctionParameter(const ast::Function* func,
|
||||||
auto sc = ref->StorageClass();
|
auto sc = ref->StorageClass();
|
||||||
if (!(sc == ast::StorageClass::kFunction ||
|
if (!(sc == ast::StorageClass::kFunction ||
|
||||||
sc == ast::StorageClass::kPrivate ||
|
sc == ast::StorageClass::kPrivate ||
|
||||||
sc == ast::StorageClass::kWorkgroup)) {
|
sc == ast::StorageClass::kWorkgroup) &&
|
||||||
|
IsValidationEnabled(info->declaration->decorations,
|
||||||
|
ast::DisabledValidation::kIgnoreStorageClass)) {
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "function parameter of pointer type cannot be in '" << sc
|
ss << "function parameter of pointer type cannot be in '" << sc
|
||||||
<< "' storage class";
|
<< "' storage class";
|
||||||
|
@ -1806,6 +1808,18 @@ bool Resolver::Function(const ast::Function* func) {
|
||||||
param->source);
|
param->source);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (auto* ptr = param_info->type->As<sem::Pointer>()) {
|
||||||
|
// For MSL, we push module-scope variables into the entry point as pointer
|
||||||
|
// parameters, so we also need to handle their store type.
|
||||||
|
if (!ApplyStorageClassUsageToType(
|
||||||
|
ptr->StorageClass(), const_cast<sem::Type*>(ptr->StoreType()),
|
||||||
|
param->source)) {
|
||||||
|
AddNote("while instantiating parameter " +
|
||||||
|
builder_->Symbols().NameFor(param->symbol),
|
||||||
|
param->source);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (auto* str = param_info->type->As<sem::Struct>()) {
|
if (auto* str = param_info->type->As<sem::Struct>()) {
|
||||||
switch (func->PipelineStage()) {
|
switch (func->PipelineStage()) {
|
||||||
|
|
|
@ -92,21 +92,18 @@ struct ModuleScopeVarToEntryPointParam::State {
|
||||||
|
|
||||||
std::vector<const ast::Function*> functions_to_process;
|
std::vector<const ast::Function*> functions_to_process;
|
||||||
|
|
||||||
// Build a list of functions that transitively reference any private or
|
// Build a list of functions that transitively reference any module-scope
|
||||||
// workgroup variables, or texture/sampler variables.
|
// variables.
|
||||||
for (auto* func_ast : ctx.src->AST().Functions()) {
|
for (auto* func_ast : ctx.src->AST().Functions()) {
|
||||||
auto* func_sem = ctx.src->Sem().Get(func_ast);
|
auto* func_sem = ctx.src->Sem().Get(func_ast);
|
||||||
|
|
||||||
bool needs_processing = false;
|
bool needs_processing = false;
|
||||||
for (auto* var : func_sem->ReferencedModuleVariables()) {
|
for (auto* var : func_sem->ReferencedModuleVariables()) {
|
||||||
if (var->StorageClass() == ast::StorageClass::kPrivate ||
|
if (var->StorageClass() != ast::StorageClass::kNone) {
|
||||||
var->StorageClass() == ast::StorageClass::kWorkgroup ||
|
|
||||||
var->StorageClass() == ast::StorageClass::kUniformConstant) {
|
|
||||||
needs_processing = true;
|
needs_processing = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needs_processing) {
|
if (needs_processing) {
|
||||||
functions_to_process.push_back(func_ast);
|
functions_to_process.push_back(func_ast);
|
||||||
|
|
||||||
|
@ -140,8 +137,12 @@ struct ModuleScopeVarToEntryPointParam::State {
|
||||||
auto* func_sem = ctx.src->Sem().Get(func_ast);
|
auto* func_sem = ctx.src->Sem().Get(func_ast);
|
||||||
bool is_entry_point = func_ast->IsEntryPoint();
|
bool is_entry_point = func_ast->IsEntryPoint();
|
||||||
|
|
||||||
// Map module-scope variables onto their function-scope replacement.
|
// Map module-scope variables onto their replacement.
|
||||||
std::unordered_map<const sem::Variable*, Symbol> var_to_symbol;
|
struct NewVar {
|
||||||
|
Symbol symbol;
|
||||||
|
bool is_pointer;
|
||||||
|
};
|
||||||
|
std::unordered_map<const sem::Variable*, NewVar> var_to_newvar;
|
||||||
|
|
||||||
// We aggregate all workgroup variables into a struct to avoid hitting
|
// We aggregate all workgroup variables into a struct to avoid hitting
|
||||||
// MSL's limit for threadgroup memory arguments.
|
// MSL's limit for threadgroup memory arguments.
|
||||||
|
@ -155,11 +156,18 @@ struct ModuleScopeVarToEntryPointParam::State {
|
||||||
};
|
};
|
||||||
|
|
||||||
for (auto* var : func_sem->ReferencedModuleVariables()) {
|
for (auto* var : func_sem->ReferencedModuleVariables()) {
|
||||||
if (var->StorageClass() != ast::StorageClass::kPrivate &&
|
auto sc = var->StorageClass();
|
||||||
var->StorageClass() != ast::StorageClass::kWorkgroup &&
|
if (sc == ast::StorageClass::kNone) {
|
||||||
var->StorageClass() != ast::StorageClass::kUniformConstant) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (sc != ast::StorageClass::kPrivate &&
|
||||||
|
sc != ast::StorageClass::kStorage &&
|
||||||
|
sc != ast::StorageClass::kUniform &&
|
||||||
|
sc != ast::StorageClass::kUniformConstant &&
|
||||||
|
sc != ast::StorageClass::kWorkgroup) {
|
||||||
|
TINT_ICE(Transform, ctx.dst->Diagnostics())
|
||||||
|
<< "unhandled module-scope storage class (" << sc << ")";
|
||||||
|
}
|
||||||
|
|
||||||
// This is the symbol for the variable that replaces the module-scope
|
// This is the symbol for the variable that replaces the module-scope
|
||||||
// var.
|
// var.
|
||||||
|
@ -185,7 +193,26 @@ struct ModuleScopeVarToEntryPointParam::State {
|
||||||
decos.push_back(disable_validation);
|
decos.push_back(disable_validation);
|
||||||
auto* param = ctx.dst->Param(new_var_symbol, store_type(), decos);
|
auto* param = ctx.dst->Param(new_var_symbol, store_type(), decos);
|
||||||
ctx.InsertFront(func_ast->params, param);
|
ctx.InsertFront(func_ast->params, param);
|
||||||
} else if (var->StorageClass() == ast::StorageClass::kWorkgroup &&
|
} else if (sc == ast::StorageClass::kStorage ||
|
||||||
|
sc == ast::StorageClass::kUniform) {
|
||||||
|
// Variables into the Storage and Uniform storage classes are
|
||||||
|
// redeclared as entry point parameters with a pointer type.
|
||||||
|
auto attributes = ctx.Clone(var->Declaration()->decorations);
|
||||||
|
attributes.push_back(
|
||||||
|
ctx.dst->ASTNodes().Create<ast::DisableValidationDecoration>(
|
||||||
|
ctx.dst->ID(),
|
||||||
|
ast::DisabledValidation::kEntryPointParameter));
|
||||||
|
attributes.push_back(
|
||||||
|
ctx.dst->ASTNodes().Create<ast::DisableValidationDecoration>(
|
||||||
|
ctx.dst->ID(),
|
||||||
|
ast::DisabledValidation::kIgnoreStorageClass));
|
||||||
|
auto* param_type = ctx.dst->ty.pointer(
|
||||||
|
store_type(), sc, var->Declaration()->declared_access);
|
||||||
|
auto* param =
|
||||||
|
ctx.dst->Param(new_var_symbol, param_type, attributes);
|
||||||
|
ctx.InsertFront(func_ast->params, param);
|
||||||
|
is_pointer = true;
|
||||||
|
} else if (sc == ast::StorageClass::kWorkgroup &&
|
||||||
ContainsMatrix(var->Type())) {
|
ContainsMatrix(var->Type())) {
|
||||||
// Due to a bug in the MSL compiler, we use a threadgroup memory
|
// Due to a bug in the MSL compiler, we use a threadgroup memory
|
||||||
// argument for any workgroup allocation that contains a matrix.
|
// argument for any workgroup allocation that contains a matrix.
|
||||||
|
@ -210,16 +237,16 @@ struct ModuleScopeVarToEntryPointParam::State {
|
||||||
ctx.dst->Decl(local_var));
|
ctx.dst->Decl(local_var));
|
||||||
is_pointer = true;
|
is_pointer = true;
|
||||||
} else {
|
} else {
|
||||||
// For any other private or workgroup variable, redeclare it at
|
// Variables in the Private and Workgroup storage classes are
|
||||||
// function scope. Disable storage class validation on this
|
// redeclared at function scope. Disable storage class validation on
|
||||||
// variable.
|
// this variable.
|
||||||
auto* disable_validation =
|
auto* disable_validation =
|
||||||
ctx.dst->ASTNodes().Create<ast::DisableValidationDecoration>(
|
ctx.dst->ASTNodes().Create<ast::DisableValidationDecoration>(
|
||||||
ctx.dst->ID(),
|
ctx.dst->ID(),
|
||||||
ast::DisabledValidation::kIgnoreStorageClass);
|
ast::DisabledValidation::kIgnoreStorageClass);
|
||||||
auto* constructor = ctx.Clone(var->Declaration()->constructor);
|
auto* constructor = ctx.Clone(var->Declaration()->constructor);
|
||||||
auto* local_var = ctx.dst->Var(
|
auto* local_var =
|
||||||
new_var_symbol, store_type(), var->StorageClass(), constructor,
|
ctx.dst->Var(new_var_symbol, store_type(), sc, constructor,
|
||||||
ast::DecorationList{disable_validation});
|
ast::DecorationList{disable_validation});
|
||||||
ctx.InsertFront(func_ast->body->statements,
|
ctx.InsertFront(func_ast->body->statements,
|
||||||
ctx.dst->Decl(local_var));
|
ctx.dst->Decl(local_var));
|
||||||
|
@ -230,11 +257,16 @@ struct ModuleScopeVarToEntryPointParam::State {
|
||||||
auto* param_type = store_type();
|
auto* param_type = store_type();
|
||||||
ast::DecorationList attributes;
|
ast::DecorationList attributes;
|
||||||
if (!var->Type()->UnwrapRef()->is_handle()) {
|
if (!var->Type()->UnwrapRef()->is_handle()) {
|
||||||
param_type = ctx.dst->ty.pointer(param_type, var->StorageClass());
|
param_type = ctx.dst->ty.pointer(
|
||||||
|
param_type, sc, var->Declaration()->declared_access);
|
||||||
is_pointer = true;
|
is_pointer = true;
|
||||||
|
|
||||||
// Disable validation of arguments passed to this pointer parameter,
|
// Disable validation of the parameter's storage class and of
|
||||||
// as we will sometimes pass pointers to struct members.
|
// arguments passed it.
|
||||||
|
attributes.push_back(
|
||||||
|
ctx.dst->ASTNodes().Create<ast::DisableValidationDecoration>(
|
||||||
|
ctx.dst->ID(),
|
||||||
|
ast::DisabledValidation::kIgnoreStorageClass));
|
||||||
attributes.push_back(
|
attributes.push_back(
|
||||||
ctx.dst->ASTNodes().Create<ast::DisableValidationDecoration>(
|
ctx.dst->ASTNodes().Create<ast::DisableValidationDecoration>(
|
||||||
ctx.dst->ID(),
|
ctx.dst->ID(),
|
||||||
|
@ -267,7 +299,7 @@ struct ModuleScopeVarToEntryPointParam::State {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var_to_symbol[var] = new_var_symbol;
|
var_to_newvar[var] = {new_var_symbol, is_pointer};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!workgroup_parameter_members.empty()) {
|
if (!workgroup_parameter_members.empty()) {
|
||||||
|
@ -294,31 +326,28 @@ struct ModuleScopeVarToEntryPointParam::State {
|
||||||
// Add new arguments for any variables that are needed by the callee.
|
// Add new arguments for any variables that are needed by the callee.
|
||||||
// For entry points, pass non-handle types as pointers.
|
// For entry points, pass non-handle types as pointers.
|
||||||
for (auto* target_var : target_sem->ReferencedModuleVariables()) {
|
for (auto* target_var : target_sem->ReferencedModuleVariables()) {
|
||||||
|
auto sc = target_var->StorageClass();
|
||||||
|
if (sc == ast::StorageClass::kNone) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto new_var = var_to_newvar[target_var];
|
||||||
bool is_handle = target_var->Type()->UnwrapRef()->is_handle();
|
bool is_handle = target_var->Type()->UnwrapRef()->is_handle();
|
||||||
bool is_workgroup_matrix =
|
const ast::Expression* arg = ctx.dst->Expr(new_var.symbol);
|
||||||
target_var->StorageClass() == ast::StorageClass::kWorkgroup &&
|
if (is_entry_point && !is_handle && !new_var.is_pointer) {
|
||||||
ContainsMatrix(target_var->Type());
|
// We need to pass a pointer and we don't already have one, so take
|
||||||
if (target_var->StorageClass() == ast::StorageClass::kPrivate ||
|
// the address of the new variable.
|
||||||
target_var->StorageClass() == ast::StorageClass::kWorkgroup ||
|
|
||||||
target_var->StorageClass() ==
|
|
||||||
ast::StorageClass::kUniformConstant) {
|
|
||||||
const ast::Expression* arg =
|
|
||||||
ctx.dst->Expr(var_to_symbol[target_var]);
|
|
||||||
if (is_entry_point && !is_handle && !is_workgroup_matrix) {
|
|
||||||
arg = ctx.dst->AddressOf(arg);
|
arg = ctx.dst->AddressOf(arg);
|
||||||
}
|
}
|
||||||
ctx.InsertBack(call->args, arg);
|
ctx.InsertBack(call->args, arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Now remove all module-scope variables with these storage classes.
|
// Now remove all module-scope variables with these storage classes.
|
||||||
for (auto* var_ast : ctx.src->AST().GlobalVariables()) {
|
for (auto* var_ast : ctx.src->AST().GlobalVariables()) {
|
||||||
auto* var_sem = ctx.src->Sem().Get(var_ast);
|
auto* var_sem = ctx.src->Sem().Get(var_ast);
|
||||||
if (var_sem->StorageClass() == ast::StorageClass::kPrivate ||
|
if (var_sem->StorageClass() != ast::StorageClass::kNone) {
|
||||||
var_sem->StorageClass() == ast::StorageClass::kWorkgroup ||
|
|
||||||
var_sem->StorageClass() == ast::StorageClass::kUniformConstant) {
|
|
||||||
ctx.Remove(ctx.src->AST().GlobalDeclarations(), var_ast);
|
ctx.Remove(ctx.src->AST().GlobalDeclarations(), var_ast);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,22 +22,27 @@ namespace transform {
|
||||||
|
|
||||||
/// Move module-scope variables into the entry point as parameters.
|
/// Move module-scope variables into the entry point as parameters.
|
||||||
///
|
///
|
||||||
/// MSL does not allow private and workgroup variables at module-scope, so we
|
/// MSL does not allow module-scope variables to have any address space other
|
||||||
/// push these declarations into the entry point function and then pass them as
|
/// than `constant`. This transform moves all module-scope declarations into the
|
||||||
/// pointer parameters to any function that references them.
|
/// entry point function (either as parameters or function-scope variables) and
|
||||||
/// Similarly, texture and sampler types are converted to entry point
|
/// then passes them as pointer parameters to any function that references them.
|
||||||
/// parameters and passed by value to functions that need them.
|
|
||||||
///
|
///
|
||||||
/// Since WGSL does not allow function-scope variables to have these storage
|
/// Since WGSL does not allow entry point parameters or function-scope variables
|
||||||
/// classes, we annotate the new variable declarations with an attribute that
|
/// to have these storage classes, we annotate the new variable declarations
|
||||||
/// bypasses that validation rule.
|
/// with an attribute that bypasses that validation rule.
|
||||||
///
|
///
|
||||||
/// Before:
|
/// Before:
|
||||||
/// ```
|
/// ```
|
||||||
/// var<private> v : f32 = 2.0;
|
/// [[block]]
|
||||||
|
/// struct S {
|
||||||
|
/// f : f32;
|
||||||
|
/// };
|
||||||
|
/// [[binding(0), group(0)]]
|
||||||
|
/// var<storage, read> s : S;
|
||||||
|
/// var<private> p : f32 = 2.0;
|
||||||
///
|
///
|
||||||
/// fn foo() {
|
/// fn foo() {
|
||||||
/// v = v + 1.0;
|
/// p = p + f;
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// [[stage(compute), workgroup_size(1)]]
|
/// [[stage(compute), workgroup_size(1)]]
|
||||||
|
@ -48,14 +53,14 @@ namespace transform {
|
||||||
///
|
///
|
||||||
/// After:
|
/// After:
|
||||||
/// ```
|
/// ```
|
||||||
/// fn foo(v : ptr<private, f32>) {
|
/// fn foo(p : ptr<private, f32>, sptr : ptr<storage, S, read>) {
|
||||||
/// *v = *v + 1.0;
|
/// *p = *p + (*sptr).f;
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// [[stage(compute), workgroup_size(1)]]
|
/// [[stage(compute), workgroup_size(1)]]
|
||||||
/// fn main() {
|
/// fn main(sptr : ptr<storage, S, read>) {
|
||||||
/// var<private> v : f32 = 2.0;
|
/// var<private> p : f32 = 2.0;
|
||||||
/// foo(&v);
|
/// foo(&p, sptr);
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
class ModuleScopeVarToEntryPointParam
|
class ModuleScopeVarToEntryPointParam
|
||||||
|
|
|
@ -78,12 +78,12 @@ fn main() {
|
||||||
fn no_uses() {
|
fn no_uses() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn bar(a : f32, b : f32, [[internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol : ptr<private, f32>, [[internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_1 : ptr<workgroup, f32>) {
|
fn bar(a : f32, b : f32, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol : ptr<private, f32>, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_1 : ptr<workgroup, f32>) {
|
||||||
*(tint_symbol) = a;
|
*(tint_symbol) = a;
|
||||||
*(tint_symbol_1) = b;
|
*(tint_symbol_1) = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn foo(a : f32, [[internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_2 : ptr<private, f32>, [[internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_3 : ptr<workgroup, f32>) {
|
fn foo(a : f32, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_2 : ptr<private, f32>, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_3 : ptr<workgroup, f32>) {
|
||||||
let b : f32 = 2.0;
|
let b : f32 = 2.0;
|
||||||
bar(a, b, tint_symbol_2, tint_symbol_3);
|
bar(a, b, tint_symbol_2, tint_symbol_3);
|
||||||
no_uses();
|
no_uses();
|
||||||
|
@ -181,7 +181,7 @@ fn bar(p : ptr<private, f32>) {
|
||||||
*(p) = 0.0;
|
*(p) = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn foo([[internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol : ptr<private, f32>) {
|
fn foo([[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol : ptr<private, f32>) {
|
||||||
bar(tint_symbol);
|
bar(tint_symbol);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,28 +197,7 @@ fn main() {
|
||||||
EXPECT_EQ(expect, str(got));
|
EXPECT_EQ(expect, str(got));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ModuleScopeVarToEntryPointParamTest, UnusedVariables) {
|
TEST_F(ModuleScopeVarToEntryPointParamTest, Buffers_Basic) {
|
||||||
auto* src = R"(
|
|
||||||
var<private> p : f32;
|
|
||||||
var<workgroup> w : f32;
|
|
||||||
|
|
||||||
[[stage(compute), workgroup_size(1)]]
|
|
||||||
fn main() {
|
|
||||||
}
|
|
||||||
)";
|
|
||||||
|
|
||||||
auto* expect = R"(
|
|
||||||
[[stage(compute), workgroup_size(1)]]
|
|
||||||
fn main() {
|
|
||||||
}
|
|
||||||
)";
|
|
||||||
|
|
||||||
auto got = Run<ModuleScopeVarToEntryPointParam>(src);
|
|
||||||
|
|
||||||
EXPECT_EQ(expect, str(got));
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(ModuleScopeVarToEntryPointParamTest, OtherVariables) {
|
|
||||||
auto* src = R"(
|
auto* src = R"(
|
||||||
[[block]]
|
[[block]]
|
||||||
struct S {
|
struct S {
|
||||||
|
@ -227,9 +206,13 @@ struct S {
|
||||||
|
|
||||||
[[group(0), binding(0)]]
|
[[group(0), binding(0)]]
|
||||||
var<uniform> u : S;
|
var<uniform> u : S;
|
||||||
|
[[group(0), binding(1)]]
|
||||||
|
var<storage> s : S;
|
||||||
|
|
||||||
[[stage(compute), workgroup_size(1)]]
|
[[stage(compute), workgroup_size(1)]]
|
||||||
fn main() {
|
fn main() {
|
||||||
|
_ = u;
|
||||||
|
_ = s;
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
|
||||||
|
@ -239,10 +222,75 @@ struct S {
|
||||||
a : f32;
|
a : f32;
|
||||||
};
|
};
|
||||||
|
|
||||||
[[group(0), binding(0)]] var<uniform> u : S;
|
[[stage(compute), workgroup_size(1)]]
|
||||||
|
fn main([[group(0), binding(0), internal(disable_validation__entry_point_parameter), internal(disable_validation__ignore_storage_class)]] tint_symbol : ptr<uniform, S>, [[group(0), binding(1), internal(disable_validation__entry_point_parameter), internal(disable_validation__ignore_storage_class)]] tint_symbol_1 : ptr<storage, S>) {
|
||||||
|
_ = *(tint_symbol);
|
||||||
|
_ = *(tint_symbol_1);
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
|
||||||
|
auto got = Run<ModuleScopeVarToEntryPointParam>(src);
|
||||||
|
|
||||||
|
EXPECT_EQ(expect, str(got));
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(ModuleScopeVarToEntryPointParamTest, Buffers_FunctionCalls) {
|
||||||
|
auto* src = R"(
|
||||||
|
[[block]]
|
||||||
|
struct S {
|
||||||
|
a : f32;
|
||||||
|
};
|
||||||
|
|
||||||
|
[[group(0), binding(0)]]
|
||||||
|
var<uniform> u : S;
|
||||||
|
[[group(0), binding(1)]]
|
||||||
|
var<storage> s : S;
|
||||||
|
|
||||||
|
fn no_uses() {
|
||||||
|
}
|
||||||
|
|
||||||
|
fn bar(a : f32, b : f32) {
|
||||||
|
_ = u;
|
||||||
|
_ = s;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn foo(a : f32) {
|
||||||
|
let b : f32 = 2.0;
|
||||||
|
_ = u;
|
||||||
|
bar(a, b);
|
||||||
|
no_uses();
|
||||||
|
}
|
||||||
|
|
||||||
[[stage(compute), workgroup_size(1)]]
|
[[stage(compute), workgroup_size(1)]]
|
||||||
fn main() {
|
fn main() {
|
||||||
|
foo(1.0);
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
|
||||||
|
auto* expect = R"(
|
||||||
|
[[block]]
|
||||||
|
struct S {
|
||||||
|
a : f32;
|
||||||
|
};
|
||||||
|
|
||||||
|
fn no_uses() {
|
||||||
|
}
|
||||||
|
|
||||||
|
fn bar(a : f32, b : f32, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol : ptr<uniform, S>, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_1 : ptr<storage, S>) {
|
||||||
|
_ = *(tint_symbol);
|
||||||
|
_ = *(tint_symbol_1);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn foo(a : f32, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_2 : ptr<uniform, S>, [[internal(disable_validation__ignore_storage_class), internal(disable_validation__ignore_invalid_pointer_argument)]] tint_symbol_3 : ptr<storage, S>) {
|
||||||
|
let b : f32 = 2.0;
|
||||||
|
_ = *(tint_symbol_2);
|
||||||
|
bar(a, b, tint_symbol_2, tint_symbol_3);
|
||||||
|
no_uses();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[stage(compute), workgroup_size(1)]]
|
||||||
|
fn main([[group(0), binding(0), internal(disable_validation__entry_point_parameter), internal(disable_validation__ignore_storage_class)]] tint_symbol_4 : ptr<uniform, S>, [[group(0), binding(1), internal(disable_validation__entry_point_parameter), internal(disable_validation__ignore_storage_class)]] tint_symbol_5 : ptr<storage, S>) {
|
||||||
|
foo(1.0, tint_symbol_4, tint_symbol_5);
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
|
||||||
|
@ -258,16 +306,16 @@ TEST_F(ModuleScopeVarToEntryPointParamTest, HandleTypes_Basic) {
|
||||||
|
|
||||||
[[stage(compute), workgroup_size(1)]]
|
[[stage(compute), workgroup_size(1)]]
|
||||||
fn main() {
|
fn main() {
|
||||||
ignore(t);
|
_ = t;
|
||||||
ignore(s);
|
_ = s;
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
|
||||||
auto* expect = R"(
|
auto* expect = R"(
|
||||||
[[stage(compute), workgroup_size(1)]]
|
[[stage(compute), workgroup_size(1)]]
|
||||||
fn main([[group(0), binding(0), internal(disable_validation__entry_point_parameter)]] tint_symbol : texture_2d<f32>, [[group(0), binding(1), internal(disable_validation__entry_point_parameter)]] tint_symbol_1 : sampler) {
|
fn main([[group(0), binding(0), internal(disable_validation__entry_point_parameter)]] tint_symbol : texture_2d<f32>, [[group(0), binding(1), internal(disable_validation__entry_point_parameter)]] tint_symbol_1 : sampler) {
|
||||||
ignore(tint_symbol);
|
_ = tint_symbol;
|
||||||
ignore(tint_symbol_1);
|
_ = tint_symbol_1;
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
|
||||||
|
@ -285,13 +333,13 @@ fn no_uses() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn bar(a : f32, b : f32) {
|
fn bar(a : f32, b : f32) {
|
||||||
ignore(t);
|
_ = t;
|
||||||
ignore(s);
|
_ = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn foo(a : f32) {
|
fn foo(a : f32) {
|
||||||
let b : f32 = 2.0;
|
let b : f32 = 2.0;
|
||||||
ignore(t);
|
_ = t;
|
||||||
bar(a, b);
|
bar(a, b);
|
||||||
no_uses();
|
no_uses();
|
||||||
}
|
}
|
||||||
|
@ -307,13 +355,13 @@ fn no_uses() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn bar(a : f32, b : f32, tint_symbol : texture_2d<f32>, tint_symbol_1 : sampler) {
|
fn bar(a : f32, b : f32, tint_symbol : texture_2d<f32>, tint_symbol_1 : sampler) {
|
||||||
ignore(tint_symbol);
|
_ = tint_symbol;
|
||||||
ignore(tint_symbol_1);
|
_ = tint_symbol_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn foo(a : f32, tint_symbol_2 : texture_2d<f32>, tint_symbol_3 : sampler) {
|
fn foo(a : f32, tint_symbol_2 : texture_2d<f32>, tint_symbol_3 : sampler) {
|
||||||
let b : f32 = 2.0;
|
let b : f32 = 2.0;
|
||||||
ignore(tint_symbol_2);
|
_ = tint_symbol_2;
|
||||||
bar(a, b, tint_symbol_2, tint_symbol_3);
|
bar(a, b, tint_symbol_2, tint_symbol_3);
|
||||||
no_uses();
|
no_uses();
|
||||||
}
|
}
|
||||||
|
@ -440,6 +488,45 @@ fn main([[internal(disable_validation__entry_point_parameter)]] tint_symbol_1 :
|
||||||
EXPECT_EQ(expect, str(got));
|
EXPECT_EQ(expect, str(got));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(ModuleScopeVarToEntryPointParamTest, UnusedVariables) {
|
||||||
|
auto* src = R"(
|
||||||
|
[[block]]
|
||||||
|
struct S {
|
||||||
|
a : f32;
|
||||||
|
};
|
||||||
|
|
||||||
|
var<private> p : f32;
|
||||||
|
var<workgroup> w : f32;
|
||||||
|
|
||||||
|
[[group(0), binding(0)]]
|
||||||
|
var<uniform> ub : S;
|
||||||
|
[[group(0), binding(1)]]
|
||||||
|
var<storage> sb : S;
|
||||||
|
|
||||||
|
[[group(0), binding(2)]] var t : texture_2d<f32>;
|
||||||
|
[[group(0), binding(3)]] var s : sampler;
|
||||||
|
|
||||||
|
[[stage(compute), workgroup_size(1)]]
|
||||||
|
fn main() {
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
|
||||||
|
auto* expect = R"(
|
||||||
|
[[block]]
|
||||||
|
struct S {
|
||||||
|
a : f32;
|
||||||
|
};
|
||||||
|
|
||||||
|
[[stage(compute), workgroup_size(1)]]
|
||||||
|
fn main() {
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
|
||||||
|
auto got = Run<ModuleScopeVarToEntryPointParam>(src);
|
||||||
|
|
||||||
|
EXPECT_EQ(expect, str(got));
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(ModuleScopeVarToEntryPointParamTest, EmtpyModule) {
|
TEST_F(ModuleScopeVarToEntryPointParamTest, EmtpyModule) {
|
||||||
auto* src = "";
|
auto* src = "";
|
||||||
|
|
||||||
|
|
|
@ -146,13 +146,13 @@ SanitizedResult Sanitize(const Program* in,
|
||||||
manager.Add<transform::VectorizeScalarMatrixConstructors>();
|
manager.Add<transform::VectorizeScalarMatrixConstructors>();
|
||||||
manager.Add<transform::WrapArraysInStructs>();
|
manager.Add<transform::WrapArraysInStructs>();
|
||||||
manager.Add<transform::PadArrayElements>();
|
manager.Add<transform::PadArrayElements>();
|
||||||
manager.Add<transform::ModuleScopeVarToEntryPointParam>();
|
|
||||||
manager.Add<transform::InlinePointerLets>();
|
manager.Add<transform::InlinePointerLets>();
|
||||||
manager.Add<transform::RemovePhonies>();
|
manager.Add<transform::RemovePhonies>();
|
||||||
manager.Add<transform::Simplify>();
|
manager.Add<transform::Simplify>();
|
||||||
// ArrayLengthFromUniform must come after InlinePointerLets and Simplify, as
|
// ArrayLengthFromUniform must come after InlinePointerLets and Simplify, as
|
||||||
// it assumes that the form of the array length argument is &var.array.
|
// it assumes that the form of the array length argument is &var.array.
|
||||||
manager.Add<transform::ArrayLengthFromUniform>();
|
manager.Add<transform::ArrayLengthFromUniform>();
|
||||||
|
manager.Add<transform::ModuleScopeVarToEntryPointParam>();
|
||||||
internal_inputs.Add<transform::ArrayLengthFromUniform::Config>(
|
internal_inputs.Add<transform::ArrayLengthFromUniform::Config>(
|
||||||
std::move(array_length_from_uniform_cfg));
|
std::move(array_length_from_uniform_cfg));
|
||||||
internal_inputs.Add<transform::CanonicalizeEntryPointIO::Config>(
|
internal_inputs.Add<transform::CanonicalizeEntryPointIO::Config>(
|
||||||
|
@ -196,18 +196,10 @@ bool GeneratorImpl::Generate() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
auto* sem = program_->Sem().Get(var);
|
// These are pushed into the entry point by sanitizer transforms.
|
||||||
switch (sem->StorageClass()) {
|
TINT_ICE(Writer, diagnostics_) << "module-scope variables should have "
|
||||||
case ast::StorageClass::kPrivate:
|
"been handled by the MSL sanitizer";
|
||||||
case ast::StorageClass::kWorkgroup:
|
|
||||||
// These are pushed into the entry point by the sanitizer.
|
|
||||||
TINT_ICE(Writer, diagnostics_)
|
|
||||||
<< "module-scope variables in the private/workgroup storage "
|
|
||||||
"class should have been handled by the MSL sanitizer";
|
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break; // Handled by another code path
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -521,25 +513,6 @@ bool GeneratorImpl::EmitCall(std::ostream& out,
|
||||||
out << program_->Symbols().NameFor(ident->symbol) << "(";
|
out << program_->Symbols().NameFor(ident->symbol) << "(";
|
||||||
|
|
||||||
bool first = true;
|
bool first = true;
|
||||||
auto* func_sem = program_->Sem().Get(func);
|
|
||||||
for (const auto& data : func_sem->ReferencedUniformVariables()) {
|
|
||||||
auto* var = data.first;
|
|
||||||
if (!first) {
|
|
||||||
out << ", ";
|
|
||||||
}
|
|
||||||
first = false;
|
|
||||||
out << program_->Symbols().NameFor(var->Declaration()->symbol);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const auto& data : func_sem->ReferencedStorageBufferVariables()) {
|
|
||||||
auto* var = data.first;
|
|
||||||
if (!first) {
|
|
||||||
out << ", ";
|
|
||||||
}
|
|
||||||
first = false;
|
|
||||||
out << program_->Symbols().NameFor(var->Declaration()->symbol);
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto& args = expr->args;
|
const auto& args = expr->args;
|
||||||
for (auto* arg : args) {
|
for (auto* arg : args) {
|
||||||
if (!first) {
|
if (!first) {
|
||||||
|
@ -1464,39 +1437,6 @@ bool GeneratorImpl::EmitFunction(const ast::Function* func) {
|
||||||
out << " " << program_->Symbols().NameFor(func->symbol) << "(";
|
out << " " << program_->Symbols().NameFor(func->symbol) << "(";
|
||||||
|
|
||||||
bool first = true;
|
bool first = true;
|
||||||
for (const auto& data : func_sem->ReferencedUniformVariables()) {
|
|
||||||
auto* var = data.first;
|
|
||||||
if (!first) {
|
|
||||||
out << ", ";
|
|
||||||
}
|
|
||||||
first = false;
|
|
||||||
|
|
||||||
out << "constant ";
|
|
||||||
// TODO(dsinclair): Can arrays be uniform? If so, fix this ...
|
|
||||||
if (!EmitType(out, var->Type()->UnwrapRef(), "")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
out << "& " << program_->Symbols().NameFor(var->Declaration()->symbol);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const auto& data : func_sem->ReferencedStorageBufferVariables()) {
|
|
||||||
auto* var = data.first;
|
|
||||||
if (!first) {
|
|
||||||
out << ", ";
|
|
||||||
}
|
|
||||||
first = false;
|
|
||||||
|
|
||||||
if (var->Access() == ast::Access::kRead) {
|
|
||||||
out << "const ";
|
|
||||||
}
|
|
||||||
|
|
||||||
out << "device ";
|
|
||||||
if (!EmitType(out, var->Type()->UnwrapRef(), "")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
out << "& " << program_->Symbols().NameFor(var->Declaration()->symbol);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto* v : func->params) {
|
for (auto* v : func->params) {
|
||||||
if (!first) {
|
if (!first) {
|
||||||
out << ", ";
|
out << ", ";
|
||||||
|
@ -1594,9 +1534,27 @@ std::string GeneratorImpl::interpolation_to_attribute(
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GeneratorImpl::EmitEntryPointFunction(const ast::Function* func) {
|
bool GeneratorImpl::EmitEntryPointFunction(const ast::Function* func) {
|
||||||
auto* func_sem = program_->Sem().Get(func);
|
|
||||||
auto func_name = program_->Symbols().NameFor(func->symbol);
|
auto func_name = program_->Symbols().NameFor(func->symbol);
|
||||||
|
|
||||||
|
// Returns the binding index of a variable, requiring that the group attribute
|
||||||
|
// have a value of zero.
|
||||||
|
const uint32_t kInvalidBindingIndex = std::numeric_limits<uint32_t>::max();
|
||||||
|
auto get_binding_index = [&](const ast::Variable* var) -> uint32_t {
|
||||||
|
auto bp = var->BindingPoint();
|
||||||
|
if (bp.group == nullptr || bp.binding == nullptr) {
|
||||||
|
TINT_ICE(Writer, diagnostics_)
|
||||||
|
<< "missing binding attributes for entry point parameter";
|
||||||
|
return kInvalidBindingIndex;
|
||||||
|
}
|
||||||
|
if (bp.group->value != 0) {
|
||||||
|
TINT_ICE(Writer, diagnostics_)
|
||||||
|
<< "encountered non-zero resource group index (use "
|
||||||
|
"BindingRemapper to fix)";
|
||||||
|
return kInvalidBindingIndex;
|
||||||
|
}
|
||||||
|
return bp.binding->value;
|
||||||
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
auto out = line();
|
auto out = line();
|
||||||
|
|
||||||
|
@ -1626,32 +1584,32 @@ bool GeneratorImpl::EmitEntryPointFunction(const ast::Function* func) {
|
||||||
if (type->Is<sem::Struct>()) {
|
if (type->Is<sem::Struct>()) {
|
||||||
out << " [[stage_in]]";
|
out << " [[stage_in]]";
|
||||||
} else if (type->is_handle()) {
|
} else if (type->is_handle()) {
|
||||||
auto bp = var->BindingPoint();
|
uint32_t binding = get_binding_index(var);
|
||||||
if (bp.group == nullptr || bp.binding == nullptr) {
|
if (binding == kInvalidBindingIndex) {
|
||||||
TINT_ICE(Writer, diagnostics_)
|
|
||||||
<< "missing binding attributes for entry point parameter";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (bp.group->value != 0) {
|
|
||||||
TINT_ICE(Writer, diagnostics_)
|
|
||||||
<< "encountered non-zero resource group index (use "
|
|
||||||
"BindingRemapper to fix)";
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (var->type->Is<ast::Sampler>()) {
|
if (var->type->Is<ast::Sampler>()) {
|
||||||
out << " [[sampler(" << bp.binding->value << ")]]";
|
out << " [[sampler(" << binding << ")]]";
|
||||||
} else if (var->type->Is<ast::Texture>()) {
|
} else if (var->type->Is<ast::Texture>()) {
|
||||||
out << " [[texture(" << bp.binding->value << ")]]";
|
out << " [[texture(" << binding << ")]]";
|
||||||
} else {
|
} else {
|
||||||
TINT_ICE(Writer, diagnostics_)
|
TINT_ICE(Writer, diagnostics_)
|
||||||
<< "invalid handle type entry point parameter";
|
<< "invalid handle type entry point parameter";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if (auto* ptr = var->type->As<ast::Pointer>()) {
|
} else if (auto* ptr = var->type->As<ast::Pointer>()) {
|
||||||
if (ptr->storage_class == ast::StorageClass::kWorkgroup) {
|
auto sc = ptr->storage_class;
|
||||||
|
if (sc == ast::StorageClass::kWorkgroup) {
|
||||||
auto& allocations = workgroup_allocations_[func_name];
|
auto& allocations = workgroup_allocations_[func_name];
|
||||||
out << " [[threadgroup(" << allocations.size() << ")]]";
|
out << " [[threadgroup(" << allocations.size() << ")]]";
|
||||||
allocations.push_back(program_->Sem().Get(ptr->type)->Size());
|
allocations.push_back(program_->Sem().Get(ptr->type)->Size());
|
||||||
|
} else if (sc == ast::StorageClass::kStorage ||
|
||||||
|
sc == ast::StorageClass::kUniform) {
|
||||||
|
uint32_t binding = get_binding_index(var);
|
||||||
|
if (binding == kInvalidBindingIndex) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
out << " [[buffer(" << binding << ")]]";
|
||||||
} else {
|
} else {
|
||||||
TINT_ICE(Writer, diagnostics_)
|
TINT_ICE(Writer, diagnostics_)
|
||||||
<< "invalid pointer storage class for entry point parameter";
|
<< "invalid pointer storage class for entry point parameter";
|
||||||
|
@ -1680,62 +1638,6 @@ bool GeneratorImpl::EmitEntryPointFunction(const ast::Function* func) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto data : func_sem->ReferencedUniformVariables()) {
|
|
||||||
if (!first) {
|
|
||||||
out << ", ";
|
|
||||||
}
|
|
||||||
first = false;
|
|
||||||
|
|
||||||
auto* var = data.first;
|
|
||||||
// TODO(dsinclair): We're using the binding to make up the buffer number
|
|
||||||
// but we should instead be using a provided mapping that uses both buffer
|
|
||||||
// and set. https://bugs.chromium.org/p/tint/issues/detail?id=104
|
|
||||||
auto* binding = data.second.binding;
|
|
||||||
if (binding == nullptr) {
|
|
||||||
diagnostics_.add_error(
|
|
||||||
diag::System::Writer,
|
|
||||||
"unable to find binding information for uniform: " +
|
|
||||||
program_->Symbols().NameFor(var->Declaration()->symbol));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// auto* set = data.second.set;
|
|
||||||
|
|
||||||
out << "constant ";
|
|
||||||
// TODO(dsinclair): Can you have a uniform array? If so, this needs to be
|
|
||||||
// updated to handle arrays property.
|
|
||||||
if (!EmitType(out, var->Type()->UnwrapRef(), "")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
out << "& " << program_->Symbols().NameFor(var->Declaration()->symbol)
|
|
||||||
<< " [[buffer(" << binding->value << ")]]";
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto data : func_sem->ReferencedStorageBufferVariables()) {
|
|
||||||
if (!first) {
|
|
||||||
out << ", ";
|
|
||||||
}
|
|
||||||
first = false;
|
|
||||||
|
|
||||||
auto* var = data.first;
|
|
||||||
// TODO(dsinclair): We're using the binding to make up the buffer number
|
|
||||||
// but we should instead be using a provided mapping that uses both buffer
|
|
||||||
// and set. https://bugs.chromium.org/p/tint/issues/detail?id=104
|
|
||||||
auto* binding = data.second.binding;
|
|
||||||
// auto* set = data.second.set;
|
|
||||||
|
|
||||||
if (var->Access() == ast::Access::kRead) {
|
|
||||||
out << "const ";
|
|
||||||
}
|
|
||||||
|
|
||||||
out << "device ";
|
|
||||||
if (!EmitType(out, var->Type()->UnwrapRef(), "")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
out << "& " << program_->Symbols().NameFor(var->Declaration()->symbol)
|
|
||||||
<< " [[buffer(" << binding->value << ")]]";
|
|
||||||
}
|
|
||||||
|
|
||||||
out << ") {";
|
out << ") {";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2199,6 +2101,9 @@ bool GeneratorImpl::EmitType(std::ostream& out,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (auto* ptr = type->As<sem::Pointer>()) {
|
if (auto* ptr = type->As<sem::Pointer>()) {
|
||||||
|
if (ptr->Access() == ast::Access::kRead) {
|
||||||
|
out << "const ";
|
||||||
|
}
|
||||||
if (!EmitStorageClass(out, ptr->StorageClass())) {
|
if (!EmitStorageClass(out, ptr->StorageClass())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -335,7 +335,7 @@ TEST_F(MslGeneratorImplTest,
|
||||||
ast::Access::kReadWrite,
|
ast::Access::kReadWrite,
|
||||||
ast::DecorationList{
|
ast::DecorationList{
|
||||||
create<ast::BindingDecoration>(0),
|
create<ast::BindingDecoration>(0),
|
||||||
create<ast::GroupDecoration>(1),
|
create<ast::GroupDecoration>(0),
|
||||||
});
|
});
|
||||||
|
|
||||||
auto* var = Var("v", ty.f32(), ast::StorageClass::kNone,
|
auto* var = Var("v", ty.f32(), ast::StorageClass::kNone,
|
||||||
|
@ -350,7 +350,7 @@ TEST_F(MslGeneratorImplTest,
|
||||||
Stage(ast::PipelineStage::kFragment),
|
Stage(ast::PipelineStage::kFragment),
|
||||||
});
|
});
|
||||||
|
|
||||||
GeneratorImpl& gen = Build();
|
GeneratorImpl& gen = SanitizeAndBuild();
|
||||||
|
|
||||||
ASSERT_TRUE(gen.Generate()) << gen.error();
|
ASSERT_TRUE(gen.Generate()) << gen.error();
|
||||||
EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
|
EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
|
||||||
|
@ -361,8 +361,8 @@ struct Data {
|
||||||
/* 0x0004 */ float b;
|
/* 0x0004 */ float b;
|
||||||
};
|
};
|
||||||
|
|
||||||
fragment void frag_main(device Data& coord [[buffer(0)]]) {
|
fragment void frag_main(device Data* tint_symbol [[buffer(0)]]) {
|
||||||
float v = coord.b;
|
float v = (*(tint_symbol)).b;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,7 +381,7 @@ TEST_F(MslGeneratorImplTest,
|
||||||
Global("coord", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
|
Global("coord", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
|
||||||
ast::DecorationList{
|
ast::DecorationList{
|
||||||
create<ast::BindingDecoration>(0),
|
create<ast::BindingDecoration>(0),
|
||||||
create<ast::GroupDecoration>(1),
|
create<ast::GroupDecoration>(0),
|
||||||
});
|
});
|
||||||
|
|
||||||
auto* var = Var("v", ty.f32(), ast::StorageClass::kNone,
|
auto* var = Var("v", ty.f32(), ast::StorageClass::kNone,
|
||||||
|
@ -396,7 +396,7 @@ TEST_F(MslGeneratorImplTest,
|
||||||
Stage(ast::PipelineStage::kFragment),
|
Stage(ast::PipelineStage::kFragment),
|
||||||
});
|
});
|
||||||
|
|
||||||
GeneratorImpl& gen = Build();
|
GeneratorImpl& gen = SanitizeAndBuild();
|
||||||
|
|
||||||
ASSERT_TRUE(gen.Generate()) << gen.error();
|
ASSERT_TRUE(gen.Generate()) << gen.error();
|
||||||
EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
|
EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
|
||||||
|
@ -407,8 +407,8 @@ struct Data {
|
||||||
/* 0x0004 */ float b;
|
/* 0x0004 */ float b;
|
||||||
};
|
};
|
||||||
|
|
||||||
fragment void frag_main(const device Data& coord [[buffer(0)]]) {
|
fragment void frag_main(const device Data* tint_symbol [[buffer(0)]]) {
|
||||||
float v = coord.b;
|
float v = (*(tint_symbol)).b;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -422,7 +422,7 @@ TEST_F(MslGeneratorImplTest,
|
||||||
auto* ubo = Global("ubo", ty.Of(ubo_ty), ast::StorageClass::kUniform,
|
auto* ubo = Global("ubo", ty.Of(ubo_ty), ast::StorageClass::kUniform,
|
||||||
ast::DecorationList{
|
ast::DecorationList{
|
||||||
create<ast::BindingDecoration>(0),
|
create<ast::BindingDecoration>(0),
|
||||||
create<ast::GroupDecoration>(1),
|
create<ast::GroupDecoration>(0),
|
||||||
});
|
});
|
||||||
|
|
||||||
Func("sub_func",
|
Func("sub_func",
|
||||||
|
@ -446,7 +446,7 @@ TEST_F(MslGeneratorImplTest,
|
||||||
Stage(ast::PipelineStage::kFragment),
|
Stage(ast::PipelineStage::kFragment),
|
||||||
});
|
});
|
||||||
|
|
||||||
GeneratorImpl& gen = Build();
|
GeneratorImpl& gen = SanitizeAndBuild();
|
||||||
|
|
||||||
ASSERT_TRUE(gen.Generate()) << gen.error();
|
ASSERT_TRUE(gen.Generate()) << gen.error();
|
||||||
EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
|
EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
|
||||||
|
@ -456,12 +456,12 @@ struct UBO {
|
||||||
/* 0x0000 */ float4 coord;
|
/* 0x0000 */ float4 coord;
|
||||||
};
|
};
|
||||||
|
|
||||||
float sub_func(constant UBO& ubo, float param) {
|
float sub_func(float param, const constant UBO* const tint_symbol) {
|
||||||
return ubo.coord[0];
|
return (*(tint_symbol)).coord[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void frag_main(constant UBO& ubo [[buffer(0)]]) {
|
fragment void frag_main(const constant UBO* tint_symbol_1 [[buffer(0)]]) {
|
||||||
float v = sub_func(ubo, 1.0f);
|
float v = sub_func(1.0f, tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@ TEST_F(MslGeneratorImplTest,
|
||||||
ast::Access::kReadWrite,
|
ast::Access::kReadWrite,
|
||||||
ast::DecorationList{
|
ast::DecorationList{
|
||||||
create<ast::BindingDecoration>(0),
|
create<ast::BindingDecoration>(0),
|
||||||
create<ast::GroupDecoration>(1),
|
create<ast::GroupDecoration>(0),
|
||||||
});
|
});
|
||||||
|
|
||||||
ast::VariableList params;
|
ast::VariableList params;
|
||||||
|
@ -503,7 +503,7 @@ TEST_F(MslGeneratorImplTest,
|
||||||
Stage(ast::PipelineStage::kFragment),
|
Stage(ast::PipelineStage::kFragment),
|
||||||
});
|
});
|
||||||
|
|
||||||
GeneratorImpl& gen = Build();
|
GeneratorImpl& gen = SanitizeAndBuild();
|
||||||
|
|
||||||
ASSERT_TRUE(gen.Generate()) << gen.error();
|
ASSERT_TRUE(gen.Generate()) << gen.error();
|
||||||
EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
|
EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
|
||||||
|
@ -514,12 +514,12 @@ struct Data {
|
||||||
/* 0x0004 */ float b;
|
/* 0x0004 */ float b;
|
||||||
};
|
};
|
||||||
|
|
||||||
float sub_func(device Data& coord, float param) {
|
float sub_func(float param, device Data* const tint_symbol) {
|
||||||
return coord.b;
|
return (*(tint_symbol)).b;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void frag_main(device Data& coord [[buffer(0)]]) {
|
fragment void frag_main(device Data* tint_symbol_1 [[buffer(0)]]) {
|
||||||
float v = sub_func(coord, 1.0f);
|
float v = sub_func(1.0f, tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -538,7 +538,7 @@ TEST_F(MslGeneratorImplTest,
|
||||||
Global("coord", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
|
Global("coord", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
|
||||||
ast::DecorationList{
|
ast::DecorationList{
|
||||||
create<ast::BindingDecoration>(0),
|
create<ast::BindingDecoration>(0),
|
||||||
create<ast::GroupDecoration>(1),
|
create<ast::GroupDecoration>(0),
|
||||||
});
|
});
|
||||||
|
|
||||||
ast::VariableList params;
|
ast::VariableList params;
|
||||||
|
@ -560,7 +560,7 @@ TEST_F(MslGeneratorImplTest,
|
||||||
Stage(ast::PipelineStage::kFragment),
|
Stage(ast::PipelineStage::kFragment),
|
||||||
});
|
});
|
||||||
|
|
||||||
GeneratorImpl& gen = Build();
|
GeneratorImpl& gen = SanitizeAndBuild();
|
||||||
|
|
||||||
ASSERT_TRUE(gen.Generate()) << gen.error();
|
ASSERT_TRUE(gen.Generate()) << gen.error();
|
||||||
EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
|
EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
|
||||||
|
@ -571,12 +571,12 @@ struct Data {
|
||||||
/* 0x0004 */ float b;
|
/* 0x0004 */ float b;
|
||||||
};
|
};
|
||||||
|
|
||||||
float sub_func(const device Data& coord, float param) {
|
float sub_func(float param, const device Data* const tint_symbol) {
|
||||||
return coord.b;
|
return (*(tint_symbol)).b;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void frag_main(const device Data& coord [[buffer(0)]]) {
|
fragment void frag_main(const device Data* tint_symbol_1 [[buffer(0)]]) {
|
||||||
float v = sub_func(coord, 1.0f);
|
float v = sub_func(1.0f, tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -691,7 +691,7 @@ TEST_F(MslGeneratorImplTest,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
GeneratorImpl& gen = Build();
|
GeneratorImpl& gen = SanitizeAndBuild();
|
||||||
|
|
||||||
ASSERT_TRUE(gen.Generate()) << gen.error();
|
ASSERT_TRUE(gen.Generate()) << gen.error();
|
||||||
EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
|
EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
|
||||||
|
@ -701,13 +701,13 @@ struct Data {
|
||||||
/* 0x0000 */ float d;
|
/* 0x0000 */ float d;
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void a(device Data& data [[buffer(0)]]) {
|
kernel void a(device Data* tint_symbol [[buffer(0)]]) {
|
||||||
float v = data.d;
|
float v = (*(tint_symbol)).d;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void b(device Data& data [[buffer(0)]]) {
|
kernel void b(device Data* tint_symbol_1 [[buffer(0)]]) {
|
||||||
float v = data.d;
|
float v = (*(tint_symbol_1)).d;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,8 @@ void comp_main_inner(uint local_invocation_index, threadgroup float2x2* const ti
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void comp_main(threadgroup tint_symbol_3* tint_symbol_2 [[threadgroup(0)]], uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
kernel void comp_main(threadgroup tint_symbol_3* tint_symbol_2 [[threadgroup(0)]], uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
||||||
comp_main_inner(local_invocation_index, &((*(tint_symbol_2)).m));
|
threadgroup float2x2* const tint_symbol_1 = &((*(tint_symbol_2)).m);
|
||||||
|
comp_main_inner(local_invocation_index, tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +197,8 @@ void comp_main_inner(uint local_invocation_index, threadgroup tint_array_wrapper
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void comp_main(threadgroup tint_symbol_3* tint_symbol_2 [[threadgroup(0)]], uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
kernel void comp_main(threadgroup tint_symbol_3* tint_symbol_2 [[threadgroup(0)]], uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
||||||
comp_main_inner(local_invocation_index, &((*(tint_symbol_2)).m));
|
threadgroup tint_array_wrapper* const tint_symbol_1 = &((*(tint_symbol_2)).m);
|
||||||
|
comp_main_inner(local_invocation_index, tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +250,8 @@ void comp_main_inner(uint local_invocation_index, threadgroup S2* const tint_sym
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void comp_main(threadgroup tint_symbol_4* tint_symbol_3 [[threadgroup(0)]], uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
kernel void comp_main(threadgroup tint_symbol_4* tint_symbol_3 [[threadgroup(0)]], uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
||||||
comp_main_inner(local_invocation_index, &((*(tint_symbol_3)).s));
|
threadgroup S2* const tint_symbol_2 = &((*(tint_symbol_3)).s);
|
||||||
|
comp_main_inner(local_invocation_index, tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +333,10 @@ void main1_inner(uint local_invocation_index, threadgroup float2x2* const tint_s
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void main1(threadgroup tint_symbol_7* tint_symbol_4 [[threadgroup(0)]], uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
kernel void main1(threadgroup tint_symbol_7* tint_symbol_4 [[threadgroup(0)]], uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
||||||
main1_inner(local_invocation_index, &((*(tint_symbol_4)).m1), &((*(tint_symbol_4)).m2), &((*(tint_symbol_4)).m3));
|
threadgroup float2x2* const tint_symbol_3 = &((*(tint_symbol_4)).m1);
|
||||||
|
threadgroup float2x3* const tint_symbol_5 = &((*(tint_symbol_4)).m2);
|
||||||
|
threadgroup float2x4* const tint_symbol_6 = &((*(tint_symbol_4)).m3);
|
||||||
|
main1_inner(local_invocation_index, tint_symbol_3, tint_symbol_5, tint_symbol_6);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,7 +353,10 @@ void main2_inner(uint local_invocation_index_1, threadgroup float3x2* const tint
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void main2(threadgroup tint_symbol_15* tint_symbol_12 [[threadgroup(0)]], uint local_invocation_index_1 [[thread_index_in_threadgroup]]) {
|
kernel void main2(threadgroup tint_symbol_15* tint_symbol_12 [[threadgroup(0)]], uint local_invocation_index_1 [[thread_index_in_threadgroup]]) {
|
||||||
main2_inner(local_invocation_index_1, &((*(tint_symbol_12)).m4), &((*(tint_symbol_12)).m5), &((*(tint_symbol_12)).m6));
|
threadgroup float3x2* const tint_symbol_11 = &((*(tint_symbol_12)).m4);
|
||||||
|
threadgroup float3x3* const tint_symbol_13 = &((*(tint_symbol_12)).m5);
|
||||||
|
threadgroup float3x4* const tint_symbol_14 = &((*(tint_symbol_12)).m6);
|
||||||
|
main2_inner(local_invocation_index_1, tint_symbol_11, tint_symbol_13, tint_symbol_14);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,7 +373,10 @@ void main3_inner(uint local_invocation_index_2, threadgroup float4x2* const tint
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void main3(threadgroup tint_symbol_23* tint_symbol_20 [[threadgroup(0)]], uint local_invocation_index_2 [[thread_index_in_threadgroup]]) {
|
kernel void main3(threadgroup tint_symbol_23* tint_symbol_20 [[threadgroup(0)]], uint local_invocation_index_2 [[thread_index_in_threadgroup]]) {
|
||||||
main3_inner(local_invocation_index_2, &((*(tint_symbol_20)).m7), &((*(tint_symbol_20)).m8), &((*(tint_symbol_20)).m9));
|
threadgroup float4x2* const tint_symbol_19 = &((*(tint_symbol_20)).m7);
|
||||||
|
threadgroup float4x3* const tint_symbol_21 = &((*(tint_symbol_20)).m8);
|
||||||
|
threadgroup float4x4* const tint_symbol_22 = &((*(tint_symbol_20)).m9);
|
||||||
|
main3_inner(local_invocation_index_2, tint_symbol_19, tint_symbol_21, tint_symbol_22);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ TEST_F(MslGeneratorImplTest, EmitType_ArrayWithStride) {
|
||||||
{create<ast::StructBlockDecoration>()});
|
{create<ast::StructBlockDecoration>()});
|
||||||
auto* ubo = Global("ubo", ty.Of(s), ast::StorageClass::kUniform,
|
auto* ubo = Global("ubo", ty.Of(s), ast::StorageClass::kUniform,
|
||||||
ast::DecorationList{
|
ast::DecorationList{
|
||||||
create<ast::GroupDecoration>(1),
|
create<ast::GroupDecoration>(0),
|
||||||
create<ast::BindingDecoration>(1),
|
create<ast::BindingDecoration>(1),
|
||||||
});
|
});
|
||||||
WrapInFunction(MemberAccessor(ubo, "arr"));
|
WrapInFunction(MemberAccessor(ubo, "arr"));
|
||||||
|
|
|
@ -31,7 +31,7 @@ S ret_struct_arr() {
|
||||||
return tint_symbol_1;
|
return tint_symbol_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void foo(constant S& src_uniform, device S& src_storage, tint_array_wrapper src_param, thread tint_array_wrapper* const tint_symbol_3, threadgroup tint_array_wrapper* const tint_symbol_4) {
|
void foo(tint_array_wrapper src_param, thread tint_array_wrapper* const tint_symbol_3, threadgroup tint_array_wrapper* const tint_symbol_4, const constant S* const tint_symbol_5, device S* const tint_symbol_6) {
|
||||||
tint_array_wrapper src_function = {};
|
tint_array_wrapper src_function = {};
|
||||||
tint_array_wrapper dst = {};
|
tint_array_wrapper dst = {};
|
||||||
tint_array_wrapper const tint_symbol_2 = {.arr={{.el=1}, {.el=2}, {.el=3}, {.el=3}}};
|
tint_array_wrapper const tint_symbol_2 = {.arr={{.el=1}, {.el=2}, {.el=3}, {.el=3}}};
|
||||||
|
@ -44,8 +44,8 @@ void foo(constant S& src_uniform, device S& src_storage, tint_array_wrapper src_
|
||||||
dst = *(tint_symbol_3);
|
dst = *(tint_symbol_3);
|
||||||
dst = *(tint_symbol_4);
|
dst = *(tint_symbol_4);
|
||||||
dst = ret_struct_arr().arr;
|
dst = ret_struct_arr().arr;
|
||||||
dst = src_uniform.arr;
|
dst = (*(tint_symbol_5)).arr;
|
||||||
dst = src_storage.arr;
|
dst = (*(tint_symbol_6)).arr;
|
||||||
tint_array_wrapper_1 dst_nested = {};
|
tint_array_wrapper_1 dst_nested = {};
|
||||||
tint_array_wrapper_1 src_nested = {};
|
tint_array_wrapper_1 src_nested = {};
|
||||||
dst_nested = src_nested;
|
dst_nested = src_nested;
|
||||||
|
|
|
@ -31,7 +31,7 @@ S ret_struct_arr() {
|
||||||
return tint_symbol_1;
|
return tint_symbol_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void foo(constant S& src_uniform, device S& src_storage, tint_array_wrapper src_param, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, threadgroup tint_array_wrapper* const tint_symbol_5, thread tint_array_wrapper_1* const tint_symbol_6) {
|
void foo(tint_array_wrapper src_param, thread tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, threadgroup tint_array_wrapper* const tint_symbol_5, const constant S* const tint_symbol_6, device S* const tint_symbol_7, thread tint_array_wrapper_1* const tint_symbol_8) {
|
||||||
tint_array_wrapper src_function = {};
|
tint_array_wrapper src_function = {};
|
||||||
tint_array_wrapper const tint_symbol_2 = {.arr={{.el=1}, {.el=2}, {.el=3}, {.el=3}}};
|
tint_array_wrapper const tint_symbol_2 = {.arr={{.el=1}, {.el=2}, {.el=3}, {.el=3}}};
|
||||||
*(tint_symbol_3) = tint_symbol_2;
|
*(tint_symbol_3) = tint_symbol_2;
|
||||||
|
@ -43,9 +43,9 @@ void foo(constant S& src_uniform, device S& src_storage, tint_array_wrapper src_
|
||||||
*(tint_symbol_3) = *(tint_symbol_4);
|
*(tint_symbol_3) = *(tint_symbol_4);
|
||||||
*(tint_symbol_3) = *(tint_symbol_5);
|
*(tint_symbol_3) = *(tint_symbol_5);
|
||||||
*(tint_symbol_3) = ret_struct_arr().arr;
|
*(tint_symbol_3) = ret_struct_arr().arr;
|
||||||
*(tint_symbol_3) = src_uniform.arr;
|
*(tint_symbol_3) = (*(tint_symbol_6)).arr;
|
||||||
*(tint_symbol_3) = src_storage.arr;
|
*(tint_symbol_3) = (*(tint_symbol_7)).arr;
|
||||||
tint_array_wrapper_1 src_nested = {};
|
tint_array_wrapper_1 src_nested = {};
|
||||||
*(tint_symbol_6) = src_nested;
|
*(tint_symbol_8) = src_nested;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,21 +34,21 @@ S ret_struct_arr() {
|
||||||
return tint_symbol_1;
|
return tint_symbol_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void foo(constant S& src_uniform, device S& dst, device S& src_storage, device S_nested& dst_nested, tint_array_wrapper src_param, thread tint_array_wrapper* const tint_symbol_3, threadgroup tint_array_wrapper* const tint_symbol_4) {
|
void foo(tint_array_wrapper src_param, device S* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, threadgroup tint_array_wrapper* const tint_symbol_5, const constant S* const tint_symbol_6, device S* const tint_symbol_7, device S_nested* const tint_symbol_8) {
|
||||||
tint_array_wrapper src_function = {};
|
tint_array_wrapper src_function = {};
|
||||||
tint_array_wrapper const tint_symbol_2 = {.arr={{.el=1}, {.el=2}, {.el=3}, {.el=3}}};
|
tint_array_wrapper const tint_symbol_2 = {.arr={{.el=1}, {.el=2}, {.el=3}, {.el=3}}};
|
||||||
dst.arr = tint_symbol_2;
|
(*(tint_symbol_3)).arr = tint_symbol_2;
|
||||||
dst.arr = src_param;
|
(*(tint_symbol_3)).arr = src_param;
|
||||||
dst.arr = ret_arr();
|
(*(tint_symbol_3)).arr = ret_arr();
|
||||||
tint_array_wrapper const src_let = {.arr={}};
|
tint_array_wrapper const src_let = {.arr={}};
|
||||||
dst.arr = src_let;
|
(*(tint_symbol_3)).arr = src_let;
|
||||||
dst.arr = src_function;
|
(*(tint_symbol_3)).arr = src_function;
|
||||||
dst.arr = *(tint_symbol_3);
|
(*(tint_symbol_3)).arr = *(tint_symbol_4);
|
||||||
dst.arr = *(tint_symbol_4);
|
(*(tint_symbol_3)).arr = *(tint_symbol_5);
|
||||||
dst.arr = ret_struct_arr().arr;
|
(*(tint_symbol_3)).arr = ret_struct_arr().arr;
|
||||||
dst.arr = src_uniform.arr;
|
(*(tint_symbol_3)).arr = (*(tint_symbol_6)).arr;
|
||||||
dst.arr = src_storage.arr;
|
(*(tint_symbol_3)).arr = (*(tint_symbol_7)).arr;
|
||||||
tint_array_wrapper_1 src_nested = {};
|
tint_array_wrapper_1 src_nested = {};
|
||||||
dst_nested.arr = src_nested;
|
(*(tint_symbol_8)).arr = src_nested;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ S ret_struct_arr() {
|
||||||
return tint_symbol_1;
|
return tint_symbol_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void foo(constant S& src_uniform, device S& src_storage, tint_array_wrapper src_param, threadgroup tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, threadgroup tint_array_wrapper* const tint_symbol_5, threadgroup tint_array_wrapper_1* const tint_symbol_6) {
|
void foo(tint_array_wrapper src_param, threadgroup tint_array_wrapper* const tint_symbol_3, thread tint_array_wrapper* const tint_symbol_4, threadgroup tint_array_wrapper* const tint_symbol_5, const constant S* const tint_symbol_6, device S* const tint_symbol_7, threadgroup tint_array_wrapper_1* const tint_symbol_8) {
|
||||||
tint_array_wrapper src_function = {};
|
tint_array_wrapper src_function = {};
|
||||||
tint_array_wrapper const tint_symbol_2 = {.arr={{.el=1}, {.el=2}, {.el=3}, {.el=3}}};
|
tint_array_wrapper const tint_symbol_2 = {.arr={{.el=1}, {.el=2}, {.el=3}, {.el=3}}};
|
||||||
*(tint_symbol_3) = tint_symbol_2;
|
*(tint_symbol_3) = tint_symbol_2;
|
||||||
|
@ -43,9 +43,9 @@ void foo(constant S& src_uniform, device S& src_storage, tint_array_wrapper src_
|
||||||
*(tint_symbol_3) = *(tint_symbol_4);
|
*(tint_symbol_3) = *(tint_symbol_4);
|
||||||
*(tint_symbol_3) = *(tint_symbol_5);
|
*(tint_symbol_3) = *(tint_symbol_5);
|
||||||
*(tint_symbol_3) = ret_struct_arr().arr;
|
*(tint_symbol_3) = ret_struct_arr().arr;
|
||||||
*(tint_symbol_3) = src_uniform.arr;
|
*(tint_symbol_3) = (*(tint_symbol_6)).arr;
|
||||||
*(tint_symbol_3) = src_storage.arr;
|
*(tint_symbol_3) = (*(tint_symbol_7)).arr;
|
||||||
tint_array_wrapper_1 src_nested = {};
|
tint_array_wrapper_1 src_nested = {};
|
||||||
*(tint_symbol_6) = src_nested;
|
*(tint_symbol_8) = src_nested;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,20 +31,20 @@ struct S {
|
||||||
/* 0x0000 */ Inner arr[1];
|
/* 0x0000 */ Inner arr[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
void tint_symbol_inner(const device S& s, uint idx) {
|
void tint_symbol_inner(uint idx, const device S* const tint_symbol_1) {
|
||||||
int3 const a = s.arr[idx].a;
|
int3 const a = (*(tint_symbol_1)).arr[idx].a;
|
||||||
int const b = s.arr[idx].b;
|
int const b = (*(tint_symbol_1)).arr[idx].b;
|
||||||
uint3 const c = s.arr[idx].c;
|
uint3 const c = (*(tint_symbol_1)).arr[idx].c;
|
||||||
uint const d = s.arr[idx].d;
|
uint const d = (*(tint_symbol_1)).arr[idx].d;
|
||||||
float3 const e = s.arr[idx].e;
|
float3 const e = (*(tint_symbol_1)).arr[idx].e;
|
||||||
float const f = s.arr[idx].f;
|
float const f = (*(tint_symbol_1)).arr[idx].f;
|
||||||
float2x3 const g = s.arr[idx].g;
|
float2x3 const g = (*(tint_symbol_1)).arr[idx].g;
|
||||||
float3x2 const h = s.arr[idx].h;
|
float3x2 const h = (*(tint_symbol_1)).arr[idx].h;
|
||||||
tint_array_wrapper const i = s.arr[idx].i;
|
tint_array_wrapper const i = (*(tint_symbol_1)).arr[idx].i;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], const device S& s [[buffer(0)]]) {
|
kernel void tint_symbol(const device S* tint_symbol_2 [[buffer(0)]], uint idx [[thread_index_in_threadgroup]]) {
|
||||||
tint_symbol_inner(s, idx);
|
tint_symbol_inner(idx, tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,21 +31,21 @@ struct S {
|
||||||
/* 0x0000 */ Inner arr[1];
|
/* 0x0000 */ Inner arr[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
void tint_symbol_inner(device S& s, uint idx) {
|
void tint_symbol_inner(uint idx, device S* const tint_symbol_2) {
|
||||||
s.arr[idx].a = int3();
|
(*(tint_symbol_2)).arr[idx].a = int3();
|
||||||
s.arr[idx].b = int();
|
(*(tint_symbol_2)).arr[idx].b = int();
|
||||||
s.arr[idx].c = uint3();
|
(*(tint_symbol_2)).arr[idx].c = uint3();
|
||||||
s.arr[idx].d = uint();
|
(*(tint_symbol_2)).arr[idx].d = uint();
|
||||||
s.arr[idx].e = float3();
|
(*(tint_symbol_2)).arr[idx].e = float3();
|
||||||
s.arr[idx].f = float();
|
(*(tint_symbol_2)).arr[idx].f = float();
|
||||||
s.arr[idx].g = float2x3();
|
(*(tint_symbol_2)).arr[idx].g = float2x3();
|
||||||
s.arr[idx].h = float3x2();
|
(*(tint_symbol_2)).arr[idx].h = float3x2();
|
||||||
tint_array_wrapper const tint_symbol_1 = {.arr={}};
|
tint_array_wrapper const tint_symbol_1 = {.arr={}};
|
||||||
s.arr[idx].i = tint_symbol_1;
|
(*(tint_symbol_2)).arr[idx].i = tint_symbol_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S& s [[buffer(0)]]) {
|
kernel void tint_symbol(device S* tint_symbol_3 [[buffer(0)]], uint idx [[thread_index_in_threadgroup]]) {
|
||||||
tint_symbol_inner(s, idx);
|
tint_symbol_inner(idx, tint_symbol_3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,17 +36,17 @@ struct S {
|
||||||
/* 0x00ac */ int8_t tint_pad_1[4];
|
/* 0x00ac */ int8_t tint_pad_1[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void tint_symbol(const device S& s [[buffer(0)]]) {
|
kernel void tint_symbol(const device S* tint_symbol_1 [[buffer(0)]]) {
|
||||||
int3 const a = s.a;
|
int3 const a = (*(tint_symbol_1)).a;
|
||||||
int const b = s.b;
|
int const b = (*(tint_symbol_1)).b;
|
||||||
uint3 const c = s.c;
|
uint3 const c = (*(tint_symbol_1)).c;
|
||||||
uint const d = s.d;
|
uint const d = (*(tint_symbol_1)).d;
|
||||||
float3 const e = s.e;
|
float3 const e = (*(tint_symbol_1)).e;
|
||||||
float const f = s.f;
|
float const f = (*(tint_symbol_1)).f;
|
||||||
float2x3 const g = s.g;
|
float2x3 const g = (*(tint_symbol_1)).g;
|
||||||
float3x2 const h = s.h;
|
float3x2 const h = (*(tint_symbol_1)).h;
|
||||||
Inner const i = s.i;
|
Inner const i = (*(tint_symbol_1)).i;
|
||||||
tint_array_wrapper const j = s.j;
|
tint_array_wrapper const j = (*(tint_symbol_1)).j;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,19 +36,19 @@ struct S {
|
||||||
/* 0x00ac */ int8_t tint_pad_1[4];
|
/* 0x00ac */ int8_t tint_pad_1[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void tint_symbol(device S& s [[buffer(0)]]) {
|
kernel void tint_symbol(device S* tint_symbol_3 [[buffer(0)]]) {
|
||||||
s.a = int3();
|
(*(tint_symbol_3)).a = int3();
|
||||||
s.b = int();
|
(*(tint_symbol_3)).b = int();
|
||||||
s.c = uint3();
|
(*(tint_symbol_3)).c = uint3();
|
||||||
s.d = uint();
|
(*(tint_symbol_3)).d = uint();
|
||||||
s.e = float3();
|
(*(tint_symbol_3)).e = float3();
|
||||||
s.f = float();
|
(*(tint_symbol_3)).f = float();
|
||||||
s.g = float2x3();
|
(*(tint_symbol_3)).g = float2x3();
|
||||||
s.h = float3x2();
|
(*(tint_symbol_3)).h = float3x2();
|
||||||
Inner const tint_symbol_1 = {};
|
Inner const tint_symbol_1 = {};
|
||||||
s.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={}};
|
||||||
s.j = tint_symbol_2;
|
(*(tint_symbol_3)).j = tint_symbol_2;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,20 +36,20 @@ struct S {
|
||||||
/* 0x0000 */ tint_array_wrapper_1 arr;
|
/* 0x0000 */ tint_array_wrapper_1 arr;
|
||||||
};
|
};
|
||||||
|
|
||||||
void tint_symbol_inner(constant S& s, uint idx) {
|
void tint_symbol_inner(uint idx, const constant S* const tint_symbol_1) {
|
||||||
int3 const a = s.arr.arr[idx].a;
|
int3 const a = (*(tint_symbol_1)).arr.arr[idx].a;
|
||||||
int const b = s.arr.arr[idx].b;
|
int const b = (*(tint_symbol_1)).arr.arr[idx].b;
|
||||||
uint3 const c = s.arr.arr[idx].c;
|
uint3 const c = (*(tint_symbol_1)).arr.arr[idx].c;
|
||||||
uint const d = s.arr.arr[idx].d;
|
uint const d = (*(tint_symbol_1)).arr.arr[idx].d;
|
||||||
float3 const e = s.arr.arr[idx].e;
|
float3 const e = (*(tint_symbol_1)).arr.arr[idx].e;
|
||||||
float const f = s.arr.arr[idx].f;
|
float const f = (*(tint_symbol_1)).arr.arr[idx].f;
|
||||||
int2 const g = s.arr.arr[idx].g;
|
int2 const g = (*(tint_symbol_1)).arr.arr[idx].g;
|
||||||
int2 const h = s.arr.arr[idx].h;
|
int2 const h = (*(tint_symbol_1)).arr.arr[idx].h;
|
||||||
float2x3 const i = s.arr.arr[idx].i;
|
float2x3 const i = (*(tint_symbol_1)).arr.arr[idx].i;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], constant S& s [[buffer(0)]]) {
|
kernel void tint_symbol(const constant S* tint_symbol_2 [[buffer(0)]], uint idx [[thread_index_in_threadgroup]]) {
|
||||||
tint_symbol_inner(s, idx);
|
tint_symbol_inner(idx, tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,19 +39,19 @@ struct S {
|
||||||
/* 0x0090 */ tint_array_wrapper l;
|
/* 0x0090 */ tint_array_wrapper l;
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void tint_symbol(constant S& s [[buffer(0)]]) {
|
kernel void tint_symbol(const constant S* tint_symbol_1 [[buffer(0)]]) {
|
||||||
int3 const a = s.a;
|
int3 const a = (*(tint_symbol_1)).a;
|
||||||
int const b = s.b;
|
int const b = (*(tint_symbol_1)).b;
|
||||||
uint3 const c = s.c;
|
uint3 const c = (*(tint_symbol_1)).c;
|
||||||
uint const d = s.d;
|
uint const d = (*(tint_symbol_1)).d;
|
||||||
float3 const e = s.e;
|
float3 const e = (*(tint_symbol_1)).e;
|
||||||
float const f = s.f;
|
float const f = (*(tint_symbol_1)).f;
|
||||||
int2 const g = s.g;
|
int2 const g = (*(tint_symbol_1)).g;
|
||||||
int2 const h = s.h;
|
int2 const h = (*(tint_symbol_1)).h;
|
||||||
float2x3 const i = s.i;
|
float2x3 const i = (*(tint_symbol_1)).i;
|
||||||
float3x2 const j = s.j;
|
float3x2 const j = (*(tint_symbol_1)).j;
|
||||||
Inner const k = s.k;
|
Inner const k = (*(tint_symbol_1)).k;
|
||||||
tint_array_wrapper const l = s.l;
|
tint_array_wrapper const l = (*(tint_symbol_1)).l;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,38 +23,38 @@ struct tint_symbol_3 {
|
||||||
float4 value [[color(0)]];
|
float4 value [[color(0)]];
|
||||||
};
|
};
|
||||||
|
|
||||||
VertexOutputs vs_main_inner(constant Uniforms& uniforms, uint VertexIndex) {
|
VertexOutputs vs_main_inner(uint VertexIndex, const constant Uniforms* const tint_symbol_4) {
|
||||||
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, 1.0f)), 0.0f, 1.0f);
|
||||||
bool flipY = (uniforms.u_scale[1] < 0.0f);
|
bool flipY = ((*(tint_symbol_4)).u_scale[1] < 0.0f);
|
||||||
if (flipY) {
|
if (flipY) {
|
||||||
output.texcoords = ((((texcoord.arr[VertexIndex] * uniforms.u_scale) + uniforms.u_offset) * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f));
|
output.texcoords = ((((texcoord.arr[VertexIndex] * (*(tint_symbol_4)).u_scale) + (*(tint_symbol_4)).u_offset) * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f));
|
||||||
} else {
|
} else {
|
||||||
output.texcoords = ((((texcoord.arr[VertexIndex] * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f)) * uniforms.u_scale) + uniforms.u_offset);
|
output.texcoords = ((((texcoord.arr[VertexIndex] * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f)) * (*(tint_symbol_4)).u_scale) + (*(tint_symbol_4)).u_offset);
|
||||||
}
|
}
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
vertex tint_symbol vs_main(uint VertexIndex [[vertex_id]], constant Uniforms& uniforms [[buffer(0)]]) {
|
vertex tint_symbol vs_main(const constant Uniforms* tint_symbol_5 [[buffer(0)]], uint VertexIndex [[vertex_id]]) {
|
||||||
VertexOutputs const inner_result = vs_main_inner(uniforms, VertexIndex);
|
VertexOutputs const inner_result = vs_main_inner(VertexIndex, tint_symbol_5);
|
||||||
tint_symbol wrapper_result = {};
|
tint_symbol wrapper_result = {};
|
||||||
wrapper_result.texcoords = inner_result.texcoords;
|
wrapper_result.texcoords = inner_result.texcoords;
|
||||||
wrapper_result.position = inner_result.position;
|
wrapper_result.position = inner_result.position;
|
||||||
return wrapper_result;
|
return wrapper_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 fs_main_inner(float2 texcoord, texture2d<float, access::sample> tint_symbol_4, sampler tint_symbol_5) {
|
float4 fs_main_inner(float2 texcoord, texture2d<float, access::sample> tint_symbol_6, sampler tint_symbol_7) {
|
||||||
float2 clampedTexcoord = clamp(texcoord, float2(0.0f, 0.0f), float2(1.0f, 1.0f));
|
float2 clampedTexcoord = clamp(texcoord, float2(0.0f, 0.0f), float2(1.0f, 1.0f));
|
||||||
if (!(all((clampedTexcoord == texcoord)))) {
|
if (!(all((clampedTexcoord == texcoord)))) {
|
||||||
discard_fragment();
|
discard_fragment();
|
||||||
}
|
}
|
||||||
float4 srcColor = tint_symbol_4.sample(tint_symbol_5, texcoord);
|
float4 srcColor = tint_symbol_6.sample(tint_symbol_7, texcoord);
|
||||||
return srcColor;
|
return srcColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment tint_symbol_3 fs_main(texture2d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(0)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
|
fragment tint_symbol_3 fs_main(texture2d<float, access::sample> tint_symbol_8 [[texture(0)]], sampler tint_symbol_9 [[sampler(0)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
|
||||||
float4 const inner_result_1 = fs_main_inner(tint_symbol_1.texcoord, tint_symbol_6, tint_symbol_7);
|
float4 const inner_result_1 = fs_main_inner(tint_symbol_1.texcoord, tint_symbol_8, tint_symbol_9);
|
||||||
tint_symbol_3 wrapper_result_1 = {};
|
tint_symbol_3 wrapper_result_1 = {};
|
||||||
wrapper_result_1.value = inner_result_1;
|
wrapper_result_1.value = inner_result_1;
|
||||||
return wrapper_result_1;
|
return wrapper_result_1;
|
||||||
|
|
|
@ -14,9 +14,9 @@ struct Result {
|
||||||
/* 0x0000 */ int out;
|
/* 0x0000 */ int out;
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void f(constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) {
|
kernel void f(device Result* tint_symbol [[buffer(1)]], const constant UBO* tint_symbol_1 [[buffer(0)]]) {
|
||||||
S s = {};
|
S s = {};
|
||||||
result.out = s.data.arr[ubo.dynamic_idx];
|
(*(tint_symbol)).out = s.data.arr[(*(tint_symbol_1)).dynamic_idx];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ struct Result {
|
||||||
/* 0x0000 */ int out;
|
/* 0x0000 */ int out;
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void f(constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) {
|
kernel void f(device Result* tint_symbol [[buffer(1)]], const constant UBO* tint_symbol_2 [[buffer(0)]]) {
|
||||||
thread S tint_symbol = {};
|
thread S tint_symbol_1 = {};
|
||||||
result.out = tint_symbol.data.arr[ubo.dynamic_idx];
|
(*(tint_symbol)).out = tint_symbol_1.data.arr[(*(tint_symbol_2)).dynamic_idx];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ struct SSBO {
|
||||||
/* 0x0000 */ tint_array_wrapper data;
|
/* 0x0000 */ tint_array_wrapper data;
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void f(constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]], device SSBO& ssbo [[buffer(2)]]) {
|
kernel void f(device Result* tint_symbol [[buffer(1)]], device SSBO* tint_symbol_1 [[buffer(2)]], const constant UBO* tint_symbol_2 [[buffer(0)]]) {
|
||||||
result.out = ssbo.data.arr[ubo.dynamic_idx];
|
(*(tint_symbol)).out = (*(tint_symbol_1)).data.arr[(*(tint_symbol_2)).dynamic_idx];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@ struct Result {
|
||||||
/* 0x0000 */ int out;
|
/* 0x0000 */ int out;
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void f(constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) {
|
kernel void f(device Result* tint_symbol [[buffer(1)]], const constant UBO* tint_symbol_1 [[buffer(0)]]) {
|
||||||
result.out = ubo.data.arr[ubo.dynamic_idx].el;
|
(*(tint_symbol)).out = (*(tint_symbol_1)).data.arr[(*(tint_symbol_1)).dynamic_idx].el;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,18 +14,18 @@ struct Result {
|
||||||
/* 0x0000 */ int out;
|
/* 0x0000 */ int out;
|
||||||
};
|
};
|
||||||
|
|
||||||
void f_inner(constant UBO& ubo, device Result& result, uint local_invocation_index, threadgroup S* const tint_symbol) {
|
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] = int();
|
||||||
}
|
}
|
||||||
threadgroup_barrier(mem_flags::mem_threadgroup);
|
threadgroup_barrier(mem_flags::mem_threadgroup);
|
||||||
result.out = (*(tint_symbol)).data.arr[ubo.dynamic_idx];
|
(*(tint_symbol_1)).out = (*(tint_symbol)).data.arr[(*(tint_symbol_2)).dynamic_idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void f(uint local_invocation_index [[thread_index_in_threadgroup]], constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) {
|
kernel void f(device Result* tint_symbol_4 [[buffer(1)]], const constant UBO* tint_symbol_5 [[buffer(0)]], uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
||||||
threadgroup S tint_symbol_1;
|
threadgroup S tint_symbol_3;
|
||||||
f_inner(ubo, result, local_invocation_index, &(tint_symbol_1));
|
f_inner(local_invocation_index, &(tint_symbol_3), tint_symbol_4, tint_symbol_5);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,10 @@ struct Result {
|
||||||
/* 0x0000 */ int out;
|
/* 0x0000 */ int out;
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void f(constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) {
|
kernel void f(const constant UBO* tint_symbol [[buffer(0)]], device Result* tint_symbol_1 [[buffer(1)]]) {
|
||||||
S s = {};
|
S s = {};
|
||||||
s.data.arr[ubo.dynamic_idx] = 1;
|
s.data.arr[(*(tint_symbol)).dynamic_idx] = 1;
|
||||||
result.out = s.data.arr[3];
|
(*(tint_symbol_1)).out = s.data.arr[3];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,14 +14,14 @@ struct Result {
|
||||||
/* 0x0000 */ int out;
|
/* 0x0000 */ int out;
|
||||||
};
|
};
|
||||||
|
|
||||||
void x(constant UBO& ubo, thread S* const p) {
|
void x(thread S* const p, const constant UBO* const tint_symbol) {
|
||||||
(*(p)).data.arr[ubo.dynamic_idx] = 1;
|
(*(p)).data.arr[(*(tint_symbol)).dynamic_idx] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void f(constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) {
|
kernel void f(const constant UBO* tint_symbol_1 [[buffer(0)]], device Result* tint_symbol_2 [[buffer(1)]]) {
|
||||||
S s = {};
|
S s = {};
|
||||||
x(ubo, &(s));
|
x(&(s), tint_symbol_1);
|
||||||
result.out = s.data.arr[3];
|
(*(tint_symbol_2)).out = s.data.arr[3];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,10 @@ struct Result {
|
||||||
/* 0x0000 */ int out;
|
/* 0x0000 */ int out;
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void f(constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) {
|
kernel void f(const constant UBO* tint_symbol_1 [[buffer(0)]], device Result* tint_symbol_2 [[buffer(1)]]) {
|
||||||
thread S tint_symbol = {};
|
thread S tint_symbol = {};
|
||||||
tint_symbol.data.arr[ubo.dynamic_idx] = 1;
|
tint_symbol.data.arr[(*(tint_symbol_1)).dynamic_idx] = 1;
|
||||||
result.out = tint_symbol.data.arr[3];
|
(*(tint_symbol_2)).out = tint_symbol.data.arr[3];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,14 +14,14 @@ struct Result {
|
||||||
/* 0x0000 */ int out;
|
/* 0x0000 */ int out;
|
||||||
};
|
};
|
||||||
|
|
||||||
void x(constant UBO& ubo, thread S* const p) {
|
void x(thread S* const p, const constant UBO* const tint_symbol) {
|
||||||
(*(p)).data.arr[ubo.dynamic_idx] = 1;
|
(*(p)).data.arr[(*(tint_symbol)).dynamic_idx] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void f(constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) {
|
kernel void f(const constant UBO* tint_symbol_2 [[buffer(0)]], device Result* tint_symbol_3 [[buffer(1)]]) {
|
||||||
thread S tint_symbol = {};
|
thread S tint_symbol_1 = {};
|
||||||
x(ubo, &(tint_symbol));
|
x(&(tint_symbol_1), tint_symbol_2);
|
||||||
result.out = tint_symbol.data.arr[3];
|
(*(tint_symbol_3)).out = tint_symbol_1.data.arr[3];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ struct SSBO {
|
||||||
/* 0x0000 */ tint_array_wrapper data;
|
/* 0x0000 */ tint_array_wrapper data;
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void f(constant UBO& ubo [[buffer(0)]], device SSBO& ssbo [[buffer(1)]], device Result& result [[buffer(2)]]) {
|
kernel void f(device SSBO* tint_symbol [[buffer(1)]], const constant UBO* tint_symbol_1 [[buffer(0)]], device Result* tint_symbol_2 [[buffer(2)]]) {
|
||||||
ssbo.data.arr[ubo.dynamic_idx] = 1;
|
(*(tint_symbol)).data.arr[(*(tint_symbol_1)).dynamic_idx] = 1;
|
||||||
result.out = ssbo.data.arr[3];
|
(*(tint_symbol_2)).out = (*(tint_symbol)).data.arr[3];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,19 +14,19 @@ struct Result {
|
||||||
/* 0x0000 */ int out;
|
/* 0x0000 */ int out;
|
||||||
};
|
};
|
||||||
|
|
||||||
void f_inner(constant UBO& ubo, device Result& result, uint local_invocation_index, threadgroup S* const tint_symbol) {
|
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] = int();
|
||||||
}
|
}
|
||||||
threadgroup_barrier(mem_flags::mem_threadgroup);
|
threadgroup_barrier(mem_flags::mem_threadgroup);
|
||||||
(*(tint_symbol)).data.arr[ubo.dynamic_idx] = 1;
|
(*(tint_symbol)).data.arr[(*(tint_symbol_1)).dynamic_idx] = 1;
|
||||||
result.out = (*(tint_symbol)).data.arr[3];
|
(*(tint_symbol_2)).out = (*(tint_symbol)).data.arr[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void f(uint local_invocation_index [[thread_index_in_threadgroup]], constant UBO& ubo [[buffer(0)]], device Result& result [[buffer(1)]]) {
|
kernel void f(const constant UBO* tint_symbol_4 [[buffer(0)]], device Result* tint_symbol_5 [[buffer(1)]], uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
||||||
threadgroup S tint_symbol_1;
|
threadgroup S tint_symbol_3;
|
||||||
f_inner(ubo, result, local_invocation_index, &(tint_symbol_1));
|
f_inner(local_invocation_index, &(tint_symbol_3), tint_symbol_4, tint_symbol_5);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
using namespace metal;
|
using namespace metal;
|
||||||
struct PointLight {
|
struct PointLight {
|
||||||
/* 0x0000 */ float4 position;
|
float4 position;
|
||||||
};
|
};
|
||||||
struct PointLights {
|
struct PointLights {
|
||||||
/* 0x0000 */ PointLight values[1];
|
PointLight values[1];
|
||||||
};
|
};
|
||||||
struct Uniforms {
|
struct Uniforms {
|
||||||
/* 0x0000 */ float4x4 worldView;
|
/* 0x0000 */ float4x4 worldView;
|
||||||
|
@ -35,20 +35,20 @@ struct tint_symbol_4 {
|
||||||
float4 color [[color(0)]];
|
float4 color [[color(0)]];
|
||||||
};
|
};
|
||||||
|
|
||||||
float4 getColor(constant Uniforms& uniforms, FragmentInput tint_symbol, texture2d<float, access::sample> tint_symbol_6, sampler tint_symbol_7) {
|
float4 getColor(FragmentInput tint_symbol, const constant Uniforms* const tint_symbol_6, texture2d<float, access::sample> tint_symbol_7, sampler tint_symbol_8) {
|
||||||
float4 color = 0.0f;
|
float4 color = 0.0f;
|
||||||
if ((uniforms.color_source == 0u)) {
|
if (((*(tint_symbol_6)).color_source == 0u)) {
|
||||||
color = tint_symbol.color;
|
color = tint_symbol.color;
|
||||||
} else {
|
} else {
|
||||||
if ((uniforms.color_source == 1u)) {
|
if (((*(tint_symbol_6)).color_source == 1u)) {
|
||||||
color = tint_symbol.normal;
|
color = tint_symbol.normal;
|
||||||
color[3] = 1.0f;
|
color[3] = 1.0f;
|
||||||
} else {
|
} else {
|
||||||
if ((uniforms.color_source == 2u)) {
|
if (((*(tint_symbol_6)).color_source == 2u)) {
|
||||||
color = uniforms.color;
|
color = (*(tint_symbol_6)).color;
|
||||||
} else {
|
} else {
|
||||||
if ((uniforms.color_source == 3u)) {
|
if (((*(tint_symbol_6)).color_source == 3u)) {
|
||||||
color = tint_symbol_6.sample(tint_symbol_7, tint_symbol.uv);
|
color = tint_symbol_7.sample(tint_symbol_8, tint_symbol.uv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,15 +56,15 @@ float4 getColor(constant Uniforms& uniforms, FragmentInput tint_symbol, texture2
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
FragmentOutput tint_symbol_1_inner(FragmentInput tint_symbol, sampler tint_symbol_8, texture2d<float, access::sample> tint_symbol_9) {
|
FragmentOutput tint_symbol_1_inner(FragmentInput tint_symbol) {
|
||||||
FragmentOutput output = {};
|
FragmentOutput output = {};
|
||||||
output.color = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
output.color = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment tint_symbol_4 tint_symbol_1(sampler tint_symbol_10 [[sampler(0)]], texture2d<float, access::sample> tint_symbol_11 [[texture(0)]], float4 position [[position]], tint_symbol_3 tint_symbol_2 [[stage_in]]) {
|
fragment tint_symbol_4 tint_symbol_1(float4 position [[position]], tint_symbol_3 tint_symbol_2 [[stage_in]]) {
|
||||||
FragmentInput const tint_symbol_5 = {.position=position, .view_position=tint_symbol_2.view_position, .normal=tint_symbol_2.normal, .uv=tint_symbol_2.uv, .color=tint_symbol_2.color};
|
FragmentInput const tint_symbol_5 = {.position=position, .view_position=tint_symbol_2.view_position, .normal=tint_symbol_2.normal, .uv=tint_symbol_2.uv, .color=tint_symbol_2.color};
|
||||||
FragmentOutput const inner_result = tint_symbol_1_inner(tint_symbol_5, tint_symbol_10, tint_symbol_11);
|
FragmentOutput const inner_result = tint_symbol_1_inner(tint_symbol_5);
|
||||||
tint_symbol_4 wrapper_result = {};
|
tint_symbol_4 wrapper_result = {};
|
||||||
wrapper_result.color = inner_result.color;
|
wrapper_result.color = inner_result.color;
|
||||||
return wrapper_result;
|
return wrapper_result;
|
||||||
|
|
|
@ -32,7 +32,7 @@ struct tint_symbol_3 {
|
||||||
float4 gl_Position [[position]];
|
float4 gl_Position [[position]];
|
||||||
};
|
};
|
||||||
|
|
||||||
void main_1(constant LeftOver& x_14, thread float3* const tint_symbol_5, thread float4* const tint_symbol_6, thread float2* const tint_symbol_7, thread float2* const tint_symbol_8) {
|
void main_1(thread float3* const tint_symbol_5, const constant LeftOver* const tint_symbol_6, thread float4* const tint_symbol_7, thread float2* const tint_symbol_8, thread float2* const tint_symbol_9) {
|
||||||
float4 q = 0.0f;
|
float4 q = 0.0f;
|
||||||
float3 p = 0.0f;
|
float3 p = 0.0f;
|
||||||
float3 const x_13 = *(tint_symbol_5);
|
float3 const x_13 = *(tint_symbol_5);
|
||||||
|
@ -40,39 +40,39 @@ void main_1(constant LeftOver& x_14, thread float3* const tint_symbol_5, thread
|
||||||
float4 const x_21 = q;
|
float4 const x_21 = q;
|
||||||
p = float3(x_21[0], x_21[1], x_21[2]);
|
p = float3(x_21[0], x_21[1], x_21[2]);
|
||||||
float const x_27 = p[0];
|
float const x_27 = p[0];
|
||||||
float const x_41 = x_14.test.arr[0].el;
|
float const x_41 = (*(tint_symbol_6)).test.arr[0].el;
|
||||||
float const x_45 = (*(tint_symbol_5))[1];
|
float const x_45 = (*(tint_symbol_5))[1];
|
||||||
float const x_49 = x_14.time;
|
float const x_49 = (*(tint_symbol_6)).time;
|
||||||
p[0] = (x_27 + sin(((x_41 * x_45) + x_49)));
|
p[0] = (x_27 + sin(((x_41 * x_45) + x_49)));
|
||||||
float const x_55 = p[1];
|
float const x_55 = p[1];
|
||||||
float const x_57 = x_14.time;
|
float const x_57 = (*(tint_symbol_6)).time;
|
||||||
p[1] = (x_55 + sin((x_57 + 4.0f)));
|
p[1] = (x_55 + sin((x_57 + 4.0f)));
|
||||||
float4x4 const x_69 = x_14.worldViewProjection;
|
float4x4 const x_69 = (*(tint_symbol_6)).worldViewProjection;
|
||||||
float3 const x_70 = p;
|
float3 const x_70 = p;
|
||||||
*(tint_symbol_6) = (x_69 * float4(x_70[0], x_70[1], x_70[2], 1.0f));
|
*(tint_symbol_7) = (x_69 * float4(x_70[0], x_70[1], x_70[2], 1.0f));
|
||||||
float2 const x_83 = *(tint_symbol_7);
|
float2 const x_83 = *(tint_symbol_8);
|
||||||
*(tint_symbol_8) = x_83;
|
*(tint_symbol_9) = x_83;
|
||||||
float const x_87 = (*(tint_symbol_6))[1];
|
float const x_87 = (*(tint_symbol_7))[1];
|
||||||
(*(tint_symbol_6))[1] = (x_87 * -1.0f);
|
(*(tint_symbol_7))[1] = (x_87 * -1.0f);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
main_out tint_symbol_inner(constant LeftOver& x_14, float3 position_param, float2 uv_param, float3 normal_param, thread float3* const tint_symbol_9, thread float2* const tint_symbol_10, thread float3* const tint_symbol_11, thread float4* const tint_symbol_12, thread float2* const tint_symbol_13) {
|
main_out tint_symbol_inner(float3 position_param, float2 uv_param, float3 normal_param, thread float3* const tint_symbol_10, thread float2* const tint_symbol_11, thread float3* const tint_symbol_12, const constant LeftOver* const tint_symbol_13, thread float4* const tint_symbol_14, thread float2* const tint_symbol_15) {
|
||||||
*(tint_symbol_9) = position_param;
|
*(tint_symbol_10) = position_param;
|
||||||
*(tint_symbol_10) = uv_param;
|
*(tint_symbol_11) = uv_param;
|
||||||
*(tint_symbol_11) = normal_param;
|
*(tint_symbol_12) = normal_param;
|
||||||
main_1(x_14, tint_symbol_9, tint_symbol_12, tint_symbol_10, tint_symbol_13);
|
main_1(tint_symbol_10, tint_symbol_13, tint_symbol_14, tint_symbol_11, tint_symbol_15);
|
||||||
main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_12), .vUV_1=*(tint_symbol_13)};
|
main_out const tint_symbol_4 = {.gl_Position=*(tint_symbol_14), .vUV_1=*(tint_symbol_15)};
|
||||||
return tint_symbol_4;
|
return tint_symbol_4;
|
||||||
}
|
}
|
||||||
|
|
||||||
vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_14 [[buffer(0)]]) {
|
vertex tint_symbol_3 tint_symbol(const constant LeftOver* tint_symbol_19 [[buffer(0)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
|
||||||
thread float3 tint_symbol_14 = 0.0f;
|
|
||||||
thread float2 tint_symbol_15 = 0.0f;
|
|
||||||
thread float3 tint_symbol_16 = 0.0f;
|
thread float3 tint_symbol_16 = 0.0f;
|
||||||
thread float4 tint_symbol_17 = 0.0f;
|
thread float2 tint_symbol_17 = 0.0f;
|
||||||
thread float2 tint_symbol_18 = 0.0f;
|
thread float3 tint_symbol_18 = 0.0f;
|
||||||
main_out const inner_result = tint_symbol_inner(x_14, tint_symbol_1.position_param, tint_symbol_1.uv_param, tint_symbol_1.normal_param, &(tint_symbol_14), &(tint_symbol_15), &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18));
|
thread float4 tint_symbol_20 = 0.0f;
|
||||||
|
thread float2 tint_symbol_21 = 0.0f;
|
||||||
|
main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_param, tint_symbol_1.uv_param, tint_symbol_1.normal_param, &(tint_symbol_16), &(tint_symbol_17), &(tint_symbol_18), tint_symbol_19, &(tint_symbol_20), &(tint_symbol_21));
|
||||||
tint_symbol_3 wrapper_result = {};
|
tint_symbol_3 wrapper_result = {};
|
||||||
wrapper_result.gl_Position = inner_result.gl_Position;
|
wrapper_result.gl_Position = inner_result.gl_Position;
|
||||||
wrapper_result.vUV_1 = inner_result.vUV_1;
|
wrapper_result.vUV_1 = inner_result.vUV_1;
|
||||||
|
|
|
@ -52,15 +52,15 @@ struct AI32s {
|
||||||
/* 0x0000 */ atomic_int values[1];
|
/* 0x0000 */ atomic_int values[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
float3 toVoxelPos(constant Uniforms& uniforms, float3 position) {
|
float3 toVoxelPos(float3 position, const constant Uniforms* const tint_symbol) {
|
||||||
float3 bbMin = float3(uniforms.bbMin[0], uniforms.bbMin[1], uniforms.bbMin[2]);
|
float3 bbMin = float3((*(tint_symbol)).bbMin[0], (*(tint_symbol)).bbMin[1], (*(tint_symbol)).bbMin[2]);
|
||||||
float3 bbMax = float3(uniforms.bbMax[0], uniforms.bbMax[1], uniforms.bbMax[2]);
|
float3 bbMax = float3((*(tint_symbol)).bbMax[0], (*(tint_symbol)).bbMax[1], (*(tint_symbol)).bbMax[2]);
|
||||||
float3 bbSize = (bbMax - bbMin);
|
float3 bbSize = (bbMax - bbMin);
|
||||||
float cubeSize = fmax(fmax(bbSize[0], bbSize[1]), bbSize[2]);
|
float cubeSize = fmax(fmax(bbSize[0], bbSize[1]), bbSize[2]);
|
||||||
float gridSize = float(uniforms.gridSize);
|
float gridSize = float((*(tint_symbol)).gridSize);
|
||||||
float gx = ((gridSize * (position[0] - uniforms.bbMin[0])) / cubeSize);
|
float gx = ((gridSize * (position[0] - (*(tint_symbol)).bbMin[0])) / cubeSize);
|
||||||
float gy = ((gridSize * (position[1] - uniforms.bbMin[1])) / cubeSize);
|
float gy = ((gridSize * (position[1] - (*(tint_symbol)).bbMin[1])) / cubeSize);
|
||||||
float gz = ((gridSize * (position[2] - uniforms.bbMin[2])) / cubeSize);
|
float gz = ((gridSize * (position[2] - (*(tint_symbol)).bbMin[2])) / cubeSize);
|
||||||
return float3(gx, gy, gz);
|
return float3(gx, gy, gz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,89 +76,89 @@ uint3 toIndex3D(uint gridSize, uint index) {
|
||||||
return uint3(x_1, y_1, z_1);
|
return uint3(x_1, y_1, z_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
float3 loadPosition(device F32s& positions, uint vertexIndex) {
|
float3 loadPosition(uint vertexIndex, device F32s* const tint_symbol_1) {
|
||||||
float3 position = float3(positions.values[((3u * vertexIndex) + 0u)], positions.values[((3u * vertexIndex) + 1u)], positions.values[((3u * vertexIndex) + 2u)]);
|
float3 position = float3((*(tint_symbol_1)).values[((3u * vertexIndex) + 0u)], (*(tint_symbol_1)).values[((3u * vertexIndex) + 1u)], (*(tint_symbol_1)).values[((3u * vertexIndex) + 2u)]);
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
|
||||||
void doIgnore(constant Uniforms& uniforms, device Dbg& dbg, device AU32s& counters, device U32s& indices, device F32s& positions, device AI32s& LUT) {
|
void doIgnore(const constant Uniforms* const tint_symbol_2, device Dbg* const tint_symbol_3, device AU32s* const tint_symbol_4, device U32s* const tint_symbol_5, device F32s* const tint_symbol_6, device AI32s* const tint_symbol_7) {
|
||||||
uint g42 = uniforms.numTriangles;
|
uint g42 = (*(tint_symbol_2)).numTriangles;
|
||||||
uint kj6 = dbg.value1;
|
uint kj6 = (*(tint_symbol_3)).value1;
|
||||||
uint b53 = atomic_load_explicit(&(counters.values[0]), memory_order_relaxed);
|
uint b53 = atomic_load_explicit(&((*(tint_symbol_4)).values[0]), memory_order_relaxed);
|
||||||
uint rwg = indices.values[0];
|
uint rwg = (*(tint_symbol_5)).values[0];
|
||||||
float rb5 = positions.values[0];
|
float rb5 = (*(tint_symbol_6)).values[0];
|
||||||
int g55 = atomic_load_explicit(&(LUT.values[0]), memory_order_relaxed);
|
int g55 = atomic_load_explicit(&((*(tint_symbol_7)).values[0]), memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
void main_count_inner(constant Uniforms& uniforms, device Dbg& dbg, device AU32s& counters, device U32s& indices, device F32s& positions, device AI32s& LUT, uint3 GlobalInvocationID) {
|
void main_count_inner(uint3 GlobalInvocationID, const constant Uniforms* const tint_symbol_8, device Dbg* const tint_symbol_9, device AU32s* const tint_symbol_10, device U32s* const tint_symbol_11, device F32s* const tint_symbol_12, device AI32s* const tint_symbol_13) {
|
||||||
uint triangleIndex = GlobalInvocationID[0];
|
uint triangleIndex = GlobalInvocationID[0];
|
||||||
if ((triangleIndex >= uniforms.numTriangles)) {
|
if ((triangleIndex >= (*(tint_symbol_8)).numTriangles)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
doIgnore(uniforms, dbg, counters, indices, positions, LUT);
|
doIgnore(tint_symbol_8, tint_symbol_9, tint_symbol_10, tint_symbol_11, tint_symbol_12, tint_symbol_13);
|
||||||
uint i0 = indices.values[((3u * triangleIndex) + 0u)];
|
uint i0 = (*(tint_symbol_11)).values[((3u * triangleIndex) + 0u)];
|
||||||
uint i1 = indices.values[((3u * triangleIndex) + 1u)];
|
uint i1 = (*(tint_symbol_11)).values[((3u * triangleIndex) + 1u)];
|
||||||
uint i2 = indices.values[((3u * triangleIndex) + 2u)];
|
uint i2 = (*(tint_symbol_11)).values[((3u * triangleIndex) + 2u)];
|
||||||
float3 p0 = loadPosition(positions, i0);
|
float3 p0 = loadPosition(i0, tint_symbol_12);
|
||||||
float3 p1 = loadPosition(positions, i1);
|
float3 p1 = loadPosition(i1, tint_symbol_12);
|
||||||
float3 p2 = loadPosition(positions, i2);
|
float3 p2 = loadPosition(i2, tint_symbol_12);
|
||||||
float3 center = (((p0 + p1) + p2) / 3.0f);
|
float3 center = (((p0 + p1) + p2) / 3.0f);
|
||||||
float3 voxelPos = toVoxelPos(uniforms, center);
|
float3 voxelPos = toVoxelPos(center, tint_symbol_8);
|
||||||
uint voxelIndex = toIndex1D(uniforms.gridSize, voxelPos);
|
uint voxelIndex = toIndex1D((*(tint_symbol_8)).gridSize, voxelPos);
|
||||||
uint acefg = atomic_fetch_add_explicit(&(counters.values[voxelIndex]), 1u, memory_order_relaxed);
|
uint acefg = atomic_fetch_add_explicit(&((*(tint_symbol_10)).values[voxelIndex]), 1u, memory_order_relaxed);
|
||||||
if ((triangleIndex == 0u)) {
|
if ((triangleIndex == 0u)) {
|
||||||
dbg.value0 = uniforms.gridSize;
|
(*(tint_symbol_9)).value0 = (*(tint_symbol_8)).gridSize;
|
||||||
dbg.value_f32_0 = center[0];
|
(*(tint_symbol_9)).value_f32_0 = center[0];
|
||||||
dbg.value_f32_1 = center[1];
|
(*(tint_symbol_9)).value_f32_1 = center[1];
|
||||||
dbg.value_f32_2 = center[2];
|
(*(tint_symbol_9)).value_f32_2 = center[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void main_count(uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device Dbg& dbg [[buffer(1)]], device AU32s& counters [[buffer(2)]], device U32s& indices [[buffer(3)]], device F32s& positions [[buffer(4)]], device AI32s& LUT [[buffer(5)]]) {
|
kernel void main_count(const constant Uniforms* tint_symbol_14 [[buffer(0)]], device Dbg* tint_symbol_15 [[buffer(1)]], device AU32s* tint_symbol_16 [[buffer(2)]], device U32s* tint_symbol_17 [[buffer(3)]], device F32s* tint_symbol_18 [[buffer(4)]], device AI32s* tint_symbol_19 [[buffer(5)]], uint3 GlobalInvocationID [[thread_position_in_grid]]) {
|
||||||
main_count_inner(uniforms, dbg, counters, indices, positions, LUT, GlobalInvocationID);
|
main_count_inner(GlobalInvocationID, tint_symbol_14, tint_symbol_15, tint_symbol_16, tint_symbol_17, tint_symbol_18, tint_symbol_19);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void main_create_lut_inner(constant Uniforms& uniforms, device Dbg& dbg, device AU32s& counters, device U32s& indices, device F32s& positions, device AI32s& LUT, uint3 GlobalInvocationID) {
|
void main_create_lut_inner(uint3 GlobalInvocationID, const constant Uniforms* const tint_symbol_20, device Dbg* const tint_symbol_21, device AU32s* const tint_symbol_22, device U32s* const tint_symbol_23, device F32s* const tint_symbol_24, device AI32s* const tint_symbol_25) {
|
||||||
uint voxelIndex = GlobalInvocationID[0];
|
uint voxelIndex = GlobalInvocationID[0];
|
||||||
doIgnore(uniforms, dbg, counters, indices, positions, LUT);
|
doIgnore(tint_symbol_20, tint_symbol_21, tint_symbol_22, tint_symbol_23, tint_symbol_24, tint_symbol_25);
|
||||||
uint maxVoxels = ((uniforms.gridSize * uniforms.gridSize) * uniforms.gridSize);
|
uint maxVoxels = (((*(tint_symbol_20)).gridSize * (*(tint_symbol_20)).gridSize) * (*(tint_symbol_20)).gridSize);
|
||||||
if ((voxelIndex >= maxVoxels)) {
|
if ((voxelIndex >= maxVoxels)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uint numTriangles = atomic_load_explicit(&(counters.values[voxelIndex]), memory_order_relaxed);
|
uint numTriangles = atomic_load_explicit(&((*(tint_symbol_22)).values[voxelIndex]), memory_order_relaxed);
|
||||||
int offset = -1;
|
int offset = -1;
|
||||||
if ((numTriangles > 0u)) {
|
if ((numTriangles > 0u)) {
|
||||||
offset = int(atomic_fetch_add_explicit(&(dbg.offsetCounter), numTriangles, memory_order_relaxed));
|
offset = int(atomic_fetch_add_explicit(&((*(tint_symbol_21)).offsetCounter), numTriangles, memory_order_relaxed));
|
||||||
}
|
}
|
||||||
atomic_store_explicit(&(LUT.values[voxelIndex]), offset, memory_order_relaxed);
|
atomic_store_explicit(&((*(tint_symbol_25)).values[voxelIndex]), offset, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void main_create_lut(uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device Dbg& dbg [[buffer(1)]], device AU32s& counters [[buffer(2)]], device U32s& indices [[buffer(3)]], device F32s& positions [[buffer(4)]], device AI32s& LUT [[buffer(5)]]) {
|
kernel void main_create_lut(const constant Uniforms* tint_symbol_26 [[buffer(0)]], device Dbg* tint_symbol_27 [[buffer(1)]], device AU32s* tint_symbol_28 [[buffer(2)]], device U32s* tint_symbol_29 [[buffer(3)]], device F32s* tint_symbol_30 [[buffer(4)]], device AI32s* tint_symbol_31 [[buffer(5)]], uint3 GlobalInvocationID [[thread_position_in_grid]]) {
|
||||||
main_create_lut_inner(uniforms, dbg, counters, indices, positions, LUT, GlobalInvocationID);
|
main_create_lut_inner(GlobalInvocationID, tint_symbol_26, tint_symbol_27, tint_symbol_28, tint_symbol_29, tint_symbol_30, tint_symbol_31);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void main_sort_triangles_inner(constant Uniforms& uniforms, device Dbg& dbg, device AU32s& counters, device U32s& indices, device F32s& positions, device AI32s& LUT, uint3 GlobalInvocationID) {
|
void main_sort_triangles_inner(uint3 GlobalInvocationID, const constant Uniforms* const tint_symbol_32, device Dbg* const tint_symbol_33, device AU32s* const tint_symbol_34, device U32s* const tint_symbol_35, device F32s* const tint_symbol_36, device AI32s* const tint_symbol_37) {
|
||||||
uint triangleIndex = GlobalInvocationID[0];
|
uint triangleIndex = GlobalInvocationID[0];
|
||||||
doIgnore(uniforms, dbg, counters, indices, positions, LUT);
|
doIgnore(tint_symbol_32, tint_symbol_33, tint_symbol_34, tint_symbol_35, tint_symbol_36, tint_symbol_37);
|
||||||
if ((triangleIndex >= uniforms.numTriangles)) {
|
if ((triangleIndex >= (*(tint_symbol_32)).numTriangles)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uint i0 = indices.values[((3u * triangleIndex) + 0u)];
|
uint i0 = (*(tint_symbol_35)).values[((3u * triangleIndex) + 0u)];
|
||||||
uint i1 = indices.values[((3u * triangleIndex) + 1u)];
|
uint i1 = (*(tint_symbol_35)).values[((3u * triangleIndex) + 1u)];
|
||||||
uint i2 = indices.values[((3u * triangleIndex) + 2u)];
|
uint i2 = (*(tint_symbol_35)).values[((3u * triangleIndex) + 2u)];
|
||||||
float3 p0 = loadPosition(positions, i0);
|
float3 p0 = loadPosition(i0, tint_symbol_36);
|
||||||
float3 p1 = loadPosition(positions, i1);
|
float3 p1 = loadPosition(i1, tint_symbol_36);
|
||||||
float3 p2 = loadPosition(positions, i2);
|
float3 p2 = loadPosition(i2, tint_symbol_36);
|
||||||
float3 center = (((p0 + p1) + p2) / 3.0f);
|
float3 center = (((p0 + p1) + p2) / 3.0f);
|
||||||
float3 voxelPos = toVoxelPos(uniforms, center);
|
float3 voxelPos = toVoxelPos(center, tint_symbol_32);
|
||||||
uint voxelIndex = toIndex1D(uniforms.gridSize, voxelPos);
|
uint voxelIndex = toIndex1D((*(tint_symbol_32)).gridSize, voxelPos);
|
||||||
int triangleOffset = atomic_fetch_add_explicit(&(LUT.values[voxelIndex]), 1, memory_order_relaxed);
|
int triangleOffset = atomic_fetch_add_explicit(&((*(tint_symbol_37)).values[voxelIndex]), 1, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void main_sort_triangles(uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device Dbg& dbg [[buffer(1)]], device AU32s& counters [[buffer(2)]], device U32s& indices [[buffer(3)]], device F32s& positions [[buffer(4)]], device AI32s& LUT [[buffer(5)]]) {
|
kernel void main_sort_triangles(const constant Uniforms* tint_symbol_38 [[buffer(0)]], device Dbg* tint_symbol_39 [[buffer(1)]], device AU32s* tint_symbol_40 [[buffer(2)]], device U32s* tint_symbol_41 [[buffer(3)]], device F32s* tint_symbol_42 [[buffer(4)]], device AI32s* tint_symbol_43 [[buffer(5)]], uint3 GlobalInvocationID [[thread_position_in_grid]]) {
|
||||||
main_sort_triangles_inner(uniforms, dbg, counters, indices, positions, LUT, GlobalInvocationID);
|
main_sort_triangles_inner(GlobalInvocationID, tint_symbol_38, tint_symbol_39, tint_symbol_40, tint_symbol_41, tint_symbol_42, tint_symbol_43);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,22 +52,22 @@ struct tint_array_wrapper_2 {
|
||||||
float4 arr[6];
|
float4 arr[6];
|
||||||
};
|
};
|
||||||
|
|
||||||
void tint_symbol_inner(constant Config& config, constant Uniforms& uniforms, device LightsBuffer& lightsBuffer, device Tiles& tileLightId, uint3 GlobalInvocationID) {
|
void tint_symbol_inner(uint3 GlobalInvocationID, const constant Config* const tint_symbol_1, device LightsBuffer* const tint_symbol_2, const constant Uniforms* const tint_symbol_3, device Tiles* const tint_symbol_4) {
|
||||||
uint index = GlobalInvocationID[0];
|
uint index = GlobalInvocationID[0];
|
||||||
if ((index >= config.numLights)) {
|
if ((index >= (*(tint_symbol_1)).numLights)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lightsBuffer.lights[index].position[1] = ((lightsBuffer.lights[index].position[1] - 0.100000001f) + (0.001f * (float(index) - (64.0f * floor((float(index) / 64.0f))))));
|
(*(tint_symbol_2)).lights[index].position[1] = (((*(tint_symbol_2)).lights[index].position[1] - 0.100000001f) + (0.001f * (float(index) - (64.0f * floor((float(index) / 64.0f))))));
|
||||||
if ((lightsBuffer.lights[index].position[1] < uniforms.min[1])) {
|
if (((*(tint_symbol_2)).lights[index].position[1] < (*(tint_symbol_3)).min[1])) {
|
||||||
lightsBuffer.lights[index].position[1] = uniforms.max[1];
|
(*(tint_symbol_2)).lights[index].position[1] = (*(tint_symbol_3)).max[1];
|
||||||
}
|
}
|
||||||
float4x4 M = uniforms.projectionMatrix;
|
float4x4 M = (*(tint_symbol_3)).projectionMatrix;
|
||||||
float viewNear = (-(M[3][2]) / (-1.0f + M[2][2]));
|
float viewNear = (-(M[3][2]) / (-1.0f + M[2][2]));
|
||||||
float viewFar = (-(M[3][2]) / (1.0f + M[2][2]));
|
float viewFar = (-(M[3][2]) / (1.0f + M[2][2]));
|
||||||
float4 lightPos = lightsBuffer.lights[index].position;
|
float4 lightPos = (*(tint_symbol_2)).lights[index].position;
|
||||||
lightPos = (uniforms.viewMatrix * lightPos);
|
lightPos = ((*(tint_symbol_3)).viewMatrix * lightPos);
|
||||||
lightPos = (lightPos / lightPos[3]);
|
lightPos = (lightPos / lightPos[3]);
|
||||||
float lightRadius = lightsBuffer.lights[index].radius;
|
float lightRadius = (*(tint_symbol_2)).lights[index].radius;
|
||||||
float4 boxMin = (lightPos - float4(float3(lightRadius), 0.0f));
|
float4 boxMin = (lightPos - float4(float3(lightRadius), 0.0f));
|
||||||
float4 boxMax = (lightPos + float4(float3(lightRadius), 0.0f));
|
float4 boxMax = (lightPos + float4(float3(lightRadius), 0.0f));
|
||||||
tint_array_wrapper_2 frustumPlanes = {};
|
tint_array_wrapper_2 frustumPlanes = {};
|
||||||
|
@ -79,8 +79,8 @@ void tint_symbol_inner(constant Config& config, constant Uniforms& uniforms, dev
|
||||||
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 < TILE_COUNT_Y); 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 < TILE_COUNT_X); 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>(TILE_SIZE))), as_type<int>((as_type<uint>(y_1) * as_type<uint>(TILE_SIZE))));
|
||||||
float2 floorCoord = (((2.0f * float2(tilePixel0Idx)) / float4(uniforms.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(uniforms.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 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);
|
||||||
|
@ -110,21 +110,21 @@ void tint_symbol_inner(constant Config& config, constant Uniforms& uniforms, dev
|
||||||
}
|
}
|
||||||
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>(TILE_COUNT_X)))))));
|
||||||
if (((tileId < 0u) || (tileId >= config.numTiles))) {
|
if (((tileId < 0u) || (tileId >= (*(tint_symbol_1)).numTiles))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
uint offset = atomic_fetch_add_explicit(&(tileLightId.data.arr[tileId].count), 1u, memory_order_relaxed);
|
uint offset = atomic_fetch_add_explicit(&((*(tint_symbol_4)).data.arr[tileId].count), 1u, memory_order_relaxed);
|
||||||
if ((offset >= config.numTileLightSlot)) {
|
if ((offset >= (*(tint_symbol_1)).numTileLightSlot)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
tileLightId.data.arr[tileId].lightId.arr[offset] = GlobalInvocationID[0];
|
(*(tint_symbol_4)).data.arr[tileId].lightId.arr[offset] = GlobalInvocationID[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol(uint3 GlobalInvocationID [[thread_position_in_grid]], constant Config& config [[buffer(0)]], constant Uniforms& uniforms [[buffer(1)]], device LightsBuffer& lightsBuffer [[buffer(2)]], device Tiles& tileLightId [[buffer(3)]]) {
|
kernel void tint_symbol(const constant Config* tint_symbol_5 [[buffer(0)]], device LightsBuffer* tint_symbol_6 [[buffer(2)]], const constant Uniforms* tint_symbol_7 [[buffer(1)]], device Tiles* tint_symbol_8 [[buffer(3)]], uint3 GlobalInvocationID [[thread_position_in_grid]]) {
|
||||||
tint_symbol_inner(config, uniforms, lightsBuffer, tileLightId, GlobalInvocationID);
|
tint_symbol_inner(GlobalInvocationID, tint_symbol_5, tint_symbol_6, tint_symbol_7, tint_symbol_8);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ struct Buffer {
|
||||||
/* 0x0000 */ uint data;
|
/* 0x0000 */ uint data;
|
||||||
};
|
};
|
||||||
|
|
||||||
void tint_symbol_1(device Buffer& tint_symbol) {
|
void tint_symbol_1(device Buffer* const tint_symbol_2) {
|
||||||
tint_symbol.data = (tint_symbol.data + 1u);
|
(*(tint_symbol_2)).data = ((*(tint_symbol_2)).data + 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,23 +9,23 @@ struct Buf {
|
||||||
/* 0x0004 */ tint_array_wrapper data;
|
/* 0x0004 */ tint_array_wrapper data;
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void tint_symbol(device Buf& b [[buffer(0)]]) {
|
kernel void tint_symbol(device Buf* tint_symbol_1 [[buffer(0)]]) {
|
||||||
uint i = 0u;
|
uint i = 0u;
|
||||||
while (true) {
|
while (true) {
|
||||||
if ((i >= b.count)) {
|
if ((i >= (*(tint_symbol_1)).count)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
uint const p_save = i;
|
uint const p_save = i;
|
||||||
if (((i % 2u) == 0u)) {
|
if (((i % 2u) == 0u)) {
|
||||||
{
|
{
|
||||||
b.data.arr[p_save] = (b.data.arr[p_save] * 2u);
|
(*(tint_symbol_1)).data.arr[p_save] = ((*(tint_symbol_1)).data.arr[p_save] * 2u);
|
||||||
i = (i + 1u);
|
i = (i + 1u);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
b.data.arr[p_save] = 0u;
|
(*(tint_symbol_1)).data.arr[p_save] = 0u;
|
||||||
{
|
{
|
||||||
b.data.arr[p_save] = (b.data.arr[p_save] * 2u);
|
(*(tint_symbol_1)).data.arr[p_save] = ((*(tint_symbol_1)).data.arr[p_save] * 2u);
|
||||||
i = (i + 1u);
|
i = (i + 1u);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,11 @@
|
||||||
#include <metal_stdlib>
|
#include <metal_stdlib>
|
||||||
|
|
||||||
using namespace metal;
|
using namespace metal;
|
||||||
|
|
||||||
template<typename T, int N, int M>
|
|
||||||
inline auto operator*(matrix<T, N, M> lhs, packed_vec<T, N> rhs) {
|
|
||||||
return lhs * vec<T, N>(rhs);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename T, int N, int M>
|
|
||||||
inline auto operator*(packed_vec<T, M> lhs, matrix<T, N, M> rhs) {
|
|
||||||
return vec<T, M>(lhs) * rhs;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Light {
|
struct Light {
|
||||||
/* 0x0000 */ packed_float3 position;
|
float3 position;
|
||||||
/* 0x000c */ int8_t tint_pad[4];
|
float3 colour;
|
||||||
/* 0x0010 */ packed_float3 colour;
|
|
||||||
/* 0x001c */ int8_t tint_pad_1[4];
|
|
||||||
};
|
};
|
||||||
struct Lights {
|
struct Lights {
|
||||||
/* 0x0000 */ Light light[1];
|
Light light[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
using namespace metal;
|
using namespace metal;
|
||||||
struct S {
|
struct S {
|
||||||
/* 0x0000 */ float2x2 m;
|
float2x2 m;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,10 @@ struct tint_array_wrapper {
|
||||||
float2 arr[3];
|
float2 arr[3];
|
||||||
};
|
};
|
||||||
|
|
||||||
float4 tint_symbol_inner(constant vertexUniformBuffer1& x_20, constant vertexUniformBuffer2& x_26, uint gl_VertexIndex) {
|
float4 tint_symbol_inner(uint gl_VertexIndex, const constant vertexUniformBuffer1* const tint_symbol_3, const constant vertexUniformBuffer2* const tint_symbol_4) {
|
||||||
tint_array_wrapper indexable = {};
|
tint_array_wrapper indexable = {};
|
||||||
float2x2 const x_23 = x_20.transform1;
|
float2x2 const x_23 = (*(tint_symbol_3)).transform1;
|
||||||
float2x2 const x_28 = x_26.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, 1.0f), float2(-1.0f, -1.0f)}};
|
||||||
indexable = tint_symbol_2;
|
indexable = tint_symbol_2;
|
||||||
|
@ -26,8 +26,8 @@ float4 tint_symbol_inner(constant vertexUniformBuffer1& x_20, constant vertexUni
|
||||||
return float4(x_52[0], x_52[1], 0.0f, 1.0f);
|
return float4(x_52[0], x_52[1], 0.0f, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
vertex tint_symbol_1 tint_symbol(uint gl_VertexIndex [[vertex_id]], constant vertexUniformBuffer1& x_20 [[buffer(0)]], constant vertexUniformBuffer2& x_26 [[buffer(1)]]) {
|
vertex tint_symbol_1 tint_symbol(const constant vertexUniformBuffer1* tint_symbol_5 [[buffer(0)]], const constant vertexUniformBuffer2* tint_symbol_6 [[buffer(1)]], uint gl_VertexIndex [[vertex_id]]) {
|
||||||
float4 const inner_result = tint_symbol_inner(x_20, x_26, gl_VertexIndex);
|
float4 const inner_result = tint_symbol_inner(gl_VertexIndex, tint_symbol_5, tint_symbol_6);
|
||||||
tint_symbol_1 wrapper_result = {};
|
tint_symbol_1 wrapper_result = {};
|
||||||
wrapper_result.value = inner_result;
|
wrapper_result.value = inner_result;
|
||||||
return wrapper_result;
|
return wrapper_result;
|
||||||
|
|
|
@ -5,8 +5,8 @@ struct S {
|
||||||
/* 0x0000 */ int a;
|
/* 0x0000 */ int a;
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void tint_symbol(device S& buf [[buffer(0)]]) {
|
kernel void tint_symbol(device S* tint_symbol_1 [[buffer(0)]]) {
|
||||||
buf.a = 12;
|
(*(tint_symbol_1)).a = 12;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,32 +15,32 @@ uint ConvertToFp16FloatValue(float fp32) {
|
||||||
return 1u;
|
return 1u;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tint_symbol_inner(constant Uniforms& uniforms, device OutputBuf& output, uint3 GlobalInvocationID, texture2d<float, access::sample> tint_symbol_1, texture2d<float, access::sample> tint_symbol_2) {
|
void tint_symbol_inner(uint3 GlobalInvocationID, texture2d<float, access::sample> tint_symbol_1, const constant Uniforms* const tint_symbol_2, texture2d<float, access::sample> tint_symbol_3, device OutputBuf* const tint_symbol_4) {
|
||||||
int2 size = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
|
int2 size = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
|
||||||
int2 dstTexCoord = int2(uint3(GlobalInvocationID).xy);
|
int2 dstTexCoord = int2(uint3(GlobalInvocationID).xy);
|
||||||
int2 srcTexCoord = dstTexCoord;
|
int2 srcTexCoord = dstTexCoord;
|
||||||
if ((uniforms.dstTextureFlipY == 1u)) {
|
if (((*(tint_symbol_2)).dstTextureFlipY == 1u)) {
|
||||||
srcTexCoord[1] = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(size[1]) - as_type<uint>(dstTexCoord[1])))) - as_type<uint>(1)));
|
srcTexCoord[1] = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(size[1]) - as_type<uint>(dstTexCoord[1])))) - as_type<uint>(1)));
|
||||||
}
|
}
|
||||||
float4 srcColor = tint_symbol_1.read(uint2(srcTexCoord), 0);
|
float4 srcColor = tint_symbol_1.read(uint2(srcTexCoord), 0);
|
||||||
float4 dstColor = tint_symbol_2.read(uint2(dstTexCoord), 0);
|
float4 dstColor = tint_symbol_3.read(uint2(dstTexCoord), 0);
|
||||||
bool success = true;
|
bool success = true;
|
||||||
uint4 srcColorBits = 0u;
|
uint4 srcColorBits = 0u;
|
||||||
uint4 dstColorBits = uint4(dstColor);
|
uint4 dstColorBits = uint4(dstColor);
|
||||||
for(uint i = 0u; (i < uniforms.channelCount); i = (i + 1u)) {
|
for(uint i = 0u; (i < (*(tint_symbol_2)).channelCount); i = (i + 1u)) {
|
||||||
srcColorBits[i] = ConvertToFp16FloatValue(srcColor[i]);
|
srcColorBits[i] = ConvertToFp16FloatValue(srcColor[i]);
|
||||||
success = (success && (srcColorBits[i] == dstColorBits[i]));
|
success = (success && (srcColorBits[i] == dstColorBits[i]));
|
||||||
}
|
}
|
||||||
uint outputIndex = ((GlobalInvocationID[1] * uint(size[0])) + GlobalInvocationID[0]);
|
uint outputIndex = ((GlobalInvocationID[1] * uint(size[0])) + GlobalInvocationID[0]);
|
||||||
if (success) {
|
if (success) {
|
||||||
output.result[outputIndex] = uint(1);
|
(*(tint_symbol_4)).result[outputIndex] = uint(1);
|
||||||
} else {
|
} else {
|
||||||
output.result[outputIndex] = uint(0);
|
(*(tint_symbol_4)).result[outputIndex] = uint(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], texture2d<float, access::sample> tint_symbol_4 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device OutputBuf& output [[buffer(1)]]) {
|
kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], const constant Uniforms* tint_symbol_6 [[buffer(0)]], texture2d<float, access::sample> tint_symbol_7 [[texture(1)]], device OutputBuf* tint_symbol_8 [[buffer(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]]) {
|
||||||
tint_symbol_inner(uniforms, output, GlobalInvocationID, tint_symbol_3, tint_symbol_4);
|
tint_symbol_inner(GlobalInvocationID, tint_symbol_5, tint_symbol_6, tint_symbol_7, tint_symbol_8);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,22 +10,22 @@ struct Matrix {
|
||||||
/* 0x0000 */ uint numbers[1];
|
/* 0x0000 */ uint numbers[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
void tint_symbol_inner(constant Uniforms& uniforms, const device Matrix& firstMatrix, const device Matrix& secondMatrix, device Matrix& resultMatrix, uint3 global_id) {
|
void tint_symbol_inner(uint3 global_id, const constant Uniforms* const tint_symbol_1, const device Matrix* const tint_symbol_2, const device Matrix* const tint_symbol_3, device Matrix* const tint_symbol_4) {
|
||||||
uint2 const resultCell = uint2(global_id[1], global_id[0]);
|
uint2 const resultCell = uint2(global_id[1], global_id[0]);
|
||||||
uint const dimInner = uniforms.aShape[1];
|
uint const dimInner = (*(tint_symbol_1)).aShape[1];
|
||||||
uint const dimOutter = uniforms.outShape[1];
|
uint const dimOutter = (*(tint_symbol_1)).outShape[1];
|
||||||
uint result = 0u;
|
uint result = 0u;
|
||||||
for(uint i = 0u; (i < dimInner); i = (i + 1u)) {
|
for(uint i = 0u; (i < dimInner); i = (i + 1u)) {
|
||||||
uint const a = (i + (resultCell[0] * dimInner));
|
uint const a = (i + (resultCell[0] * dimInner));
|
||||||
uint const b = (resultCell[1] + (i * dimOutter));
|
uint const b = (resultCell[1] + (i * dimOutter));
|
||||||
result = (result + (firstMatrix.numbers[a] * secondMatrix.numbers[b]));
|
result = (result + ((*(tint_symbol_2)).numbers[a] * (*(tint_symbol_3)).numbers[b]));
|
||||||
}
|
}
|
||||||
uint const index = (resultCell[1] + (resultCell[0] * dimOutter));
|
uint const index = (resultCell[1] + (resultCell[0] * dimOutter));
|
||||||
resultMatrix.numbers[index] = result;
|
(*(tint_symbol_4)).numbers[index] = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol(uint3 global_id [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], const device Matrix& firstMatrix [[buffer(2)]], const device Matrix& secondMatrix [[buffer(3)]], device Matrix& resultMatrix [[buffer(1)]]) {
|
kernel void tint_symbol(const constant Uniforms* tint_symbol_5 [[buffer(0)]], const device Matrix* tint_symbol_6 [[buffer(2)]], const device Matrix* tint_symbol_7 [[buffer(3)]], device Matrix* tint_symbol_8 [[buffer(1)]], uint3 global_id [[thread_position_in_grid]]) {
|
||||||
tint_symbol_inner(uniforms, firstMatrix, secondMatrix, resultMatrix, global_id);
|
tint_symbol_inner(global_id, tint_symbol_5, tint_symbol_6, tint_symbol_7, tint_symbol_8);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -804,7 +804,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_83) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_84, thread float4* const tint_symbol_85, thread float4* const tint_symbol_86) {
|
void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const tint_symbol_85, const constant buf0* const tint_symbol_86, thread float4* const tint_symbol_87) {
|
||||||
float3 color = 0.0f;
|
float3 color = 0.0f;
|
||||||
int i_2 = 0;
|
int i_2 = 0;
|
||||||
float2 uv = 0.0f;
|
float2 uv = 0.0f;
|
||||||
|
@ -871,7 +871,7 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_84,
|
||||||
float2 const x_762 = uv;
|
float2 const x_762 = uv;
|
||||||
uv = float2(0.0f, 0.0f);
|
uv = float2(0.0f, 0.0f);
|
||||||
uv = x_762;
|
uv = x_762;
|
||||||
float2 const x_191 = x_188.resolution;
|
float2 const x_191 = (*(tint_symbol_86)).resolution;
|
||||||
QuicksortObject const x_763 = *(tint_symbol_84);
|
QuicksortObject const x_763 = *(tint_symbol_84);
|
||||||
tint_array_wrapper const tint_symbol_48 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
|
tint_array_wrapper const tint_symbol_48 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
|
||||||
QuicksortObject const tint_symbol_49 = {.numbers=tint_symbol_48};
|
QuicksortObject const tint_symbol_49 = {.numbers=tint_symbol_48};
|
||||||
|
@ -1534,7 +1534,7 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_84,
|
||||||
float const x_929 = uv[0];
|
float const x_929 = uv[0];
|
||||||
uv[0] = 0.0f;
|
uv[0] = 0.0f;
|
||||||
uv[0] = x_929;
|
uv[0] = x_929;
|
||||||
*(tint_symbol_86) = x_330;
|
*(tint_symbol_87) = x_330;
|
||||||
QuicksortObject const x_930 = *(tint_symbol_84);
|
QuicksortObject const x_930 = *(tint_symbol_84);
|
||||||
tint_array_wrapper const tint_symbol_78 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
|
tint_array_wrapper const tint_symbol_78 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
|
||||||
QuicksortObject const tint_symbol_79 = {.numbers=tint_symbol_78};
|
QuicksortObject const tint_symbol_79 = {.numbers=tint_symbol_78};
|
||||||
|
@ -1547,18 +1547,18 @@ void main_1(constant buf0& x_188, thread QuicksortObject* const tint_symbol_84,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
main_out tint_symbol_inner(constant buf0& x_188, float4 gl_FragCoord_param, thread float4* const tint_symbol_87, thread QuicksortObject* const tint_symbol_88, thread float4* const tint_symbol_89) {
|
main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_88, thread QuicksortObject* const tint_symbol_89, const constant buf0* const tint_symbol_90, thread float4* const tint_symbol_91) {
|
||||||
*(tint_symbol_87) = gl_FragCoord_param;
|
*(tint_symbol_88) = gl_FragCoord_param;
|
||||||
main_1(x_188, tint_symbol_88, tint_symbol_87, tint_symbol_89);
|
main_1(tint_symbol_89, tint_symbol_88, tint_symbol_90, tint_symbol_91);
|
||||||
main_out const tint_symbol_80 = {.x_GLF_color_1=*(tint_symbol_89)};
|
main_out const tint_symbol_80 = {.x_GLF_color_1=*(tint_symbol_91)};
|
||||||
return tint_symbol_80;
|
return tint_symbol_80;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_188 [[buffer(0)]]) {
|
fragment tint_symbol_1 tint_symbol(const constant buf0* tint_symbol_94 [[buffer(0)]], float4 gl_FragCoord_param [[position]]) {
|
||||||
thread float4 tint_symbol_90 = 0.0f;
|
|
||||||
thread QuicksortObject tint_symbol_91 = {};
|
|
||||||
thread float4 tint_symbol_92 = 0.0f;
|
thread float4 tint_symbol_92 = 0.0f;
|
||||||
main_out const inner_result = tint_symbol_inner(x_188, gl_FragCoord_param, &(tint_symbol_90), &(tint_symbol_91), &(tint_symbol_92));
|
thread QuicksortObject tint_symbol_93 = {};
|
||||||
|
thread float4 tint_symbol_95 = 0.0f;
|
||||||
|
main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_92), &(tint_symbol_93), tint_symbol_94, &(tint_symbol_95));
|
||||||
tint_symbol_1 wrapper_result = {};
|
tint_symbol_1 wrapper_result = {};
|
||||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||||
return wrapper_result;
|
return wrapper_result;
|
||||||
|
|
|
@ -2,23 +2,23 @@
|
||||||
|
|
||||||
using namespace metal;
|
using namespace metal;
|
||||||
struct Constants {
|
struct Constants {
|
||||||
/* 0x0000 */ int level;
|
int level;
|
||||||
};
|
};
|
||||||
struct Result {
|
struct Result {
|
||||||
/* 0x0000 */ float values[1];
|
/* 0x0000 */ float values[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
void tint_symbol_inner(device Result& result, uint3 GlobalInvocationID, texture2d_array<float, access::sample> tint_symbol_1) {
|
void tint_symbol_inner(uint3 GlobalInvocationID, texture2d_array<float, access::sample> tint_symbol_1, device Result* const tint_symbol_2) {
|
||||||
uint flatIndex = ((((2u * 2u) * GlobalInvocationID[2]) + (2u * GlobalInvocationID[1])) + GlobalInvocationID[0]);
|
uint flatIndex = ((((2u * 2u) * GlobalInvocationID[2]) + (2u * GlobalInvocationID[1])) + GlobalInvocationID[0]);
|
||||||
flatIndex = (flatIndex * 1u);
|
flatIndex = (flatIndex * 1u);
|
||||||
float4 texel = tint_symbol_1.read(uint2(int2(uint3(GlobalInvocationID).xy)), 0, 0);
|
float4 texel = tint_symbol_1.read(uint2(int2(uint3(GlobalInvocationID).xy)), 0, 0);
|
||||||
for(uint i = 0u; (i < 1u); i = (i + 1u)) {
|
for(uint i = 0u; (i < 1u); i = (i + 1u)) {
|
||||||
result.values[(flatIndex + i)] = texel[0];
|
(*(tint_symbol_2)).values[(flatIndex + i)] = texel[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], uint3 GlobalInvocationID [[thread_position_in_grid]], device Result& result [[buffer(0)]]) {
|
kernel void tint_symbol(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]], device Result* tint_symbol_4 [[buffer(0)]], uint3 GlobalInvocationID [[thread_position_in_grid]]) {
|
||||||
tint_symbol_inner(result, GlobalInvocationID, tint_symbol_2);
|
tint_symbol_inner(GlobalInvocationID, tint_symbol_3, tint_symbol_4);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,12 @@ struct Result {
|
||||||
};
|
};
|
||||||
|
|
||||||
constant uint width = 128u;
|
constant uint width = 128u;
|
||||||
void tint_symbol_inner(device Result& result, uint3 GlobalInvocationId, depth2d<float, access::sample> tint_symbol_1) {
|
void tint_symbol_inner(uint3 GlobalInvocationId, device Result* const tint_symbol_1, depth2d<float, access::sample> tint_symbol_2) {
|
||||||
result.values[((GlobalInvocationId[1] * width) + GlobalInvocationId[0])] = tint_symbol_1.read(uint2(int2(int(GlobalInvocationId[0]), int(GlobalInvocationId[1]))), 0);
|
(*(tint_symbol_1)).values[((GlobalInvocationId[1] * width) + GlobalInvocationId[0])] = tint_symbol_2.read(uint2(int2(int(GlobalInvocationId[0]), int(GlobalInvocationId[1]))), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], uint3 GlobalInvocationId [[thread_position_in_grid]], device Result& result [[buffer(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]]) {
|
||||||
tint_symbol_inner(result, GlobalInvocationId, tint_symbol_2);
|
tint_symbol_inner(GlobalInvocationId, tint_symbol_3, tint_symbol_4);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ struct x_B4_BuildInformation {
|
||||||
/* 0x0000 */ sspp962805860buildInformationS passthru;
|
/* 0x0000 */ sspp962805860buildInformationS passthru;
|
||||||
};
|
};
|
||||||
|
|
||||||
void main_1(const device x_B4_BuildInformation& sspp962805860buildInformation) {
|
void main_1(const device x_B4_BuildInformation* const tint_symbol_1) {
|
||||||
tint_array_wrapper orientation = {};
|
tint_array_wrapper orientation = {};
|
||||||
tint_array_wrapper const x_23 = sspp962805860buildInformation.passthru.orientation;
|
tint_array_wrapper const x_23 = (*(tint_symbol_1)).passthru.orientation;
|
||||||
orientation.arr[0] = x_23.arr[0u];
|
orientation.arr[0] = x_23.arr[0u];
|
||||||
orientation.arr[1] = x_23.arr[1u];
|
orientation.arr[1] = x_23.arr[1u];
|
||||||
orientation.arr[2] = x_23.arr[2u];
|
orientation.arr[2] = x_23.arr[2u];
|
||||||
|
@ -26,8 +26,8 @@ void main_1(const device x_B4_BuildInformation& sspp962805860buildInformation) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void tint_symbol(const device x_B4_BuildInformation& sspp962805860buildInformation [[buffer(0)]]) {
|
fragment void tint_symbol(const device x_B4_BuildInformation* tint_symbol_2 [[buffer(0)]]) {
|
||||||
main_1(sspp962805860buildInformation);
|
main_1(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,22 +16,22 @@ bool aboutEqual(float value, float expect) {
|
||||||
return (fabs((value - expect)) < 0.001f);
|
return (fabs((value - expect)) < 0.001f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tint_symbol_inner(constant Uniforms& uniforms, device OutputBuf& output, uint3 GlobalInvocationID, texture2d<float, access::sample> tint_symbol_1, texture2d<float, access::sample> tint_symbol_2) {
|
void tint_symbol_inner(uint3 GlobalInvocationID, texture2d<float, access::sample> tint_symbol_1, texture2d<float, access::sample> tint_symbol_2, const constant Uniforms* const tint_symbol_3, device OutputBuf* const tint_symbol_4) {
|
||||||
int2 const srcSize = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
|
int2 const srcSize = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
|
||||||
int2 const dstSize = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
|
int2 const dstSize = int2(tint_symbol_2.get_width(), tint_symbol_2.get_height());
|
||||||
uint2 const dstTexCoord = uint2(uint3(GlobalInvocationID).xy);
|
uint2 const dstTexCoord = uint2(uint3(GlobalInvocationID).xy);
|
||||||
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] < uniforms.dstCopyOrigin[0]) || (dstTexCoord[1] < uniforms.dstCopyOrigin[1])) || (dstTexCoord[0] >= (uniforms.dstCopyOrigin[0] + uniforms.copySize[0]))) || (dstTexCoord[1] >= (uniforms.dstCopyOrigin[1] + uniforms.copySize[1])))) {
|
if (((((dstTexCoord[0] < (*(tint_symbol_3)).dstCopyOrigin[0]) || (dstTexCoord[1] < (*(tint_symbol_3)).dstCopyOrigin[1])) || (dstTexCoord[0] >= ((*(tint_symbol_3)).dstCopyOrigin[0] + (*(tint_symbol_3)).copySize[0]))) || (dstTexCoord[1] >= ((*(tint_symbol_3)).dstCopyOrigin[1] + (*(tint_symbol_3)).copySize[1])))) {
|
||||||
success = (success && all((tint_symbol_2.read(uint2(int2(dstTexCoord)), 0) == nonCoveredColor)));
|
success = (success && all((tint_symbol_2.read(uint2(int2(dstTexCoord)), 0) == nonCoveredColor)));
|
||||||
} else {
|
} else {
|
||||||
uint2 srcTexCoord = ((dstTexCoord - uniforms.dstCopyOrigin) + uniforms.srcCopyOrigin);
|
uint2 srcTexCoord = ((dstTexCoord - (*(tint_symbol_3)).dstCopyOrigin) + (*(tint_symbol_3)).srcCopyOrigin);
|
||||||
if ((uniforms.dstTextureFlipY == 1u)) {
|
if (((*(tint_symbol_3)).dstTextureFlipY == 1u)) {
|
||||||
srcTexCoord[1] = ((uint(srcSize[1]) - srcTexCoord[1]) - 1u);
|
srcTexCoord[1] = ((uint(srcSize[1]) - srcTexCoord[1]) - 1u);
|
||||||
}
|
}
|
||||||
float4 const srcColor = tint_symbol_1.read(uint2(int2(srcTexCoord)), 0);
|
float4 const srcColor = tint_symbol_1.read(uint2(int2(srcTexCoord)), 0);
|
||||||
float4 const dstColor = tint_symbol_2.read(uint2(int2(dstTexCoord)), 0);
|
float4 const dstColor = tint_symbol_2.read(uint2(int2(dstTexCoord)), 0);
|
||||||
if ((uniforms.channelCount == 2u)) {
|
if (((*(tint_symbol_3)).channelCount == 2u)) {
|
||||||
success = ((success && aboutEqual(dstColor[0], srcColor[0])) && aboutEqual(dstColor[1], srcColor[1]));
|
success = ((success && aboutEqual(dstColor[0], srcColor[0])) && aboutEqual(dstColor[1], srcColor[1]));
|
||||||
} else {
|
} else {
|
||||||
success = ((((success && aboutEqual(dstColor[0], srcColor[0])) && aboutEqual(dstColor[1], srcColor[1])) && aboutEqual(dstColor[2], srcColor[2])) && aboutEqual(dstColor[3], srcColor[3]));
|
success = ((((success && aboutEqual(dstColor[0], srcColor[0])) && aboutEqual(dstColor[1], srcColor[1])) && aboutEqual(dstColor[2], srcColor[2])) && aboutEqual(dstColor[3], srcColor[3]));
|
||||||
|
@ -39,14 +39,14 @@ void tint_symbol_inner(constant Uniforms& uniforms, device OutputBuf& output, ui
|
||||||
}
|
}
|
||||||
uint const outputIndex = ((GlobalInvocationID[1] * uint(dstSize[0])) + GlobalInvocationID[0]);
|
uint const outputIndex = ((GlobalInvocationID[1] * uint(dstSize[0])) + GlobalInvocationID[0]);
|
||||||
if (success) {
|
if (success) {
|
||||||
output.result[outputIndex] = 1u;
|
(*(tint_symbol_4)).result[outputIndex] = 1u;
|
||||||
} else {
|
} else {
|
||||||
output.result[outputIndex] = 0u;
|
(*(tint_symbol_4)).result[outputIndex] = 0u;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]], texture2d<float, access::sample> tint_symbol_4 [[texture(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]], constant Uniforms& uniforms [[buffer(0)]], device OutputBuf& output [[buffer(1)]]) {
|
kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], texture2d<float, access::sample> tint_symbol_6 [[texture(1)]], const constant Uniforms* tint_symbol_7 [[buffer(0)]], device OutputBuf* tint_symbol_8 [[buffer(1)]], uint3 GlobalInvocationID [[thread_position_in_grid]]) {
|
||||||
tint_symbol_inner(uniforms, output, GlobalInvocationID, tint_symbol_3, tint_symbol_4);
|
tint_symbol_inner(GlobalInvocationID, tint_symbol_5, tint_symbol_6, tint_symbol_7, tint_symbol_8);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,42 +27,42 @@ constant uint ColPerThread = 4u;
|
||||||
constant uint TileAOuter = 64u;
|
constant uint TileAOuter = 64u;
|
||||||
constant uint TileBOuter = 64u;
|
constant uint TileBOuter = 64u;
|
||||||
constant uint TileInner = 64u;
|
constant uint TileInner = 64u;
|
||||||
float mm_readA(constant Uniforms& uniforms, const device Matrix& firstMatrix, uint row, uint col) {
|
float mm_readA(uint row, uint col, const constant Uniforms* const tint_symbol_1, const device Matrix* const tint_symbol_2) {
|
||||||
if (((row < uniforms.dimAOuter) && (col < uniforms.dimInner))) {
|
if (((row < (*(tint_symbol_1)).dimAOuter) && (col < (*(tint_symbol_1)).dimInner))) {
|
||||||
float const result = firstMatrix.numbers[((row * uniforms.dimInner) + col)];
|
float const result = (*(tint_symbol_2)).numbers[((row * (*(tint_symbol_1)).dimInner) + col)];
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
float mm_readB(constant Uniforms& uniforms, const device Matrix& secondMatrix, uint row, uint col) {
|
float mm_readB(uint row, uint col, const constant Uniforms* const tint_symbol_3, const device Matrix* const tint_symbol_4) {
|
||||||
if (((row < uniforms.dimInner) && (col < uniforms.dimBOuter))) {
|
if (((row < (*(tint_symbol_3)).dimInner) && (col < (*(tint_symbol_3)).dimBOuter))) {
|
||||||
float const result = secondMatrix.numbers[((row * uniforms.dimBOuter) + col)];
|
float const result = (*(tint_symbol_4)).numbers[((row * (*(tint_symbol_3)).dimBOuter) + col)];
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mm_write(constant Uniforms& uniforms, device Matrix& resultMatrix, uint row, uint col, float value) {
|
void mm_write(uint row, uint col, float value, const constant Uniforms* const tint_symbol_5, device Matrix* const tint_symbol_6) {
|
||||||
if (((row < uniforms.dimAOuter) && (col < uniforms.dimBOuter))) {
|
if (((row < (*(tint_symbol_5)).dimAOuter) && (col < (*(tint_symbol_5)).dimBOuter))) {
|
||||||
uint const index = (col + (row * uniforms.dimBOuter));
|
uint const index = (col + (row * (*(tint_symbol_5)).dimBOuter));
|
||||||
resultMatrix.numbers[index] = value;
|
(*(tint_symbol_6)).numbers[index] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void tint_symbol_inner(constant Uniforms& uniforms, const device Matrix& firstMatrix, const device Matrix& secondMatrix, device Matrix& resultMatrix, uint3 local_id, uint3 global_id, uint local_invocation_index, threadgroup tint_array_wrapper* const tint_symbol_1, threadgroup tint_array_wrapper* const tint_symbol_2) {
|
void tint_symbol_inner(uint3 local_id, uint3 global_id, uint local_invocation_index, threadgroup tint_array_wrapper* const tint_symbol_7, threadgroup tint_array_wrapper* const tint_symbol_8, const constant Uniforms* const tint_symbol_9, const device Matrix* const tint_symbol_10, const device Matrix* const tint_symbol_11, device Matrix* const tint_symbol_12) {
|
||||||
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_1)).arr[i].arr[i_1] = float();
|
(*(tint_symbol_7)).arr[i].arr[i_1] = float();
|
||||||
(*(tint_symbol_2)).arr[i].arr[i_1] = float();
|
(*(tint_symbol_8)).arr[i].arr[i_1] = float();
|
||||||
}
|
}
|
||||||
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] * RowPerThread);
|
||||||
uint const tileCol = (local_id[0] * ColPerThread);
|
uint const tileCol = (local_id[0] * ColPerThread);
|
||||||
uint const globalRow = (global_id[1] * RowPerThread);
|
uint const globalRow = (global_id[1] * RowPerThread);
|
||||||
uint const globalCol = (global_id[0] * ColPerThread);
|
uint const globalCol = (global_id[0] * ColPerThread);
|
||||||
uint const numTiles = (((uniforms.dimInner - 1u) / TileInner) + 1u);
|
uint const numTiles = ((((*(tint_symbol_9)).dimInner - 1u) / TileInner) + 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 = {};
|
||||||
|
@ -78,23 +78,23 @@ void tint_symbol_inner(constant Uniforms& uniforms, const device Matrix& firstMa
|
||||||
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);
|
||||||
(*(tint_symbol_1)).arr[inputRow].arr[inputCol] = mm_readA(uniforms, firstMatrix, (globalRow + innerRow), ((t * TileInner) + inputCol));
|
(*(tint_symbol_7)).arr[inputRow].arr[inputCol] = mm_readA((globalRow + innerRow), ((t * TileInner) + inputCol), tint_symbol_9, tint_symbol_10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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 < ColPerThread); innerCol = (innerCol + 1u)) {
|
||||||
uint const inputRow = (tileRowB + innerRow);
|
uint const inputRow = (tileRowB + innerRow);
|
||||||
uint const inputCol = (tileCol + innerCol);
|
uint const inputCol = (tileCol + innerCol);
|
||||||
(*(tint_symbol_2)).arr[innerCol].arr[inputCol] = mm_readB(uniforms, secondMatrix, ((t * TileInner) + inputRow), (globalCol + innerCol));
|
(*(tint_symbol_8)).arr[innerCol].arr[inputCol] = mm_readB(((t * TileInner) + inputRow), (globalCol + innerCol), tint_symbol_9, tint_symbol_11);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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 < TileInner); k = (k + 1u)) {
|
||||||
for(uint inner = 0u; (inner < ColPerThread); inner = (inner + 1u)) {
|
for(uint inner = 0u; (inner < ColPerThread); inner = (inner + 1u)) {
|
||||||
BCached.arr[inner] = (*(tint_symbol_2)).arr[k].arr[(tileCol + inner)];
|
BCached.arr[inner] = (*(tint_symbol_8)).arr[k].arr[(tileCol + inner)];
|
||||||
}
|
}
|
||||||
for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) {
|
for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) {
|
||||||
ACached = (*(tint_symbol_1)).arr[(tileRow + innerRow)].arr[k];
|
ACached = (*(tint_symbol_7)).arr[(tileRow + innerRow)].arr[k];
|
||||||
for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) {
|
for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) {
|
||||||
uint const index = ((innerRow * ColPerThread) + innerCol);
|
uint const index = ((innerRow * ColPerThread) + innerCol);
|
||||||
acc.arr[index] = (acc.arr[index] + (ACached * BCached.arr[innerCol]));
|
acc.arr[index] = (acc.arr[index] + (ACached * BCached.arr[innerCol]));
|
||||||
|
@ -106,15 +106,15 @@ void tint_symbol_inner(constant Uniforms& uniforms, const device Matrix& firstMa
|
||||||
for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) {
|
for(uint innerRow = 0u; (innerRow < RowPerThread); innerRow = (innerRow + 1u)) {
|
||||||
for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) {
|
for(uint innerCol = 0u; (innerCol < ColPerThread); innerCol = (innerCol + 1u)) {
|
||||||
uint const index = ((innerRow * ColPerThread) + innerCol);
|
uint const index = ((innerRow * ColPerThread) + innerCol);
|
||||||
mm_write(uniforms, resultMatrix, (globalRow + innerRow), (globalCol + innerCol), acc.arr[index]);
|
mm_write((globalRow + innerRow), (globalCol + innerCol), acc.arr[index], tint_symbol_9, tint_symbol_12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol(uint3 local_id [[thread_position_in_threadgroup]], uint3 global_id [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Uniforms& uniforms [[buffer(0)]], const device Matrix& firstMatrix [[buffer(2)]], const device Matrix& secondMatrix [[buffer(3)]], device Matrix& resultMatrix [[buffer(1)]]) {
|
kernel void tint_symbol(const constant Uniforms* tint_symbol_15 [[buffer(0)]], const device Matrix* tint_symbol_16 [[buffer(2)]], const device Matrix* tint_symbol_17 [[buffer(3)]], device Matrix* tint_symbol_18 [[buffer(1)]], uint3 local_id [[thread_position_in_threadgroup]], uint3 global_id [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
||||||
threadgroup tint_array_wrapper tint_symbol_3;
|
threadgroup tint_array_wrapper tint_symbol_13;
|
||||||
threadgroup tint_array_wrapper tint_symbol_4;
|
threadgroup tint_array_wrapper tint_symbol_14;
|
||||||
tint_symbol_inner(uniforms, firstMatrix, secondMatrix, resultMatrix, local_id, global_id, local_invocation_index, &(tint_symbol_3), &(tint_symbol_4));
|
tint_symbol_inner(local_id, global_id, local_invocation_index, &(tint_symbol_13), &(tint_symbol_14), tint_symbol_15, tint_symbol_16, tint_symbol_17, tint_symbol_18);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -222,77 +222,77 @@ Mat4x3_ x_Mat4x3_1(Mat4x4_ m20) {
|
||||||
return x_e12;
|
return x_e12;
|
||||||
}
|
}
|
||||||
|
|
||||||
void main1(constant ub_PacketParams& global2, constant ub_SceneParams& global, constant ub_MaterialParams& global1, thread float* const tint_symbol_5, thread float3* const tint_symbol_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9, thread float3* const tint_symbol_10, thread float2* const tint_symbol_11, thread float2* const tint_symbol_12) {
|
void main1(thread float* const tint_symbol_5, const constant ub_PacketParams* const tint_symbol_6, thread float3* const tint_symbol_7, const constant ub_SceneParams* const tint_symbol_8, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10, thread float4* const tint_symbol_11, const constant ub_MaterialParams* const tint_symbol_12, thread float3* const tint_symbol_13, thread float2* const tint_symbol_14, thread float2* const tint_symbol_15) {
|
||||||
Mat4x3_ t_PosMtx = {};
|
Mat4x3_ t_PosMtx = {};
|
||||||
float2 t_TexSpaceCoord = 0.0f;
|
float2 t_TexSpaceCoord = 0.0f;
|
||||||
float const x_e15 = *(tint_symbol_5);
|
float const x_e15 = *(tint_symbol_5);
|
||||||
Mat4x3_ const x_e18 = global2.u_PosMtx.arr[int(x_e15)];
|
Mat4x3_ const x_e18 = (*(tint_symbol_6)).u_PosMtx.arr[int(x_e15)];
|
||||||
t_PosMtx = x_e18;
|
t_PosMtx = x_e18;
|
||||||
Mat4x3_ const x_e23 = t_PosMtx;
|
Mat4x3_ const x_e23 = t_PosMtx;
|
||||||
Mat4x4_ const x_e24 = x_Mat4x4_1(x_e23);
|
Mat4x4_ const x_e24 = x_Mat4x4_1(x_e23);
|
||||||
float3 const x_e25 = *(tint_symbol_6);
|
float3 const x_e25 = *(tint_symbol_7);
|
||||||
Mat4x3_ const x_e29 = t_PosMtx;
|
Mat4x3_ const x_e29 = t_PosMtx;
|
||||||
Mat4x4_ const x_e30 = x_Mat4x4_1(x_e29);
|
Mat4x4_ const x_e30 = x_Mat4x4_1(x_e29);
|
||||||
float3 const x_e31 = *(tint_symbol_6);
|
float3 const x_e31 = *(tint_symbol_7);
|
||||||
float4 const x_e34 = Mul(x_e30, float4(x_e31, 1.0f));
|
float4 const x_e34 = Mul(x_e30, float4(x_e31, 1.0f));
|
||||||
Mat4x4_ const x_e35 = global.u_Projection;
|
Mat4x4_ const x_e35 = (*(tint_symbol_8)).u_Projection;
|
||||||
Mat4x3_ const x_e37 = t_PosMtx;
|
Mat4x3_ const x_e37 = t_PosMtx;
|
||||||
Mat4x4_ const x_e38 = x_Mat4x4_1(x_e37);
|
Mat4x4_ const x_e38 = x_Mat4x4_1(x_e37);
|
||||||
float3 const x_e39 = *(tint_symbol_6);
|
float3 const x_e39 = *(tint_symbol_7);
|
||||||
Mat4x3_ const x_e43 = t_PosMtx;
|
Mat4x3_ const x_e43 = t_PosMtx;
|
||||||
Mat4x4_ const x_e44 = x_Mat4x4_1(x_e43);
|
Mat4x4_ const x_e44 = x_Mat4x4_1(x_e43);
|
||||||
float3 const x_e45 = *(tint_symbol_6);
|
float3 const x_e45 = *(tint_symbol_7);
|
||||||
float4 const x_e48 = Mul(x_e44, float4(x_e45, 1.0f));
|
float4 const x_e48 = Mul(x_e44, float4(x_e45, 1.0f));
|
||||||
float4 const x_e49 = Mul(x_e35, x_e48);
|
float4 const x_e49 = Mul(x_e35, x_e48);
|
||||||
*(tint_symbol_7) = x_e49;
|
*(tint_symbol_9) = x_e49;
|
||||||
float4 const x_e50 = *(tint_symbol_8);
|
float4 const x_e50 = *(tint_symbol_10);
|
||||||
*(tint_symbol_9) = x_e50;
|
*(tint_symbol_11) = x_e50;
|
||||||
float4 const x_e52 = global1.u_Misc0_;
|
float4 const x_e52 = (*(tint_symbol_12)).u_Misc0_;
|
||||||
if ((x_e52[0] == 2.0f)) {
|
if ((x_e52[0] == 2.0f)) {
|
||||||
{
|
{
|
||||||
float3 const x_e59 = *(tint_symbol_10);
|
float3 const x_e59 = *(tint_symbol_13);
|
||||||
Mat4x2_ const x_e64 = global1.u_TexMtx.arr[0];
|
Mat4x2_ const x_e64 = (*(tint_symbol_12)).u_TexMtx.arr[0];
|
||||||
float3 const x_e65 = *(tint_symbol_10);
|
float3 const x_e65 = *(tint_symbol_13);
|
||||||
float2 const x_e68 = Mul2(x_e64, float4(x_e65, 1.0f));
|
float2 const x_e68 = Mul2(x_e64, float4(x_e65, 1.0f));
|
||||||
*(tint_symbol_11) = float2(x_e68).xy;
|
*(tint_symbol_14) = float2(x_e68).xy;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
{
|
{
|
||||||
float2 const x_e73 = *(tint_symbol_12);
|
float2 const x_e73 = *(tint_symbol_15);
|
||||||
Mat4x2_ const x_e79 = global1.u_TexMtx.arr[0];
|
Mat4x2_ const x_e79 = (*(tint_symbol_12)).u_TexMtx.arr[0];
|
||||||
float2 const x_e80 = *(tint_symbol_12);
|
float2 const x_e80 = *(tint_symbol_15);
|
||||||
float2 const x_e84 = Mul2(x_e79, float4(x_e80, 1.0f, 1.0f));
|
float2 const x_e84 = Mul2(x_e79, float4(x_e80, 1.0f, 1.0f));
|
||||||
*(tint_symbol_11) = float2(x_e84).xy;
|
*(tint_symbol_14) = float2(x_e84).xy;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VertexOutput tint_symbol_inner(constant ub_PacketParams& global2, constant ub_SceneParams& global, constant ub_MaterialParams& global1, float3 a_Position, float2 a_UV, float4 a_Color, float3 a_Normal, float a_PosMtxIdx, thread float3* const tint_symbol_13, thread float2* const tint_symbol_14, thread float4* const tint_symbol_15, thread float3* const tint_symbol_16, thread float* const tint_symbol_17, thread float4* const tint_symbol_18, thread float4* const tint_symbol_19, thread float2* const tint_symbol_20) {
|
VertexOutput tint_symbol_inner(float3 a_Position, float2 a_UV, float4 a_Color, float3 a_Normal, float a_PosMtxIdx, thread float3* const tint_symbol_16, thread float2* const tint_symbol_17, thread float4* const tint_symbol_18, thread float3* const tint_symbol_19, thread float* const tint_symbol_20, const constant ub_PacketParams* const tint_symbol_21, const constant ub_SceneParams* const tint_symbol_22, thread float4* const tint_symbol_23, thread float4* const tint_symbol_24, const constant ub_MaterialParams* const tint_symbol_25, thread float2* const tint_symbol_26) {
|
||||||
*(tint_symbol_13) = a_Position;
|
*(tint_symbol_16) = a_Position;
|
||||||
*(tint_symbol_14) = a_UV;
|
*(tint_symbol_17) = a_UV;
|
||||||
*(tint_symbol_15) = a_Color;
|
*(tint_symbol_18) = a_Color;
|
||||||
*(tint_symbol_16) = a_Normal;
|
*(tint_symbol_19) = a_Normal;
|
||||||
*(tint_symbol_17) = a_PosMtxIdx;
|
*(tint_symbol_20) = a_PosMtxIdx;
|
||||||
main1(global2, global, global1, tint_symbol_17, tint_symbol_13, tint_symbol_18, tint_symbol_15, tint_symbol_19, tint_symbol_16, tint_symbol_20, tint_symbol_14);
|
main1(tint_symbol_20, tint_symbol_21, tint_symbol_16, tint_symbol_22, tint_symbol_23, tint_symbol_18, tint_symbol_24, tint_symbol_25, tint_symbol_19, tint_symbol_26, tint_symbol_17);
|
||||||
float4 const x_e11 = *(tint_symbol_19);
|
float4 const x_e11 = *(tint_symbol_24);
|
||||||
float2 const x_e13 = *(tint_symbol_20);
|
float2 const x_e13 = *(tint_symbol_26);
|
||||||
float4 const x_e15 = *(tint_symbol_18);
|
float4 const x_e15 = *(tint_symbol_23);
|
||||||
VertexOutput const tint_symbol_4 = {.v_Color=x_e11, .v_TexCoord=x_e13, .member=x_e15};
|
VertexOutput const tint_symbol_4 = {.v_Color=x_e11, .v_TexCoord=x_e13, .member=x_e15};
|
||||||
return tint_symbol_4;
|
return tint_symbol_4;
|
||||||
}
|
}
|
||||||
|
|
||||||
vertex tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]], constant ub_PacketParams& global2 [[buffer(0)]], constant ub_SceneParams& global [[buffer(1)]], constant ub_MaterialParams& global1 [[buffer(2)]]) {
|
vertex tint_symbol_3 tint_symbol(const constant ub_PacketParams* tint_symbol_32 [[buffer(0)]], const constant ub_SceneParams* tint_symbol_33 [[buffer(1)]], const constant ub_MaterialParams* tint_symbol_36 [[buffer(2)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
|
||||||
thread float3 tint_symbol_21 = 0.0f;
|
thread float3 tint_symbol_27 = 0.0f;
|
||||||
thread float2 tint_symbol_22 = 0.0f;
|
|
||||||
thread float4 tint_symbol_23 = 0.0f;
|
|
||||||
thread float3 tint_symbol_24 = 0.0f;
|
|
||||||
thread float tint_symbol_25 = 0.0f;
|
|
||||||
thread float4 tint_symbol_26 = 0.0f;
|
|
||||||
thread float4 tint_symbol_27 = 0.0f;
|
|
||||||
thread float2 tint_symbol_28 = 0.0f;
|
thread float2 tint_symbol_28 = 0.0f;
|
||||||
VertexOutput const inner_result = tint_symbol_inner(global2, global, global1, tint_symbol_1.a_Position, tint_symbol_1.a_UV, tint_symbol_1.a_Color, tint_symbol_1.a_Normal, tint_symbol_1.a_PosMtxIdx, &(tint_symbol_21), &(tint_symbol_22), &(tint_symbol_23), &(tint_symbol_24), &(tint_symbol_25), &(tint_symbol_26), &(tint_symbol_27), &(tint_symbol_28));
|
thread float4 tint_symbol_29 = 0.0f;
|
||||||
|
thread float3 tint_symbol_30 = 0.0f;
|
||||||
|
thread float tint_symbol_31 = 0.0f;
|
||||||
|
thread float4 tint_symbol_34 = 0.0f;
|
||||||
|
thread float4 tint_symbol_35 = 0.0f;
|
||||||
|
thread float2 tint_symbol_37 = 0.0f;
|
||||||
|
VertexOutput const inner_result = tint_symbol_inner(tint_symbol_1.a_Position, tint_symbol_1.a_UV, tint_symbol_1.a_Color, tint_symbol_1.a_Normal, tint_symbol_1.a_PosMtxIdx, &(tint_symbol_27), &(tint_symbol_28), &(tint_symbol_29), &(tint_symbol_30), &(tint_symbol_31), tint_symbol_32, tint_symbol_33, &(tint_symbol_34), &(tint_symbol_35), tint_symbol_36, &(tint_symbol_37));
|
||||||
tint_symbol_3 wrapper_result = {};
|
tint_symbol_3 wrapper_result = {};
|
||||||
wrapper_result.v_Color = inner_result.v_Color;
|
wrapper_result.v_Color = inner_result.v_Color;
|
||||||
wrapper_result.v_TexCoord = inner_result.v_TexCoord;
|
wrapper_result.v_TexCoord = inner_result.v_TexCoord;
|
||||||
|
|
|
@ -5,13 +5,13 @@ struct DrawIndirectArgs {
|
||||||
/* 0x0000 */ atomic_uint vertexCount;
|
/* 0x0000 */ atomic_uint vertexCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
void computeMain_inner(device DrawIndirectArgs& drawOut, uint3 global_id, thread uint* const tint_symbol) {
|
void computeMain_inner(uint3 global_id, device DrawIndirectArgs* const tint_symbol, thread uint* const tint_symbol_1) {
|
||||||
uint const firstVertex = atomic_fetch_add_explicit(&(drawOut.vertexCount), *(tint_symbol), memory_order_relaxed);
|
uint const firstVertex = atomic_fetch_add_explicit(&((*(tint_symbol)).vertexCount), *(tint_symbol_1), memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void computeMain(uint3 global_id [[thread_position_in_grid]], device DrawIndirectArgs& drawOut [[buffer(0)]]) {
|
kernel void computeMain(device DrawIndirectArgs* tint_symbol_2 [[buffer(0)]], uint3 global_id [[thread_position_in_grid]]) {
|
||||||
thread uint tint_symbol_1 = 0u;
|
thread uint tint_symbol_3 = 0u;
|
||||||
computeMain_inner(drawOut, global_id, &(tint_symbol_1));
|
computeMain_inner(global_id, tint_symbol_2, &(tint_symbol_3));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,48 +15,48 @@ struct tint_array_wrapper {
|
||||||
tint_array_wrapper_1 arr[4];
|
tint_array_wrapper_1 arr[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
void tint_symbol_inner(constant Params& params, constant Flip& flip, uint3 WorkGroupID, uint3 LocalInvocationID, uint local_invocation_index, threadgroup tint_array_wrapper* const tint_symbol_1, texture2d<float, access::sample> tint_symbol_2, sampler tint_symbol_3, texture2d<float, access::write> tint_symbol_4) {
|
void tint_symbol_inner(uint3 WorkGroupID, uint3 LocalInvocationID, uint local_invocation_index, threadgroup tint_array_wrapper* const tint_symbol_1, const constant Params* const tint_symbol_2, texture2d<float, access::sample> tint_symbol_3, const constant Flip* const tint_symbol_4, sampler tint_symbol_5, texture2d<float, access::write> tint_symbol_6) {
|
||||||
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();
|
||||||
}
|
}
|
||||||
threadgroup_barrier(mem_flags::mem_threadgroup);
|
threadgroup_barrier(mem_flags::mem_threadgroup);
|
||||||
uint const filterOffset = ((params.filterDim - 1u) / 2u);
|
uint const filterOffset = (((*(tint_symbol_2)).filterDim - 1u) / 2u);
|
||||||
int2 const dims = int2(tint_symbol_2.get_width(0), tint_symbol_2.get_height(0));
|
int2 const dims = int2(tint_symbol_3.get_width(0), tint_symbol_3.get_height(0));
|
||||||
int2 const baseIndex = as_type<int2>((as_type<uint2>(int2(((uint3(WorkGroupID).xy * uint2(params.blockDim, 4u)) + (uint3(LocalInvocationID).xy * uint2(4u, 1u))))) - as_type<uint2>(int2(int(filterOffset), 0))));
|
int2 const baseIndex = as_type<int2>((as_type<uint2>(int2(((uint3(WorkGroupID).xy * uint2((*(tint_symbol_2)).blockDim, 4u)) + (uint3(LocalInvocationID).xy * uint2(4u, 1u))))) - as_type<uint2>(int2(int(filterOffset), 0))));
|
||||||
for(uint r = 0u; (r < 4u); r = (r + 1u)) {
|
for(uint r = 0u; (r < 4u); r = (r + 1u)) {
|
||||||
for(uint c = 0u; (c < 4u); c = (c + 1u)) {
|
for(uint c = 0u; (c < 4u); c = (c + 1u)) {
|
||||||
int2 loadIndex = as_type<int2>((as_type<uint2>(baseIndex) + as_type<uint2>(int2(int(c), int(r)))));
|
int2 loadIndex = as_type<int2>((as_type<uint2>(baseIndex) + as_type<uint2>(int2(int(c), int(r)))));
|
||||||
if ((flip.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_2.sample(tint_symbol_3, ((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, 0.25f)) / float2(dims)), level(0.0f))).rgb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
threadgroup_barrier(mem_flags::mem_threadgroup);
|
threadgroup_barrier(mem_flags::mem_threadgroup);
|
||||||
for(uint r = 0u; (r < 4u); r = (r + 1u)) {
|
for(uint r = 0u; (r < 4u); r = (r + 1u)) {
|
||||||
for(uint c = 0u; (c < 4u); c = (c + 1u)) {
|
for(uint c = 0u; (c < 4u); c = (c + 1u)) {
|
||||||
int2 writeIndex = as_type<int2>((as_type<uint2>(baseIndex) + as_type<uint2>(int2(int(c), int(r)))));
|
int2 writeIndex = as_type<int2>((as_type<uint2>(baseIndex) + as_type<uint2>(int2(int(c), int(r)))));
|
||||||
if ((flip.value != 0u)) {
|
if (((*(tint_symbol_4)).value != 0u)) {
|
||||||
writeIndex = int2(writeIndex).yx;
|
writeIndex = int2(writeIndex).yx;
|
||||||
}
|
}
|
||||||
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, 0.0f, 0.0f);
|
||||||
for(uint f = 0u; (f < params.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(params.filterDim)) * (*(tint_symbol_1)).arr[r].arr[i]));
|
acc = (acc + ((1.0f / float((*(tint_symbol_2)).filterDim)) * (*(tint_symbol_1)).arr[r].arr[i]));
|
||||||
}
|
}
|
||||||
tint_symbol_4.write(float4(acc, 1.0f), uint2(writeIndex));
|
tint_symbol_6.write(float4(acc, 1.0f), uint2(writeIndex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol(texture2d<float, access::sample> tint_symbol_6 [[texture(0)]], sampler tint_symbol_7 [[sampler(0)]], texture2d<float, access::write> tint_symbol_8 [[texture(1)]], uint3 WorkGroupID [[threadgroup_position_in_grid]], uint3 LocalInvocationID [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Params& params [[buffer(0)]], constant Flip& flip [[buffer(1)]]) {
|
kernel void tint_symbol(const constant Params* tint_symbol_8 [[buffer(0)]], texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], const constant Flip* tint_symbol_10 [[buffer(1)]], sampler tint_symbol_11 [[sampler(0)]], texture2d<float, access::write> tint_symbol_12 [[texture(1)]], uint3 WorkGroupID [[threadgroup_position_in_grid]], uint3 LocalInvocationID [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
||||||
threadgroup tint_array_wrapper tint_symbol_5;
|
threadgroup tint_array_wrapper tint_symbol_7;
|
||||||
tint_symbol_inner(params, flip, WorkGroupID, LocalInvocationID, local_invocation_index, &(tint_symbol_5), tint_symbol_6, tint_symbol_7, tint_symbol_8);
|
tint_symbol_inner(WorkGroupID, LocalInvocationID, local_invocation_index, &(tint_symbol_7), tint_symbol_8, tint_symbol_9, tint_symbol_10, tint_symbol_11, tint_symbol_12);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,28 +53,28 @@ bool coordsInBounds_vi2_vi2_(thread int2* const coord, thread int2* const shape)
|
||||||
return x_88;
|
return x_88;
|
||||||
}
|
}
|
||||||
|
|
||||||
float mm_readA_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, thread int* const row, thread int* const col, thread int* const tint_symbol_2, thread int* const tint_symbol_3, thread int* const tint_symbol_4) {
|
float mm_readA_i1_i1_(thread int* const row, thread int* const col, const constant Uniforms* const tint_symbol_2, thread int* const tint_symbol_3, thread int* const tint_symbol_4, thread int* const tint_symbol_5, const device ssbA* const tint_symbol_6) {
|
||||||
int batchASize = 0;
|
int batchASize = 0;
|
||||||
int2 param_10 = 0;
|
int2 param_10 = 0;
|
||||||
int2 param_11 = 0;
|
int2 param_11 = 0;
|
||||||
float x_430 = 0.0f;
|
float x_430 = 0.0f;
|
||||||
int const x_417 = x_48.aShape[1];
|
int const x_417 = (*(tint_symbol_2)).aShape[1];
|
||||||
int const x_419 = x_48.aShape[2];
|
int const x_419 = (*(tint_symbol_2)).aShape[2];
|
||||||
batchASize = as_type<int>((as_type<uint>(x_417) * as_type<uint>(x_419)));
|
batchASize = as_type<int>((as_type<uint>(x_417) * as_type<uint>(x_419)));
|
||||||
int const x_421 = *(row);
|
int const x_421 = *(row);
|
||||||
int const x_422 = *(col);
|
int const x_422 = *(col);
|
||||||
int const x_424 = *(tint_symbol_2);
|
int const x_424 = *(tint_symbol_3);
|
||||||
int const x_425 = *(tint_symbol_3);
|
int const x_425 = *(tint_symbol_4);
|
||||||
param_10 = int2(x_421, x_422);
|
param_10 = int2(x_421, x_422);
|
||||||
param_11 = int2(x_424, x_425);
|
param_11 = int2(x_424, x_425);
|
||||||
bool const x_429 = coordsInBounds_vi2_vi2_(&(param_10), &(param_11));
|
bool const x_429 = coordsInBounds_vi2_vi2_(&(param_10), &(param_11));
|
||||||
if (x_429) {
|
if (x_429) {
|
||||||
int const x_438 = *(tint_symbol_4);
|
int const x_438 = *(tint_symbol_5);
|
||||||
int const x_439 = batchASize;
|
int const x_439 = batchASize;
|
||||||
int const x_441 = *(row);
|
int const x_441 = *(row);
|
||||||
int const x_442 = *(tint_symbol_3);
|
int const x_442 = *(tint_symbol_4);
|
||||||
int const x_445 = *(col);
|
int const x_445 = *(col);
|
||||||
float const x_448 = x_165.A[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_438) * as_type<uint>(x_439)))) + as_type<uint>(as_type<int>((as_type<uint>(x_441) * as_type<uint>(x_442))))))) + as_type<uint>(x_445)))];
|
float const x_448 = (*(tint_symbol_6)).A[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_438) * as_type<uint>(x_439)))) + as_type<uint>(as_type<int>((as_type<uint>(x_441) * as_type<uint>(x_442))))))) + as_type<uint>(x_445)))];
|
||||||
x_430 = x_448;
|
x_430 = x_448;
|
||||||
} else {
|
} else {
|
||||||
x_430 = 0.0f;
|
x_430 = 0.0f;
|
||||||
|
@ -83,28 +83,28 @@ float mm_readA_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, thread
|
||||||
return x_450;
|
return x_450;
|
||||||
}
|
}
|
||||||
|
|
||||||
float mm_readB_i1_i1_(constant Uniforms& x_48, const device ssbB& x_185, thread int* const row_1, thread int* const col_1, thread int* const tint_symbol_5, thread int* const tint_symbol_6, thread int* const tint_symbol_7) {
|
float mm_readB_i1_i1_(thread int* const row_1, thread int* const col_1, const constant Uniforms* const tint_symbol_7, thread int* const tint_symbol_8, thread int* const tint_symbol_9, thread int* const tint_symbol_10, const device ssbB* const tint_symbol_11) {
|
||||||
int batchBSize = 0;
|
int batchBSize = 0;
|
||||||
int2 param_12 = 0;
|
int2 param_12 = 0;
|
||||||
int2 param_13 = 0;
|
int2 param_13 = 0;
|
||||||
float x_468 = 0.0f;
|
float x_468 = 0.0f;
|
||||||
int const x_455 = x_48.bShape[1];
|
int const x_455 = (*(tint_symbol_7)).bShape[1];
|
||||||
int const x_457 = x_48.bShape[2];
|
int const x_457 = (*(tint_symbol_7)).bShape[2];
|
||||||
batchBSize = as_type<int>((as_type<uint>(x_455) * as_type<uint>(x_457)));
|
batchBSize = as_type<int>((as_type<uint>(x_455) * as_type<uint>(x_457)));
|
||||||
int const x_459 = *(row_1);
|
int const x_459 = *(row_1);
|
||||||
int const x_460 = *(col_1);
|
int const x_460 = *(col_1);
|
||||||
int const x_462 = *(tint_symbol_5);
|
int const x_462 = *(tint_symbol_8);
|
||||||
int const x_463 = *(tint_symbol_6);
|
int const x_463 = *(tint_symbol_9);
|
||||||
param_12 = int2(x_459, x_460);
|
param_12 = int2(x_459, x_460);
|
||||||
param_13 = int2(x_462, x_463);
|
param_13 = int2(x_462, x_463);
|
||||||
bool const x_467 = coordsInBounds_vi2_vi2_(&(param_12), &(param_13));
|
bool const x_467 = coordsInBounds_vi2_vi2_(&(param_12), &(param_13));
|
||||||
if (x_467) {
|
if (x_467) {
|
||||||
int const x_475 = *(tint_symbol_7);
|
int const x_475 = *(tint_symbol_10);
|
||||||
int const x_476 = batchBSize;
|
int const x_476 = batchBSize;
|
||||||
int const x_478 = *(row_1);
|
int const x_478 = *(row_1);
|
||||||
int const x_479 = *(tint_symbol_6);
|
int const x_479 = *(tint_symbol_9);
|
||||||
int const x_482 = *(col_1);
|
int const x_482 = *(col_1);
|
||||||
float const x_485 = x_185.B[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_475) * as_type<uint>(x_476)))) + as_type<uint>(as_type<int>((as_type<uint>(x_478) * as_type<uint>(x_479))))))) + as_type<uint>(x_482)))];
|
float const x_485 = (*(tint_symbol_11)).B[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_475) * as_type<uint>(x_476)))) + as_type<uint>(as_type<int>((as_type<uint>(x_478) * as_type<uint>(x_479))))))) + as_type<uint>(x_482)))];
|
||||||
x_468 = x_485;
|
x_468 = x_485;
|
||||||
} else {
|
} else {
|
||||||
x_468 = 0.0f;
|
x_468 = 0.0f;
|
||||||
|
@ -113,21 +113,21 @@ float mm_readB_i1_i1_(constant Uniforms& x_48, const device ssbB& x_185, thread
|
||||||
return x_487;
|
return x_487;
|
||||||
}
|
}
|
||||||
|
|
||||||
int getOutputFlatIndex_vi3_(constant Uniforms& x_48, thread int3* const coords) {
|
int getOutputFlatIndex_vi3_(thread int3* const coords, const constant Uniforms* const tint_symbol_12) {
|
||||||
int3 const x_99 = *(coords);
|
int3 const x_99 = *(coords);
|
||||||
int const x_105 = x_48.outShapeStrides[0];
|
int const x_105 = (*(tint_symbol_12)).outShapeStrides[0];
|
||||||
int const x_107 = x_48.outShapeStrides[1];
|
int const x_107 = (*(tint_symbol_12)).outShapeStrides[1];
|
||||||
return int(dot(float3(x_99), float3(int3(x_105, x_107, 1))));
|
return int(dot(float3(x_99), float3(int3(x_105, x_107, 1))));
|
||||||
}
|
}
|
||||||
|
|
||||||
void setOutput_i1_f1_(device ssbOut& x_54, thread int* const flatIndex, thread float* const value) {
|
void setOutput_i1_f1_(thread int* const flatIndex, thread float* const value, device ssbOut* const tint_symbol_13) {
|
||||||
int const x_95 = *(flatIndex);
|
int const x_95 = *(flatIndex);
|
||||||
float const x_96 = *(value);
|
float const x_96 = *(value);
|
||||||
x_54.result[x_95] = x_96;
|
(*(tint_symbol_13)).result[x_95] = x_96;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setOutput_i1_i1_i1_f1_(constant Uniforms& x_48, device ssbOut& x_54, thread int* const d0, thread int* const d1, thread int* const d2, thread float* const value_1) {
|
void setOutput_i1_i1_i1_f1_(thread int* const d0, thread int* const d1, thread int* const d2, thread float* const value_1, const constant Uniforms* const tint_symbol_14, device ssbOut* const tint_symbol_15) {
|
||||||
int flatIndex_1 = 0;
|
int flatIndex_1 = 0;
|
||||||
int3 param = 0;
|
int3 param = 0;
|
||||||
int param_1 = 0;
|
int param_1 = 0;
|
||||||
|
@ -136,27 +136,27 @@ void setOutput_i1_i1_i1_f1_(constant Uniforms& x_48, device ssbOut& x_54, thread
|
||||||
int const x_116 = *(d1);
|
int const x_116 = *(d1);
|
||||||
int const x_117 = *(d2);
|
int const x_117 = *(d2);
|
||||||
param = int3(x_115, x_116, x_117);
|
param = int3(x_115, x_116, x_117);
|
||||||
int const x_120 = getOutputFlatIndex_vi3_(x_48, &(param));
|
int const x_120 = getOutputFlatIndex_vi3_(&(param), tint_symbol_14);
|
||||||
flatIndex_1 = x_120;
|
flatIndex_1 = x_120;
|
||||||
int const x_122 = flatIndex_1;
|
int const x_122 = flatIndex_1;
|
||||||
param_1 = x_122;
|
param_1 = x_122;
|
||||||
float const x_124 = *(value_1);
|
float const x_124 = *(value_1);
|
||||||
param_2 = x_124;
|
param_2 = x_124;
|
||||||
setOutput_i1_f1_(x_54, &(param_1), &(param_2));
|
setOutput_i1_f1_(&(param_1), &(param_2), tint_symbol_15);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mm_write_i1_i1_f1_(constant Uniforms& x_48, device ssbOut& x_54, thread int* const row_2, thread int* const col_2, thread float* const value_2, thread int* const tint_symbol_8) {
|
void mm_write_i1_i1_f1_(thread int* const row_2, thread int* const col_2, thread float* const value_2, thread int* const tint_symbol_16, const constant Uniforms* const tint_symbol_17, device ssbOut* const tint_symbol_18) {
|
||||||
int3 outCoord = 0;
|
int3 outCoord = 0;
|
||||||
int param_14 = 0;
|
int param_14 = 0;
|
||||||
int param_15 = 0;
|
int param_15 = 0;
|
||||||
int param_16 = 0;
|
int param_16 = 0;
|
||||||
float param_17 = 0.0f;
|
float param_17 = 0.0f;
|
||||||
int const x_491 = *(tint_symbol_8);
|
int const x_491 = *(tint_symbol_16);
|
||||||
int const x_492 = *(row_2);
|
int const x_492 = *(row_2);
|
||||||
int const x_493 = *(col_2);
|
int const x_493 = *(col_2);
|
||||||
outCoord = int3(x_491, x_492, x_493);
|
outCoord = int3(x_491, x_492, x_493);
|
||||||
int const x_496 = *(tint_symbol_8);
|
int const x_496 = *(tint_symbol_16);
|
||||||
param_14 = x_496;
|
param_14 = x_496;
|
||||||
int const x_498 = *(row_2);
|
int const x_498 = *(row_2);
|
||||||
param_15 = x_498;
|
param_15 = x_498;
|
||||||
|
@ -164,11 +164,11 @@ void mm_write_i1_i1_f1_(constant Uniforms& x_48, device ssbOut& x_54, thread int
|
||||||
param_16 = x_500;
|
param_16 = x_500;
|
||||||
float const x_502 = *(value_2);
|
float const x_502 = *(value_2);
|
||||||
param_17 = x_502;
|
param_17 = x_502;
|
||||||
setOutput_i1_i1_i1_f1_(x_48, x_54, &(param_14), &(param_15), &(param_16), &(param_17));
|
setOutput_i1_i1_i1_f1_(&(param_14), &(param_15), &(param_16), &(param_17), tint_symbol_17, tint_symbol_18);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, const device ssbB& x_185, device ssbOut& x_54, thread int* const dimAOuter, thread int* const dimInner, thread int* const dimBOuter, thread uint3* const tint_symbol_9, thread uint3* const tint_symbol_10, thread int* const tint_symbol_11, thread int* const tint_symbol_12, thread int* const tint_symbol_13, threadgroup tint_array_wrapper* const tint_symbol_14, thread int* const tint_symbol_15, threadgroup tint_array_wrapper_2* const tint_symbol_16) {
|
void mm_matMul_i1_i1_i1_(thread int* const dimAOuter, thread int* const dimInner, thread int* const dimBOuter, thread uint3* const tint_symbol_19, thread uint3* const tint_symbol_20, const constant Uniforms* const tint_symbol_21, thread int* const tint_symbol_22, thread int* const tint_symbol_23, thread int* const tint_symbol_24, const device ssbA* const tint_symbol_25, threadgroup tint_array_wrapper* const tint_symbol_26, thread int* const tint_symbol_27, const device ssbB* const tint_symbol_28, threadgroup tint_array_wrapper_2* const tint_symbol_29, device ssbOut* const tint_symbol_30) {
|
||||||
int tileRow = 0;
|
int tileRow = 0;
|
||||||
int tileCol = 0;
|
int tileCol = 0;
|
||||||
int globalRow = 0;
|
int globalRow = 0;
|
||||||
|
@ -203,13 +203,13 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons
|
||||||
int param_7 = 0;
|
int param_7 = 0;
|
||||||
int param_8 = 0;
|
int param_8 = 0;
|
||||||
float param_9 = 0.0f;
|
float param_9 = 0.0f;
|
||||||
uint const x_132 = (*(tint_symbol_9))[1];
|
uint const x_132 = (*(tint_symbol_19))[1];
|
||||||
tileRow = as_type<int>((as_type<uint>(as_type<int>(x_132)) * as_type<uint>(1)));
|
tileRow = as_type<int>((as_type<uint>(as_type<int>(x_132)) * as_type<uint>(1)));
|
||||||
uint const x_137 = (*(tint_symbol_9))[0];
|
uint const x_137 = (*(tint_symbol_19))[0];
|
||||||
tileCol = as_type<int>((as_type<uint>(as_type<int>(x_137)) * as_type<uint>(1)));
|
tileCol = as_type<int>((as_type<uint>(as_type<int>(x_137)) * as_type<uint>(1)));
|
||||||
uint const x_143 = (*(tint_symbol_10))[1];
|
uint const x_143 = (*(tint_symbol_20))[1];
|
||||||
globalRow = as_type<int>((as_type<uint>(as_type<int>(x_143)) * as_type<uint>(1)));
|
globalRow = as_type<int>((as_type<uint>(as_type<int>(x_143)) * as_type<uint>(1)));
|
||||||
uint const x_148 = (*(tint_symbol_10))[0];
|
uint const x_148 = (*(tint_symbol_20))[0];
|
||||||
globalCol = as_type<int>((as_type<uint>(as_type<int>(x_148)) * as_type<uint>(1)));
|
globalCol = as_type<int>((as_type<uint>(as_type<int>(x_148)) * as_type<uint>(1)));
|
||||||
int const x_152 = *(dimInner);
|
int const x_152 = *(dimInner);
|
||||||
numTiles = as_type<int>((as_type<uint>((as_type<int>((as_type<uint>(x_152) - as_type<uint>(1))) / 64)) + as_type<uint>(1)));
|
numTiles = as_type<int>((as_type<uint>((as_type<int>((as_type<uint>(x_152) - as_type<uint>(1))) / 64)) + as_type<uint>(1)));
|
||||||
|
@ -240,9 +240,9 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons
|
||||||
innerRow = as_type<int>((as_type<uint>(x_183) + as_type<uint>(1)));
|
innerRow = as_type<int>((as_type<uint>(x_183) + as_type<uint>(1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uint const x_187 = (*(tint_symbol_9))[0];
|
uint const x_187 = (*(tint_symbol_19))[0];
|
||||||
tileColA = as_type<int>((as_type<uint>(as_type<int>(x_187)) * as_type<uint>(64)));
|
tileColA = as_type<int>((as_type<uint>(as_type<int>(x_187)) * as_type<uint>(64)));
|
||||||
uint const x_192 = (*(tint_symbol_9))[1];
|
uint const x_192 = (*(tint_symbol_19))[1];
|
||||||
tileRowB = as_type<int>((as_type<uint>(as_type<int>(x_192)) * as_type<uint>(1)));
|
tileRowB = as_type<int>((as_type<uint>(as_type<int>(x_192)) * as_type<uint>(1)));
|
||||||
t = 0;
|
t = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -280,8 +280,8 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons
|
||||||
int const x_240 = inputCol;
|
int const x_240 = inputCol;
|
||||||
param_3 = as_type<int>((as_type<uint>(x_235) + as_type<uint>(x_236)));
|
param_3 = as_type<int>((as_type<uint>(x_235) + as_type<uint>(x_236)));
|
||||||
param_4 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_238) * as_type<uint>(64)))) + as_type<uint>(x_240)));
|
param_4 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_238) * as_type<uint>(64)))) + as_type<uint>(x_240)));
|
||||||
float const x_244 = mm_readA_i1_i1_(x_48, x_165, &(param_3), &(param_4), tint_symbol_11, tint_symbol_12, tint_symbol_13);
|
float const x_244 = mm_readA_i1_i1_(&(param_3), &(param_4), tint_symbol_21, tint_symbol_22, tint_symbol_23, tint_symbol_24, tint_symbol_25);
|
||||||
(*(tint_symbol_14)).arr[x_233].arr[x_234] = x_244;
|
(*(tint_symbol_26)).arr[x_233].arr[x_234] = x_244;
|
||||||
{
|
{
|
||||||
int const x_247 = innerCol_1;
|
int const x_247 = innerCol_1;
|
||||||
innerCol_1 = as_type<int>((as_type<uint>(x_247) + as_type<uint>(1)));
|
innerCol_1 = as_type<int>((as_type<uint>(x_247) + as_type<uint>(1)));
|
||||||
|
@ -320,8 +320,8 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons
|
||||||
int const x_285 = innerCol_2;
|
int const x_285 = innerCol_2;
|
||||||
param_5 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_280) * as_type<uint>(64)))) + as_type<uint>(x_282)));
|
param_5 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_280) * as_type<uint>(64)))) + as_type<uint>(x_282)));
|
||||||
param_6 = as_type<int>((as_type<uint>(x_284) + as_type<uint>(x_285)));
|
param_6 = as_type<int>((as_type<uint>(x_284) + as_type<uint>(x_285)));
|
||||||
float const x_289 = mm_readB_i1_i1_(x_48, x_185, &(param_5), &(param_6), tint_symbol_12, tint_symbol_15, tint_symbol_13);
|
float const x_289 = mm_readB_i1_i1_(&(param_5), &(param_6), tint_symbol_21, tint_symbol_23, tint_symbol_27, tint_symbol_24, tint_symbol_28);
|
||||||
(*(tint_symbol_16)).arr[x_278].arr[x_279] = x_289;
|
(*(tint_symbol_29)).arr[x_278].arr[x_279] = x_289;
|
||||||
{
|
{
|
||||||
int const x_291 = innerCol_2;
|
int const x_291 = innerCol_2;
|
||||||
innerCol_2 = as_type<int>((as_type<uint>(x_291) + as_type<uint>(1)));
|
innerCol_2 = as_type<int>((as_type<uint>(x_291) + as_type<uint>(1)));
|
||||||
|
@ -351,7 +351,7 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons
|
||||||
int const x_315 = k;
|
int const x_315 = k;
|
||||||
int const x_316 = tileCol;
|
int const x_316 = tileCol;
|
||||||
int const x_317 = inner;
|
int const x_317 = inner;
|
||||||
float const x_320 = (*(tint_symbol_16)).arr[x_315].arr[as_type<int>((as_type<uint>(x_316) + as_type<uint>(x_317)))];
|
float const x_320 = (*(tint_symbol_29)).arr[x_315].arr[as_type<int>((as_type<uint>(x_316) + as_type<uint>(x_317)))];
|
||||||
BCached.arr[x_314] = x_320;
|
BCached.arr[x_314] = x_320;
|
||||||
{
|
{
|
||||||
int const x_322 = inner;
|
int const x_322 = inner;
|
||||||
|
@ -368,7 +368,7 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons
|
||||||
int const x_333 = tileRow;
|
int const x_333 = tileRow;
|
||||||
int const x_334 = innerRow_3;
|
int const x_334 = innerRow_3;
|
||||||
int const x_336 = k;
|
int const x_336 = k;
|
||||||
float const x_338 = (*(tint_symbol_14)).arr[as_type<int>((as_type<uint>(x_333) + as_type<uint>(x_334)))].arr[x_336];
|
float const x_338 = (*(tint_symbol_26)).arr[as_type<int>((as_type<uint>(x_333) + as_type<uint>(x_334)))].arr[x_336];
|
||||||
ACached = x_338;
|
ACached = x_338;
|
||||||
innerCol_3 = 0;
|
innerCol_3 = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -445,7 +445,7 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons
|
||||||
param_8 = as_type<int>((as_type<uint>(x_400) + as_type<uint>(x_401)));
|
param_8 = as_type<int>((as_type<uint>(x_400) + as_type<uint>(x_401)));
|
||||||
float const x_409 = acc.arr[x_403].arr[x_404];
|
float const x_409 = acc.arr[x_403].arr[x_404];
|
||||||
param_9 = x_409;
|
param_9 = x_409;
|
||||||
mm_write_i1_i1_f1_(x_48, x_54, &(param_7), &(param_8), &(param_9), tint_symbol_13);
|
mm_write_i1_i1_f1_(&(param_7), &(param_8), &(param_9), tint_symbol_24, tint_symbol_21, tint_symbol_30);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
int const x_411 = innerCol_4;
|
int const x_411 = innerCol_4;
|
||||||
|
@ -460,55 +460,55 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void main_1(constant Uniforms& x_48, const device ssbA& x_165, const device ssbB& x_185, device ssbOut& x_54, thread int* const tint_symbol_17, thread int* const tint_symbol_18, thread int* const tint_symbol_19, thread uint3* const tint_symbol_20, thread int* const tint_symbol_21, thread uint3* const tint_symbol_22, threadgroup tint_array_wrapper* const tint_symbol_23, threadgroup tint_array_wrapper_2* const tint_symbol_24) {
|
void main_1(const constant Uniforms* const tint_symbol_31, thread int* const tint_symbol_32, thread int* const tint_symbol_33, thread int* const tint_symbol_34, thread uint3* const tint_symbol_35, thread int* const tint_symbol_36, thread uint3* const tint_symbol_37, const device ssbA* const tint_symbol_38, threadgroup tint_array_wrapper* const tint_symbol_39, const device ssbB* const tint_symbol_40, threadgroup tint_array_wrapper_2* const tint_symbol_41, device ssbOut* const tint_symbol_42) {
|
||||||
int param_18 = 0;
|
int param_18 = 0;
|
||||||
int param_19 = 0;
|
int param_19 = 0;
|
||||||
int param_20 = 0;
|
int param_20 = 0;
|
||||||
int const x_67 = x_48.aShape[1];
|
int const x_67 = (*(tint_symbol_31)).aShape[1];
|
||||||
*(tint_symbol_17) = x_67;
|
*(tint_symbol_32) = x_67;
|
||||||
int const x_71 = x_48.aShape[2];
|
int const x_71 = (*(tint_symbol_31)).aShape[2];
|
||||||
*(tint_symbol_18) = x_71;
|
*(tint_symbol_33) = x_71;
|
||||||
int const x_75 = x_48.bShape[2];
|
int const x_75 = (*(tint_symbol_31)).bShape[2];
|
||||||
*(tint_symbol_19) = x_75;
|
*(tint_symbol_34) = x_75;
|
||||||
uint const x_505 = (*(tint_symbol_20))[2];
|
uint const x_505 = (*(tint_symbol_35))[2];
|
||||||
*(tint_symbol_21) = as_type<int>(x_505);
|
*(tint_symbol_36) = as_type<int>(x_505);
|
||||||
int const x_508 = *(tint_symbol_17);
|
int const x_508 = *(tint_symbol_32);
|
||||||
param_18 = x_508;
|
param_18 = x_508;
|
||||||
int const x_510 = *(tint_symbol_18);
|
int const x_510 = *(tint_symbol_33);
|
||||||
param_19 = x_510;
|
param_19 = x_510;
|
||||||
int const x_512 = *(tint_symbol_19);
|
int const x_512 = *(tint_symbol_34);
|
||||||
param_20 = x_512;
|
param_20 = x_512;
|
||||||
mm_matMul_i1_i1_i1_(x_48, x_165, x_185, x_54, &(param_18), &(param_19), &(param_20), tint_symbol_22, tint_symbol_20, tint_symbol_17, tint_symbol_18, tint_symbol_21, tint_symbol_23, tint_symbol_19, tint_symbol_24);
|
mm_matMul_i1_i1_i1_(&(param_18), &(param_19), &(param_20), tint_symbol_37, tint_symbol_35, tint_symbol_31, tint_symbol_32, tint_symbol_33, tint_symbol_36, tint_symbol_38, tint_symbol_39, tint_symbol_34, tint_symbol_40, tint_symbol_41, tint_symbol_42);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tint_symbol_1_inner(constant Uniforms& x_48, const device ssbA& x_165, const device ssbB& x_185, device ssbOut& x_54, uint3 gl_LocalInvocationID_param, uint3 gl_GlobalInvocationID_param, uint local_invocation_index, threadgroup tint_array_wrapper_2* const tint_symbol_25, threadgroup tint_array_wrapper* const tint_symbol_26, thread uint3* const tint_symbol_27, thread uint3* const tint_symbol_28, thread int* const tint_symbol_29, thread int* const tint_symbol_30, thread int* const tint_symbol_31, thread int* const tint_symbol_32) {
|
void tint_symbol_1_inner(uint3 gl_LocalInvocationID_param, uint3 gl_GlobalInvocationID_param, uint local_invocation_index, threadgroup tint_array_wrapper_2* const tint_symbol_43, threadgroup tint_array_wrapper* const tint_symbol_44, thread uint3* const tint_symbol_45, thread uint3* const tint_symbol_46, const constant Uniforms* const tint_symbol_47, thread int* const tint_symbol_48, thread int* const tint_symbol_49, thread int* const tint_symbol_50, thread int* const tint_symbol_51, const device ssbA* const tint_symbol_52, const device ssbB* const tint_symbol_53, device ssbOut* const tint_symbol_54) {
|
||||||
{
|
{
|
||||||
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_25)).arr[i_1].arr[i_2] = float();
|
(*(tint_symbol_43)).arr[i_1].arr[i_2] = float();
|
||||||
}
|
}
|
||||||
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_26)).arr[i].arr[i_1] = float();
|
(*(tint_symbol_44)).arr[i].arr[i_1] = float();
|
||||||
}
|
}
|
||||||
threadgroup_barrier(mem_flags::mem_threadgroup);
|
threadgroup_barrier(mem_flags::mem_threadgroup);
|
||||||
*(tint_symbol_27) = gl_LocalInvocationID_param;
|
*(tint_symbol_45) = gl_LocalInvocationID_param;
|
||||||
*(tint_symbol_28) = gl_GlobalInvocationID_param;
|
*(tint_symbol_46) = gl_GlobalInvocationID_param;
|
||||||
main_1(x_48, x_165, x_185, x_54, tint_symbol_29, tint_symbol_30, tint_symbol_31, tint_symbol_28, tint_symbol_32, tint_symbol_27, tint_symbol_26, tint_symbol_25);
|
main_1(tint_symbol_47, tint_symbol_48, tint_symbol_49, tint_symbol_50, tint_symbol_46, tint_symbol_51, tint_symbol_45, tint_symbol_52, tint_symbol_44, tint_symbol_53, tint_symbol_43, tint_symbol_54);
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol_1(uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]], constant Uniforms& x_48 [[buffer(0)]], const device ssbA& x_165 [[buffer(2)]], const device ssbB& x_185 [[buffer(3)]], device ssbOut& x_54 [[buffer(1)]]) {
|
kernel void tint_symbol_1(const constant Uniforms* tint_symbol_59 [[buffer(0)]], const device ssbA* tint_symbol_64 [[buffer(2)]], const device ssbB* tint_symbol_65 [[buffer(3)]], device ssbOut* tint_symbol_66 [[buffer(1)]], uint3 gl_LocalInvocationID_param [[thread_position_in_threadgroup]], uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
||||||
threadgroup tint_array_wrapper_2 tint_symbol_33;
|
threadgroup tint_array_wrapper_2 tint_symbol_55;
|
||||||
threadgroup tint_array_wrapper tint_symbol_34;
|
threadgroup tint_array_wrapper tint_symbol_56;
|
||||||
thread uint3 tint_symbol_35 = 0u;
|
thread uint3 tint_symbol_57 = 0u;
|
||||||
thread uint3 tint_symbol_36 = 0u;
|
thread uint3 tint_symbol_58 = 0u;
|
||||||
thread int tint_symbol_37 = 0;
|
thread int tint_symbol_60 = 0;
|
||||||
thread int tint_symbol_38 = 0;
|
thread int tint_symbol_61 = 0;
|
||||||
thread int tint_symbol_39 = 0;
|
thread int tint_symbol_62 = 0;
|
||||||
thread int tint_symbol_40 = 0;
|
thread int tint_symbol_63 = 0;
|
||||||
tint_symbol_1_inner(x_48, x_165, x_185, x_54, gl_LocalInvocationID_param, gl_GlobalInvocationID_param, local_invocation_index, &(tint_symbol_33), &(tint_symbol_34), &(tint_symbol_35), &(tint_symbol_36), &(tint_symbol_37), &(tint_symbol_38), &(tint_symbol_39), &(tint_symbol_40));
|
tint_symbol_1_inner(gl_LocalInvocationID_param, gl_GlobalInvocationID_param, local_invocation_index, &(tint_symbol_55), &(tint_symbol_56), &(tint_symbol_57), &(tint_symbol_58), tint_symbol_59, &(tint_symbol_60), &(tint_symbol_61), &(tint_symbol_62), &(tint_symbol_63), tint_symbol_64, tint_symbol_65, tint_symbol_66);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,21 +40,21 @@ struct tint_symbol_3 {
|
||||||
float4 glFragColor_1 [[color(0)]];
|
float4 glFragColor_1 [[color(0)]];
|
||||||
};
|
};
|
||||||
|
|
||||||
float4x4 getFrameData_f1_(constant LeftOver& x_20, thread float* const frameID, texture2d<float, access::sample> tint_symbol_5, sampler tint_symbol_6) {
|
float4x4 getFrameData_f1_(thread float* const frameID, const constant LeftOver* const tint_symbol_5, texture2d<float, access::sample> tint_symbol_6, sampler tint_symbol_7) {
|
||||||
float fX = 0.0f;
|
float fX = 0.0f;
|
||||||
float const x_15 = *(frameID);
|
float const x_15 = *(frameID);
|
||||||
float const x_25 = x_20.spriteCount;
|
float const x_25 = (*(tint_symbol_5)).spriteCount;
|
||||||
fX = (x_15 / x_25);
|
fX = (x_15 / x_25);
|
||||||
float const x_37 = fX;
|
float const x_37 = fX;
|
||||||
float4 const x_40 = tint_symbol_5.sample(tint_symbol_6, float2(x_37, 0.0f), bias(0.0f));
|
float4 const x_40 = tint_symbol_6.sample(tint_symbol_7, float2(x_37, 0.0f), bias(0.0f));
|
||||||
float const x_44 = fX;
|
float const x_44 = fX;
|
||||||
float4 const x_47 = tint_symbol_5.sample(tint_symbol_6, 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_5.sample(tint_symbol_6, 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.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]));
|
||||||
}
|
}
|
||||||
|
|
||||||
void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_7, texture2d<float, access::sample> tint_symbol_8, sampler tint_symbol_9, texture2d<float, access::sample> tint_symbol_10, texture2d<float, access::sample> tint_symbol_11, sampler tint_symbol_12, thread float* const tint_symbol_13, texture2d<float, access::sample> tint_symbol_14, sampler tint_symbol_15, texture2d<float, access::sample> tint_symbol_16, sampler tint_symbol_17, thread float4* const tint_symbol_18) {
|
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) {
|
||||||
float4 color = 0.0f;
|
float4 color = 0.0f;
|
||||||
float2 tileUV = 0.0f;
|
float2 tileUV = 0.0f;
|
||||||
float2 tileID = 0.0f;
|
float2 tileID = 0.0f;
|
||||||
|
@ -74,17 +74,17 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_7, texture
|
||||||
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, 0.0f, 0.0f, 0.0f);
|
||||||
float2 const x_86 = *(tint_symbol_7);
|
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];
|
||||||
tileUV[1] = (1.0f - x_91);
|
tileUV[1] = (1.0f - x_91);
|
||||||
float2 const x_95 = *(tint_symbol_7);
|
float2 const x_95 = *(tint_symbol_8);
|
||||||
tileID = floor(x_95);
|
tileID = floor(x_95);
|
||||||
float2 const x_101 = x_20.spriteMapSize;
|
float2 const x_101 = (*(tint_symbol_9)).spriteMapSize;
|
||||||
sheetUnits = (float2(1.0f, 1.0f) / x_101);
|
sheetUnits = (float2(1.0f, 1.0f) / x_101);
|
||||||
float const x_106 = x_20.spriteCount;
|
float const x_106 = (*(tint_symbol_9)).spriteCount;
|
||||||
spriteUnits = (1.0f / x_106);
|
spriteUnits = (1.0f / x_106);
|
||||||
float2 const x_111 = x_20.stageSize;
|
float2 const x_111 = (*(tint_symbol_9)).stageSize;
|
||||||
stageUnits = (float2(1.0f, 1.0f) / x_111);
|
stageUnits = (float2(1.0f, 1.0f) / x_111);
|
||||||
i = 0;
|
i = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -97,15 +97,15 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_7, texture
|
||||||
switch(x_126) {
|
switch(x_126) {
|
||||||
case 1: {
|
case 1: {
|
||||||
float2 const x_150 = tileID;
|
float2 const x_150 = tileID;
|
||||||
float2 const x_154 = x_20.stageSize;
|
float2 const x_154 = (*(tint_symbol_9)).stageSize;
|
||||||
float4 const x_156 = tint_symbol_8.sample(tint_symbol_9, ((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, 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 = x_20.stageSize;
|
float2 const x_140 = (*(tint_symbol_9)).stageSize;
|
||||||
float4 const x_142 = tint_symbol_10.sample(tint_symbol_9, ((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, 0.5f)) / x_140), bias(0.0f));
|
||||||
frameID_1 = x_142[0];
|
frameID_1 = x_142[0];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -114,14 +114,14 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_7, texture
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
float const x_166 = frameID_1;
|
float const x_166 = frameID_1;
|
||||||
float const x_169 = x_20.spriteCount;
|
float const x_169 = (*(tint_symbol_9)).spriteCount;
|
||||||
float4 const x_172 = tint_symbol_11.sample(tint_symbol_12, float2(((x_166 + 0.5f) / x_169), 0.0f), bias(0.0f));
|
float4 const x_172 = tint_symbol_13.sample(tint_symbol_14, float2(((x_166 + 0.5f) / x_169), 0.0f), bias(0.0f));
|
||||||
animationData = x_172;
|
animationData = x_172;
|
||||||
float const x_174 = animationData[1];
|
float const x_174 = animationData[1];
|
||||||
if ((x_174 > 0.0f)) {
|
if ((x_174 > 0.0f)) {
|
||||||
float const x_181 = x_20.time;
|
float const x_181 = (*(tint_symbol_9)).time;
|
||||||
float const x_184 = animationData[2];
|
float const x_184 = animationData[2];
|
||||||
*(tint_symbol_13) = fmod((x_181 * x_184), 1.0f);
|
*(tint_symbol_15) = fmod((x_181 * x_184), 1.0f);
|
||||||
f = 0.0f;
|
f = 0.0f;
|
||||||
while (true) {
|
while (true) {
|
||||||
float const x_193 = f;
|
float const x_193 = f;
|
||||||
|
@ -130,16 +130,16 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_7, texture
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
float const x_197 = animationData[1];
|
float const x_197 = animationData[1];
|
||||||
float const x_198 = *(tint_symbol_13);
|
float const x_198 = *(tint_symbol_15);
|
||||||
if ((x_197 > x_198)) {
|
if ((x_197 > x_198)) {
|
||||||
float const x_203 = animationData[0];
|
float const x_203 = animationData[0];
|
||||||
frameID_1 = x_203;
|
frameID_1 = x_203;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
float const x_208 = frameID_1;
|
float const x_208 = frameID_1;
|
||||||
float const x_211 = x_20.spriteCount;
|
float const x_211 = (*(tint_symbol_9)).spriteCount;
|
||||||
float const x_214 = f;
|
float const x_214 = f;
|
||||||
float4 const x_217 = tint_symbol_11.sample(tint_symbol_12, float2(((x_208 + 0.5f) / x_211), (0.125f * x_214)), bias(0.0f));
|
float4 const x_217 = tint_symbol_13.sample(tint_symbol_14, float2(((x_208 + 0.5f) / x_211), (0.125f * x_214)), bias(0.0f));
|
||||||
animationData = x_217;
|
animationData = x_217;
|
||||||
{
|
{
|
||||||
float const x_218 = f;
|
float const x_218 = f;
|
||||||
|
@ -149,10 +149,10 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_7, texture
|
||||||
}
|
}
|
||||||
float const x_222 = frameID_1;
|
float const x_222 = frameID_1;
|
||||||
param = (x_222 + 0.5f);
|
param = (x_222 + 0.5f);
|
||||||
float4x4 const x_225 = getFrameData_f1_(x_20, &(param), tint_symbol_14, tint_symbol_15);
|
float4x4 const x_225 = getFrameData_f1_(&(param), tint_symbol_9, tint_symbol_16, tint_symbol_17);
|
||||||
frameData = x_225;
|
frameData = x_225;
|
||||||
float4 const x_228 = frameData[0];
|
float4 const x_228 = frameData[0];
|
||||||
float2 const x_231 = x_20.spriteMapSize;
|
float2 const x_231 = (*(tint_symbol_9)).spriteMapSize;
|
||||||
frameSize = (float2(x_228[3], x_228[2]) / x_231);
|
frameSize = (float2(x_228[3], x_228[2]) / x_231);
|
||||||
float4 const x_235 = frameData[0];
|
float4 const x_235 = frameData[0];
|
||||||
float2 const x_237 = sheetUnits;
|
float2 const x_237 = sheetUnits;
|
||||||
|
@ -170,13 +170,13 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_7, texture
|
||||||
float2 const x_263 = tileUV;
|
float2 const x_263 = tileUV;
|
||||||
float2 const x_264 = frameSize;
|
float2 const x_264 = frameSize;
|
||||||
float2 const x_266 = offset_1;
|
float2 const x_266 = offset_1;
|
||||||
float4 const x_268 = tint_symbol_16.sample(tint_symbol_17, ((x_263 * x_264) + x_266));
|
float4 const x_268 = tint_symbol_18.sample(tint_symbol_19, ((x_263 * x_264) + x_266));
|
||||||
color = x_268;
|
color = x_268;
|
||||||
} else {
|
} else {
|
||||||
float2 const x_274 = tileUV;
|
float2 const x_274 = tileUV;
|
||||||
float2 const x_275 = frameSize;
|
float2 const x_275 = frameSize;
|
||||||
float2 const x_277 = offset_1;
|
float2 const x_277 = offset_1;
|
||||||
float4 const x_279 = tint_symbol_16.sample(tint_symbol_17, ((x_274 * x_275) + x_277));
|
float4 const x_279 = tint_symbol_18.sample(tint_symbol_19, ((x_274 * x_275) + x_277));
|
||||||
nc = x_279;
|
nc = x_279;
|
||||||
float const x_283 = color[3];
|
float const x_283 = color[3];
|
||||||
float const x_285 = nc[3];
|
float const x_285 = nc[3];
|
||||||
|
@ -194,38 +194,38 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_7, texture
|
||||||
i = as_type<int>((as_type<uint>(x_304) + as_type<uint>(1)));
|
i = as_type<int>((as_type<uint>(x_304) + as_type<uint>(1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
float3 const x_310 = x_20.colorMul;
|
float3 const x_310 = (*(tint_symbol_9)).colorMul;
|
||||||
float4 const x_311 = color;
|
float4 const x_311 = color;
|
||||||
float3 const x_313 = (float3(x_311[0], x_311[1], x_311[2]) * x_310);
|
float3 const x_313 = (float3(x_311[0], x_311[1], x_311[2]) * x_310);
|
||||||
float4 const x_314 = color;
|
float4 const x_314 = color;
|
||||||
color = float4(x_313[0], x_313[1], x_313[2], x_314[3]);
|
color = float4(x_313[0], x_313[1], x_313[2], x_314[3]);
|
||||||
float4 const x_318 = color;
|
float4 const x_318 = color;
|
||||||
*(tint_symbol_18) = x_318;
|
*(tint_symbol_20) = x_318;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
main_out tint_symbol_inner(constant LeftOver& x_20, float2 tUV_param, float2 tileID_1_param, float2 levelUnits_param, float2 stageUnits_1_param, float3 vPosition_param, float2 vUV_param, thread float2* const tint_symbol_19, thread float2* const tint_symbol_20, thread float2* const tint_symbol_21, thread float2* const tint_symbol_22, thread float3* const tint_symbol_23, thread float2* const tint_symbol_24, texture2d<float, access::sample> tint_symbol_25, sampler tint_symbol_26, texture2d<float, access::sample> tint_symbol_27, texture2d<float, access::sample> tint_symbol_28, sampler tint_symbol_29, thread float* const tint_symbol_30, texture2d<float, access::sample> tint_symbol_31, sampler tint_symbol_32, texture2d<float, access::sample> tint_symbol_33, sampler tint_symbol_34, thread float4* const tint_symbol_35) {
|
main_out tint_symbol_inner(float2 tUV_param, float2 tileID_1_param, float2 levelUnits_param, float2 stageUnits_1_param, float3 vPosition_param, float2 vUV_param, thread float2* const tint_symbol_21, thread float2* const tint_symbol_22, thread float2* const tint_symbol_23, thread float2* const tint_symbol_24, thread float3* const tint_symbol_25, thread float2* const tint_symbol_26, const constant LeftOver* const tint_symbol_27, texture2d<float, access::sample> tint_symbol_28, sampler tint_symbol_29, texture2d<float, access::sample> tint_symbol_30, texture2d<float, access::sample> tint_symbol_31, sampler tint_symbol_32, thread float* const tint_symbol_33, texture2d<float, access::sample> tint_symbol_34, sampler tint_symbol_35, texture2d<float, access::sample> tint_symbol_36, sampler tint_symbol_37, thread float4* const tint_symbol_38) {
|
||||||
*(tint_symbol_19) = tUV_param;
|
*(tint_symbol_21) = tUV_param;
|
||||||
*(tint_symbol_20) = tileID_1_param;
|
*(tint_symbol_22) = tileID_1_param;
|
||||||
*(tint_symbol_21) = levelUnits_param;
|
*(tint_symbol_23) = levelUnits_param;
|
||||||
*(tint_symbol_22) = stageUnits_1_param;
|
*(tint_symbol_24) = stageUnits_1_param;
|
||||||
*(tint_symbol_23) = vPosition_param;
|
*(tint_symbol_25) = vPosition_param;
|
||||||
*(tint_symbol_24) = vUV_param;
|
*(tint_symbol_26) = vUV_param;
|
||||||
main_1(x_20, tint_symbol_19, tint_symbol_25, tint_symbol_26, tint_symbol_27, tint_symbol_28, tint_symbol_29, tint_symbol_30, tint_symbol_31, tint_symbol_32, tint_symbol_33, tint_symbol_34, tint_symbol_35);
|
main_1(tint_symbol_21, tint_symbol_27, tint_symbol_28, tint_symbol_29, tint_symbol_30, tint_symbol_31, tint_symbol_32, tint_symbol_33, tint_symbol_34, tint_symbol_35, tint_symbol_36, tint_symbol_37, tint_symbol_38);
|
||||||
main_out const tint_symbol_4 = {.glFragColor_1=*(tint_symbol_35)};
|
main_out const tint_symbol_4 = {.glFragColor_1=*(tint_symbol_38)};
|
||||||
return tint_symbol_4;
|
return tint_symbol_4;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment tint_symbol_3 tint_symbol(texture2d<float, access::sample> tint_symbol_42 [[texture(0)]], sampler tint_symbol_43 [[sampler(0)]], texture2d<float, access::sample> tint_symbol_44 [[texture(1)]], texture2d<float, access::sample> tint_symbol_45 [[texture(2)]], sampler tint_symbol_46 [[sampler(1)]], texture2d<float, access::sample> tint_symbol_48 [[texture(3)]], sampler tint_symbol_49 [[sampler(2)]], texture2d<float, access::sample> tint_symbol_50 [[texture(4)]], sampler tint_symbol_51 [[sampler(3)]], tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_20 [[buffer(0)]]) {
|
fragment tint_symbol_3 tint_symbol(const constant LeftOver* tint_symbol_45 [[buffer(0)]], texture2d<float, access::sample> tint_symbol_46 [[texture(0)]], sampler tint_symbol_47 [[sampler(0)]], texture2d<float, access::sample> tint_symbol_48 [[texture(1)]], texture2d<float, access::sample> tint_symbol_49 [[texture(2)]], sampler tint_symbol_50 [[sampler(1)]], texture2d<float, access::sample> tint_symbol_52 [[texture(3)]], sampler tint_symbol_53 [[sampler(2)]], texture2d<float, access::sample> tint_symbol_54 [[texture(4)]], sampler tint_symbol_55 [[sampler(3)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
|
||||||
thread float2 tint_symbol_36 = 0.0f;
|
|
||||||
thread float2 tint_symbol_37 = 0.0f;
|
|
||||||
thread float2 tint_symbol_38 = 0.0f;
|
|
||||||
thread float2 tint_symbol_39 = 0.0f;
|
thread float2 tint_symbol_39 = 0.0f;
|
||||||
thread float3 tint_symbol_40 = 0.0f;
|
thread float2 tint_symbol_40 = 0.0f;
|
||||||
thread float2 tint_symbol_41 = 0.0f;
|
thread float2 tint_symbol_41 = 0.0f;
|
||||||
thread float tint_symbol_47 = 0.0f;
|
thread float2 tint_symbol_42 = 0.0f;
|
||||||
thread float4 tint_symbol_52 = 0.0f;
|
thread float3 tint_symbol_43 = 0.0f;
|
||||||
main_out const inner_result = tint_symbol_inner(x_20, tint_symbol_1.tUV_param, tint_symbol_1.tileID_1_param, tint_symbol_1.levelUnits_param, tint_symbol_1.stageUnits_1_param, tint_symbol_1.vPosition_param, tint_symbol_1.vUV_param, &(tint_symbol_36), &(tint_symbol_37), &(tint_symbol_38), &(tint_symbol_39), &(tint_symbol_40), &(tint_symbol_41), tint_symbol_42, tint_symbol_43, tint_symbol_44, tint_symbol_45, tint_symbol_46, &(tint_symbol_47), tint_symbol_48, tint_symbol_49, tint_symbol_50, tint_symbol_51, &(tint_symbol_52));
|
thread float2 tint_symbol_44 = 0.0f;
|
||||||
|
thread float tint_symbol_51 = 0.0f;
|
||||||
|
thread float4 tint_symbol_56 = 0.0f;
|
||||||
|
main_out const inner_result = tint_symbol_inner(tint_symbol_1.tUV_param, tint_symbol_1.tileID_1_param, tint_symbol_1.levelUnits_param, tint_symbol_1.stageUnits_1_param, tint_symbol_1.vPosition_param, tint_symbol_1.vUV_param, &(tint_symbol_39), &(tint_symbol_40), &(tint_symbol_41), &(tint_symbol_42), &(tint_symbol_43), &(tint_symbol_44), tint_symbol_45, tint_symbol_46, tint_symbol_47, tint_symbol_48, tint_symbol_49, tint_symbol_50, &(tint_symbol_51), tint_symbol_52, tint_symbol_53, tint_symbol_54, tint_symbol_55, &(tint_symbol_56));
|
||||||
tint_symbol_3 wrapper_result = {};
|
tint_symbol_3 wrapper_result = {};
|
||||||
wrapper_result.glFragColor_1 = inner_result.glFragColor_1;
|
wrapper_result.glFragColor_1 = inner_result.glFragColor_1;
|
||||||
return wrapper_result;
|
return wrapper_result;
|
||||||
|
|
|
@ -182,7 +182,7 @@ lightingInfo computeHemisphericLighting_vf3_vf3_vf4_vf3_vf3_vf3_f1_(thread float
|
||||||
return x_245;
|
return x_245;
|
||||||
}
|
}
|
||||||
|
|
||||||
void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* const tint_symbol_5, thread float3* const tint_symbol_6, thread float2* const tint_symbol_7, texture2d<float, access::sample> tint_symbol_8, sampler tint_symbol_9, thread float4* const tint_symbol_10, thread bool* const tint_symbol_11, thread float2* const tint_symbol_12, thread float4* const tint_symbol_13, texture2d<float, access::sample> tint_symbol_14, sampler tint_symbol_15, thread float4* const tint_symbol_16) {
|
void main_1(thread float* const tint_symbol_5, thread float3* const tint_symbol_6, thread float2* const tint_symbol_7, texture2d<float, access::sample> tint_symbol_8, sampler tint_symbol_9, const constant LeftOver* const tint_symbol_10, thread float4* const tint_symbol_11, thread bool* const tint_symbol_12, thread float2* const tint_symbol_13, thread float4* const tint_symbol_14, texture2d<float, access::sample> tint_symbol_15, sampler tint_symbol_16, const constant Light0* const tint_symbol_17, thread float4* const tint_symbol_18) {
|
||||||
float4 tempTextureRead = 0.0f;
|
float4 tempTextureRead = 0.0f;
|
||||||
float3 rgb = 0.0f;
|
float3 rgb = 0.0f;
|
||||||
float3 output5 = 0.0f;
|
float3 output5 = 0.0f;
|
||||||
|
@ -242,33 +242,33 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con
|
||||||
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;
|
||||||
float4 const x_264 = tempTextureRead;
|
float4 const x_264 = tempTextureRead;
|
||||||
float const x_273 = x_269.textureInfoName;
|
float const x_273 = (*(tint_symbol_10)).textureInfoName;
|
||||||
rgb = (float3(x_264[0], x_264[1], x_264[2]) * x_273);
|
rgb = (float3(x_264[0], x_264[1], x_264[2]) * x_273);
|
||||||
float3 const x_279 = x_269.u_cameraPosition;
|
float3 const x_279 = (*(tint_symbol_10)).u_cameraPosition;
|
||||||
float4 const x_282 = *(tint_symbol_10);
|
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, 0.0f, 0.0f, 0.0f);
|
||||||
uvOffset = float2(0.0f, 0.0f);
|
uvOffset = float2(0.0f, 0.0f);
|
||||||
float const x_292 = x_269.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_11);
|
bool const x_298 = *(tint_symbol_12);
|
||||||
if (x_298) {
|
if (x_298) {
|
||||||
float2 const x_303 = *(tint_symbol_12);
|
float2 const x_303 = *(tint_symbol_13);
|
||||||
x_299 = x_303;
|
x_299 = x_303;
|
||||||
} else {
|
} else {
|
||||||
float2 const x_305 = *(tint_symbol_12);
|
float2 const x_305 = *(tint_symbol_13);
|
||||||
x_299 = -(x_305);
|
x_299 = -(x_305);
|
||||||
}
|
}
|
||||||
float2 const x_307 = x_299;
|
float2 const x_307 = x_299;
|
||||||
TBNUV = x_307;
|
TBNUV = x_307;
|
||||||
float4 const x_310 = *(tint_symbol_13);
|
float4 const x_310 = *(tint_symbol_14);
|
||||||
float const x_312 = normalScale;
|
float const x_312 = normalScale;
|
||||||
param_3 = (float3(x_310[0], x_310[1], x_310[2]) * x_312);
|
param_3 = (float3(x_310[0], x_310[1], x_310[2]) * x_312);
|
||||||
float4 const x_317 = *(tint_symbol_10);
|
float4 const x_317 = *(tint_symbol_11);
|
||||||
param_4 = float3(x_317[0], x_317[1], x_317[2]);
|
param_4 = float3(x_317[0], x_317[1], x_317[2]);
|
||||||
float2 const x_320 = TBNUV;
|
float2 const x_320 = TBNUV;
|
||||||
param_5 = x_320;
|
param_5 = x_320;
|
||||||
float2 const x_324 = x_269.tangentSpaceParameter0;
|
float2 const x_324 = (*(tint_symbol_10)).tangentSpaceParameter0;
|
||||||
param_6 = x_324;
|
param_6 = x_324;
|
||||||
float3x3 const x_325 = cotangent_frame_vf3_vf3_vf2_vf2_(&(param_3), &(param_4), &(param_5), &(param_6));
|
float3x3 const x_325 = cotangent_frame_vf3_vf3_vf2_vf2_(&(param_3), &(param_4), &(param_5), &(param_6));
|
||||||
TBN = x_325;
|
TBN = x_325;
|
||||||
|
@ -282,7 +282,7 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con
|
||||||
float3x3 const x_337 = invTBN;
|
float3x3 const x_337 = invTBN;
|
||||||
float3 const x_338 = output5;
|
float3 const x_338 = output5;
|
||||||
parallaxLimit = (length(float2(x_334[0], x_334[1])) / ((x_337 * -(x_338)))[2]);
|
parallaxLimit = (length(float2(x_334[0], x_334[1])) / ((x_337 * -(x_338)))[2]);
|
||||||
float const x_345 = x_269.u_parallaxScale;
|
float const x_345 = (*(tint_symbol_10)).u_parallaxScale;
|
||||||
float const x_346 = parallaxLimit;
|
float const x_346 = parallaxLimit;
|
||||||
parallaxLimit = (x_346 * x_345);
|
parallaxLimit = (x_346 * x_345);
|
||||||
float3x3 const x_349 = invTBN;
|
float3x3 const x_349 = invTBN;
|
||||||
|
@ -295,7 +295,7 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con
|
||||||
float3x3 const x_361 = invTBN;
|
float3x3 const x_361 = invTBN;
|
||||||
float3 const x_362 = output5;
|
float3 const x_362 = output5;
|
||||||
float3x3 const x_365 = invTBN;
|
float3x3 const x_365 = invTBN;
|
||||||
float4 const x_366 = *(tint_symbol_13);
|
float4 const x_366 = *(tint_symbol_14);
|
||||||
numSamples = (15.0f + (dot((x_361 * -(x_362)), (x_365 * float3(x_366[0], x_366[1], x_366[2]))) * -11.0f));
|
numSamples = (15.0f + (dot((x_361 * -(x_362)), (x_365 * float3(x_366[0], x_366[1], x_366[2]))) * -11.0f));
|
||||||
float const x_374 = numSamples;
|
float const x_374 = numSamples;
|
||||||
stepSize = (1.0f / x_374);
|
stepSize = (1.0f / x_374);
|
||||||
|
@ -311,7 +311,7 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
float2 const x_394 = *(tint_symbol_12);
|
float2 const x_394 = *(tint_symbol_13);
|
||||||
float2 const x_395 = vCurrOffset;
|
float2 const x_395 = vCurrOffset;
|
||||||
float4 const x_397 = tint_symbol_8.sample(tint_symbol_9, (x_394 + x_395));
|
float4 const x_397 = tint_symbol_8.sample(tint_symbol_9, (x_394 + x_395));
|
||||||
currSampledHeight = x_397[3];
|
currSampledHeight = x_397[3];
|
||||||
|
@ -357,10 +357,10 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con
|
||||||
parallaxOcclusion_0 = x_444;
|
parallaxOcclusion_0 = x_444;
|
||||||
float2 const x_445 = parallaxOcclusion_0;
|
float2 const x_445 = parallaxOcclusion_0;
|
||||||
uvOffset = x_445;
|
uvOffset = x_445;
|
||||||
float2 const x_449 = *(tint_symbol_12);
|
float2 const x_449 = *(tint_symbol_13);
|
||||||
float2 const x_450 = uvOffset;
|
float2 const x_450 = uvOffset;
|
||||||
float4 const x_452 = tint_symbol_8.sample(tint_symbol_9, (x_449 + x_450));
|
float4 const x_452 = tint_symbol_8.sample(tint_symbol_9, (x_449 + x_450));
|
||||||
float const x_454 = x_269.u_bumpStrength;
|
float const x_454 = (*(tint_symbol_10)).u_bumpStrength;
|
||||||
float3x3 const x_457 = TBN;
|
float3x3 const x_457 = TBN;
|
||||||
param_8 = x_457;
|
param_8 = x_457;
|
||||||
param_9 = float3(x_452[0], x_452[1], x_452[2]);
|
param_9 = float3(x_452[0], x_452[1], x_452[2]);
|
||||||
|
@ -368,16 +368,16 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con
|
||||||
float3 const x_461 = perturbNormal_mf33_vf3_f1_(&(param_8), &(param_9), &(param_10));
|
float3 const x_461 = perturbNormal_mf33_vf3_f1_(&(param_8), &(param_9), &(param_10));
|
||||||
float4 const x_462 = output4;
|
float4 const x_462 = output4;
|
||||||
output4 = float4(x_461[0], x_461[1], x_461[2], x_462[3]);
|
output4 = float4(x_461[0], x_461[1], x_461[2], x_462[3]);
|
||||||
float2 const x_465 = *(tint_symbol_12);
|
float2 const x_465 = *(tint_symbol_13);
|
||||||
float2 const x_466 = uvOffset;
|
float2 const x_466 = uvOffset;
|
||||||
output6 = (x_465 + x_466);
|
output6 = (x_465 + x_466);
|
||||||
float2 const x_474 = output6;
|
float2 const x_474 = output6;
|
||||||
float4 const x_475 = tint_symbol_14.sample(tint_symbol_15, x_474);
|
float4 const x_475 = tint_symbol_15.sample(tint_symbol_16, x_474);
|
||||||
tempTextureRead1 = x_475;
|
tempTextureRead1 = x_475;
|
||||||
float4 const x_477 = tempTextureRead1;
|
float4 const x_477 = tempTextureRead1;
|
||||||
rgb1 = float3(x_477[0], x_477[1], x_477[2]);
|
rgb1 = float3(x_477[0], x_477[1], x_477[2]);
|
||||||
float3 const x_481 = x_269.u_cameraPosition;
|
float3 const x_481 = (*(tint_symbol_10)).u_cameraPosition;
|
||||||
float4 const x_482 = *(tint_symbol_10);
|
float4 const x_482 = *(tint_symbol_11);
|
||||||
viewDirectionW_1 = normalize((x_481 - float3(x_482[0], x_482[1], x_482[2])));
|
viewDirectionW_1 = normalize((x_481 - float3(x_482[0], x_482[1], x_482[2])));
|
||||||
shadow = 1.0f;
|
shadow = 1.0f;
|
||||||
float const x_488 = *(tint_symbol_5);
|
float const x_488 = *(tint_symbol_5);
|
||||||
|
@ -390,13 +390,13 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con
|
||||||
param_11 = x_501;
|
param_11 = x_501;
|
||||||
float3 const x_503 = normalW;
|
float3 const x_503 = normalW;
|
||||||
param_12 = x_503;
|
param_12 = x_503;
|
||||||
float4 const x_507 = light0.vLightData;
|
float4 const x_507 = (*(tint_symbol_17)).vLightData;
|
||||||
param_13 = x_507;
|
param_13 = x_507;
|
||||||
float4 const x_510 = light0.vLightDiffuse;
|
float4 const x_510 = (*(tint_symbol_17)).vLightDiffuse;
|
||||||
param_14 = float3(x_510[0], x_510[1], x_510[2]);
|
param_14 = float3(x_510[0], x_510[1], x_510[2]);
|
||||||
float4 const x_514 = light0.vLightSpecular;
|
float4 const x_514 = (*(tint_symbol_17)).vLightSpecular;
|
||||||
param_15 = float3(x_514[0], x_514[1], x_514[2]);
|
param_15 = float3(x_514[0], x_514[1], x_514[2]);
|
||||||
float3 const x_518 = light0.vLightGround;
|
float3 const x_518 = (*(tint_symbol_17)).vLightGround;
|
||||||
param_16 = x_518;
|
param_16 = x_518;
|
||||||
float const x_520 = glossiness_1;
|
float const x_520 = glossiness_1;
|
||||||
param_17 = x_520;
|
param_17 = x_520;
|
||||||
|
@ -421,31 +421,31 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con
|
||||||
float3 const x_544 = specularOutput;
|
float3 const x_544 = specularOutput;
|
||||||
output3 = (x_543 + x_544);
|
output3 = (x_543 + x_544);
|
||||||
float3 const x_548 = output3;
|
float3 const x_548 = output3;
|
||||||
*(tint_symbol_16) = float4(x_548[0], x_548[1], x_548[2], 1.0f);
|
*(tint_symbol_18) = float4(x_548[0], x_548[1], x_548[2], 1.0f);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
main_out tint_symbol_inner(constant LeftOver& x_269, constant Light0& light0, float2 vMainuv_param, float4 v_output1_param, bool gl_FrontFacing_param, float2 v_uv_param, float4 v_output2_param, thread float2* const tint_symbol_17, thread float4* const tint_symbol_18, thread bool* const tint_symbol_19, thread float2* const tint_symbol_20, thread float4* const tint_symbol_21, thread float* const tint_symbol_22, thread float3* const tint_symbol_23, texture2d<float, access::sample> tint_symbol_24, sampler tint_symbol_25, texture2d<float, access::sample> tint_symbol_26, sampler tint_symbol_27, thread float4* const tint_symbol_28) {
|
main_out tint_symbol_inner(float2 vMainuv_param, float4 v_output1_param, bool gl_FrontFacing_param, float2 v_uv_param, float4 v_output2_param, thread float2* const tint_symbol_19, thread float4* const tint_symbol_20, thread bool* const tint_symbol_21, thread float2* const tint_symbol_22, thread float4* const tint_symbol_23, thread float* const tint_symbol_24, thread float3* const tint_symbol_25, texture2d<float, access::sample> tint_symbol_26, sampler tint_symbol_27, const constant LeftOver* const tint_symbol_28, texture2d<float, access::sample> tint_symbol_29, sampler tint_symbol_30, const constant Light0* const tint_symbol_31, thread float4* const tint_symbol_32) {
|
||||||
*(tint_symbol_17) = vMainuv_param;
|
*(tint_symbol_19) = vMainuv_param;
|
||||||
*(tint_symbol_18) = v_output1_param;
|
*(tint_symbol_20) = v_output1_param;
|
||||||
*(tint_symbol_19) = gl_FrontFacing_param;
|
*(tint_symbol_21) = gl_FrontFacing_param;
|
||||||
*(tint_symbol_20) = v_uv_param;
|
*(tint_symbol_22) = v_uv_param;
|
||||||
*(tint_symbol_21) = v_output2_param;
|
*(tint_symbol_23) = v_output2_param;
|
||||||
main_1(x_269, light0, tint_symbol_22, tint_symbol_23, tint_symbol_17, tint_symbol_24, tint_symbol_25, tint_symbol_18, tint_symbol_19, tint_symbol_20, tint_symbol_21, tint_symbol_26, tint_symbol_27, tint_symbol_28);
|
main_1(tint_symbol_24, tint_symbol_25, tint_symbol_19, tint_symbol_26, tint_symbol_27, tint_symbol_28, tint_symbol_20, tint_symbol_21, tint_symbol_22, tint_symbol_23, tint_symbol_29, tint_symbol_30, tint_symbol_31, tint_symbol_32);
|
||||||
main_out const tint_symbol_4 = {.glFragColor_1=*(tint_symbol_28)};
|
main_out const tint_symbol_4 = {.glFragColor_1=*(tint_symbol_32)};
|
||||||
return tint_symbol_4;
|
return tint_symbol_4;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment tint_symbol_3 tint_symbol(texture2d<float, access::sample> tint_symbol_36 [[texture(0)]], sampler tint_symbol_37 [[sampler(0)]], texture2d<float, access::sample> tint_symbol_38 [[texture(1)]], sampler tint_symbol_39 [[sampler(1)]], bool gl_FrontFacing_param [[front_facing]], tint_symbol_2 tint_symbol_1 [[stage_in]], constant LeftOver& x_269 [[buffer(0)]], constant Light0& light0 [[buffer(1)]]) {
|
fragment tint_symbol_3 tint_symbol(texture2d<float, access::sample> tint_symbol_40 [[texture(0)]], sampler tint_symbol_41 [[sampler(0)]], const constant LeftOver* tint_symbol_42 [[buffer(0)]], texture2d<float, access::sample> tint_symbol_43 [[texture(1)]], sampler tint_symbol_44 [[sampler(1)]], const constant Light0* tint_symbol_45 [[buffer(1)]], bool gl_FrontFacing_param [[front_facing]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
|
||||||
thread float2 tint_symbol_29 = 0.0f;
|
thread float2 tint_symbol_33 = 0.0f;
|
||||||
thread float4 tint_symbol_30 = 0.0f;
|
thread float4 tint_symbol_34 = 0.0f;
|
||||||
thread bool tint_symbol_31 = false;
|
thread bool tint_symbol_35 = false;
|
||||||
thread float2 tint_symbol_32 = 0.0f;
|
thread float2 tint_symbol_36 = 0.0f;
|
||||||
thread float4 tint_symbol_33 = 0.0f;
|
thread float4 tint_symbol_37 = 0.0f;
|
||||||
thread float tint_symbol_34 = 0.0f;
|
thread float tint_symbol_38 = 0.0f;
|
||||||
thread float3 tint_symbol_35 = 0.0f;
|
thread float3 tint_symbol_39 = 0.0f;
|
||||||
thread float4 tint_symbol_40 = 0.0f;
|
thread float4 tint_symbol_46 = 0.0f;
|
||||||
main_out const inner_result = tint_symbol_inner(x_269, light0, tint_symbol_1.vMainuv_param, tint_symbol_1.v_output1_param, gl_FrontFacing_param, tint_symbol_1.v_uv_param, tint_symbol_1.v_output2_param, &(tint_symbol_29), &(tint_symbol_30), &(tint_symbol_31), &(tint_symbol_32), &(tint_symbol_33), &(tint_symbol_34), &(tint_symbol_35), tint_symbol_36, tint_symbol_37, tint_symbol_38, tint_symbol_39, &(tint_symbol_40));
|
main_out const inner_result = tint_symbol_inner(tint_symbol_1.vMainuv_param, tint_symbol_1.v_output1_param, gl_FrontFacing_param, tint_symbol_1.v_uv_param, tint_symbol_1.v_output2_param, &(tint_symbol_33), &(tint_symbol_34), &(tint_symbol_35), &(tint_symbol_36), &(tint_symbol_37), &(tint_symbol_38), &(tint_symbol_39), tint_symbol_40, tint_symbol_41, tint_symbol_42, tint_symbol_43, tint_symbol_44, tint_symbol_45, &(tint_symbol_46));
|
||||||
tint_symbol_3 wrapper_result = {};
|
tint_symbol_3 wrapper_result = {};
|
||||||
wrapper_result.glFragColor_1 = inner_result.glFragColor_1;
|
wrapper_result.glFragColor_1 = inner_result.glFragColor_1;
|
||||||
return wrapper_result;
|
return wrapper_result;
|
||||||
|
|
|
@ -15,9 +15,9 @@ struct Uniforms {
|
||||||
/* 0x0010 */ int size;
|
/* 0x0010 */ int size;
|
||||||
};
|
};
|
||||||
|
|
||||||
float getAAtOutCoords_(const device ssbA& x_20, thread uint3* const tint_symbol_2) {
|
float getAAtOutCoords_(thread uint3* const tint_symbol_2, const device ssbA* const tint_symbol_3) {
|
||||||
uint const x_42 = (*(tint_symbol_2))[0];
|
uint const x_42 = (*(tint_symbol_2))[0];
|
||||||
float const x_44 = x_20.A[x_42];
|
float const x_44 = (*(tint_symbol_3)).A[x_42];
|
||||||
return x_44;
|
return x_44;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,25 +30,25 @@ float unaryOperation_f1_(thread float* const a) {
|
||||||
return log(x_55);
|
return log(x_55);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setOutput_i1_f1_(device ssbOut& x_16, thread int* const flatIndex, thread float* const value) {
|
void setOutput_i1_f1_(thread int* const flatIndex, thread float* const value, device ssbOut* const tint_symbol_4) {
|
||||||
int const x_27 = *(flatIndex);
|
int const x_27 = *(flatIndex);
|
||||||
float const x_28 = *(value);
|
float const x_28 = *(value);
|
||||||
x_16.result[x_27] = x_28;
|
(*(tint_symbol_4)).result[x_27] = x_28;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void main_1(constant Uniforms& x_24, const device ssbA& x_20, device ssbOut& x_16, thread uint3* const tint_symbol_3) {
|
void main_1(thread uint3* const tint_symbol_5, const constant Uniforms* const tint_symbol_6, const device ssbA* const tint_symbol_7, device ssbOut* const tint_symbol_8) {
|
||||||
int index = 0;
|
int index = 0;
|
||||||
float a_1 = 0.0f;
|
float a_1 = 0.0f;
|
||||||
float param = 0.0f;
|
float param = 0.0f;
|
||||||
int param_1 = 0;
|
int param_1 = 0;
|
||||||
float param_2 = 0.0f;
|
float param_2 = 0.0f;
|
||||||
uint const x_61 = (*(tint_symbol_3))[0];
|
uint const x_61 = (*(tint_symbol_5))[0];
|
||||||
index = as_type<int>(x_61);
|
index = as_type<int>(x_61);
|
||||||
int const x_63 = index;
|
int const x_63 = index;
|
||||||
int const x_70 = x_24.size;
|
int const x_70 = (*(tint_symbol_6)).size;
|
||||||
if ((x_63 < x_70)) {
|
if ((x_63 < x_70)) {
|
||||||
float const x_75 = getAAtOutCoords_(x_20, tint_symbol_3);
|
float const x_75 = getAAtOutCoords_(tint_symbol_5, tint_symbol_7);
|
||||||
a_1 = x_75;
|
a_1 = x_75;
|
||||||
float const x_77 = a_1;
|
float const x_77 = a_1;
|
||||||
param = x_77;
|
param = x_77;
|
||||||
|
@ -56,19 +56,19 @@ void main_1(constant Uniforms& x_24, const device ssbA& x_20, device ssbOut& x_1
|
||||||
int const x_80 = index;
|
int const x_80 = index;
|
||||||
param_1 = x_80;
|
param_1 = x_80;
|
||||||
param_2 = x_78;
|
param_2 = x_78;
|
||||||
setOutput_i1_f1_(x_16, &(param_1), &(param_2));
|
setOutput_i1_f1_(&(param_1), &(param_2), tint_symbol_8);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tint_symbol_1_inner(constant Uniforms& x_24, const device ssbA& x_20, device ssbOut& x_16, uint3 gl_GlobalInvocationID_param, thread uint3* const tint_symbol_4) {
|
void tint_symbol_1_inner(uint3 gl_GlobalInvocationID_param, thread uint3* const tint_symbol_9, const constant Uniforms* const tint_symbol_10, const device ssbA* const tint_symbol_11, device ssbOut* const tint_symbol_12) {
|
||||||
*(tint_symbol_4) = gl_GlobalInvocationID_param;
|
*(tint_symbol_9) = gl_GlobalInvocationID_param;
|
||||||
main_1(x_24, x_20, x_16, tint_symbol_4);
|
main_1(tint_symbol_9, tint_symbol_10, tint_symbol_11, tint_symbol_12);
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol_1(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], constant Uniforms& x_24 [[buffer(0)]], const device ssbA& x_20 [[buffer(2)]], device ssbOut& x_16 [[buffer(1)]]) {
|
kernel void tint_symbol_1(const constant Uniforms* tint_symbol_14 [[buffer(0)]], const device ssbA* tint_symbol_15 [[buffer(2)]], device ssbOut* tint_symbol_16 [[buffer(1)]], uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]]) {
|
||||||
thread uint3 tint_symbol_5 = 0u;
|
thread uint3 tint_symbol_13 = 0u;
|
||||||
tint_symbol_1_inner(x_24, x_20, x_16, gl_GlobalInvocationID_param, &(tint_symbol_5));
|
tint_symbol_1_inner(gl_GlobalInvocationID_param, &(tint_symbol_13), tint_symbol_14, tint_symbol_15, tint_symbol_16);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
using namespace metal;
|
using namespace metal;
|
||||||
struct S {
|
struct S {
|
||||||
/* 0x0000 */ float a;
|
float a;
|
||||||
};
|
};
|
||||||
|
|
||||||
fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_1 [[texture(0)]], texture2d<float, access::sample> tint_symbol_2 [[texture(1)]], texture2d<float, access::sample> tint_symbol_3 [[texture(2)]], texture2d<float, access::sample> tint_symbol_4 [[texture(3)]], texture2d<float, access::sample> tint_symbol_5 [[texture(4)]], texture2d<float, access::sample> tint_symbol_6 [[texture(5)]], texture2d<float, access::sample> tint_symbol_7 [[texture(6)]], texture2d<float, access::sample> tint_symbol_8 [[texture(7)]], depth2d<float, access::sample> tint_symbol_9 [[texture(8)]], depth2d<float, access::sample> tint_symbol_10 [[texture(9)]], depth2d<float, access::sample> tint_symbol_11 [[texture(10)]], depth2d<float, access::sample> tint_symbol_12 [[texture(11)]], depth2d<float, access::sample> tint_symbol_13 [[texture(12)]], depth2d<float, access::sample> tint_symbol_14 [[texture(13)]], depth2d<float, access::sample> tint_symbol_15 [[texture(14)]], depth2d<float, access::sample> tint_symbol_16 [[texture(15)]], sampler tint_symbol_17 [[sampler(0)]], sampler tint_symbol_18 [[sampler(1)]], sampler tint_symbol_19 [[sampler(2)]], sampler tint_symbol_20 [[sampler(3)]], sampler tint_symbol_21 [[sampler(4)]], sampler tint_symbol_22 [[sampler(5)]], sampler tint_symbol_23 [[sampler(6)]], sampler tint_symbol_24 [[sampler(7)]], sampler tint_symbol_25 [[sampler(8)]], sampler tint_symbol_26 [[sampler(9)]], sampler tint_symbol_27 [[sampler(10)]], sampler tint_symbol_28 [[sampler(11)]], sampler tint_symbol_29 [[sampler(12)]], sampler tint_symbol_30 [[sampler(13)]], sampler tint_symbol_31 [[sampler(14)]], sampler tint_symbol_32 [[sampler(15)]]) {
|
fragment void tint_symbol() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,15 +5,15 @@ struct ResultMatrix {
|
||||||
/* 0x0000 */ float numbers[1];
|
/* 0x0000 */ float numbers[1];
|
||||||
};
|
};
|
||||||
struct FirstMatrix {
|
struct FirstMatrix {
|
||||||
/* 0x0000 */ float numbers[1];
|
float numbers[1];
|
||||||
};
|
};
|
||||||
struct SecondMatrix {
|
struct SecondMatrix {
|
||||||
/* 0x0000 */ float numbers[1];
|
float numbers[1];
|
||||||
};
|
};
|
||||||
struct Uniforms {
|
struct Uniforms {
|
||||||
/* 0x0000 */ float tint_symbol;
|
float tint_symbol;
|
||||||
/* 0x0004 */ int sizeA;
|
int sizeA;
|
||||||
/* 0x0008 */ int sizeB;
|
int sizeB;
|
||||||
};
|
};
|
||||||
|
|
||||||
float binaryOperation_f1_f1_(thread float* const a, thread float* const b) {
|
float binaryOperation_f1_f1_(thread float* const a, thread float* const b) {
|
||||||
|
@ -37,7 +37,7 @@ float binaryOperation_f1_f1_(thread float* const a, thread float* const b) {
|
||||||
return x_41;
|
return x_41;
|
||||||
}
|
}
|
||||||
|
|
||||||
void main_1(device ResultMatrix& resultMatrix, thread uint3* const tint_symbol_2) {
|
void main_1(thread uint3* const tint_symbol_2, device ResultMatrix* const tint_symbol_3) {
|
||||||
int index = 0;
|
int index = 0;
|
||||||
int a_1 = 0;
|
int a_1 = 0;
|
||||||
float param = 0.0f;
|
float param = 0.0f;
|
||||||
|
@ -49,18 +49,18 @@ void main_1(device ResultMatrix& resultMatrix, thread uint3* const tint_symbol_2
|
||||||
param = -4.0f;
|
param = -4.0f;
|
||||||
param_1 = -3.0f;
|
param_1 = -3.0f;
|
||||||
float const x_68 = binaryOperation_f1_f1_(&(param), &(param_1));
|
float const x_68 = binaryOperation_f1_f1_(&(param), &(param_1));
|
||||||
resultMatrix.numbers[x_63] = x_68;
|
(*(tint_symbol_3)).numbers[x_63] = x_68;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tint_symbol_1_inner(device ResultMatrix& resultMatrix, uint3 gl_GlobalInvocationID_param, thread uint3* const tint_symbol_3) {
|
void tint_symbol_1_inner(uint3 gl_GlobalInvocationID_param, thread uint3* const tint_symbol_4, device ResultMatrix* const tint_symbol_5) {
|
||||||
*(tint_symbol_3) = gl_GlobalInvocationID_param;
|
*(tint_symbol_4) = gl_GlobalInvocationID_param;
|
||||||
main_1(resultMatrix, tint_symbol_3);
|
main_1(tint_symbol_4, tint_symbol_5);
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol_1(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], device ResultMatrix& resultMatrix [[buffer(0)]]) {
|
kernel void tint_symbol_1(device ResultMatrix* tint_symbol_7 [[buffer(0)]], uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]]) {
|
||||||
thread uint3 tint_symbol_4 = 0u;
|
thread uint3 tint_symbol_6 = 0u;
|
||||||
tint_symbol_1_inner(resultMatrix, gl_GlobalInvocationID_param, &(tint_symbol_4));
|
tint_symbol_1_inner(gl_GlobalInvocationID_param, &(tint_symbol_6), tint_symbol_7);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,12 @@ float3 Bad(uint index, float3 rd) {
|
||||||
return normalize(normal);
|
return normalize(normal);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tint_symbol_inner(device S& io, uint idx) {
|
void tint_symbol_inner(uint idx, device S* const tint_symbol_1) {
|
||||||
io.v = Bad(io.i, io.v);
|
(*(tint_symbol_1)).v = Bad((*(tint_symbol_1)).i, (*(tint_symbol_1)).v);
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S& io [[buffer(0)]]) {
|
kernel void tint_symbol(device S* tint_symbol_2 [[buffer(0)]], uint idx [[thread_index_in_threadgroup]]) {
|
||||||
tint_symbol_inner(io, idx);
|
tint_symbol_inner(idx, tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,12 +14,12 @@ struct TestData {
|
||||||
/* 0x0000 */ tint_array_wrapper data;
|
/* 0x0000 */ tint_array_wrapper data;
|
||||||
};
|
};
|
||||||
|
|
||||||
int runTest(constant Constants& constants, device TestData& s) {
|
int runTest(device TestData* const tint_symbol_1, const constant Constants* const tint_symbol_2) {
|
||||||
return atomic_load_explicit(&(s.data.arr[(0u + uint(constants.zero))]), memory_order_relaxed);
|
return atomic_load_explicit(&((*(tint_symbol_1)).data.arr[(0u + uint((*(tint_symbol_2)).zero))]), memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void tint_symbol(constant Constants& constants [[buffer(0)]], device Result& result [[buffer(1)]], device TestData& s [[buffer(2)]]) {
|
kernel void tint_symbol(device Result* tint_symbol_3 [[buffer(1)]], device TestData* tint_symbol_4 [[buffer(2)]], const constant Constants* tint_symbol_5 [[buffer(0)]]) {
|
||||||
result.value = uint(runTest(constants, s));
|
(*(tint_symbol_3)).value = uint(runTest(tint_symbol_4, tint_symbol_5));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ struct Constants {
|
||||||
/* 0x0000 */ uint zero;
|
/* 0x0000 */ uint zero;
|
||||||
};
|
};
|
||||||
struct Result {
|
struct Result {
|
||||||
/* 0x0000 */ uint value;
|
uint value;
|
||||||
};
|
};
|
||||||
struct tint_array_wrapper {
|
struct tint_array_wrapper {
|
||||||
uint arr[3];
|
uint arr[3];
|
||||||
|
@ -14,9 +14,9 @@ struct S {
|
||||||
tint_array_wrapper data;
|
tint_array_wrapper data;
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void tint_symbol(constant Constants& constants [[buffer(0)]]) {
|
kernel void tint_symbol(const constant Constants* tint_symbol_2 [[buffer(0)]]) {
|
||||||
thread S tint_symbol_1 = {};
|
thread S tint_symbol_1 = {};
|
||||||
tint_symbol_1.data.arr[constants.zero] = 0u;
|
tint_symbol_1.data.arr[(*(tint_symbol_2)).zero] = 0u;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@ struct S {
|
||||||
/* 0x002c */ int8_t tint_pad_1[4];
|
/* 0x002c */ int8_t tint_pad_1[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
fragment void tint_symbol_1(constant S& data [[buffer(0)]]) {
|
fragment void tint_symbol_1(const constant S* tint_symbol_2 [[buffer(0)]]) {
|
||||||
float2 const x = (data.tint_symbol * data.vector);
|
float2 const x = ((*(tint_symbol_2)).tint_symbol * (*(tint_symbol_2)).vector);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@ struct S {
|
||||||
/* 0x003c */ int8_t tint_pad[4];
|
/* 0x003c */ int8_t tint_pad[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
fragment void tint_symbol_1(constant S& data [[buffer(0)]]) {
|
fragment void tint_symbol_1(const constant S* tint_symbol_2 [[buffer(0)]]) {
|
||||||
float3 const x = (data.tint_symbol * data.vector);
|
float3 const x = ((*(tint_symbol_2)).tint_symbol * (*(tint_symbol_2)).vector);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@ struct S {
|
||||||
/* 0x003c */ int8_t tint_pad[4];
|
/* 0x003c */ int8_t tint_pad[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
fragment void tint_symbol_1(constant S& data [[buffer(0)]]) {
|
fragment void tint_symbol_1(const constant S* tint_symbol_2 [[buffer(0)]]) {
|
||||||
float3 const x = (data.vector * data.tint_symbol);
|
float3 const x = ((*(tint_symbol_2)).vector * (*(tint_symbol_2)).tint_symbol);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@ struct S {
|
||||||
/* 0x004c */ int8_t tint_pad[4];
|
/* 0x004c */ int8_t tint_pad[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
fragment void tint_symbol_1(constant S& data [[buffer(0)]]) {
|
fragment void tint_symbol_1(const constant S* tint_symbol_2 [[buffer(0)]]) {
|
||||||
float4 const x = (data.vector * data.tint_symbol);
|
float4 const x = ((*(tint_symbol_2)).vector * (*(tint_symbol_2)).tint_symbol);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,127 +17,127 @@ struct S {
|
||||||
/* 0x000c */ int8_t tint_pad[4];
|
/* 0x000c */ int8_t tint_pad[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
void f(constant S& U) {
|
void f(const constant S* const tint_symbol) {
|
||||||
float3 v = U.v;
|
float3 v = (*(tint_symbol)).v;
|
||||||
float x = U.v[0];
|
float x = (*(tint_symbol)).v[0];
|
||||||
float y = U.v[1];
|
float y = (*(tint_symbol)).v[1];
|
||||||
float z = U.v[2];
|
float z = (*(tint_symbol)).v[2];
|
||||||
float2 xx = float3(U.v).xx;
|
float2 xx = float3((*(tint_symbol)).v).xx;
|
||||||
float2 xy = float3(U.v).xy;
|
float2 xy = float3((*(tint_symbol)).v).xy;
|
||||||
float2 xz = float3(U.v).xz;
|
float2 xz = float3((*(tint_symbol)).v).xz;
|
||||||
float2 yx = float3(U.v).yx;
|
float2 yx = float3((*(tint_symbol)).v).yx;
|
||||||
float2 yy = float3(U.v).yy;
|
float2 yy = float3((*(tint_symbol)).v).yy;
|
||||||
float2 yz = float3(U.v).yz;
|
float2 yz = float3((*(tint_symbol)).v).yz;
|
||||||
float2 zx = float3(U.v).zx;
|
float2 zx = float3((*(tint_symbol)).v).zx;
|
||||||
float2 zy = float3(U.v).zy;
|
float2 zy = float3((*(tint_symbol)).v).zy;
|
||||||
float2 zz = float3(U.v).zz;
|
float2 zz = float3((*(tint_symbol)).v).zz;
|
||||||
float3 xxx = float3(U.v).xxx;
|
float3 xxx = float3((*(tint_symbol)).v).xxx;
|
||||||
float3 xxy = float3(U.v).xxy;
|
float3 xxy = float3((*(tint_symbol)).v).xxy;
|
||||||
float3 xxz = float3(U.v).xxz;
|
float3 xxz = float3((*(tint_symbol)).v).xxz;
|
||||||
float3 xyx = float3(U.v).xyx;
|
float3 xyx = float3((*(tint_symbol)).v).xyx;
|
||||||
float3 xyy = float3(U.v).xyy;
|
float3 xyy = float3((*(tint_symbol)).v).xyy;
|
||||||
float3 xyz = float3(U.v).xyz;
|
float3 xyz = float3((*(tint_symbol)).v).xyz;
|
||||||
float3 xzx = float3(U.v).xzx;
|
float3 xzx = float3((*(tint_symbol)).v).xzx;
|
||||||
float3 xzy = float3(U.v).xzy;
|
float3 xzy = float3((*(tint_symbol)).v).xzy;
|
||||||
float3 xzz = float3(U.v).xzz;
|
float3 xzz = float3((*(tint_symbol)).v).xzz;
|
||||||
float3 yxx = float3(U.v).yxx;
|
float3 yxx = float3((*(tint_symbol)).v).yxx;
|
||||||
float3 yxy = float3(U.v).yxy;
|
float3 yxy = float3((*(tint_symbol)).v).yxy;
|
||||||
float3 yxz = float3(U.v).yxz;
|
float3 yxz = float3((*(tint_symbol)).v).yxz;
|
||||||
float3 yyx = float3(U.v).yyx;
|
float3 yyx = float3((*(tint_symbol)).v).yyx;
|
||||||
float3 yyy = float3(U.v).yyy;
|
float3 yyy = float3((*(tint_symbol)).v).yyy;
|
||||||
float3 yyz = float3(U.v).yyz;
|
float3 yyz = float3((*(tint_symbol)).v).yyz;
|
||||||
float3 yzx = float3(U.v).yzx;
|
float3 yzx = float3((*(tint_symbol)).v).yzx;
|
||||||
float3 yzy = float3(U.v).yzy;
|
float3 yzy = float3((*(tint_symbol)).v).yzy;
|
||||||
float3 yzz = float3(U.v).yzz;
|
float3 yzz = float3((*(tint_symbol)).v).yzz;
|
||||||
float3 zxx = float3(U.v).zxx;
|
float3 zxx = float3((*(tint_symbol)).v).zxx;
|
||||||
float3 zxy = float3(U.v).zxy;
|
float3 zxy = float3((*(tint_symbol)).v).zxy;
|
||||||
float3 zxz = float3(U.v).zxz;
|
float3 zxz = float3((*(tint_symbol)).v).zxz;
|
||||||
float3 zyx = float3(U.v).zyx;
|
float3 zyx = float3((*(tint_symbol)).v).zyx;
|
||||||
float3 zyy = float3(U.v).zyy;
|
float3 zyy = float3((*(tint_symbol)).v).zyy;
|
||||||
float3 zyz = float3(U.v).zyz;
|
float3 zyz = float3((*(tint_symbol)).v).zyz;
|
||||||
float3 zzx = float3(U.v).zzx;
|
float3 zzx = float3((*(tint_symbol)).v).zzx;
|
||||||
float3 zzy = float3(U.v).zzy;
|
float3 zzy = float3((*(tint_symbol)).v).zzy;
|
||||||
float3 zzz = float3(U.v).zzz;
|
float3 zzz = float3((*(tint_symbol)).v).zzz;
|
||||||
float4 xxxx = float3(U.v).xxxx;
|
float4 xxxx = float3((*(tint_symbol)).v).xxxx;
|
||||||
float4 xxxy = float3(U.v).xxxy;
|
float4 xxxy = float3((*(tint_symbol)).v).xxxy;
|
||||||
float4 xxxz = float3(U.v).xxxz;
|
float4 xxxz = float3((*(tint_symbol)).v).xxxz;
|
||||||
float4 xxyx = float3(U.v).xxyx;
|
float4 xxyx = float3((*(tint_symbol)).v).xxyx;
|
||||||
float4 xxyy = float3(U.v).xxyy;
|
float4 xxyy = float3((*(tint_symbol)).v).xxyy;
|
||||||
float4 xxyz = float3(U.v).xxyz;
|
float4 xxyz = float3((*(tint_symbol)).v).xxyz;
|
||||||
float4 xxzx = float3(U.v).xxzx;
|
float4 xxzx = float3((*(tint_symbol)).v).xxzx;
|
||||||
float4 xxzy = float3(U.v).xxzy;
|
float4 xxzy = float3((*(tint_symbol)).v).xxzy;
|
||||||
float4 xxzz = float3(U.v).xxzz;
|
float4 xxzz = float3((*(tint_symbol)).v).xxzz;
|
||||||
float4 xyxx = float3(U.v).xyxx;
|
float4 xyxx = float3((*(tint_symbol)).v).xyxx;
|
||||||
float4 xyxy = float3(U.v).xyxy;
|
float4 xyxy = float3((*(tint_symbol)).v).xyxy;
|
||||||
float4 xyxz = float3(U.v).xyxz;
|
float4 xyxz = float3((*(tint_symbol)).v).xyxz;
|
||||||
float4 xyyx = float3(U.v).xyyx;
|
float4 xyyx = float3((*(tint_symbol)).v).xyyx;
|
||||||
float4 xyyy = float3(U.v).xyyy;
|
float4 xyyy = float3((*(tint_symbol)).v).xyyy;
|
||||||
float4 xyyz = float3(U.v).xyyz;
|
float4 xyyz = float3((*(tint_symbol)).v).xyyz;
|
||||||
float4 xyzx = float3(U.v).xyzx;
|
float4 xyzx = float3((*(tint_symbol)).v).xyzx;
|
||||||
float4 xyzy = float3(U.v).xyzy;
|
float4 xyzy = float3((*(tint_symbol)).v).xyzy;
|
||||||
float4 xyzz = float3(U.v).xyzz;
|
float4 xyzz = float3((*(tint_symbol)).v).xyzz;
|
||||||
float4 xzxx = float3(U.v).xzxx;
|
float4 xzxx = float3((*(tint_symbol)).v).xzxx;
|
||||||
float4 xzxy = float3(U.v).xzxy;
|
float4 xzxy = float3((*(tint_symbol)).v).xzxy;
|
||||||
float4 xzxz = float3(U.v).xzxz;
|
float4 xzxz = float3((*(tint_symbol)).v).xzxz;
|
||||||
float4 xzyx = float3(U.v).xzyx;
|
float4 xzyx = float3((*(tint_symbol)).v).xzyx;
|
||||||
float4 xzyy = float3(U.v).xzyy;
|
float4 xzyy = float3((*(tint_symbol)).v).xzyy;
|
||||||
float4 xzyz = float3(U.v).xzyz;
|
float4 xzyz = float3((*(tint_symbol)).v).xzyz;
|
||||||
float4 xzzx = float3(U.v).xzzx;
|
float4 xzzx = float3((*(tint_symbol)).v).xzzx;
|
||||||
float4 xzzy = float3(U.v).xzzy;
|
float4 xzzy = float3((*(tint_symbol)).v).xzzy;
|
||||||
float4 xzzz = float3(U.v).xzzz;
|
float4 xzzz = float3((*(tint_symbol)).v).xzzz;
|
||||||
float4 yxxx = float3(U.v).yxxx;
|
float4 yxxx = float3((*(tint_symbol)).v).yxxx;
|
||||||
float4 yxxy = float3(U.v).yxxy;
|
float4 yxxy = float3((*(tint_symbol)).v).yxxy;
|
||||||
float4 yxxz = float3(U.v).yxxz;
|
float4 yxxz = float3((*(tint_symbol)).v).yxxz;
|
||||||
float4 yxyx = float3(U.v).yxyx;
|
float4 yxyx = float3((*(tint_symbol)).v).yxyx;
|
||||||
float4 yxyy = float3(U.v).yxyy;
|
float4 yxyy = float3((*(tint_symbol)).v).yxyy;
|
||||||
float4 yxyz = float3(U.v).yxyz;
|
float4 yxyz = float3((*(tint_symbol)).v).yxyz;
|
||||||
float4 yxzx = float3(U.v).yxzx;
|
float4 yxzx = float3((*(tint_symbol)).v).yxzx;
|
||||||
float4 yxzy = float3(U.v).yxzy;
|
float4 yxzy = float3((*(tint_symbol)).v).yxzy;
|
||||||
float4 yxzz = float3(U.v).yxzz;
|
float4 yxzz = float3((*(tint_symbol)).v).yxzz;
|
||||||
float4 yyxx = float3(U.v).yyxx;
|
float4 yyxx = float3((*(tint_symbol)).v).yyxx;
|
||||||
float4 yyxy = float3(U.v).yyxy;
|
float4 yyxy = float3((*(tint_symbol)).v).yyxy;
|
||||||
float4 yyxz = float3(U.v).yyxz;
|
float4 yyxz = float3((*(tint_symbol)).v).yyxz;
|
||||||
float4 yyyx = float3(U.v).yyyx;
|
float4 yyyx = float3((*(tint_symbol)).v).yyyx;
|
||||||
float4 yyyy = float3(U.v).yyyy;
|
float4 yyyy = float3((*(tint_symbol)).v).yyyy;
|
||||||
float4 yyyz = float3(U.v).yyyz;
|
float4 yyyz = float3((*(tint_symbol)).v).yyyz;
|
||||||
float4 yyzx = float3(U.v).yyzx;
|
float4 yyzx = float3((*(tint_symbol)).v).yyzx;
|
||||||
float4 yyzy = float3(U.v).yyzy;
|
float4 yyzy = float3((*(tint_symbol)).v).yyzy;
|
||||||
float4 yyzz = float3(U.v).yyzz;
|
float4 yyzz = float3((*(tint_symbol)).v).yyzz;
|
||||||
float4 yzxx = float3(U.v).yzxx;
|
float4 yzxx = float3((*(tint_symbol)).v).yzxx;
|
||||||
float4 yzxy = float3(U.v).yzxy;
|
float4 yzxy = float3((*(tint_symbol)).v).yzxy;
|
||||||
float4 yzxz = float3(U.v).yzxz;
|
float4 yzxz = float3((*(tint_symbol)).v).yzxz;
|
||||||
float4 yzyx = float3(U.v).yzyx;
|
float4 yzyx = float3((*(tint_symbol)).v).yzyx;
|
||||||
float4 yzyy = float3(U.v).yzyy;
|
float4 yzyy = float3((*(tint_symbol)).v).yzyy;
|
||||||
float4 yzyz = float3(U.v).yzyz;
|
float4 yzyz = float3((*(tint_symbol)).v).yzyz;
|
||||||
float4 yzzx = float3(U.v).yzzx;
|
float4 yzzx = float3((*(tint_symbol)).v).yzzx;
|
||||||
float4 yzzy = float3(U.v).yzzy;
|
float4 yzzy = float3((*(tint_symbol)).v).yzzy;
|
||||||
float4 yzzz = float3(U.v).yzzz;
|
float4 yzzz = float3((*(tint_symbol)).v).yzzz;
|
||||||
float4 zxxx = float3(U.v).zxxx;
|
float4 zxxx = float3((*(tint_symbol)).v).zxxx;
|
||||||
float4 zxxy = float3(U.v).zxxy;
|
float4 zxxy = float3((*(tint_symbol)).v).zxxy;
|
||||||
float4 zxxz = float3(U.v).zxxz;
|
float4 zxxz = float3((*(tint_symbol)).v).zxxz;
|
||||||
float4 zxyx = float3(U.v).zxyx;
|
float4 zxyx = float3((*(tint_symbol)).v).zxyx;
|
||||||
float4 zxyy = float3(U.v).zxyy;
|
float4 zxyy = float3((*(tint_symbol)).v).zxyy;
|
||||||
float4 zxyz = float3(U.v).zxyz;
|
float4 zxyz = float3((*(tint_symbol)).v).zxyz;
|
||||||
float4 zxzx = float3(U.v).zxzx;
|
float4 zxzx = float3((*(tint_symbol)).v).zxzx;
|
||||||
float4 zxzy = float3(U.v).zxzy;
|
float4 zxzy = float3((*(tint_symbol)).v).zxzy;
|
||||||
float4 zxzz = float3(U.v).zxzz;
|
float4 zxzz = float3((*(tint_symbol)).v).zxzz;
|
||||||
float4 zyxx = float3(U.v).zyxx;
|
float4 zyxx = float3((*(tint_symbol)).v).zyxx;
|
||||||
float4 zyxy = float3(U.v).zyxy;
|
float4 zyxy = float3((*(tint_symbol)).v).zyxy;
|
||||||
float4 zyxz = float3(U.v).zyxz;
|
float4 zyxz = float3((*(tint_symbol)).v).zyxz;
|
||||||
float4 zyyx = float3(U.v).zyyx;
|
float4 zyyx = float3((*(tint_symbol)).v).zyyx;
|
||||||
float4 zyyy = float3(U.v).zyyy;
|
float4 zyyy = float3((*(tint_symbol)).v).zyyy;
|
||||||
float4 zyyz = float3(U.v).zyyz;
|
float4 zyyz = float3((*(tint_symbol)).v).zyyz;
|
||||||
float4 zyzx = float3(U.v).zyzx;
|
float4 zyzx = float3((*(tint_symbol)).v).zyzx;
|
||||||
float4 zyzy = float3(U.v).zyzy;
|
float4 zyzy = float3((*(tint_symbol)).v).zyzy;
|
||||||
float4 zyzz = float3(U.v).zyzz;
|
float4 zyzz = float3((*(tint_symbol)).v).zyzz;
|
||||||
float4 zzxx = float3(U.v).zzxx;
|
float4 zzxx = float3((*(tint_symbol)).v).zzxx;
|
||||||
float4 zzxy = float3(U.v).zzxy;
|
float4 zzxy = float3((*(tint_symbol)).v).zzxy;
|
||||||
float4 zzxz = float3(U.v).zzxz;
|
float4 zzxz = float3((*(tint_symbol)).v).zzxz;
|
||||||
float4 zzyx = float3(U.v).zzyx;
|
float4 zzyx = float3((*(tint_symbol)).v).zzyx;
|
||||||
float4 zzyy = float3(U.v).zzyy;
|
float4 zzyy = float3((*(tint_symbol)).v).zzyy;
|
||||||
float4 zzyz = float3(U.v).zzyz;
|
float4 zzyz = float3((*(tint_symbol)).v).zzyz;
|
||||||
float4 zzzx = float3(U.v).zzzx;
|
float4 zzzx = float3((*(tint_symbol)).v).zzzx;
|
||||||
float4 zzzy = float3(U.v).zzzy;
|
float4 zzzy = float3((*(tint_symbol)).v).zzzy;
|
||||||
float4 zzzz = float3(U.v).zzzz;
|
float4 zzzz = float3((*(tint_symbol)).v).zzzz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,127 +6,127 @@ struct S {
|
||||||
/* 0x000c */ int8_t tint_pad[4];
|
/* 0x000c */ int8_t tint_pad[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
void f(constant S& U) {
|
void f(const constant S* const tint_symbol) {
|
||||||
int3 v = U.v;
|
int3 v = (*(tint_symbol)).v;
|
||||||
int x = U.v[0];
|
int x = (*(tint_symbol)).v[0];
|
||||||
int y = U.v[1];
|
int y = (*(tint_symbol)).v[1];
|
||||||
int z = U.v[2];
|
int z = (*(tint_symbol)).v[2];
|
||||||
int2 xx = int3(U.v).xx;
|
int2 xx = int3((*(tint_symbol)).v).xx;
|
||||||
int2 xy = int3(U.v).xy;
|
int2 xy = int3((*(tint_symbol)).v).xy;
|
||||||
int2 xz = int3(U.v).xz;
|
int2 xz = int3((*(tint_symbol)).v).xz;
|
||||||
int2 yx = int3(U.v).yx;
|
int2 yx = int3((*(tint_symbol)).v).yx;
|
||||||
int2 yy = int3(U.v).yy;
|
int2 yy = int3((*(tint_symbol)).v).yy;
|
||||||
int2 yz = int3(U.v).yz;
|
int2 yz = int3((*(tint_symbol)).v).yz;
|
||||||
int2 zx = int3(U.v).zx;
|
int2 zx = int3((*(tint_symbol)).v).zx;
|
||||||
int2 zy = int3(U.v).zy;
|
int2 zy = int3((*(tint_symbol)).v).zy;
|
||||||
int2 zz = int3(U.v).zz;
|
int2 zz = int3((*(tint_symbol)).v).zz;
|
||||||
int3 xxx = int3(U.v).xxx;
|
int3 xxx = int3((*(tint_symbol)).v).xxx;
|
||||||
int3 xxy = int3(U.v).xxy;
|
int3 xxy = int3((*(tint_symbol)).v).xxy;
|
||||||
int3 xxz = int3(U.v).xxz;
|
int3 xxz = int3((*(tint_symbol)).v).xxz;
|
||||||
int3 xyx = int3(U.v).xyx;
|
int3 xyx = int3((*(tint_symbol)).v).xyx;
|
||||||
int3 xyy = int3(U.v).xyy;
|
int3 xyy = int3((*(tint_symbol)).v).xyy;
|
||||||
int3 xyz = int3(U.v).xyz;
|
int3 xyz = int3((*(tint_symbol)).v).xyz;
|
||||||
int3 xzx = int3(U.v).xzx;
|
int3 xzx = int3((*(tint_symbol)).v).xzx;
|
||||||
int3 xzy = int3(U.v).xzy;
|
int3 xzy = int3((*(tint_symbol)).v).xzy;
|
||||||
int3 xzz = int3(U.v).xzz;
|
int3 xzz = int3((*(tint_symbol)).v).xzz;
|
||||||
int3 yxx = int3(U.v).yxx;
|
int3 yxx = int3((*(tint_symbol)).v).yxx;
|
||||||
int3 yxy = int3(U.v).yxy;
|
int3 yxy = int3((*(tint_symbol)).v).yxy;
|
||||||
int3 yxz = int3(U.v).yxz;
|
int3 yxz = int3((*(tint_symbol)).v).yxz;
|
||||||
int3 yyx = int3(U.v).yyx;
|
int3 yyx = int3((*(tint_symbol)).v).yyx;
|
||||||
int3 yyy = int3(U.v).yyy;
|
int3 yyy = int3((*(tint_symbol)).v).yyy;
|
||||||
int3 yyz = int3(U.v).yyz;
|
int3 yyz = int3((*(tint_symbol)).v).yyz;
|
||||||
int3 yzx = int3(U.v).yzx;
|
int3 yzx = int3((*(tint_symbol)).v).yzx;
|
||||||
int3 yzy = int3(U.v).yzy;
|
int3 yzy = int3((*(tint_symbol)).v).yzy;
|
||||||
int3 yzz = int3(U.v).yzz;
|
int3 yzz = int3((*(tint_symbol)).v).yzz;
|
||||||
int3 zxx = int3(U.v).zxx;
|
int3 zxx = int3((*(tint_symbol)).v).zxx;
|
||||||
int3 zxy = int3(U.v).zxy;
|
int3 zxy = int3((*(tint_symbol)).v).zxy;
|
||||||
int3 zxz = int3(U.v).zxz;
|
int3 zxz = int3((*(tint_symbol)).v).zxz;
|
||||||
int3 zyx = int3(U.v).zyx;
|
int3 zyx = int3((*(tint_symbol)).v).zyx;
|
||||||
int3 zyy = int3(U.v).zyy;
|
int3 zyy = int3((*(tint_symbol)).v).zyy;
|
||||||
int3 zyz = int3(U.v).zyz;
|
int3 zyz = int3((*(tint_symbol)).v).zyz;
|
||||||
int3 zzx = int3(U.v).zzx;
|
int3 zzx = int3((*(tint_symbol)).v).zzx;
|
||||||
int3 zzy = int3(U.v).zzy;
|
int3 zzy = int3((*(tint_symbol)).v).zzy;
|
||||||
int3 zzz = int3(U.v).zzz;
|
int3 zzz = int3((*(tint_symbol)).v).zzz;
|
||||||
int4 xxxx = int3(U.v).xxxx;
|
int4 xxxx = int3((*(tint_symbol)).v).xxxx;
|
||||||
int4 xxxy = int3(U.v).xxxy;
|
int4 xxxy = int3((*(tint_symbol)).v).xxxy;
|
||||||
int4 xxxz = int3(U.v).xxxz;
|
int4 xxxz = int3((*(tint_symbol)).v).xxxz;
|
||||||
int4 xxyx = int3(U.v).xxyx;
|
int4 xxyx = int3((*(tint_symbol)).v).xxyx;
|
||||||
int4 xxyy = int3(U.v).xxyy;
|
int4 xxyy = int3((*(tint_symbol)).v).xxyy;
|
||||||
int4 xxyz = int3(U.v).xxyz;
|
int4 xxyz = int3((*(tint_symbol)).v).xxyz;
|
||||||
int4 xxzx = int3(U.v).xxzx;
|
int4 xxzx = int3((*(tint_symbol)).v).xxzx;
|
||||||
int4 xxzy = int3(U.v).xxzy;
|
int4 xxzy = int3((*(tint_symbol)).v).xxzy;
|
||||||
int4 xxzz = int3(U.v).xxzz;
|
int4 xxzz = int3((*(tint_symbol)).v).xxzz;
|
||||||
int4 xyxx = int3(U.v).xyxx;
|
int4 xyxx = int3((*(tint_symbol)).v).xyxx;
|
||||||
int4 xyxy = int3(U.v).xyxy;
|
int4 xyxy = int3((*(tint_symbol)).v).xyxy;
|
||||||
int4 xyxz = int3(U.v).xyxz;
|
int4 xyxz = int3((*(tint_symbol)).v).xyxz;
|
||||||
int4 xyyx = int3(U.v).xyyx;
|
int4 xyyx = int3((*(tint_symbol)).v).xyyx;
|
||||||
int4 xyyy = int3(U.v).xyyy;
|
int4 xyyy = int3((*(tint_symbol)).v).xyyy;
|
||||||
int4 xyyz = int3(U.v).xyyz;
|
int4 xyyz = int3((*(tint_symbol)).v).xyyz;
|
||||||
int4 xyzx = int3(U.v).xyzx;
|
int4 xyzx = int3((*(tint_symbol)).v).xyzx;
|
||||||
int4 xyzy = int3(U.v).xyzy;
|
int4 xyzy = int3((*(tint_symbol)).v).xyzy;
|
||||||
int4 xyzz = int3(U.v).xyzz;
|
int4 xyzz = int3((*(tint_symbol)).v).xyzz;
|
||||||
int4 xzxx = int3(U.v).xzxx;
|
int4 xzxx = int3((*(tint_symbol)).v).xzxx;
|
||||||
int4 xzxy = int3(U.v).xzxy;
|
int4 xzxy = int3((*(tint_symbol)).v).xzxy;
|
||||||
int4 xzxz = int3(U.v).xzxz;
|
int4 xzxz = int3((*(tint_symbol)).v).xzxz;
|
||||||
int4 xzyx = int3(U.v).xzyx;
|
int4 xzyx = int3((*(tint_symbol)).v).xzyx;
|
||||||
int4 xzyy = int3(U.v).xzyy;
|
int4 xzyy = int3((*(tint_symbol)).v).xzyy;
|
||||||
int4 xzyz = int3(U.v).xzyz;
|
int4 xzyz = int3((*(tint_symbol)).v).xzyz;
|
||||||
int4 xzzx = int3(U.v).xzzx;
|
int4 xzzx = int3((*(tint_symbol)).v).xzzx;
|
||||||
int4 xzzy = int3(U.v).xzzy;
|
int4 xzzy = int3((*(tint_symbol)).v).xzzy;
|
||||||
int4 xzzz = int3(U.v).xzzz;
|
int4 xzzz = int3((*(tint_symbol)).v).xzzz;
|
||||||
int4 yxxx = int3(U.v).yxxx;
|
int4 yxxx = int3((*(tint_symbol)).v).yxxx;
|
||||||
int4 yxxy = int3(U.v).yxxy;
|
int4 yxxy = int3((*(tint_symbol)).v).yxxy;
|
||||||
int4 yxxz = int3(U.v).yxxz;
|
int4 yxxz = int3((*(tint_symbol)).v).yxxz;
|
||||||
int4 yxyx = int3(U.v).yxyx;
|
int4 yxyx = int3((*(tint_symbol)).v).yxyx;
|
||||||
int4 yxyy = int3(U.v).yxyy;
|
int4 yxyy = int3((*(tint_symbol)).v).yxyy;
|
||||||
int4 yxyz = int3(U.v).yxyz;
|
int4 yxyz = int3((*(tint_symbol)).v).yxyz;
|
||||||
int4 yxzx = int3(U.v).yxzx;
|
int4 yxzx = int3((*(tint_symbol)).v).yxzx;
|
||||||
int4 yxzy = int3(U.v).yxzy;
|
int4 yxzy = int3((*(tint_symbol)).v).yxzy;
|
||||||
int4 yxzz = int3(U.v).yxzz;
|
int4 yxzz = int3((*(tint_symbol)).v).yxzz;
|
||||||
int4 yyxx = int3(U.v).yyxx;
|
int4 yyxx = int3((*(tint_symbol)).v).yyxx;
|
||||||
int4 yyxy = int3(U.v).yyxy;
|
int4 yyxy = int3((*(tint_symbol)).v).yyxy;
|
||||||
int4 yyxz = int3(U.v).yyxz;
|
int4 yyxz = int3((*(tint_symbol)).v).yyxz;
|
||||||
int4 yyyx = int3(U.v).yyyx;
|
int4 yyyx = int3((*(tint_symbol)).v).yyyx;
|
||||||
int4 yyyy = int3(U.v).yyyy;
|
int4 yyyy = int3((*(tint_symbol)).v).yyyy;
|
||||||
int4 yyyz = int3(U.v).yyyz;
|
int4 yyyz = int3((*(tint_symbol)).v).yyyz;
|
||||||
int4 yyzx = int3(U.v).yyzx;
|
int4 yyzx = int3((*(tint_symbol)).v).yyzx;
|
||||||
int4 yyzy = int3(U.v).yyzy;
|
int4 yyzy = int3((*(tint_symbol)).v).yyzy;
|
||||||
int4 yyzz = int3(U.v).yyzz;
|
int4 yyzz = int3((*(tint_symbol)).v).yyzz;
|
||||||
int4 yzxx = int3(U.v).yzxx;
|
int4 yzxx = int3((*(tint_symbol)).v).yzxx;
|
||||||
int4 yzxy = int3(U.v).yzxy;
|
int4 yzxy = int3((*(tint_symbol)).v).yzxy;
|
||||||
int4 yzxz = int3(U.v).yzxz;
|
int4 yzxz = int3((*(tint_symbol)).v).yzxz;
|
||||||
int4 yzyx = int3(U.v).yzyx;
|
int4 yzyx = int3((*(tint_symbol)).v).yzyx;
|
||||||
int4 yzyy = int3(U.v).yzyy;
|
int4 yzyy = int3((*(tint_symbol)).v).yzyy;
|
||||||
int4 yzyz = int3(U.v).yzyz;
|
int4 yzyz = int3((*(tint_symbol)).v).yzyz;
|
||||||
int4 yzzx = int3(U.v).yzzx;
|
int4 yzzx = int3((*(tint_symbol)).v).yzzx;
|
||||||
int4 yzzy = int3(U.v).yzzy;
|
int4 yzzy = int3((*(tint_symbol)).v).yzzy;
|
||||||
int4 yzzz = int3(U.v).yzzz;
|
int4 yzzz = int3((*(tint_symbol)).v).yzzz;
|
||||||
int4 zxxx = int3(U.v).zxxx;
|
int4 zxxx = int3((*(tint_symbol)).v).zxxx;
|
||||||
int4 zxxy = int3(U.v).zxxy;
|
int4 zxxy = int3((*(tint_symbol)).v).zxxy;
|
||||||
int4 zxxz = int3(U.v).zxxz;
|
int4 zxxz = int3((*(tint_symbol)).v).zxxz;
|
||||||
int4 zxyx = int3(U.v).zxyx;
|
int4 zxyx = int3((*(tint_symbol)).v).zxyx;
|
||||||
int4 zxyy = int3(U.v).zxyy;
|
int4 zxyy = int3((*(tint_symbol)).v).zxyy;
|
||||||
int4 zxyz = int3(U.v).zxyz;
|
int4 zxyz = int3((*(tint_symbol)).v).zxyz;
|
||||||
int4 zxzx = int3(U.v).zxzx;
|
int4 zxzx = int3((*(tint_symbol)).v).zxzx;
|
||||||
int4 zxzy = int3(U.v).zxzy;
|
int4 zxzy = int3((*(tint_symbol)).v).zxzy;
|
||||||
int4 zxzz = int3(U.v).zxzz;
|
int4 zxzz = int3((*(tint_symbol)).v).zxzz;
|
||||||
int4 zyxx = int3(U.v).zyxx;
|
int4 zyxx = int3((*(tint_symbol)).v).zyxx;
|
||||||
int4 zyxy = int3(U.v).zyxy;
|
int4 zyxy = int3((*(tint_symbol)).v).zyxy;
|
||||||
int4 zyxz = int3(U.v).zyxz;
|
int4 zyxz = int3((*(tint_symbol)).v).zyxz;
|
||||||
int4 zyyx = int3(U.v).zyyx;
|
int4 zyyx = int3((*(tint_symbol)).v).zyyx;
|
||||||
int4 zyyy = int3(U.v).zyyy;
|
int4 zyyy = int3((*(tint_symbol)).v).zyyy;
|
||||||
int4 zyyz = int3(U.v).zyyz;
|
int4 zyyz = int3((*(tint_symbol)).v).zyyz;
|
||||||
int4 zyzx = int3(U.v).zyzx;
|
int4 zyzx = int3((*(tint_symbol)).v).zyzx;
|
||||||
int4 zyzy = int3(U.v).zyzy;
|
int4 zyzy = int3((*(tint_symbol)).v).zyzy;
|
||||||
int4 zyzz = int3(U.v).zyzz;
|
int4 zyzz = int3((*(tint_symbol)).v).zyzz;
|
||||||
int4 zzxx = int3(U.v).zzxx;
|
int4 zzxx = int3((*(tint_symbol)).v).zzxx;
|
||||||
int4 zzxy = int3(U.v).zzxy;
|
int4 zzxy = int3((*(tint_symbol)).v).zzxy;
|
||||||
int4 zzxz = int3(U.v).zzxz;
|
int4 zzxz = int3((*(tint_symbol)).v).zzxz;
|
||||||
int4 zzyx = int3(U.v).zzyx;
|
int4 zzyx = int3((*(tint_symbol)).v).zzyx;
|
||||||
int4 zzyy = int3(U.v).zzyy;
|
int4 zzyy = int3((*(tint_symbol)).v).zzyy;
|
||||||
int4 zzyz = int3(U.v).zzyz;
|
int4 zzyz = int3((*(tint_symbol)).v).zzyz;
|
||||||
int4 zzzx = int3(U.v).zzzx;
|
int4 zzzx = int3((*(tint_symbol)).v).zzzx;
|
||||||
int4 zzzy = int3(U.v).zzzy;
|
int4 zzzy = int3((*(tint_symbol)).v).zzzy;
|
||||||
int4 zzzz = int3(U.v).zzzz;
|
int4 zzzz = int3((*(tint_symbol)).v).zzzz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,127 +6,127 @@ struct S {
|
||||||
/* 0x000c */ int8_t tint_pad[4];
|
/* 0x000c */ int8_t tint_pad[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
void f(constant S& U) {
|
void f(const constant S* const tint_symbol) {
|
||||||
uint3 v = U.v;
|
uint3 v = (*(tint_symbol)).v;
|
||||||
uint x = U.v[0];
|
uint x = (*(tint_symbol)).v[0];
|
||||||
uint y = U.v[1];
|
uint y = (*(tint_symbol)).v[1];
|
||||||
uint z = U.v[2];
|
uint z = (*(tint_symbol)).v[2];
|
||||||
uint2 xx = uint3(U.v).xx;
|
uint2 xx = uint3((*(tint_symbol)).v).xx;
|
||||||
uint2 xy = uint3(U.v).xy;
|
uint2 xy = uint3((*(tint_symbol)).v).xy;
|
||||||
uint2 xz = uint3(U.v).xz;
|
uint2 xz = uint3((*(tint_symbol)).v).xz;
|
||||||
uint2 yx = uint3(U.v).yx;
|
uint2 yx = uint3((*(tint_symbol)).v).yx;
|
||||||
uint2 yy = uint3(U.v).yy;
|
uint2 yy = uint3((*(tint_symbol)).v).yy;
|
||||||
uint2 yz = uint3(U.v).yz;
|
uint2 yz = uint3((*(tint_symbol)).v).yz;
|
||||||
uint2 zx = uint3(U.v).zx;
|
uint2 zx = uint3((*(tint_symbol)).v).zx;
|
||||||
uint2 zy = uint3(U.v).zy;
|
uint2 zy = uint3((*(tint_symbol)).v).zy;
|
||||||
uint2 zz = uint3(U.v).zz;
|
uint2 zz = uint3((*(tint_symbol)).v).zz;
|
||||||
uint3 xxx = uint3(U.v).xxx;
|
uint3 xxx = uint3((*(tint_symbol)).v).xxx;
|
||||||
uint3 xxy = uint3(U.v).xxy;
|
uint3 xxy = uint3((*(tint_symbol)).v).xxy;
|
||||||
uint3 xxz = uint3(U.v).xxz;
|
uint3 xxz = uint3((*(tint_symbol)).v).xxz;
|
||||||
uint3 xyx = uint3(U.v).xyx;
|
uint3 xyx = uint3((*(tint_symbol)).v).xyx;
|
||||||
uint3 xyy = uint3(U.v).xyy;
|
uint3 xyy = uint3((*(tint_symbol)).v).xyy;
|
||||||
uint3 xyz = uint3(U.v).xyz;
|
uint3 xyz = uint3((*(tint_symbol)).v).xyz;
|
||||||
uint3 xzx = uint3(U.v).xzx;
|
uint3 xzx = uint3((*(tint_symbol)).v).xzx;
|
||||||
uint3 xzy = uint3(U.v).xzy;
|
uint3 xzy = uint3((*(tint_symbol)).v).xzy;
|
||||||
uint3 xzz = uint3(U.v).xzz;
|
uint3 xzz = uint3((*(tint_symbol)).v).xzz;
|
||||||
uint3 yxx = uint3(U.v).yxx;
|
uint3 yxx = uint3((*(tint_symbol)).v).yxx;
|
||||||
uint3 yxy = uint3(U.v).yxy;
|
uint3 yxy = uint3((*(tint_symbol)).v).yxy;
|
||||||
uint3 yxz = uint3(U.v).yxz;
|
uint3 yxz = uint3((*(tint_symbol)).v).yxz;
|
||||||
uint3 yyx = uint3(U.v).yyx;
|
uint3 yyx = uint3((*(tint_symbol)).v).yyx;
|
||||||
uint3 yyy = uint3(U.v).yyy;
|
uint3 yyy = uint3((*(tint_symbol)).v).yyy;
|
||||||
uint3 yyz = uint3(U.v).yyz;
|
uint3 yyz = uint3((*(tint_symbol)).v).yyz;
|
||||||
uint3 yzx = uint3(U.v).yzx;
|
uint3 yzx = uint3((*(tint_symbol)).v).yzx;
|
||||||
uint3 yzy = uint3(U.v).yzy;
|
uint3 yzy = uint3((*(tint_symbol)).v).yzy;
|
||||||
uint3 yzz = uint3(U.v).yzz;
|
uint3 yzz = uint3((*(tint_symbol)).v).yzz;
|
||||||
uint3 zxx = uint3(U.v).zxx;
|
uint3 zxx = uint3((*(tint_symbol)).v).zxx;
|
||||||
uint3 zxy = uint3(U.v).zxy;
|
uint3 zxy = uint3((*(tint_symbol)).v).zxy;
|
||||||
uint3 zxz = uint3(U.v).zxz;
|
uint3 zxz = uint3((*(tint_symbol)).v).zxz;
|
||||||
uint3 zyx = uint3(U.v).zyx;
|
uint3 zyx = uint3((*(tint_symbol)).v).zyx;
|
||||||
uint3 zyy = uint3(U.v).zyy;
|
uint3 zyy = uint3((*(tint_symbol)).v).zyy;
|
||||||
uint3 zyz = uint3(U.v).zyz;
|
uint3 zyz = uint3((*(tint_symbol)).v).zyz;
|
||||||
uint3 zzx = uint3(U.v).zzx;
|
uint3 zzx = uint3((*(tint_symbol)).v).zzx;
|
||||||
uint3 zzy = uint3(U.v).zzy;
|
uint3 zzy = uint3((*(tint_symbol)).v).zzy;
|
||||||
uint3 zzz = uint3(U.v).zzz;
|
uint3 zzz = uint3((*(tint_symbol)).v).zzz;
|
||||||
uint4 xxxx = uint3(U.v).xxxx;
|
uint4 xxxx = uint3((*(tint_symbol)).v).xxxx;
|
||||||
uint4 xxxy = uint3(U.v).xxxy;
|
uint4 xxxy = uint3((*(tint_symbol)).v).xxxy;
|
||||||
uint4 xxxz = uint3(U.v).xxxz;
|
uint4 xxxz = uint3((*(tint_symbol)).v).xxxz;
|
||||||
uint4 xxyx = uint3(U.v).xxyx;
|
uint4 xxyx = uint3((*(tint_symbol)).v).xxyx;
|
||||||
uint4 xxyy = uint3(U.v).xxyy;
|
uint4 xxyy = uint3((*(tint_symbol)).v).xxyy;
|
||||||
uint4 xxyz = uint3(U.v).xxyz;
|
uint4 xxyz = uint3((*(tint_symbol)).v).xxyz;
|
||||||
uint4 xxzx = uint3(U.v).xxzx;
|
uint4 xxzx = uint3((*(tint_symbol)).v).xxzx;
|
||||||
uint4 xxzy = uint3(U.v).xxzy;
|
uint4 xxzy = uint3((*(tint_symbol)).v).xxzy;
|
||||||
uint4 xxzz = uint3(U.v).xxzz;
|
uint4 xxzz = uint3((*(tint_symbol)).v).xxzz;
|
||||||
uint4 xyxx = uint3(U.v).xyxx;
|
uint4 xyxx = uint3((*(tint_symbol)).v).xyxx;
|
||||||
uint4 xyxy = uint3(U.v).xyxy;
|
uint4 xyxy = uint3((*(tint_symbol)).v).xyxy;
|
||||||
uint4 xyxz = uint3(U.v).xyxz;
|
uint4 xyxz = uint3((*(tint_symbol)).v).xyxz;
|
||||||
uint4 xyyx = uint3(U.v).xyyx;
|
uint4 xyyx = uint3((*(tint_symbol)).v).xyyx;
|
||||||
uint4 xyyy = uint3(U.v).xyyy;
|
uint4 xyyy = uint3((*(tint_symbol)).v).xyyy;
|
||||||
uint4 xyyz = uint3(U.v).xyyz;
|
uint4 xyyz = uint3((*(tint_symbol)).v).xyyz;
|
||||||
uint4 xyzx = uint3(U.v).xyzx;
|
uint4 xyzx = uint3((*(tint_symbol)).v).xyzx;
|
||||||
uint4 xyzy = uint3(U.v).xyzy;
|
uint4 xyzy = uint3((*(tint_symbol)).v).xyzy;
|
||||||
uint4 xyzz = uint3(U.v).xyzz;
|
uint4 xyzz = uint3((*(tint_symbol)).v).xyzz;
|
||||||
uint4 xzxx = uint3(U.v).xzxx;
|
uint4 xzxx = uint3((*(tint_symbol)).v).xzxx;
|
||||||
uint4 xzxy = uint3(U.v).xzxy;
|
uint4 xzxy = uint3((*(tint_symbol)).v).xzxy;
|
||||||
uint4 xzxz = uint3(U.v).xzxz;
|
uint4 xzxz = uint3((*(tint_symbol)).v).xzxz;
|
||||||
uint4 xzyx = uint3(U.v).xzyx;
|
uint4 xzyx = uint3((*(tint_symbol)).v).xzyx;
|
||||||
uint4 xzyy = uint3(U.v).xzyy;
|
uint4 xzyy = uint3((*(tint_symbol)).v).xzyy;
|
||||||
uint4 xzyz = uint3(U.v).xzyz;
|
uint4 xzyz = uint3((*(tint_symbol)).v).xzyz;
|
||||||
uint4 xzzx = uint3(U.v).xzzx;
|
uint4 xzzx = uint3((*(tint_symbol)).v).xzzx;
|
||||||
uint4 xzzy = uint3(U.v).xzzy;
|
uint4 xzzy = uint3((*(tint_symbol)).v).xzzy;
|
||||||
uint4 xzzz = uint3(U.v).xzzz;
|
uint4 xzzz = uint3((*(tint_symbol)).v).xzzz;
|
||||||
uint4 yxxx = uint3(U.v).yxxx;
|
uint4 yxxx = uint3((*(tint_symbol)).v).yxxx;
|
||||||
uint4 yxxy = uint3(U.v).yxxy;
|
uint4 yxxy = uint3((*(tint_symbol)).v).yxxy;
|
||||||
uint4 yxxz = uint3(U.v).yxxz;
|
uint4 yxxz = uint3((*(tint_symbol)).v).yxxz;
|
||||||
uint4 yxyx = uint3(U.v).yxyx;
|
uint4 yxyx = uint3((*(tint_symbol)).v).yxyx;
|
||||||
uint4 yxyy = uint3(U.v).yxyy;
|
uint4 yxyy = uint3((*(tint_symbol)).v).yxyy;
|
||||||
uint4 yxyz = uint3(U.v).yxyz;
|
uint4 yxyz = uint3((*(tint_symbol)).v).yxyz;
|
||||||
uint4 yxzx = uint3(U.v).yxzx;
|
uint4 yxzx = uint3((*(tint_symbol)).v).yxzx;
|
||||||
uint4 yxzy = uint3(U.v).yxzy;
|
uint4 yxzy = uint3((*(tint_symbol)).v).yxzy;
|
||||||
uint4 yxzz = uint3(U.v).yxzz;
|
uint4 yxzz = uint3((*(tint_symbol)).v).yxzz;
|
||||||
uint4 yyxx = uint3(U.v).yyxx;
|
uint4 yyxx = uint3((*(tint_symbol)).v).yyxx;
|
||||||
uint4 yyxy = uint3(U.v).yyxy;
|
uint4 yyxy = uint3((*(tint_symbol)).v).yyxy;
|
||||||
uint4 yyxz = uint3(U.v).yyxz;
|
uint4 yyxz = uint3((*(tint_symbol)).v).yyxz;
|
||||||
uint4 yyyx = uint3(U.v).yyyx;
|
uint4 yyyx = uint3((*(tint_symbol)).v).yyyx;
|
||||||
uint4 yyyy = uint3(U.v).yyyy;
|
uint4 yyyy = uint3((*(tint_symbol)).v).yyyy;
|
||||||
uint4 yyyz = uint3(U.v).yyyz;
|
uint4 yyyz = uint3((*(tint_symbol)).v).yyyz;
|
||||||
uint4 yyzx = uint3(U.v).yyzx;
|
uint4 yyzx = uint3((*(tint_symbol)).v).yyzx;
|
||||||
uint4 yyzy = uint3(U.v).yyzy;
|
uint4 yyzy = uint3((*(tint_symbol)).v).yyzy;
|
||||||
uint4 yyzz = uint3(U.v).yyzz;
|
uint4 yyzz = uint3((*(tint_symbol)).v).yyzz;
|
||||||
uint4 yzxx = uint3(U.v).yzxx;
|
uint4 yzxx = uint3((*(tint_symbol)).v).yzxx;
|
||||||
uint4 yzxy = uint3(U.v).yzxy;
|
uint4 yzxy = uint3((*(tint_symbol)).v).yzxy;
|
||||||
uint4 yzxz = uint3(U.v).yzxz;
|
uint4 yzxz = uint3((*(tint_symbol)).v).yzxz;
|
||||||
uint4 yzyx = uint3(U.v).yzyx;
|
uint4 yzyx = uint3((*(tint_symbol)).v).yzyx;
|
||||||
uint4 yzyy = uint3(U.v).yzyy;
|
uint4 yzyy = uint3((*(tint_symbol)).v).yzyy;
|
||||||
uint4 yzyz = uint3(U.v).yzyz;
|
uint4 yzyz = uint3((*(tint_symbol)).v).yzyz;
|
||||||
uint4 yzzx = uint3(U.v).yzzx;
|
uint4 yzzx = uint3((*(tint_symbol)).v).yzzx;
|
||||||
uint4 yzzy = uint3(U.v).yzzy;
|
uint4 yzzy = uint3((*(tint_symbol)).v).yzzy;
|
||||||
uint4 yzzz = uint3(U.v).yzzz;
|
uint4 yzzz = uint3((*(tint_symbol)).v).yzzz;
|
||||||
uint4 zxxx = uint3(U.v).zxxx;
|
uint4 zxxx = uint3((*(tint_symbol)).v).zxxx;
|
||||||
uint4 zxxy = uint3(U.v).zxxy;
|
uint4 zxxy = uint3((*(tint_symbol)).v).zxxy;
|
||||||
uint4 zxxz = uint3(U.v).zxxz;
|
uint4 zxxz = uint3((*(tint_symbol)).v).zxxz;
|
||||||
uint4 zxyx = uint3(U.v).zxyx;
|
uint4 zxyx = uint3((*(tint_symbol)).v).zxyx;
|
||||||
uint4 zxyy = uint3(U.v).zxyy;
|
uint4 zxyy = uint3((*(tint_symbol)).v).zxyy;
|
||||||
uint4 zxyz = uint3(U.v).zxyz;
|
uint4 zxyz = uint3((*(tint_symbol)).v).zxyz;
|
||||||
uint4 zxzx = uint3(U.v).zxzx;
|
uint4 zxzx = uint3((*(tint_symbol)).v).zxzx;
|
||||||
uint4 zxzy = uint3(U.v).zxzy;
|
uint4 zxzy = uint3((*(tint_symbol)).v).zxzy;
|
||||||
uint4 zxzz = uint3(U.v).zxzz;
|
uint4 zxzz = uint3((*(tint_symbol)).v).zxzz;
|
||||||
uint4 zyxx = uint3(U.v).zyxx;
|
uint4 zyxx = uint3((*(tint_symbol)).v).zyxx;
|
||||||
uint4 zyxy = uint3(U.v).zyxy;
|
uint4 zyxy = uint3((*(tint_symbol)).v).zyxy;
|
||||||
uint4 zyxz = uint3(U.v).zyxz;
|
uint4 zyxz = uint3((*(tint_symbol)).v).zyxz;
|
||||||
uint4 zyyx = uint3(U.v).zyyx;
|
uint4 zyyx = uint3((*(tint_symbol)).v).zyyx;
|
||||||
uint4 zyyy = uint3(U.v).zyyy;
|
uint4 zyyy = uint3((*(tint_symbol)).v).zyyy;
|
||||||
uint4 zyyz = uint3(U.v).zyyz;
|
uint4 zyyz = uint3((*(tint_symbol)).v).zyyz;
|
||||||
uint4 zyzx = uint3(U.v).zyzx;
|
uint4 zyzx = uint3((*(tint_symbol)).v).zyzx;
|
||||||
uint4 zyzy = uint3(U.v).zyzy;
|
uint4 zyzy = uint3((*(tint_symbol)).v).zyzy;
|
||||||
uint4 zyzz = uint3(U.v).zyzz;
|
uint4 zyzz = uint3((*(tint_symbol)).v).zyzz;
|
||||||
uint4 zzxx = uint3(U.v).zzxx;
|
uint4 zzxx = uint3((*(tint_symbol)).v).zzxx;
|
||||||
uint4 zzxy = uint3(U.v).zzxy;
|
uint4 zzxy = uint3((*(tint_symbol)).v).zzxy;
|
||||||
uint4 zzxz = uint3(U.v).zzxz;
|
uint4 zzxz = uint3((*(tint_symbol)).v).zzxz;
|
||||||
uint4 zzyx = uint3(U.v).zzyx;
|
uint4 zzyx = uint3((*(tint_symbol)).v).zzyx;
|
||||||
uint4 zzyy = uint3(U.v).zzyy;
|
uint4 zzyy = uint3((*(tint_symbol)).v).zzyy;
|
||||||
uint4 zzyz = uint3(U.v).zzyz;
|
uint4 zzyz = uint3((*(tint_symbol)).v).zzyz;
|
||||||
uint4 zzzx = uint3(U.v).zzzx;
|
uint4 zzzx = uint3((*(tint_symbol)).v).zzzx;
|
||||||
uint4 zzzy = uint3(U.v).zzzy;
|
uint4 zzzy = uint3((*(tint_symbol)).v).zzzy;
|
||||||
uint4 zzzz = uint3(U.v).zzzz;
|
uint4 zzzz = uint3((*(tint_symbol)).v).zzzz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,10 @@ struct S {
|
||||||
/* 0x000c */ int8_t tint_pad[4];
|
/* 0x000c */ int8_t tint_pad[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
void f(device S& U) {
|
void f(device S* const tint_symbol) {
|
||||||
U.v = float3(1.0f, 2.0f, 3.0f);
|
(*(tint_symbol)).v = float3(1.0f, 2.0f, 3.0f);
|
||||||
U.v[0] = 1.0f;
|
(*(tint_symbol)).v[0] = 1.0f;
|
||||||
U.v[1] = 2.0f;
|
(*(tint_symbol)).v[1] = 2.0f;
|
||||||
U.v[2] = 3.0f;
|
(*(tint_symbol)).v[2] = 3.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,10 @@ struct S {
|
||||||
/* 0x000c */ int8_t tint_pad[4];
|
/* 0x000c */ int8_t tint_pad[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
void f(device S& U) {
|
void f(device S* const tint_symbol) {
|
||||||
U.v = int3(1, 2, 3);
|
(*(tint_symbol)).v = int3(1, 2, 3);
|
||||||
U.v[0] = 1;
|
(*(tint_symbol)).v[0] = 1;
|
||||||
U.v[1] = 2;
|
(*(tint_symbol)).v[1] = 2;
|
||||||
U.v[2] = 3;
|
(*(tint_symbol)).v[2] = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,10 @@ struct S {
|
||||||
/* 0x000c */ int8_t tint_pad[4];
|
/* 0x000c */ int8_t tint_pad[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
void f(device S& U) {
|
void f(device S* const tint_symbol) {
|
||||||
U.v = uint3(1u, 2u, 3u);
|
(*(tint_symbol)).v = uint3(1u, 2u, 3u);
|
||||||
U.v[0] = 1u;
|
(*(tint_symbol)).v[0] = 1u;
|
||||||
U.v[1] = 2u;
|
(*(tint_symbol)).v[1] = 2u;
|
||||||
U.v[2] = 3u;
|
(*(tint_symbol)).v[2] = 3u;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@ struct tint_symbol_1 {
|
||||||
/* 0x0000 */ uint4 buffer_size[1];
|
/* 0x0000 */ uint4 buffer_size[1];
|
||||||
};
|
};
|
||||||
struct S {
|
struct S {
|
||||||
/* 0x0000 */ int a[1];
|
int a[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void tint_symbol(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
kernel void tint_symbol(const constant tint_symbol_1* tint_symbol_3 [[buffer(30)]]) {
|
||||||
uint const l1 = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
|
uint const l1 = (((*(tint_symbol_3)).buffer_size[0u][0u] - 0u) / 4u);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@ struct tint_symbol_1 {
|
||||||
/* 0x0000 */ uint4 buffer_size[1];
|
/* 0x0000 */ uint4 buffer_size[1];
|
||||||
};
|
};
|
||||||
struct S {
|
struct S {
|
||||||
/* 0x0000 */ int a[1];
|
int a[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void tint_symbol(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
kernel void tint_symbol(const constant tint_symbol_1* tint_symbol_3 [[buffer(30)]]) {
|
||||||
uint const l1 = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
|
uint const l1 = (((*(tint_symbol_3)).buffer_size[0u][0u] - 0u) / 4u);
|
||||||
uint const l2 = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
|
uint const l2 = (((*(tint_symbol_3)).buffer_size[0u][0u] - 0u) / 4u);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@ struct tint_symbol_1 {
|
||||||
/* 0x0000 */ uint4 buffer_size[1];
|
/* 0x0000 */ uint4 buffer_size[1];
|
||||||
};
|
};
|
||||||
struct S {
|
struct S {
|
||||||
/* 0x0000 */ int a[1];
|
int a[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void tint_symbol(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
kernel void tint_symbol(const constant tint_symbol_1* tint_symbol_3 [[buffer(30)]]) {
|
||||||
uint const l1 = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
|
uint const l1 = (((*(tint_symbol_3)).buffer_size[0u][0u] - 0u) / 4u);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@ struct tint_symbol_1 {
|
||||||
/* 0x0000 */ uint4 buffer_size[1];
|
/* 0x0000 */ uint4 buffer_size[1];
|
||||||
};
|
};
|
||||||
struct S {
|
struct S {
|
||||||
/* 0x0000 */ int a[1];
|
int a[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void tint_symbol(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
kernel void tint_symbol(const constant tint_symbol_1* tint_symbol_3 [[buffer(30)]]) {
|
||||||
uint const l1 = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
|
uint const l1 = (((*(tint_symbol_3)).buffer_size[0u][0u] - 0u) / 4u);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@ struct tint_symbol_1 {
|
||||||
/* 0x0000 */ uint4 buffer_size[1];
|
/* 0x0000 */ uint4 buffer_size[1];
|
||||||
};
|
};
|
||||||
struct S {
|
struct S {
|
||||||
/* 0x0000 */ int a[1];
|
int a[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel void tint_symbol(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
kernel void tint_symbol(const constant tint_symbol_1* tint_symbol_3 [[buffer(30)]]) {
|
||||||
uint const l1 = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
|
uint const l1 = (((*(tint_symbol_3)).buffer_size[0u][0u] - 0u) / 4u);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,35 +5,35 @@ struct tint_symbol_1 {
|
||||||
/* 0x0000 */ uint4 buffer_size[1];
|
/* 0x0000 */ uint4 buffer_size[1];
|
||||||
};
|
};
|
||||||
struct SB_RO {
|
struct SB_RO {
|
||||||
/* 0x0000 */ int arg_0[1];
|
int arg_0[1];
|
||||||
};
|
};
|
||||||
struct tint_symbol {
|
struct tint_symbol {
|
||||||
float4 value [[position]];
|
float4 value [[position]];
|
||||||
};
|
};
|
||||||
|
|
||||||
void arrayLength_1588cd(constant tint_symbol_1& tint_symbol_2) {
|
void arrayLength_1588cd(const constant tint_symbol_1* const tint_symbol_3) {
|
||||||
uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
|
uint res = (((*(tint_symbol_3)).buffer_size[0u][0u] - 0u) / 4u);
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
|
float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) {
|
||||||
arrayLength_1588cd(tint_symbol_2);
|
arrayLength_1588cd(tint_symbol_4);
|
||||||
return float4();
|
return float4();
|
||||||
}
|
}
|
||||||
|
|
||||||
vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) {
|
||||||
float4 const inner_result = vertex_main_inner(tint_symbol_2);
|
float4 const inner_result = vertex_main_inner(tint_symbol_5);
|
||||||
tint_symbol wrapper_result = {};
|
tint_symbol wrapper_result = {};
|
||||||
wrapper_result.value = inner_result;
|
wrapper_result.value = inner_result;
|
||||||
return wrapper_result;
|
return wrapper_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
fragment void fragment_main(const constant tint_symbol_1* tint_symbol_6 [[buffer(30)]]) {
|
||||||
arrayLength_1588cd(tint_symbol_2);
|
arrayLength_1588cd(tint_symbol_6);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
kernel void compute_main(const constant tint_symbol_1* tint_symbol_7 [[buffer(30)]]) {
|
||||||
arrayLength_1588cd(tint_symbol_2);
|
arrayLength_1588cd(tint_symbol_7);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,35 +5,35 @@ struct tint_symbol_1 {
|
||||||
/* 0x0000 */ uint4 buffer_size[1];
|
/* 0x0000 */ uint4 buffer_size[1];
|
||||||
};
|
};
|
||||||
struct SB_RW {
|
struct SB_RW {
|
||||||
/* 0x0000 */ int arg_0[1];
|
int arg_0[1];
|
||||||
};
|
};
|
||||||
struct tint_symbol {
|
struct tint_symbol {
|
||||||
float4 value [[position]];
|
float4 value [[position]];
|
||||||
};
|
};
|
||||||
|
|
||||||
void arrayLength_61b1c7(constant tint_symbol_1& tint_symbol_2) {
|
void arrayLength_61b1c7(const constant tint_symbol_1* const tint_symbol_3) {
|
||||||
uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
|
uint res = (((*(tint_symbol_3)).buffer_size[0u][0u] - 0u) / 4u);
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
|
float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) {
|
||||||
arrayLength_61b1c7(tint_symbol_2);
|
arrayLength_61b1c7(tint_symbol_4);
|
||||||
return float4();
|
return float4();
|
||||||
}
|
}
|
||||||
|
|
||||||
vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) {
|
||||||
float4 const inner_result = vertex_main_inner(tint_symbol_2);
|
float4 const inner_result = vertex_main_inner(tint_symbol_5);
|
||||||
tint_symbol wrapper_result = {};
|
tint_symbol wrapper_result = {};
|
||||||
wrapper_result.value = inner_result;
|
wrapper_result.value = inner_result;
|
||||||
return wrapper_result;
|
return wrapper_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
fragment void fragment_main(const constant tint_symbol_1* tint_symbol_6 [[buffer(30)]]) {
|
||||||
arrayLength_61b1c7(tint_symbol_2);
|
arrayLength_61b1c7(tint_symbol_6);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
kernel void compute_main(const constant tint_symbol_1* tint_symbol_7 [[buffer(30)]]) {
|
||||||
arrayLength_61b1c7(tint_symbol_2);
|
arrayLength_61b1c7(tint_symbol_7);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,35 +5,35 @@ struct tint_symbol_1 {
|
||||||
/* 0x0000 */ uint4 buffer_size[1];
|
/* 0x0000 */ uint4 buffer_size[1];
|
||||||
};
|
};
|
||||||
struct SB_RO {
|
struct SB_RO {
|
||||||
/* 0x0000 */ float arg_0[1];
|
float arg_0[1];
|
||||||
};
|
};
|
||||||
struct tint_symbol {
|
struct tint_symbol {
|
||||||
float4 value [[position]];
|
float4 value [[position]];
|
||||||
};
|
};
|
||||||
|
|
||||||
void arrayLength_a0f5ca(constant tint_symbol_1& tint_symbol_2) {
|
void arrayLength_a0f5ca(const constant tint_symbol_1* const tint_symbol_3) {
|
||||||
uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
|
uint res = (((*(tint_symbol_3)).buffer_size[0u][0u] - 0u) / 4u);
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
|
float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) {
|
||||||
arrayLength_a0f5ca(tint_symbol_2);
|
arrayLength_a0f5ca(tint_symbol_4);
|
||||||
return float4();
|
return float4();
|
||||||
}
|
}
|
||||||
|
|
||||||
vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) {
|
||||||
float4 const inner_result = vertex_main_inner(tint_symbol_2);
|
float4 const inner_result = vertex_main_inner(tint_symbol_5);
|
||||||
tint_symbol wrapper_result = {};
|
tint_symbol wrapper_result = {};
|
||||||
wrapper_result.value = inner_result;
|
wrapper_result.value = inner_result;
|
||||||
return wrapper_result;
|
return wrapper_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
fragment void fragment_main(const constant tint_symbol_1* tint_symbol_6 [[buffer(30)]]) {
|
||||||
arrayLength_a0f5ca(tint_symbol_2);
|
arrayLength_a0f5ca(tint_symbol_6);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
kernel void compute_main(const constant tint_symbol_1* tint_symbol_7 [[buffer(30)]]) {
|
||||||
arrayLength_a0f5ca(tint_symbol_2);
|
arrayLength_a0f5ca(tint_symbol_7);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,35 +5,35 @@ struct tint_symbol_1 {
|
||||||
/* 0x0000 */ uint4 buffer_size[1];
|
/* 0x0000 */ uint4 buffer_size[1];
|
||||||
};
|
};
|
||||||
struct SB_RW {
|
struct SB_RW {
|
||||||
/* 0x0000 */ float arg_0[1];
|
float arg_0[1];
|
||||||
};
|
};
|
||||||
struct tint_symbol {
|
struct tint_symbol {
|
||||||
float4 value [[position]];
|
float4 value [[position]];
|
||||||
};
|
};
|
||||||
|
|
||||||
void arrayLength_cdd123(constant tint_symbol_1& tint_symbol_2) {
|
void arrayLength_cdd123(const constant tint_symbol_1* const tint_symbol_3) {
|
||||||
uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
|
uint res = (((*(tint_symbol_3)).buffer_size[0u][0u] - 0u) / 4u);
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
|
float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) {
|
||||||
arrayLength_cdd123(tint_symbol_2);
|
arrayLength_cdd123(tint_symbol_4);
|
||||||
return float4();
|
return float4();
|
||||||
}
|
}
|
||||||
|
|
||||||
vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) {
|
||||||
float4 const inner_result = vertex_main_inner(tint_symbol_2);
|
float4 const inner_result = vertex_main_inner(tint_symbol_5);
|
||||||
tint_symbol wrapper_result = {};
|
tint_symbol wrapper_result = {};
|
||||||
wrapper_result.value = inner_result;
|
wrapper_result.value = inner_result;
|
||||||
return wrapper_result;
|
return wrapper_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
fragment void fragment_main(const constant tint_symbol_1* tint_symbol_6 [[buffer(30)]]) {
|
||||||
arrayLength_cdd123(tint_symbol_2);
|
arrayLength_cdd123(tint_symbol_6);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
kernel void compute_main(const constant tint_symbol_1* tint_symbol_7 [[buffer(30)]]) {
|
||||||
arrayLength_cdd123(tint_symbol_2);
|
arrayLength_cdd123(tint_symbol_7);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,35 +5,35 @@ struct tint_symbol_1 {
|
||||||
/* 0x0000 */ uint4 buffer_size[1];
|
/* 0x0000 */ uint4 buffer_size[1];
|
||||||
};
|
};
|
||||||
struct SB_RO {
|
struct SB_RO {
|
||||||
/* 0x0000 */ uint arg_0[1];
|
uint arg_0[1];
|
||||||
};
|
};
|
||||||
struct tint_symbol {
|
struct tint_symbol {
|
||||||
float4 value [[position]];
|
float4 value [[position]];
|
||||||
};
|
};
|
||||||
|
|
||||||
void arrayLength_cfca0a(constant tint_symbol_1& tint_symbol_2) {
|
void arrayLength_cfca0a(const constant tint_symbol_1* const tint_symbol_3) {
|
||||||
uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
|
uint res = (((*(tint_symbol_3)).buffer_size[0u][0u] - 0u) / 4u);
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
|
float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) {
|
||||||
arrayLength_cfca0a(tint_symbol_2);
|
arrayLength_cfca0a(tint_symbol_4);
|
||||||
return float4();
|
return float4();
|
||||||
}
|
}
|
||||||
|
|
||||||
vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) {
|
||||||
float4 const inner_result = vertex_main_inner(tint_symbol_2);
|
float4 const inner_result = vertex_main_inner(tint_symbol_5);
|
||||||
tint_symbol wrapper_result = {};
|
tint_symbol wrapper_result = {};
|
||||||
wrapper_result.value = inner_result;
|
wrapper_result.value = inner_result;
|
||||||
return wrapper_result;
|
return wrapper_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
fragment void fragment_main(const constant tint_symbol_1* tint_symbol_6 [[buffer(30)]]) {
|
||||||
arrayLength_cfca0a(tint_symbol_2);
|
arrayLength_cfca0a(tint_symbol_6);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
kernel void compute_main(const constant tint_symbol_1* tint_symbol_7 [[buffer(30)]]) {
|
||||||
arrayLength_cfca0a(tint_symbol_2);
|
arrayLength_cfca0a(tint_symbol_7);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,35 +5,35 @@ struct tint_symbol_1 {
|
||||||
/* 0x0000 */ uint4 buffer_size[1];
|
/* 0x0000 */ uint4 buffer_size[1];
|
||||||
};
|
};
|
||||||
struct SB_RW {
|
struct SB_RW {
|
||||||
/* 0x0000 */ uint arg_0[1];
|
uint arg_0[1];
|
||||||
};
|
};
|
||||||
struct tint_symbol {
|
struct tint_symbol {
|
||||||
float4 value [[position]];
|
float4 value [[position]];
|
||||||
};
|
};
|
||||||
|
|
||||||
void arrayLength_eb510f(constant tint_symbol_1& tint_symbol_2) {
|
void arrayLength_eb510f(const constant tint_symbol_1* const tint_symbol_3) {
|
||||||
uint res = ((tint_symbol_2.buffer_size[0u][0u] - 0u) / 4u);
|
uint res = (((*(tint_symbol_3)).buffer_size[0u][0u] - 0u) / 4u);
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 vertex_main_inner(constant tint_symbol_1& tint_symbol_2) {
|
float4 vertex_main_inner(const constant tint_symbol_1* const tint_symbol_4) {
|
||||||
arrayLength_eb510f(tint_symbol_2);
|
arrayLength_eb510f(tint_symbol_4);
|
||||||
return float4();
|
return float4();
|
||||||
}
|
}
|
||||||
|
|
||||||
vertex tint_symbol vertex_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
vertex tint_symbol vertex_main(const constant tint_symbol_1* tint_symbol_5 [[buffer(30)]]) {
|
||||||
float4 const inner_result = vertex_main_inner(tint_symbol_2);
|
float4 const inner_result = vertex_main_inner(tint_symbol_5);
|
||||||
tint_symbol wrapper_result = {};
|
tint_symbol wrapper_result = {};
|
||||||
wrapper_result.value = inner_result;
|
wrapper_result.value = inner_result;
|
||||||
return wrapper_result;
|
return wrapper_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
fragment void fragment_main(const constant tint_symbol_1* tint_symbol_6 [[buffer(30)]]) {
|
||||||
arrayLength_eb510f(tint_symbol_2);
|
arrayLength_eb510f(tint_symbol_6);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(constant tint_symbol_1& tint_symbol_2 [[buffer(30)]]) {
|
kernel void compute_main(const constant tint_symbol_1* tint_symbol_7 [[buffer(30)]]) {
|
||||||
arrayLength_eb510f(tint_symbol_2);
|
arrayLength_eb510f(tint_symbol_7);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_uint arg_0;
|
/* 0x0000 */ atomic_uint arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicAdd_8a199a(device SB_RW& sb_rw) {
|
void atomicAdd_8a199a(device SB_RW* const tint_symbol) {
|
||||||
uint res = atomic_fetch_add_explicit(&(sb_rw.arg_0), 1u, memory_order_relaxed);
|
uint res = atomic_fetch_add_explicit(&((*(tint_symbol)).arg_0), 1u, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicAdd_8a199a(sb_rw);
|
atomicAdd_8a199a(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicAdd_8a199a(sb_rw);
|
atomicAdd_8a199a(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_int arg_0;
|
/* 0x0000 */ atomic_int arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicAdd_d32fe4(device SB_RW& sb_rw) {
|
void atomicAdd_d32fe4(device SB_RW* const tint_symbol) {
|
||||||
int res = atomic_fetch_add_explicit(&(sb_rw.arg_0), 1, memory_order_relaxed);
|
int res = atomic_fetch_add_explicit(&((*(tint_symbol)).arg_0), 1, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicAdd_d32fe4(sb_rw);
|
atomicAdd_d32fe4(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicAdd_d32fe4(sb_rw);
|
atomicAdd_d32fe4(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_int arg_0;
|
/* 0x0000 */ atomic_int arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicAnd_152966(device SB_RW& sb_rw) {
|
void atomicAnd_152966(device SB_RW* const tint_symbol) {
|
||||||
int res = atomic_fetch_and_explicit(&(sb_rw.arg_0), 1, memory_order_relaxed);
|
int res = atomic_fetch_and_explicit(&((*(tint_symbol)).arg_0), 1, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicAnd_152966(sb_rw);
|
atomicAnd_152966(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicAnd_152966(sb_rw);
|
atomicAnd_152966(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_uint arg_0;
|
/* 0x0000 */ atomic_uint arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicAnd_85a8d9(device SB_RW& sb_rw) {
|
void atomicAnd_85a8d9(device SB_RW* const tint_symbol) {
|
||||||
uint res = atomic_fetch_and_explicit(&(sb_rw.arg_0), 1u, memory_order_relaxed);
|
uint res = atomic_fetch_and_explicit(&((*(tint_symbol)).arg_0), 1u, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicAnd_85a8d9(sb_rw);
|
atomicAnd_85a8d9(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicAnd_85a8d9(sb_rw);
|
atomicAnd_85a8d9(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,17 +13,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_int arg_0;
|
/* 0x0000 */ atomic_int arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicCompareExchangeWeak_12871c(device SB_RW& sb_rw) {
|
void atomicCompareExchangeWeak_12871c(device SB_RW* const tint_symbol) {
|
||||||
int2 res = atomicCompareExchangeWeak_1(&(sb_rw.arg_0), 1, 1);
|
int2 res = atomicCompareExchangeWeak_1(&((*(tint_symbol)).arg_0), 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicCompareExchangeWeak_12871c(sb_rw);
|
atomicCompareExchangeWeak_12871c(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicCompareExchangeWeak_12871c(sb_rw);
|
atomicCompareExchangeWeak_12871c(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,17 +13,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_uint arg_0;
|
/* 0x0000 */ atomic_uint arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicCompareExchangeWeak_6673da(device SB_RW& sb_rw) {
|
void atomicCompareExchangeWeak_6673da(device SB_RW* const tint_symbol) {
|
||||||
uint2 res = atomicCompareExchangeWeak_1(&(sb_rw.arg_0), 1u, 1u);
|
uint2 res = atomicCompareExchangeWeak_1(&((*(tint_symbol)).arg_0), 1u, 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicCompareExchangeWeak_6673da(sb_rw);
|
atomicCompareExchangeWeak_6673da(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicCompareExchangeWeak_6673da(sb_rw);
|
atomicCompareExchangeWeak_6673da(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_uint arg_0;
|
/* 0x0000 */ atomic_uint arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicExchange_d59712(device SB_RW& sb_rw) {
|
void atomicExchange_d59712(device SB_RW* const tint_symbol) {
|
||||||
uint res = atomic_exchange_explicit(&(sb_rw.arg_0), 1u, memory_order_relaxed);
|
uint res = atomic_exchange_explicit(&((*(tint_symbol)).arg_0), 1u, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicExchange_d59712(sb_rw);
|
atomicExchange_d59712(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicExchange_d59712(sb_rw);
|
atomicExchange_d59712(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_int arg_0;
|
/* 0x0000 */ atomic_int arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicExchange_f2e22f(device SB_RW& sb_rw) {
|
void atomicExchange_f2e22f(device SB_RW* const tint_symbol) {
|
||||||
int res = atomic_exchange_explicit(&(sb_rw.arg_0), 1, memory_order_relaxed);
|
int res = atomic_exchange_explicit(&((*(tint_symbol)).arg_0), 1, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicExchange_f2e22f(sb_rw);
|
atomicExchange_f2e22f(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicExchange_f2e22f(sb_rw);
|
atomicExchange_f2e22f(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_int arg_0;
|
/* 0x0000 */ atomic_int arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicLoad_0806ad(device SB_RW& sb_rw) {
|
void atomicLoad_0806ad(device SB_RW* const tint_symbol) {
|
||||||
int res = atomic_load_explicit(&(sb_rw.arg_0), memory_order_relaxed);
|
int res = atomic_load_explicit(&((*(tint_symbol)).arg_0), memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicLoad_0806ad(sb_rw);
|
atomicLoad_0806ad(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicLoad_0806ad(sb_rw);
|
atomicLoad_0806ad(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_uint arg_0;
|
/* 0x0000 */ atomic_uint arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicLoad_fe6cc3(device SB_RW& sb_rw) {
|
void atomicLoad_fe6cc3(device SB_RW* const tint_symbol) {
|
||||||
uint res = atomic_load_explicit(&(sb_rw.arg_0), memory_order_relaxed);
|
uint res = atomic_load_explicit(&((*(tint_symbol)).arg_0), memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicLoad_fe6cc3(sb_rw);
|
atomicLoad_fe6cc3(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicLoad_fe6cc3(sb_rw);
|
atomicLoad_fe6cc3(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_uint arg_0;
|
/* 0x0000 */ atomic_uint arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicMax_51b9be(device SB_RW& sb_rw) {
|
void atomicMax_51b9be(device SB_RW* const tint_symbol) {
|
||||||
uint res = atomic_fetch_max_explicit(&(sb_rw.arg_0), 1u, memory_order_relaxed);
|
uint res = atomic_fetch_max_explicit(&((*(tint_symbol)).arg_0), 1u, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicMax_51b9be(sb_rw);
|
atomicMax_51b9be(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicMax_51b9be(sb_rw);
|
atomicMax_51b9be(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_int arg_0;
|
/* 0x0000 */ atomic_int arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicMax_92aa72(device SB_RW& sb_rw) {
|
void atomicMax_92aa72(device SB_RW* const tint_symbol) {
|
||||||
int res = atomic_fetch_max_explicit(&(sb_rw.arg_0), 1, memory_order_relaxed);
|
int res = atomic_fetch_max_explicit(&((*(tint_symbol)).arg_0), 1, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicMax_92aa72(sb_rw);
|
atomicMax_92aa72(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicMax_92aa72(sb_rw);
|
atomicMax_92aa72(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_int arg_0;
|
/* 0x0000 */ atomic_int arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicMin_8e38dc(device SB_RW& sb_rw) {
|
void atomicMin_8e38dc(device SB_RW* const tint_symbol) {
|
||||||
int res = atomic_fetch_min_explicit(&(sb_rw.arg_0), 1, memory_order_relaxed);
|
int res = atomic_fetch_min_explicit(&((*(tint_symbol)).arg_0), 1, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicMin_8e38dc(sb_rw);
|
atomicMin_8e38dc(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicMin_8e38dc(sb_rw);
|
atomicMin_8e38dc(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_uint arg_0;
|
/* 0x0000 */ atomic_uint arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicMin_c67a74(device SB_RW& sb_rw) {
|
void atomicMin_c67a74(device SB_RW* const tint_symbol) {
|
||||||
uint res = atomic_fetch_min_explicit(&(sb_rw.arg_0), 1u, memory_order_relaxed);
|
uint res = atomic_fetch_min_explicit(&((*(tint_symbol)).arg_0), 1u, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicMin_c67a74(sb_rw);
|
atomicMin_c67a74(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicMin_c67a74(sb_rw);
|
atomicMin_c67a74(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_uint arg_0;
|
/* 0x0000 */ atomic_uint arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicOr_5e95d4(device SB_RW& sb_rw) {
|
void atomicOr_5e95d4(device SB_RW* const tint_symbol) {
|
||||||
uint res = atomic_fetch_or_explicit(&(sb_rw.arg_0), 1u, memory_order_relaxed);
|
uint res = atomic_fetch_or_explicit(&((*(tint_symbol)).arg_0), 1u, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicOr_5e95d4(sb_rw);
|
atomicOr_5e95d4(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicOr_5e95d4(sb_rw);
|
atomicOr_5e95d4(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_int arg_0;
|
/* 0x0000 */ atomic_int arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicOr_8d96a0(device SB_RW& sb_rw) {
|
void atomicOr_8d96a0(device SB_RW* const tint_symbol) {
|
||||||
int res = atomic_fetch_or_explicit(&(sb_rw.arg_0), 1, memory_order_relaxed);
|
int res = atomic_fetch_or_explicit(&((*(tint_symbol)).arg_0), 1, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicOr_8d96a0(sb_rw);
|
atomicOr_8d96a0(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicOr_8d96a0(sb_rw);
|
atomicOr_8d96a0(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_uint arg_0;
|
/* 0x0000 */ atomic_uint arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicStore_cdc29e(device SB_RW& sb_rw) {
|
void atomicStore_cdc29e(device SB_RW* const tint_symbol) {
|
||||||
atomic_store_explicit(&(sb_rw.arg_0), 1u, memory_order_relaxed);
|
atomic_store_explicit(&((*(tint_symbol)).arg_0), 1u, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicStore_cdc29e(sb_rw);
|
atomicStore_cdc29e(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicStore_cdc29e(sb_rw);
|
atomicStore_cdc29e(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@ struct SB_RW {
|
||||||
/* 0x0000 */ atomic_int arg_0;
|
/* 0x0000 */ atomic_int arg_0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void atomicStore_d1e9a6(device SB_RW& sb_rw) {
|
void atomicStore_d1e9a6(device SB_RW* const tint_symbol) {
|
||||||
atomic_store_explicit(&(sb_rw.arg_0), 1, memory_order_relaxed);
|
atomic_store_explicit(&((*(tint_symbol)).arg_0), 1, memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment void fragment_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
fragment void fragment_main(device SB_RW* tint_symbol_1 [[buffer(0)]]) {
|
||||||
atomicStore_d1e9a6(sb_rw);
|
atomicStore_d1e9a6(tint_symbol_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel void compute_main(device SB_RW& sb_rw [[buffer(0)]]) {
|
kernel void compute_main(device SB_RW* tint_symbol_2 [[buffer(0)]]) {
|
||||||
atomicStore_d1e9a6(sb_rw);
|
atomicStore_d1e9a6(tint_symbol_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue