tint/msl: Fix emission of private variables
In order to avoid declaring too many function parameters, we
previously modified this transform to redeclare private variables that
are only used inside a single function as function-scope
variables. This was broken as it meant that their values did not
persist across multiple calls to the same function.
Instead, wrap all private variables in a structure and pass it around
as a pointer.
Fixed: tint:1875
Change-Id: I83f5eb1071d57b9c6af56d6cf21b3a32c6e94260
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/124800
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
diff --git a/src/tint/transform/module_scope_var_to_entry_point_param.cc b/src/tint/transform/module_scope_var_to_entry_point_param.cc
index 044133c..e82b1bd 100644
--- a/src/tint/transform/module_scope_var_to_entry_point_param.cc
+++ b/src/tint/transform/module_scope_var_to_entry_point_param.cc
@@ -33,7 +33,7 @@
namespace tint::transform {
namespace {
-using WorkgroupParameterMemberList = utils::Vector<const ast::StructMember*, 8>;
+using StructMemberList = utils::Vector<const ast::StructMember*, 8>;
// The name of the struct member for arrays that are wrapped in structures.
const char* kWrappedArrayMemberName = "arr";
@@ -114,7 +114,7 @@
const sem::Variable* var,
Symbol new_var_symbol,
std::function<Symbol()> workgroup_param,
- WorkgroupParameterMemberList& workgroup_parameter_members,
+ StructMemberList& workgroup_parameter_members,
bool& is_pointer,
bool& is_wrapped) {
auto* ty = var->Type()->UnwrapRef();
@@ -188,21 +188,14 @@
member_ptr);
ctx.InsertFront(func->body->statements, ctx.dst->Decl(local_var));
is_pointer = true;
-
- break;
+ } else {
+ auto* disable_validation =
+ ctx.dst->Disable(ast::DisabledValidation::kIgnoreAddressSpace);
+ auto* initializer = ctx.Clone(var->Declaration()->initializer);
+ auto* local_var = ctx.dst->Var(new_var_symbol, store_type(), sc, initializer,
+ utils::Vector{disable_validation});
+ ctx.InsertFront(func->body->statements, ctx.dst->Decl(local_var));
}
- [[fallthrough]];
- }
- case builtin::AddressSpace::kPrivate: {
- // Variables in the Private and Workgroup address spaces are redeclared at function
- // scope. Disable address space validation on this variable.
- auto* disable_validation =
- ctx.dst->Disable(ast::DisabledValidation::kIgnoreAddressSpace);
- auto* initializer = ctx.Clone(var->Declaration()->initializer);
- auto* local_var = ctx.dst->Var(new_var_symbol, store_type(), sc, initializer,
- utils::Vector{disable_validation});
- ctx.InsertFront(func->body->statements, ctx.dst->Decl(local_var));
-
break;
}
case builtin::AddressSpace::kPushConstant: {
@@ -234,6 +227,8 @@
auto sc = var->AddressSpace();
switch (sc) {
case builtin::AddressSpace::kPrivate:
+ // Private variables are passed all together in a struct.
+ return;
case builtin::AddressSpace::kStorage:
case builtin::AddressSpace::kUniform:
case builtin::AddressSpace::kHandle:
@@ -275,12 +270,12 @@
/// @param var the variable to replace
/// @param new_var the symbol to use for replacement
/// @param is_pointer true if `new_var` is a pointer to the new variable
- /// @param is_wrapped true if `new_var` is an array wrapped in a structure
+ /// @param member_name if valid, the name of the struct member that holds this variable
void ReplaceUsesInFunction(const ast::Function* func,
const sem::Variable* var,
Symbol new_var,
bool is_pointer,
- bool is_wrapped) {
+ Symbol member_name) {
for (auto* user : var->Users()) {
if (user->Stmt()->Function()->Declaration() == func) {
const ast::Expression* expr = ctx.dst->Expr(new_var);
@@ -288,16 +283,16 @@
// If this identifier is used by an address-of operator, just remove the
// address-of instead of adding a deref, since we already have a pointer.
auto* ident = user->Declaration()->As<ast::IdentifierExpression>();
- if (ident_to_address_of_.count(ident)) {
+ if (ident_to_address_of_.count(ident) && !member_name.IsValid()) {
ctx.Replace(ident_to_address_of_[ident], expr);
continue;
}
expr = ctx.dst->Deref(expr);
}
- if (is_wrapped) {
- // Get the member from the wrapper structure.
- expr = ctx.dst->MemberAccessor(expr, kWrappedArrayMemberName);
+ if (member_name.IsValid()) {
+ // Get the member from the containing structure.
+ expr = ctx.dst->MemberAccessor(expr, member_name);
}
ctx.Replace(user->Declaration(), expr);
}
@@ -312,8 +307,34 @@
utils::Vector<const ast::Function*, 8> functions_to_process;
+ // Collect private variables into a single structure.
+ StructMemberList private_struct_members;
+ utils::Vector<std::function<const ast::AssignmentStatement*()>, 4> private_initializers;
+ std::unordered_set<const ast::Function*> uses_privates;
+
// Build a list of functions that transitively reference any module-scope variables.
for (auto* decl : ctx.src->Sem().Module()->DependencyOrderedDeclarations()) {
+ if (auto* var = decl->As<ast::Var>()) {
+ auto* sem_var = ctx.src->Sem().Get(var);
+ if (sem_var->AddressSpace() == builtin::AddressSpace::kPrivate) {
+ // Create a member in the private variable struct.
+ auto* ty = sem_var->Type()->UnwrapRef();
+ auto name = ctx.Clone(var->name->symbol);
+ private_struct_members.Push(ctx.dst->Member(name, CreateASTTypeFor(ctx, ty)));
+ CloneStructTypes(ty);
+
+ // Create a statement to assign the initializer if present.
+ if (var->initializer) {
+ private_initializers.Push([&, name, var]() {
+ return ctx.dst->Assign(
+ ctx.dst->MemberAccessor(PrivateStructVariableName(), name),
+ ctx.Clone(var->initializer));
+ });
+ }
+ }
+ continue;
+ }
+
auto* func_ast = decl->As<ast::Function>();
if (!func_ast) {
continue;
@@ -324,8 +345,10 @@
bool needs_processing = false;
for (auto* var : func_sem->TransitivelyReferencedGlobals()) {
if (var->AddressSpace() != builtin::AddressSpace::kUndefined) {
+ if (var->AddressSpace() == builtin::AddressSpace::kPrivate) {
+ uses_privates.insert(func_ast);
+ }
needs_processing = true;
- break;
}
}
if (needs_processing) {
@@ -339,6 +362,14 @@
}
}
+ if (!private_struct_members.IsEmpty()) {
+ // Create the private variable struct.
+ ctx.dst->Structure(PrivateStructName(), std::move(private_struct_members));
+ // Passing a pointer to a private variable will now involve passing a pointer to the
+ // member of a structure, so enable the extension that allows this.
+ ctx.dst->Enable(builtin::Extension::kChromiumExperimentalFullPtrParameters);
+ }
+
// Build a list of `&ident` expressions. We'll use this later to avoid generating
// expressions of the form `&*ident`, which break WGSL validation rules when this expression
// is passed to a function.
@@ -370,7 +401,7 @@
// We aggregate all workgroup variables into a struct to avoid hitting MSL's limit for
// threadgroup memory arguments.
Symbol workgroup_parameter_symbol;
- WorkgroupParameterMemberList workgroup_parameter_members;
+ StructMemberList workgroup_parameter_members;
auto workgroup_param = [&]() {
if (!workgroup_parameter_symbol.IsValid()) {
workgroup_parameter_symbol = ctx.dst->Sym();
@@ -378,12 +409,43 @@
return workgroup_parameter_symbol;
};
+ // If this function references any private variables, it needs to take the private
+ // variable struct as a parameter (or declare it, if it is an entry point function).
+ if (uses_privates.count(func_ast)) {
+ if (is_entry_point) {
+ // Create a local declaration for the private variable struct.
+ auto* var = ctx.dst->Var(
+ PrivateStructVariableName(), ctx.dst->ty(PrivateStructName()),
+ builtin::AddressSpace::kPrivate,
+ utils::Vector{
+ ctx.dst->Disable(ast::DisabledValidation::kIgnoreAddressSpace),
+ });
+ ctx.InsertFront(func_ast->body->statements, ctx.dst->Decl(var));
+
+ // Initialize the members of that struct with the original initializers.
+ for (auto init : private_initializers) {
+ ctx.InsertFront(func_ast->body->statements, init());
+ }
+ } else {
+ // Create a parameter that is a pointer to the private variable struct.
+ auto ptr = ctx.dst->ty.pointer(ctx.dst->ty(PrivateStructName()),
+ builtin::AddressSpace::kPrivate);
+ auto* param = ctx.dst->Param(PrivateStructVariableName(), ptr);
+ ctx.InsertBack(func_ast->params, param);
+ }
+ }
+
// Process and redeclare all variables referenced by the function.
for (auto* var : func_sem->TransitivelyReferencedGlobals()) {
if (var->AddressSpace() == builtin::AddressSpace::kUndefined) {
continue;
}
- if (local_private_vars_.count(var)) {
+ if (var->AddressSpace() == builtin::AddressSpace::kPrivate) {
+ // Private variable are collected into a single struct that is passed by
+ // pointer (handled above), so we just need to replace the uses here.
+ ReplaceUsesInFunction(func_ast, var, PrivateStructVariableName(),
+ /* is_pointer */ !is_entry_point,
+ ctx.Clone(var->Declaration()->name->symbol));
continue;
}
@@ -396,49 +458,25 @@
// Track whether the new variable was wrapped in a struct or not.
bool is_wrapped = false;
- // Check if this is a private variable that is only referenced by this function.
- bool local_private = false;
- if (var->AddressSpace() == builtin::AddressSpace::kPrivate) {
- local_private = true;
- for (auto* user : var->Users()) {
- auto* stmt = user->Stmt();
- if (!stmt || stmt->Function() != func_sem) {
- local_private = false;
- break;
- }
- }
- }
-
- if (local_private) {
- // Redeclare the variable at function scope.
- auto* disable_validation =
- ctx.dst->Disable(ast::DisabledValidation::kIgnoreAddressSpace);
- auto* initializer = ctx.Clone(var->Declaration()->initializer);
- auto* local_var = ctx.dst->Var(new_var_symbol,
- CreateASTTypeFor(ctx, var->Type()->UnwrapRef()),
- builtin::AddressSpace::kPrivate, initializer,
- utils::Vector{disable_validation});
- ctx.InsertFront(func_ast->body->statements, ctx.dst->Decl(local_var));
- local_private_vars_.insert(var);
+ // Process the variable to redeclare it as a parameter or local variable.
+ if (is_entry_point) {
+ ProcessVariableInEntryPoint(func_ast, var, new_var_symbol, workgroup_param,
+ workgroup_parameter_members, is_pointer,
+ is_wrapped);
} else {
- // Process the variable to redeclare it as a parameter or local variable.
- if (is_entry_point) {
- ProcessVariableInEntryPoint(func_ast, var, new_var_symbol, workgroup_param,
- workgroup_parameter_members, is_pointer,
- is_wrapped);
- } else {
- ProcessVariableInUserFunction(func_ast, var, new_var_symbol, is_pointer);
- if (var->AddressSpace() == builtin::AddressSpace::kWorkgroup) {
- needs_pointer_aliasing = true;
- }
+ ProcessVariableInUserFunction(func_ast, var, new_var_symbol, is_pointer);
+ if (var->AddressSpace() == builtin::AddressSpace::kWorkgroup) {
+ needs_pointer_aliasing = true;
}
-
- // Record the replacement symbol.
- var_to_newvar[var] = {new_var_symbol, is_pointer, is_wrapped};
}
+ // Record the replacement symbol.
+ var_to_newvar[var] = {new_var_symbol, is_pointer, is_wrapped};
+
// Replace all uses of the module-scope variable.
- ReplaceUsesInFunction(func_ast, var, new_var_symbol, is_pointer, is_wrapped);
+ ReplaceUsesInFunction(
+ func_ast, var, new_var_symbol, is_pointer,
+ is_wrapped ? ctx.dst->Sym(kWrappedArrayMemberName) : Symbol());
}
// Allow pointer aliasing if needed.
@@ -468,6 +506,15 @@
auto* call_sem = ctx.src->Sem().Get(call)->Unwrap()->As<sem::Call>();
auto* target_sem = call_sem->Target()->As<sem::Function>();
+ // Pass the private variable struct pointer if needed.
+ if (uses_privates.count(target_sem->Declaration())) {
+ const ast::Expression* arg = ctx.dst->Expr(PrivateStructVariableName());
+ if (is_entry_point) {
+ arg = ctx.dst->AddressOf(arg);
+ }
+ ctx.InsertBack(call->args, arg);
+ }
+
// Add new arguments for any variables that are needed by the callee.
// For entry points, pass non-handle types as pointers.
for (auto* target_var : target_sem->TransitivelyReferencedGlobals()) {
@@ -509,16 +556,35 @@
}
}
+ /// @returns the name of the structure that contains all of the module-scope private variables
+ Symbol PrivateStructName() {
+ if (!private_struct_name.IsValid()) {
+ private_struct_name = ctx.dst->Symbols().New("tint_private_vars_struct");
+ }
+ return private_struct_name;
+ }
+
+ /// @returns the name of the variable that contains all of the module-scope private variables
+ Symbol PrivateStructVariableName() {
+ if (!private_struct_variable_name.IsValid()) {
+ private_struct_variable_name = ctx.dst->Symbols().New("tint_private_vars");
+ }
+ return private_struct_variable_name;
+ }
+
private:
// The structures that have already been cloned by this transform.
std::unordered_set<const sem::Struct*> cloned_structs_;
- // Set of a private variables that are local to a single function.
- std::unordered_set<const sem::Variable*> local_private_vars_;
-
// Map from identifier expression to the address-of expression that uses it.
std::unordered_map<const ast::IdentifierExpression*, const ast::UnaryOpExpression*>
ident_to_address_of_;
+
+ // The name of the structure that contains all the module-scope private variables.
+ Symbol private_struct_name;
+
+ // The name of the structure variable that contains all the module-scope private variables.
+ Symbol private_struct_variable_name;
};
ModuleScopeVarToEntryPointParam::ModuleScopeVarToEntryPointParam() = default;
diff --git a/src/tint/transform/module_scope_var_to_entry_point_param_test.cc b/src/tint/transform/module_scope_var_to_entry_point_param_test.cc
index a9aaa28..5991a1a 100644
--- a/src/tint/transform/module_scope_var_to_entry_point_param_test.cc
+++ b/src/tint/transform/module_scope_var_to_entry_point_param_test.cc
@@ -49,11 +49,17 @@
)";
auto* expect = R"(
+enable chromium_experimental_full_ptr_parameters;
+
+struct tint_private_vars_struct {
+ p : f32,
+}
+
@compute @workgroup_size(1)
fn main() {
+ @internal(disable_validation__ignore_address_space) var<private> tint_private_vars : tint_private_vars_struct;
@internal(disable_validation__ignore_address_space) var<workgroup> tint_symbol : f32;
- @internal(disable_validation__ignore_address_space) var<private> tint_symbol_1 : f32;
- tint_symbol = tint_symbol_1;
+ tint_symbol = tint_private_vars.p;
}
)";
@@ -74,11 +80,17 @@
)";
auto* expect = R"(
+enable chromium_experimental_full_ptr_parameters;
+
+struct tint_private_vars_struct {
+ p : f32,
+}
+
@compute @workgroup_size(1)
fn main() {
+ @internal(disable_validation__ignore_address_space) var<private> tint_private_vars : tint_private_vars_struct;
@internal(disable_validation__ignore_address_space) var<workgroup> tint_symbol : f32;
- @internal(disable_validation__ignore_address_space) var<private> tint_symbol_1 : f32;
- tint_symbol = tint_symbol_1;
+ tint_symbol = tint_private_vars.p;
}
)";
@@ -118,32 +130,38 @@
)";
auto* expect = R"(
+enable chromium_experimental_full_ptr_parameters;
+
+struct tint_private_vars_struct {
+ p : f32,
+}
+
fn no_uses() {
}
-fn zoo(@internal(disable_validation__ignore_address_space) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol : ptr<private, f32>) {
- *(tint_symbol) = (*(tint_symbol) * 2.0);
+fn zoo(tint_private_vars : ptr<private, tint_private_vars_struct>) {
+ (*(tint_private_vars)).p = ((*(tint_private_vars)).p * 2.0);
}
@internal(disable_validation__ignore_pointer_aliasing)
-fn bar(a : f32, b : f32, @internal(disable_validation__ignore_address_space) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_1 : ptr<private, f32>, @internal(disable_validation__ignore_address_space) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_2 : ptr<workgroup, f32>) {
- *(tint_symbol_1) = a;
- *(tint_symbol_2) = b;
- zoo(tint_symbol_1);
+fn bar(a : f32, b : f32, tint_private_vars : ptr<private, tint_private_vars_struct>, @internal(disable_validation__ignore_address_space) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol : ptr<workgroup, f32>) {
+ (*(tint_private_vars)).p = a;
+ *(tint_symbol) = b;
+ zoo(tint_private_vars);
}
@internal(disable_validation__ignore_pointer_aliasing)
-fn foo(a : f32, @internal(disable_validation__ignore_address_space) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_3 : ptr<private, f32>, @internal(disable_validation__ignore_address_space) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_4 : ptr<workgroup, f32>) {
+fn foo(a : f32, tint_private_vars : ptr<private, tint_private_vars_struct>, @internal(disable_validation__ignore_address_space) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_1 : ptr<workgroup, f32>) {
let b : f32 = 2.0;
- bar(a, b, tint_symbol_3, tint_symbol_4);
+ bar(a, b, tint_private_vars, tint_symbol_1);
no_uses();
}
@compute @workgroup_size(1)
fn main() {
- @internal(disable_validation__ignore_address_space) var<private> tint_symbol_5 : f32;
- @internal(disable_validation__ignore_address_space) var<workgroup> tint_symbol_6 : f32;
- foo(1.0, &(tint_symbol_5), &(tint_symbol_6));
+ @internal(disable_validation__ignore_address_space) var<private> tint_private_vars : tint_private_vars_struct;
+ @internal(disable_validation__ignore_address_space) var<workgroup> tint_symbol_2 : f32;
+ foo(1.0, &(tint_private_vars), &(tint_symbol_2));
}
)";
@@ -183,17 +201,23 @@
)";
auto* expect = R"(
+enable chromium_experimental_full_ptr_parameters;
+
+struct tint_private_vars_struct {
+ p : f32,
+}
+
@compute @workgroup_size(1)
fn main() {
- @internal(disable_validation__ignore_address_space) var<private> tint_symbol_5 : f32;
- @internal(disable_validation__ignore_address_space) var<workgroup> tint_symbol_6 : f32;
- foo(1.0, &(tint_symbol_5), &(tint_symbol_6));
+ @internal(disable_validation__ignore_address_space) var<private> tint_private_vars : tint_private_vars_struct;
+ @internal(disable_validation__ignore_address_space) var<workgroup> tint_symbol_2 : f32;
+ foo(1.0, &(tint_private_vars), &(tint_symbol_2));
}
@internal(disable_validation__ignore_pointer_aliasing)
-fn foo(a : f32, @internal(disable_validation__ignore_address_space) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_3 : ptr<private, f32>, @internal(disable_validation__ignore_address_space) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_4 : ptr<workgroup, f32>) {
+fn foo(a : f32, tint_private_vars : ptr<private, tint_private_vars_struct>, @internal(disable_validation__ignore_address_space) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_1 : ptr<workgroup, f32>) {
let b : f32 = 2.0;
- bar(a, b, tint_symbol_3, tint_symbol_4);
+ bar(a, b, tint_private_vars, tint_symbol_1);
no_uses();
}
@@ -201,14 +225,14 @@
}
@internal(disable_validation__ignore_pointer_aliasing)
-fn bar(a : f32, b : f32, @internal(disable_validation__ignore_address_space) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_1 : ptr<private, f32>, @internal(disable_validation__ignore_address_space) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol_2 : ptr<workgroup, f32>) {
- *(tint_symbol_1) = a;
- *(tint_symbol_2) = b;
- zoo(tint_symbol_1);
+fn bar(a : f32, b : f32, tint_private_vars : ptr<private, tint_private_vars_struct>, @internal(disable_validation__ignore_address_space) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol : ptr<workgroup, f32>) {
+ (*(tint_private_vars)).p = a;
+ *(tint_symbol) = b;
+ zoo(tint_private_vars);
}
-fn zoo(@internal(disable_validation__ignore_address_space) @internal(disable_validation__ignore_invalid_pointer_argument) tint_symbol : ptr<private, f32>) {
- *(tint_symbol) = (*(tint_symbol) * 2.0);
+fn zoo(tint_private_vars : ptr<private, tint_private_vars_struct>) {
+ (*(tint_private_vars)).p = ((*(tint_private_vars)).p * 2.0);
}
)";
@@ -229,11 +253,19 @@
)";
auto* expect = R"(
+enable chromium_experimental_full_ptr_parameters;
+
+struct tint_private_vars_struct {
+ a : f32,
+ b : f32,
+}
+
@compute @workgroup_size(1)
fn main() {
- @internal(disable_validation__ignore_address_space) var<private> tint_symbol : f32 = 1.0;
- @internal(disable_validation__ignore_address_space) var<private> tint_symbol_1 : f32 = f32();
- let x : f32 = (tint_symbol + tint_symbol_1);
+ @internal(disable_validation__ignore_address_space) var<private> tint_private_vars : tint_private_vars_struct;
+ tint_private_vars.a = 1.0;
+ tint_private_vars.b = f32();
+ let x : f32 = (tint_private_vars.a + tint_private_vars.b);
}
)";
@@ -254,11 +286,19 @@
)";
auto* expect = R"(
+enable chromium_experimental_full_ptr_parameters;
+
+struct tint_private_vars_struct {
+ a : f32,
+ b : f32,
+}
+
@compute @workgroup_size(1)
fn main() {
- @internal(disable_validation__ignore_address_space) var<private> tint_symbol : f32 = 1.0;
- @internal(disable_validation__ignore_address_space) var<private> tint_symbol_1 : f32 = f32();
- let x : f32 = (tint_symbol + tint_symbol_1);
+ @internal(disable_validation__ignore_address_space) var<private> tint_private_vars : tint_private_vars_struct;
+ tint_private_vars.a = 1.0;
+ tint_private_vars.b = f32();
+ let x : f32 = (tint_private_vars.a + tint_private_vars.b);
}
)";
@@ -282,12 +322,18 @@
)";
auto* expect = R"(
+enable chromium_experimental_full_ptr_parameters;
+
+struct tint_private_vars_struct {
+ p : f32,
+}
+
@compute @workgroup_size(1)
fn main() {
- @internal(disable_validation__ignore_address_space) var<private> tint_symbol : f32;
- @internal(disable_validation__ignore_address_space) var<workgroup> tint_symbol_1 : f32;
- let p_ptr : ptr<private, f32> = &(tint_symbol);
- let w_ptr : ptr<workgroup, f32> = &(tint_symbol_1);
+ @internal(disable_validation__ignore_address_space) var<private> tint_private_vars : tint_private_vars_struct;
+ @internal(disable_validation__ignore_address_space) var<workgroup> tint_symbol : f32;
+ let p_ptr : ptr<private, f32> = &(tint_private_vars.p);
+ let w_ptr : ptr<workgroup, f32> = &(tint_symbol);
let x : f32 = (*(p_ptr) + *(w_ptr));
*(p_ptr) = x;
}
@@ -313,12 +359,18 @@
)";
auto* expect = R"(
+enable chromium_experimental_full_ptr_parameters;
+
+struct tint_private_vars_struct {
+ p : f32,
+}
+
@compute @workgroup_size(1)
fn main() {
- @internal(disable_validation__ignore_address_space) var<private> tint_symbol : f32;
- @internal(disable_validation__ignore_address_space) var<workgroup> tint_symbol_1 : f32;
- let p_ptr : ptr<private, f32> = &(tint_symbol);
- let w_ptr : ptr<workgroup, f32> = &(tint_symbol_1);
+ @internal(disable_validation__ignore_address_space) var<private> tint_private_vars : tint_private_vars_struct;
+ @internal(disable_validation__ignore_address_space) var<workgroup> tint_symbol : f32;
+ let p_ptr : ptr<private, f32> = &(tint_private_vars.p);
+ let w_ptr : ptr<workgroup, f32> = &(tint_symbol);
let x : f32 = (*(p_ptr) + *(w_ptr));
*(p_ptr) = x;
}
@@ -1151,6 +1203,7 @@
var<private> p : f32;
var<workgroup> w : f32;
+var<private> p_with_init : f32 = 42;
@group(0) @binding(0)
var<uniform> ub : S;
@@ -1166,6 +1219,13 @@
)";
auto* expect = R"(
+enable chromium_experimental_full_ptr_parameters;
+
+struct tint_private_vars_struct {
+ p : f32,
+ p_with_init : f32,
+}
+
struct S {
a : f32,
}
@@ -1180,16 +1240,22 @@
EXPECT_EQ(expect, str(got));
}
-// Test that a private variable that is only referenced by a single user-defined function is
-// promoted to a function scope variable, rather than passed as a parameter.
-TEST_F(ModuleScopeVarToEntryPointParamTest, PromotePrivateToFunctionScope) {
+TEST_F(ModuleScopeVarToEntryPointParamTest, MultiplePrivateVariables) {
auto* src = R"(
-var<private> p : f32;
+struct S {
+ a : f32,
+ b : f32,
+ c : f32,
+}
-fn foo(a : f32) -> f32 {
- let x = p;
- p = x * a;
- return p;
+var<private> a : f32;
+var<private> b : f32 = 42;
+var<private> c : S = S(1, 2, 3);
+var<private> d : S;
+var<private> unused : f32;
+
+fn foo(x : f32) -> f32 {
+ return (a + b + c.a + d.c) * x;
}
@compute @workgroup_size(1)
@@ -1199,16 +1265,32 @@
)";
auto* expect = R"(
-fn foo(a : f32) -> f32 {
- @internal(disable_validation__ignore_address_space) var<private> tint_symbol : f32;
- let x = tint_symbol;
- tint_symbol = (x * a);
- return tint_symbol;
+enable chromium_experimental_full_ptr_parameters;
+
+struct S {
+ a : f32,
+ b : f32,
+ c : f32,
+}
+
+struct tint_private_vars_struct {
+ a : f32,
+ b : f32,
+ c : S,
+ d : S,
+ unused : f32,
+}
+
+fn foo(x : f32, tint_private_vars : ptr<private, tint_private_vars_struct>) -> f32 {
+ return (((((*(tint_private_vars)).a + (*(tint_private_vars)).b) + (*(tint_private_vars)).c.a) + (*(tint_private_vars)).d.c) * x);
}
@compute @workgroup_size(1)
fn main() {
- _ = foo(1.0);
+ @internal(disable_validation__ignore_address_space) var<private> tint_private_vars : tint_private_vars_struct;
+ tint_private_vars.b = 42;
+ tint_private_vars.c = S(1, 2, 3);
+ _ = foo(1.0, &(tint_private_vars));
}
)";
@@ -1217,36 +1299,59 @@
EXPECT_EQ(expect, str(got));
}
-// Test that a private variable that is only referenced by a single user-defined function is
-// promoted to a function scope variable, rather than passed as a parameter.
-TEST_F(ModuleScopeVarToEntryPointParamTest, PromotePrivateToFunctionScope_OutOfOrder) {
+TEST_F(ModuleScopeVarToEntryPointParamTest, MultiplePrivateVariables_OutOfOrder) {
auto* src = R"(
-var<private> p : f32;
+var<private> a : f32;
+var<private> c : S = S(1, 2, 3);
+var<private> unused : f32;
@compute @workgroup_size(1)
fn main() {
_ = foo(1.0);
}
-fn foo(a : f32) -> f32 {
- let x = p;
- p = x * a;
- return p;
+fn foo(x : f32) -> f32 {
+ return (a + b + c.a + d.c) * x;
}
+var<private> b : f32 = 42;
+
+struct S {
+ a : f32,
+ b : f32,
+ c : f32,
+}
+
+var<private> d : S;
)";
auto* expect = R"(
-@compute @workgroup_size(1)
-fn main() {
- _ = foo(1.0);
+enable chromium_experimental_full_ptr_parameters;
+
+struct S {
+ a : f32,
+ b : f32,
+ c : f32,
}
-fn foo(a : f32) -> f32 {
- @internal(disable_validation__ignore_address_space) var<private> tint_symbol : f32;
- let x = tint_symbol;
- tint_symbol = (x * a);
- return tint_symbol;
+struct tint_private_vars_struct {
+ a : f32,
+ c : S,
+ unused : f32,
+ b : f32,
+ d : S,
+}
+
+@compute @workgroup_size(1)
+fn main() {
+ @internal(disable_validation__ignore_address_space) var<private> tint_private_vars : tint_private_vars_struct;
+ tint_private_vars.c = S(1, 2, 3);
+ tint_private_vars.b = 42;
+ _ = foo(1.0, &(tint_private_vars));
+}
+
+fn foo(x : f32, tint_private_vars : ptr<private, tint_private_vars_struct>) -> f32 {
+ return (((((*(tint_private_vars)).a + (*(tint_private_vars)).b) + (*(tint_private_vars)).c.a) + (*(tint_private_vars)).d.c) * x);
}
)";
diff --git a/src/tint/writer/msl/generator_impl_builtin_test.cc b/src/tint/writer/msl/generator_impl_builtin_test.cc
index 6c70abe..9868d5e 100644
--- a/src/tint/writer/msl/generator_impl_builtin_test.cc
+++ b/src/tint/writer/msl/generator_impl_builtin_test.cc
@@ -1089,9 +1089,13 @@
T tint_dot3(vec<T,3> a, vec<T,3> b) {
return a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
}
+struct tint_private_vars_struct {
+ int3 v;
+};
+
kernel void test_function() {
- thread int3 tint_symbol = 0;
- int r = tint_dot3(tint_symbol, tint_symbol);
+ thread tint_private_vars_struct tint_private_vars = {};
+ int r = tint_dot3(tint_private_vars.v, tint_private_vars.v);
return;
}
diff --git a/src/tint/writer/msl/generator_impl_variable_decl_statement_test.cc b/src/tint/writer/msl/generator_impl_variable_decl_statement_test.cc
index fa0c53f..f4b0578 100644
--- a/src/tint/writer/msl/generator_impl_variable_decl_statement_test.cc
+++ b/src/tint/writer/msl/generator_impl_variable_decl_statement_test.cc
@@ -527,7 +527,10 @@
gen.increment_indent();
ASSERT_TRUE(gen.Generate()) << gen.error();
- EXPECT_THAT(gen.result(), HasSubstr("thread float tint_symbol_1 = 0.0f;\n"));
+ EXPECT_THAT(gen.result(), HasSubstr(R"(thread tint_private_vars_struct tint_private_vars = {};
+ float const tint_symbol = tint_private_vars.a;
+ return;
+)"));
}
TEST_F(MslGeneratorImplTest, Emit_VariableDeclStatement_Workgroup) {
diff --git a/test/tint/array/assign_to_function_var.wgsl.expected.msl b/test/tint/array/assign_to_function_var.wgsl.expected.msl
index a57b60e..a63f260 100644
--- a/test/tint/array/assign_to_function_var.wgsl.expected.msl
+++ b/test/tint/array/assign_to_function_var.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ tint_array<int4, 4> src_private;
+};
+
struct S {
/* 0x0000 */ tint_array<int4, 4> arr;
};
@@ -28,8 +32,7 @@
return tint_symbol_2;
}
-void foo(tint_array<int4, 4> src_param, threadgroup tint_array<int4, 4>* const tint_symbol_5, const constant S* const tint_symbol_6, device S* const tint_symbol_7) {
- thread tint_array<int4, 4> tint_symbol_4 = {};
+void foo(tint_array<int4, 4> src_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup tint_array<int4, 4>* const tint_symbol_4, const constant S* const tint_symbol_5, device S* const tint_symbol_6) {
tint_array<int4, 4> src_function = {};
tint_array<int4, 4> dst = {};
tint_array<int4, 4> const tint_symbol_3 = tint_array<int4, 4>{int4(1), int4(2), int4(3), int4(3)};
@@ -39,12 +42,12 @@
tint_array<int4, 4> const src_let = tint_array<int4, 4>{};
dst = src_let;
dst = src_function;
- dst = tint_symbol_4;
- dst = *(tint_symbol_5);
+ dst = (*(tint_private_vars)).src_private;
+ dst = *(tint_symbol_4);
S const tint_symbol = ret_struct_arr();
dst = tint_symbol.arr;
+ dst = (*(tint_symbol_5)).arr;
dst = (*(tint_symbol_6)).arr;
- dst = (*(tint_symbol_7)).arr;
tint_array<tint_array<tint_array<int, 2>, 3>, 4> dst_nested = {};
tint_array<tint_array<tint_array<int, 2>, 3>, 4> src_nested = {};
dst_nested = src_nested;
diff --git a/test/tint/array/assign_to_private_var.wgsl.expected.msl b/test/tint/array/assign_to_private_var.wgsl.expected.msl
index 20a35cd..d96bf73 100644
--- a/test/tint/array/assign_to_private_var.wgsl.expected.msl
+++ b/test/tint/array/assign_to_private_var.wgsl.expected.msl
@@ -14,6 +14,12 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ tint_array<int4, 4> src_private;
+ tint_array<int4, 4> dst;
+ tint_array<tint_array<tint_array<int, 2>, 3>, 4> dst_nested;
+};
+
struct S {
/* 0x0000 */ tint_array<int4, 4> arr;
};
@@ -28,25 +34,22 @@
return tint_symbol_2;
}
-void foo(tint_array<int4, 4> src_param, threadgroup tint_array<int4, 4>* const tint_symbol_6, const constant S* const tint_symbol_7, device S* const tint_symbol_8) {
- thread tint_array<int4, 4> tint_symbol_4 = {};
- thread tint_array<int4, 4> tint_symbol_5 = {};
- thread tint_array<tint_array<tint_array<int, 2>, 3>, 4> tint_symbol_9 = {};
+void foo(tint_array<int4, 4> src_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup tint_array<int4, 4>* const tint_symbol_4, const constant S* const tint_symbol_5, device S* const tint_symbol_6) {
tint_array<int4, 4> src_function = {};
tint_array<int4, 4> const tint_symbol_3 = tint_array<int4, 4>{int4(1), int4(2), int4(3), int4(3)};
- tint_symbol_4 = tint_symbol_3;
- tint_symbol_4 = src_param;
- tint_symbol_4 = ret_arr();
+ (*(tint_private_vars)).dst = tint_symbol_3;
+ (*(tint_private_vars)).dst = src_param;
+ (*(tint_private_vars)).dst = ret_arr();
tint_array<int4, 4> const src_let = tint_array<int4, 4>{};
- tint_symbol_4 = src_let;
- tint_symbol_4 = src_function;
- tint_symbol_4 = tint_symbol_5;
- tint_symbol_4 = *(tint_symbol_6);
+ (*(tint_private_vars)).dst = src_let;
+ (*(tint_private_vars)).dst = src_function;
+ (*(tint_private_vars)).dst = (*(tint_private_vars)).src_private;
+ (*(tint_private_vars)).dst = *(tint_symbol_4);
S const tint_symbol = ret_struct_arr();
- tint_symbol_4 = tint_symbol.arr;
- tint_symbol_4 = (*(tint_symbol_7)).arr;
- tint_symbol_4 = (*(tint_symbol_8)).arr;
+ (*(tint_private_vars)).dst = tint_symbol.arr;
+ (*(tint_private_vars)).dst = (*(tint_symbol_5)).arr;
+ (*(tint_private_vars)).dst = (*(tint_symbol_6)).arr;
tint_array<tint_array<tint_array<int, 2>, 3>, 4> src_nested = {};
- tint_symbol_9 = src_nested;
+ (*(tint_private_vars)).dst_nested = src_nested;
}
diff --git a/test/tint/array/assign_to_storage_var.wgsl.expected.msl b/test/tint/array/assign_to_storage_var.wgsl.expected.msl
index 54070c6..06a713d 100644
--- a/test/tint/array/assign_to_storage_var.wgsl.expected.msl
+++ b/test/tint/array/assign_to_storage_var.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ tint_array<int4, 4> src_private;
+};
+
struct S {
/* 0x0000 */ tint_array<int4, 4> arr;
};
@@ -32,8 +36,7 @@
return tint_symbol_2;
}
-void foo(tint_array<int4, 4> src_param, device S* const tint_symbol_4, threadgroup tint_array<int4, 4>* const tint_symbol_6, const constant S* const tint_symbol_7, device S* const tint_symbol_8, device S_nested* const tint_symbol_9) {
- thread tint_array<int4, 4> tint_symbol_5 = {};
+void foo(tint_array<int4, 4> src_param, thread tint_private_vars_struct* const tint_private_vars, device S* const tint_symbol_4, threadgroup tint_array<int4, 4>* 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<int4, 4> src_function = {};
tint_array<int4, 4> const tint_symbol_3 = tint_array<int4, 4>{int4(1), int4(2), int4(3), int4(3)};
(*(tint_symbol_4)).arr = tint_symbol_3;
@@ -42,13 +45,13 @@
tint_array<int4, 4> const src_let = tint_array<int4, 4>{};
(*(tint_symbol_4)).arr = src_let;
(*(tint_symbol_4)).arr = src_function;
- (*(tint_symbol_4)).arr = tint_symbol_5;
- (*(tint_symbol_4)).arr = *(tint_symbol_6);
+ (*(tint_symbol_4)).arr = (*(tint_private_vars)).src_private;
+ (*(tint_symbol_4)).arr = *(tint_symbol_5);
S const tint_symbol = ret_struct_arr();
(*(tint_symbol_4)).arr = tint_symbol.arr;
+ (*(tint_symbol_4)).arr = (*(tint_symbol_6)).arr;
(*(tint_symbol_4)).arr = (*(tint_symbol_7)).arr;
- (*(tint_symbol_4)).arr = (*(tint_symbol_8)).arr;
tint_array<tint_array<tint_array<int, 2>, 3>, 4> src_nested = {};
- (*(tint_symbol_9)).arr = src_nested;
+ (*(tint_symbol_8)).arr = src_nested;
}
diff --git a/test/tint/array/assign_to_workgroup_var.wgsl.expected.msl b/test/tint/array/assign_to_workgroup_var.wgsl.expected.msl
index a356fab..a6a6a5a 100644
--- a/test/tint/array/assign_to_workgroup_var.wgsl.expected.msl
+++ b/test/tint/array/assign_to_workgroup_var.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ tint_array<int4, 4> src_private;
+};
+
struct S {
/* 0x0000 */ tint_array<int4, 4> arr;
};
@@ -28,8 +32,7 @@
return tint_symbol_2;
}
-void foo(tint_array<int4, 4> src_param, threadgroup tint_array<int4, 4>* const tint_symbol_4, threadgroup tint_array<int4, 4>* const tint_symbol_6, const constant S* const tint_symbol_7, device S* const tint_symbol_8, threadgroup tint_array<tint_array<tint_array<int, 2>, 3>, 4>* const tint_symbol_9) {
- thread tint_array<int4, 4> tint_symbol_5 = {};
+void foo(tint_array<int4, 4> src_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup tint_array<int4, 4>* const tint_symbol_4, threadgroup tint_array<int4, 4>* const tint_symbol_5, const constant S* const tint_symbol_6, device S* const tint_symbol_7, threadgroup tint_array<tint_array<tint_array<int, 2>, 3>, 4>* const tint_symbol_8) {
tint_array<int4, 4> src_function = {};
tint_array<int4, 4> const tint_symbol_3 = tint_array<int4, 4>{int4(1), int4(2), int4(3), int4(3)};
*(tint_symbol_4) = tint_symbol_3;
@@ -38,13 +41,13 @@
tint_array<int4, 4> const src_let = tint_array<int4, 4>{};
*(tint_symbol_4) = src_let;
*(tint_symbol_4) = src_function;
- *(tint_symbol_4) = tint_symbol_5;
- *(tint_symbol_4) = *(tint_symbol_6);
+ *(tint_symbol_4) = (*(tint_private_vars)).src_private;
+ *(tint_symbol_4) = *(tint_symbol_5);
S const tint_symbol = ret_struct_arr();
*(tint_symbol_4) = tint_symbol.arr;
+ *(tint_symbol_4) = (*(tint_symbol_6)).arr;
*(tint_symbol_4) = (*(tint_symbol_7)).arr;
- *(tint_symbol_4) = (*(tint_symbol_8)).arr;
tint_array<tint_array<tint_array<int, 2>, 3>, 4> src_nested = {};
- *(tint_symbol_9) = src_nested;
+ *(tint_symbol_8) = src_nested;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
index fe8fe73..14cefda 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,20 +14,25 @@
T elements[N];
};
-int i() {
- thread int tint_symbol_2 = 0;
- tint_symbol_2 = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(1)));
- return tint_symbol_2;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<float2x2, 4>* tint_symbol_3 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<float2x2, 4>* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_i_save = tint_symbol_1;
- tint_array<float2x2, 4> const l_a = *(tint_symbol_3);
- float2x2 const l_a_i = (*(tint_symbol_3))[p_a_i_save];
- float2 const l_a_i_i = (*(tint_symbol_3))[p_a_i_save][p_a_i_i_save];
+ tint_array<float2x2, 4> const l_a = *(tint_symbol_2);
+ float2x2 const l_a_i = (*(tint_symbol_2))[p_a_i_save];
+ float2 const l_a_i_i = (*(tint_symbol_2))[p_a_i_save][p_a_i_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.msl
index bf586af..19c149c 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.msl
@@ -14,12 +14,16 @@
T elements[N];
};
-kernel void f(const constant tint_array<float2x2, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<float2x2, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[1][0] = (*(tint_symbol_1))[0][1].yx;
- tint_symbol[1][0][0] = (*(tint_symbol_1))[0][1][0];
+struct tint_private_vars_struct {
+ tint_array<float2x2, 4> p;
+};
+
+kernel void f(const constant tint_array<float2x2, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[1][0] = (*(tint_symbol))[0][1].yx;
+ tint_private_vars.p[1][0][0] = (*(tint_symbol))[0][1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 1b83f6b..0589421 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -35,20 +39,21 @@
return result;
}
-int i() {
- thread int tint_symbol_2 = 0;
- tint_symbol_2 = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(1)));
- return tint_symbol_2;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f16_array_element, 2>, 4>* tint_symbol_3 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f16_array_element, 2>, 4>* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_i_save = tint_symbol_1;
- tint_array<half2x3, 4> const l_a = tint_unpack_vec3_in_composite_1(*(tint_symbol_3));
- half2x3 const l_a_i = tint_unpack_vec3_in_composite((*(tint_symbol_3))[p_a_i_save]);
- half3 const l_a_i_i = half3((*(tint_symbol_3))[p_a_i_save][p_a_i_i_save].elements);
+ tint_array<half2x3, 4> const l_a = tint_unpack_vec3_in_composite_1(*(tint_symbol_2));
+ half2x3 const l_a_i = tint_unpack_vec3_in_composite((*(tint_symbol_2))[p_a_i_save]);
+ half3 const l_a_i_i = half3((*(tint_symbol_2))[p_a_i_save][p_a_i_i_save].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.msl
index e004d81..b83c6e8 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ tint_array<half2x3, 4> p;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -35,12 +39,12 @@
return result;
}
-kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f16_array_element, 2>, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<half2x3, 4> tint_symbol = {};
- tint_symbol = tint_unpack_vec3_in_composite_1(*(tint_symbol_1));
- tint_symbol[1] = tint_unpack_vec3_in_composite((*(tint_symbol_1))[2]);
- tint_symbol[1][0] = half3((*(tint_symbol_1))[0][1].elements).zxy;
- tint_symbol[1][0][0] = (*(tint_symbol_1))[0][1].elements[0];
+kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f16_array_element, 2>, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite_1(*(tint_symbol));
+ tint_private_vars.p[1] = tint_unpack_vec3_in_composite((*(tint_symbol))[2]);
+ tint_private_vars.p[1][0] = half3((*(tint_symbol))[0][1].elements).zxy;
+ tint_private_vars.p[1][0][0] = (*(tint_symbol))[0][1].elements[0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 1e8f133..4a958fe 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -35,20 +39,21 @@
return result;
}
-int i() {
- thread int tint_symbol_2 = 0;
- tint_symbol_2 = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(1)));
- return tint_symbol_2;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f32_array_element, 2>, 4>* tint_symbol_3 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f32_array_element, 2>, 4>* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_i_save = tint_symbol_1;
- tint_array<float2x3, 4> const l_a = tint_unpack_vec3_in_composite_1(*(tint_symbol_3));
- float2x3 const l_a_i = tint_unpack_vec3_in_composite((*(tint_symbol_3))[p_a_i_save]);
- float3 const l_a_i_i = float3((*(tint_symbol_3))[p_a_i_save][p_a_i_i_save].elements);
+ tint_array<float2x3, 4> const l_a = tint_unpack_vec3_in_composite_1(*(tint_symbol_2));
+ float2x3 const l_a_i = tint_unpack_vec3_in_composite((*(tint_symbol_2))[p_a_i_save]);
+ float3 const l_a_i_i = float3((*(tint_symbol_2))[p_a_i_save][p_a_i_i_save].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.msl
index 8efe3f7..1d8250e 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ tint_array<float2x3, 4> p;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -35,12 +39,12 @@
return result;
}
-kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f32_array_element, 2>, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<float2x3, 4> tint_symbol = {};
- tint_symbol = tint_unpack_vec3_in_composite_1(*(tint_symbol_1));
- tint_symbol[1] = tint_unpack_vec3_in_composite((*(tint_symbol_1))[2]);
- tint_symbol[1][0] = float3((*(tint_symbol_1))[0][1].elements).zxy;
- tint_symbol[1][0][0] = (*(tint_symbol_1))[0][1].elements[0];
+kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f32_array_element, 2>, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite_1(*(tint_symbol));
+ tint_private_vars.p[1] = tint_unpack_vec3_in_composite((*(tint_symbol))[2]);
+ tint_private_vars.p[1][0] = float3((*(tint_symbol))[0][1].elements).zxy;
+ tint_private_vars.p[1][0][0] = (*(tint_symbol))[0][1].elements[0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 7ff60c2..cad775d 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,20 +14,25 @@
T elements[N];
};
-int i() {
- thread int tint_symbol_2 = 0;
- tint_symbol_2 = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(1)));
- return tint_symbol_2;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<half2x4, 4>* tint_symbol_3 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<half2x4, 4>* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_i_save = tint_symbol_1;
- tint_array<half2x4, 4> const l_a = *(tint_symbol_3);
- half2x4 const l_a_i = (*(tint_symbol_3))[p_a_i_save];
- half4 const l_a_i_i = (*(tint_symbol_3))[p_a_i_save][p_a_i_i_save];
+ tint_array<half2x4, 4> const l_a = *(tint_symbol_2);
+ half2x4 const l_a_i = (*(tint_symbol_2))[p_a_i_save];
+ half4 const l_a_i_i = (*(tint_symbol_2))[p_a_i_save][p_a_i_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.msl
index 2187ceb..cfcebb1 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.msl
@@ -14,12 +14,16 @@
T elements[N];
};
-kernel void f(const constant tint_array<half2x4, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<half2x4, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[1][0] = (*(tint_symbol_1))[0][1].ywxz;
- tint_symbol[1][0][0] = (*(tint_symbol_1))[0][1][0];
+struct tint_private_vars_struct {
+ tint_array<half2x4, 4> p;
+};
+
+kernel void f(const constant tint_array<half2x4, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[1][0] = (*(tint_symbol))[0][1].ywxz;
+ tint_private_vars.p[1][0][0] = (*(tint_symbol))[0][1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 5566a8c..69ff4d3 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,20 +14,25 @@
T elements[N];
};
-int i() {
- thread int tint_symbol_2 = 0;
- tint_symbol_2 = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(1)));
- return tint_symbol_2;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<float2x4, 4>* tint_symbol_3 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<float2x4, 4>* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_i_save = tint_symbol_1;
- tint_array<float2x4, 4> const l_a = *(tint_symbol_3);
- float2x4 const l_a_i = (*(tint_symbol_3))[p_a_i_save];
- float4 const l_a_i_i = (*(tint_symbol_3))[p_a_i_save][p_a_i_i_save];
+ tint_array<float2x4, 4> const l_a = *(tint_symbol_2);
+ float2x4 const l_a_i = (*(tint_symbol_2))[p_a_i_save];
+ float4 const l_a_i_i = (*(tint_symbol_2))[p_a_i_save][p_a_i_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.msl
index 147f578..b5b1fd4 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.msl
@@ -14,12 +14,16 @@
T elements[N];
};
-kernel void f(const constant tint_array<float2x4, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<float2x4, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[1][0] = (*(tint_symbol_1))[0][1].ywxz;
- tint_symbol[1][0][0] = (*(tint_symbol_1))[0][1][0];
+struct tint_private_vars_struct {
+ tint_array<float2x4, 4> p;
+};
+
+kernel void f(const constant tint_array<float2x4, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[1][0] = (*(tint_symbol))[0][1].ywxz;
+ tint_private_vars.p[1][0][0] = (*(tint_symbol))[0][1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
index b5bbbfe..f90ac9e 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -35,20 +39,21 @@
return result;
}
-int i() {
- thread int tint_symbol_2 = 0;
- tint_symbol_2 = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(1)));
- return tint_symbol_2;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f32_array_element, 3>, 4>* tint_symbol_3 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f32_array_element, 3>, 4>* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_i_save = tint_symbol_1;
- tint_array<float3x3, 4> const l_a = tint_unpack_vec3_in_composite_1(*(tint_symbol_3));
- float3x3 const l_a_i = tint_unpack_vec3_in_composite((*(tint_symbol_3))[p_a_i_save]);
- float3 const l_a_i_i = float3((*(tint_symbol_3))[p_a_i_save][p_a_i_i_save].elements);
+ tint_array<float3x3, 4> const l_a = tint_unpack_vec3_in_composite_1(*(tint_symbol_2));
+ float3x3 const l_a_i = tint_unpack_vec3_in_composite((*(tint_symbol_2))[p_a_i_save]);
+ float3 const l_a_i_i = float3((*(tint_symbol_2))[p_a_i_save][p_a_i_i_save].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.msl
index 591e132..fcdd7d4 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ tint_array<float3x3, 4> p;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -35,12 +39,12 @@
return result;
}
-kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f32_array_element, 3>, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<float3x3, 4> tint_symbol = {};
- tint_symbol = tint_unpack_vec3_in_composite_1(*(tint_symbol_1));
- tint_symbol[1] = tint_unpack_vec3_in_composite((*(tint_symbol_1))[2]);
- tint_symbol[1][0] = float3((*(tint_symbol_1))[0][1].elements).zxy;
- tint_symbol[1][0][0] = (*(tint_symbol_1))[0][1].elements[0];
+kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f32_array_element, 3>, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite_1(*(tint_symbol));
+ tint_private_vars.p[1] = tint_unpack_vec3_in_composite((*(tint_symbol))[2]);
+ tint_private_vars.p[1][0] = float3((*(tint_symbol))[0][1].elements).zxy;
+ tint_private_vars.p[1][0][0] = (*(tint_symbol))[0][1].elements[0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
index fccba32..afa7618 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,20 +14,25 @@
T elements[N];
};
-int i() {
- thread int tint_symbol_2 = 0;
- tint_symbol_2 = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(1)));
- return tint_symbol_2;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<float3x4, 4>* tint_symbol_3 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<float3x4, 4>* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_i_save = tint_symbol_1;
- tint_array<float3x4, 4> const l_a = *(tint_symbol_3);
- float3x4 const l_a_i = (*(tint_symbol_3))[p_a_i_save];
- float4 const l_a_i_i = (*(tint_symbol_3))[p_a_i_save][p_a_i_i_save];
+ tint_array<float3x4, 4> const l_a = *(tint_symbol_2);
+ float3x4 const l_a_i = (*(tint_symbol_2))[p_a_i_save];
+ float4 const l_a_i_i = (*(tint_symbol_2))[p_a_i_save][p_a_i_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.msl
index 3ebf98c..ab11514 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.msl
@@ -14,12 +14,16 @@
T elements[N];
};
-kernel void f(const constant tint_array<float3x4, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<float3x4, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[1][0] = (*(tint_symbol_1))[0][1].ywxz;
- tint_symbol[1][0][0] = (*(tint_symbol_1))[0][1][0];
+struct tint_private_vars_struct {
+ tint_array<float3x4, 4> p;
+};
+
+kernel void f(const constant tint_array<float3x4, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[1][0] = (*(tint_symbol))[0][1].ywxz;
+ tint_private_vars.p[1][0][0] = (*(tint_symbol))[0][1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
index f850ce9..e0207e7 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,20 +14,25 @@
T elements[N];
};
-int i() {
- thread int tint_symbol_2 = 0;
- tint_symbol_2 = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(1)));
- return tint_symbol_2;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<half4x2, 4>* tint_symbol_3 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<half4x2, 4>* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_i_save = tint_symbol_1;
- tint_array<half4x2, 4> const l_a = *(tint_symbol_3);
- half4x2 const l_a_i = (*(tint_symbol_3))[p_a_i_save];
- half2 const l_a_i_i = (*(tint_symbol_3))[p_a_i_save][p_a_i_i_save];
+ tint_array<half4x2, 4> const l_a = *(tint_symbol_2);
+ half4x2 const l_a_i = (*(tint_symbol_2))[p_a_i_save];
+ half2 const l_a_i_i = (*(tint_symbol_2))[p_a_i_save][p_a_i_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.msl
index d7b60af..72384ca 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.msl
@@ -14,12 +14,16 @@
T elements[N];
};
-kernel void f(const constant tint_array<half4x2, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<half4x2, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[1][0] = (*(tint_symbol_1))[0][1].yx;
- tint_symbol[1][0][0] = (*(tint_symbol_1))[0][1][0];
+struct tint_private_vars_struct {
+ tint_array<half4x2, 4> p;
+};
+
+kernel void f(const constant tint_array<half4x2, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[1][0] = (*(tint_symbol))[0][1].yx;
+ tint_private_vars.p[1][0][0] = (*(tint_symbol))[0][1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
index cffca67..286c29e 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,20 +14,25 @@
T elements[N];
};
-int i() {
- thread int tint_symbol_2 = 0;
- tint_symbol_2 = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(1)));
- return tint_symbol_2;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<float4x2, 4>* tint_symbol_3 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<float4x2, 4>* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_i_save = tint_symbol_1;
- tint_array<float4x2, 4> const l_a = *(tint_symbol_3);
- float4x2 const l_a_i = (*(tint_symbol_3))[p_a_i_save];
- float2 const l_a_i_i = (*(tint_symbol_3))[p_a_i_save][p_a_i_i_save];
+ tint_array<float4x2, 4> const l_a = *(tint_symbol_2);
+ float4x2 const l_a_i = (*(tint_symbol_2))[p_a_i_save];
+ float2 const l_a_i_i = (*(tint_symbol_2))[p_a_i_save][p_a_i_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.msl
index 5aec084..dbe7645 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.msl
@@ -14,12 +14,16 @@
T elements[N];
};
-kernel void f(const constant tint_array<float4x2, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<float4x2, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[1][0] = (*(tint_symbol_1))[0][1].yx;
- tint_symbol[1][0][0] = (*(tint_symbol_1))[0][1][0];
+struct tint_private_vars_struct {
+ tint_array<float4x2, 4> p;
+};
+
+kernel void f(const constant tint_array<float4x2, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[1][0] = (*(tint_symbol))[0][1].yx;
+ tint_private_vars.p[1][0][0] = (*(tint_symbol))[0][1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
index e8d3f21..6b79003 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -35,20 +39,21 @@
return result;
}
-int i() {
- thread int tint_symbol_2 = 0;
- tint_symbol_2 = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(1)));
- return tint_symbol_2;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f16_array_element, 4>, 4>* tint_symbol_3 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f16_array_element, 4>, 4>* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_i_save = tint_symbol_1;
- tint_array<half4x3, 4> const l_a = tint_unpack_vec3_in_composite_1(*(tint_symbol_3));
- half4x3 const l_a_i = tint_unpack_vec3_in_composite((*(tint_symbol_3))[p_a_i_save]);
- half3 const l_a_i_i = half3((*(tint_symbol_3))[p_a_i_save][p_a_i_i_save].elements);
+ tint_array<half4x3, 4> const l_a = tint_unpack_vec3_in_composite_1(*(tint_symbol_2));
+ half4x3 const l_a_i = tint_unpack_vec3_in_composite((*(tint_symbol_2))[p_a_i_save]);
+ half3 const l_a_i_i = half3((*(tint_symbol_2))[p_a_i_save][p_a_i_i_save].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.msl
index 0f56e7a..dc505d8 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ tint_array<half4x3, 4> p;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -35,12 +39,12 @@
return result;
}
-kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f16_array_element, 4>, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<half4x3, 4> tint_symbol = {};
- tint_symbol = tint_unpack_vec3_in_composite_1(*(tint_symbol_1));
- tint_symbol[1] = tint_unpack_vec3_in_composite((*(tint_symbol_1))[2]);
- tint_symbol[1][0] = half3((*(tint_symbol_1))[0][1].elements).zxy;
- tint_symbol[1][0][0] = (*(tint_symbol_1))[0][1].elements[0];
+kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f16_array_element, 4>, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite_1(*(tint_symbol));
+ tint_private_vars.p[1] = tint_unpack_vec3_in_composite((*(tint_symbol))[2]);
+ tint_private_vars.p[1][0] = half3((*(tint_symbol))[0][1].elements).zxy;
+ tint_private_vars.p[1][0][0] = (*(tint_symbol))[0][1].elements[0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 4f340ac..7b444ce 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -35,20 +39,21 @@
return result;
}
-int i() {
- thread int tint_symbol_2 = 0;
- tint_symbol_2 = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(1)));
- return tint_symbol_2;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f32_array_element, 4>, 4>* tint_symbol_3 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f32_array_element, 4>, 4>* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_i_save = tint_symbol_1;
- tint_array<float4x3, 4> const l_a = tint_unpack_vec3_in_composite_1(*(tint_symbol_3));
- float4x3 const l_a_i = tint_unpack_vec3_in_composite((*(tint_symbol_3))[p_a_i_save]);
- float3 const l_a_i_i = float3((*(tint_symbol_3))[p_a_i_save][p_a_i_i_save].elements);
+ tint_array<float4x3, 4> const l_a = tint_unpack_vec3_in_composite_1(*(tint_symbol_2));
+ float4x3 const l_a_i = tint_unpack_vec3_in_composite((*(tint_symbol_2))[p_a_i_save]);
+ float3 const l_a_i_i = float3((*(tint_symbol_2))[p_a_i_save][p_a_i_i_save].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.msl
index bfb7be1..88eb93a 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ tint_array<float4x3, 4> p;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -35,12 +39,12 @@
return result;
}
-kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f32_array_element, 4>, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<float4x3, 4> tint_symbol = {};
- tint_symbol = tint_unpack_vec3_in_composite_1(*(tint_symbol_1));
- tint_symbol[1] = tint_unpack_vec3_in_composite((*(tint_symbol_1))[2]);
- tint_symbol[1][0] = float3((*(tint_symbol_1))[0][1].elements).zxy;
- tint_symbol[1][0][0] = (*(tint_symbol_1))[0][1].elements[0];
+kernel void f(const constant tint_array<tint_array<tint_packed_vec3_f32_array_element, 4>, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite_1(*(tint_symbol));
+ tint_private_vars.p[1] = tint_unpack_vec3_in_composite((*(tint_symbol))[2]);
+ tint_private_vars.p[1][0] = float3((*(tint_symbol))[0][1].elements).zxy;
+ tint_private_vars.p[1][0][0] = (*(tint_symbol))[0][1].elements[0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
index c1b59e6..08abcd5 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,20 +14,25 @@
T elements[N];
};
-int i() {
- thread int tint_symbol_2 = 0;
- tint_symbol_2 = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(1)));
- return tint_symbol_2;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<half4x4, 4>* tint_symbol_3 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<half4x4, 4>* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_i_save = tint_symbol_1;
- tint_array<half4x4, 4> const l_a = *(tint_symbol_3);
- half4x4 const l_a_i = (*(tint_symbol_3))[p_a_i_save];
- half4 const l_a_i_i = (*(tint_symbol_3))[p_a_i_save][p_a_i_i_save];
+ tint_array<half4x4, 4> const l_a = *(tint_symbol_2);
+ half4x4 const l_a_i = (*(tint_symbol_2))[p_a_i_save];
+ half4 const l_a_i_i = (*(tint_symbol_2))[p_a_i_save][p_a_i_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.msl
index f6a14dc..f7b3395 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.msl
@@ -14,12 +14,16 @@
T elements[N];
};
-kernel void f(const constant tint_array<half4x4, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<half4x4, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[1][0] = (*(tint_symbol_1))[0][1].ywxz;
- tint_symbol[1][0][0] = (*(tint_symbol_1))[0][1][0];
+struct tint_private_vars_struct {
+ tint_array<half4x4, 4> p;
+};
+
+kernel void f(const constant tint_array<half4x4, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[1][0] = (*(tint_symbol))[0][1].ywxz;
+ tint_private_vars.p[1][0][0] = (*(tint_symbol))[0][1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 4aeaf64..c318d62 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,20 +14,25 @@
T elements[N];
};
-int i() {
- thread int tint_symbol_2 = 0;
- tint_symbol_2 = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(1)));
- return tint_symbol_2;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<float4x4, 4>* tint_symbol_3 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<float4x4, 4>* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_i_save = tint_symbol_1;
- tint_array<float4x4, 4> const l_a = *(tint_symbol_3);
- float4x4 const l_a_i = (*(tint_symbol_3))[p_a_i_save];
- float4 const l_a_i_i = (*(tint_symbol_3))[p_a_i_save][p_a_i_i_save];
+ tint_array<float4x4, 4> const l_a = *(tint_symbol_2);
+ float4x4 const l_a_i = (*(tint_symbol_2))[p_a_i_save];
+ float4 const l_a_i_i = (*(tint_symbol_2))[p_a_i_save][p_a_i_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.msl
index eb69666..d782b28 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.msl
@@ -14,12 +14,16 @@
T elements[N];
};
-kernel void f(const constant tint_array<float4x4, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<float4x4, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[1][0] = (*(tint_symbol_1))[0][1].ywxz;
- tint_symbol[1][0][0] = (*(tint_symbol_1))[0][1][0];
+struct tint_private_vars_struct {
+ tint_array<float4x4, 4> p;
+};
+
+kernel void f(const constant tint_array<float4x4, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[1][0] = (*(tint_symbol))[0][1].ywxz;
+ tint_private_vars.p[1][0][0] = (*(tint_symbol))[0][1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 3c067f3..17a32f3 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct Inner {
/* 0x0000 */ half2x2 m;
/* 0x0008 */ tint_array<int8_t, 56> tint_pad;
@@ -23,27 +27,28 @@
/* 0x0000 */ tint_array<Inner, 4> a;
};
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = *(tint_symbol_5);
- Outer const l_a_i = (*(tint_symbol_5))[p_a_i_save];
- tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_5))[p_a_i_save].a;
- Inner const l_a_i_a_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save];
- half2x2 const l_a_i_a_i_m = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m;
- half2 const l_a_i_a_i_m_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
- int const tint_symbol_3 = i();
- half const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
+ tint_array<Outer, 4> const l_a = *(tint_symbol_4);
+ Outer const l_a_i = (*(tint_symbol_4))[p_a_i_save];
+ tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_4))[p_a_i_save].a;
+ Inner const l_a_i_a_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save];
+ half2x2 const l_a_i_a_i_m = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m;
+ half2 const l_a_i_a_i_m_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ half const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.msl
index 37fd98a..0d3bda7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.msl
@@ -22,12 +22,16 @@
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_1;
};
-kernel void f(const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[3].m = (*(tint_symbol_1))[2].m;
- tint_symbol[1].m[0] = (*(tint_symbol_1))[0].m[1].yx;
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
+kernel void f(const constant tint_array<S, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[3].m = (*(tint_symbol))[2].m;
+ tint_private_vars.p[1].m[0] = (*(tint_symbol))[0].m[1].yx;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 56ba8da..e8a41dd 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct Inner {
/* 0x0000 */ float2x2 m;
/* 0x0010 */ tint_array<int8_t, 48> tint_pad;
@@ -23,27 +27,28 @@
/* 0x0000 */ tint_array<Inner, 4> a;
};
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = *(tint_symbol_5);
- Outer const l_a_i = (*(tint_symbol_5))[p_a_i_save];
- tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_5))[p_a_i_save].a;
- Inner const l_a_i_a_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save];
- float2x2 const l_a_i_a_i_m = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m;
- float2 const l_a_i_a_i_m_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
- int const tint_symbol_3 = i();
- float const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
+ tint_array<Outer, 4> const l_a = *(tint_symbol_4);
+ Outer const l_a_i = (*(tint_symbol_4))[p_a_i_save];
+ tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_4))[p_a_i_save].a;
+ Inner const l_a_i_a_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save];
+ float2x2 const l_a_i_a_i_m = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m;
+ float2 const l_a_i_a_i_m_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ float const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.msl
index db4c6db..1253483 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.msl
@@ -23,12 +23,16 @@
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_2;
};
-kernel void f(const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[3].m = (*(tint_symbol_1))[2].m;
- tint_symbol[1].m[0] = (*(tint_symbol_1))[0].m[1].yx;
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
+kernel void f(const constant tint_array<S, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[3].m = (*(tint_symbol))[2].m;
+ tint_private_vars.p[1].m[0] = (*(tint_symbol))[0].m[1].yx;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 8afb558..dcaae72 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -72,27 +76,28 @@
return result;
}
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer_tint_packed_vec3, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer_tint_packed_vec3, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = tint_unpack_vec3_in_composite_4(*(tint_symbol_5));
- Outer const l_a_i = tint_unpack_vec3_in_composite_3((*(tint_symbol_5))[p_a_i_save]);
- tint_array<Inner, 4> const l_a_i_a = tint_unpack_vec3_in_composite_2((*(tint_symbol_5))[p_a_i_save].a);
- Inner const l_a_i_a_i = tint_unpack_vec3_in_composite_1((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save]);
- half2x3 const l_a_i_a_i_m = tint_unpack_vec3_in_composite((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m);
- half3 const l_a_i_a_i_m_i = half3((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements);
- int const tint_symbol_3 = i();
- half const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements[tint_symbol_3];
+ tint_array<Outer, 4> const l_a = tint_unpack_vec3_in_composite_4(*(tint_symbol_4));
+ Outer const l_a_i = tint_unpack_vec3_in_composite_3((*(tint_symbol_4))[p_a_i_save]);
+ tint_array<Inner, 4> const l_a_i_a = tint_unpack_vec3_in_composite_2((*(tint_symbol_4))[p_a_i_save].a);
+ Inner const l_a_i_a_i = tint_unpack_vec3_in_composite_1((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save]);
+ half2x3 const l_a_i_a_i_m = tint_unpack_vec3_in_composite((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m);
+ half3 const l_a_i_a_i_m_i = half3((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements);
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ half const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements[tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.msl
index 30e2743..f58017c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.msl
@@ -14,6 +14,16 @@
T elements[N];
};
+struct S {
+ int before;
+ half2x3 m;
+ int after;
+};
+
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -36,12 +46,6 @@
return result;
}
-struct S {
- int before;
- half2x3 m;
- int after;
-};
-
S tint_unpack_vec3_in_composite_1(S_tint_packed_vec3 in) {
S result = {};
result.before = in.before;
@@ -58,12 +62,12 @@
return result;
}
-kernel void f(const constant tint_array<S_tint_packed_vec3, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = tint_unpack_vec3_in_composite_2(*(tint_symbol_1));
- tint_symbol[1] = tint_unpack_vec3_in_composite_1((*(tint_symbol_1))[2]);
- tint_symbol[3].m = tint_unpack_vec3_in_composite((*(tint_symbol_1))[2].m);
- tint_symbol[1].m[0] = half3((*(tint_symbol_1))[0].m[1].elements).zxy;
+kernel void f(const constant tint_array<S_tint_packed_vec3, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite_2(*(tint_symbol));
+ tint_private_vars.p[1] = tint_unpack_vec3_in_composite_1((*(tint_symbol))[2]);
+ tint_private_vars.p[3].m = tint_unpack_vec3_in_composite((*(tint_symbol))[2].m);
+ tint_private_vars.p[1].m[0] = half3((*(tint_symbol))[0].m[1].elements).zxy;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
index ad6de23..cacb8ae 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -72,27 +76,28 @@
return result;
}
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer_tint_packed_vec3, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer_tint_packed_vec3, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = tint_unpack_vec3_in_composite_4(*(tint_symbol_5));
- Outer const l_a_i = tint_unpack_vec3_in_composite_3((*(tint_symbol_5))[p_a_i_save]);
- tint_array<Inner, 4> const l_a_i_a = tint_unpack_vec3_in_composite_2((*(tint_symbol_5))[p_a_i_save].a);
- Inner const l_a_i_a_i = tint_unpack_vec3_in_composite_1((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save]);
- float2x3 const l_a_i_a_i_m = tint_unpack_vec3_in_composite((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m);
- float3 const l_a_i_a_i_m_i = float3((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements);
- int const tint_symbol_3 = i();
- float const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements[tint_symbol_3];
+ tint_array<Outer, 4> const l_a = tint_unpack_vec3_in_composite_4(*(tint_symbol_4));
+ Outer const l_a_i = tint_unpack_vec3_in_composite_3((*(tint_symbol_4))[p_a_i_save]);
+ tint_array<Inner, 4> const l_a_i_a = tint_unpack_vec3_in_composite_2((*(tint_symbol_4))[p_a_i_save].a);
+ Inner const l_a_i_a_i = tint_unpack_vec3_in_composite_1((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save]);
+ float2x3 const l_a_i_a_i_m = tint_unpack_vec3_in_composite((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m);
+ float3 const l_a_i_a_i_m_i = float3((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements);
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ float const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements[tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.msl
index a4125c9..2b17191 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.msl
@@ -14,6 +14,16 @@
T elements[N];
};
+struct S {
+ int before;
+ float2x3 m;
+ int after;
+};
+
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -36,12 +46,6 @@
return result;
}
-struct S {
- int before;
- float2x3 m;
- int after;
-};
-
S tint_unpack_vec3_in_composite_1(S_tint_packed_vec3 in) {
S result = {};
result.before = in.before;
@@ -58,12 +62,12 @@
return result;
}
-kernel void f(const constant tint_array<S_tint_packed_vec3, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = tint_unpack_vec3_in_composite_2(*(tint_symbol_1));
- tint_symbol[1] = tint_unpack_vec3_in_composite_1((*(tint_symbol_1))[2]);
- tint_symbol[3].m = tint_unpack_vec3_in_composite((*(tint_symbol_1))[2].m);
- tint_symbol[1].m[0] = float3((*(tint_symbol_1))[0].m[1].elements).zxy;
+kernel void f(const constant tint_array<S_tint_packed_vec3, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite_2(*(tint_symbol));
+ tint_private_vars.p[1] = tint_unpack_vec3_in_composite_1((*(tint_symbol))[2]);
+ tint_private_vars.p[3].m = tint_unpack_vec3_in_composite((*(tint_symbol))[2].m);
+ tint_private_vars.p[1].m[0] = float3((*(tint_symbol))[0].m[1].elements).zxy;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
index a4620ce..eb79a3c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct Inner {
/* 0x0000 */ half2x4 m;
/* 0x0010 */ tint_array<int8_t, 48> tint_pad;
@@ -23,27 +27,28 @@
/* 0x0000 */ tint_array<Inner, 4> a;
};
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = *(tint_symbol_5);
- Outer const l_a_i = (*(tint_symbol_5))[p_a_i_save];
- tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_5))[p_a_i_save].a;
- Inner const l_a_i_a_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save];
- half2x4 const l_a_i_a_i_m = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m;
- half4 const l_a_i_a_i_m_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
- int const tint_symbol_3 = i();
- half const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
+ tint_array<Outer, 4> const l_a = *(tint_symbol_4);
+ Outer const l_a_i = (*(tint_symbol_4))[p_a_i_save];
+ tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_4))[p_a_i_save].a;
+ Inner const l_a_i_a_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save];
+ half2x4 const l_a_i_a_i_m = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m;
+ half4 const l_a_i_a_i_m_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ half const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.msl
index 401d59c..bf4dc27 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.msl
@@ -23,12 +23,16 @@
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_2;
};
-kernel void f(const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[3].m = (*(tint_symbol_1))[2].m;
- tint_symbol[1].m[0] = (*(tint_symbol_1))[0].m[1].ywxz;
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
+kernel void f(const constant tint_array<S, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[3].m = (*(tint_symbol))[2].m;
+ tint_private_vars.p[1].m[0] = (*(tint_symbol))[0].m[1].ywxz;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 6092bcc..c34b3ef 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct Inner {
/* 0x0000 */ float2x4 m;
/* 0x0020 */ tint_array<int8_t, 32> tint_pad;
@@ -23,27 +27,28 @@
/* 0x0000 */ tint_array<Inner, 4> a;
};
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = *(tint_symbol_5);
- Outer const l_a_i = (*(tint_symbol_5))[p_a_i_save];
- tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_5))[p_a_i_save].a;
- Inner const l_a_i_a_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save];
- float2x4 const l_a_i_a_i_m = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m;
- float4 const l_a_i_a_i_m_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
- int const tint_symbol_3 = i();
- float const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
+ tint_array<Outer, 4> const l_a = *(tint_symbol_4);
+ Outer const l_a_i = (*(tint_symbol_4))[p_a_i_save];
+ tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_4))[p_a_i_save].a;
+ Inner const l_a_i_a_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save];
+ float2x4 const l_a_i_a_i_m = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m;
+ float4 const l_a_i_a_i_m_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ float const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.msl
index 7fb9918..4e17693 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.msl
@@ -23,12 +23,16 @@
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_2;
};
-kernel void f(const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[3].m = (*(tint_symbol_1))[2].m;
- tint_symbol[1].m[0] = (*(tint_symbol_1))[0].m[1].ywxz;
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
+kernel void f(const constant tint_array<S, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[3].m = (*(tint_symbol))[2].m;
+ tint_private_vars.p[1].m[0] = (*(tint_symbol))[0].m[1].ywxz;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 322fa8e..0cf5a40 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct Inner {
/* 0x0000 */ half3x2 m;
/* 0x000c */ tint_array<int8_t, 52> tint_pad;
@@ -23,27 +27,28 @@
/* 0x0000 */ tint_array<Inner, 4> a;
};
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = *(tint_symbol_5);
- Outer const l_a_i = (*(tint_symbol_5))[p_a_i_save];
- tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_5))[p_a_i_save].a;
- Inner const l_a_i_a_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save];
- half3x2 const l_a_i_a_i_m = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m;
- half2 const l_a_i_a_i_m_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
- int const tint_symbol_3 = i();
- half const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
+ tint_array<Outer, 4> const l_a = *(tint_symbol_4);
+ Outer const l_a_i = (*(tint_symbol_4))[p_a_i_save];
+ tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_4))[p_a_i_save].a;
+ Inner const l_a_i_a_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save];
+ half3x2 const l_a_i_a_i_m = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m;
+ half2 const l_a_i_a_i_m_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ half const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.msl
index 1fbb90c..e484c9d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.msl
@@ -22,12 +22,16 @@
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_1;
};
-kernel void f(const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[3].m = (*(tint_symbol_1))[2].m;
- tint_symbol[1].m[0] = (*(tint_symbol_1))[0].m[1].yx;
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
+kernel void f(const constant tint_array<S, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[3].m = (*(tint_symbol))[2].m;
+ tint_private_vars.p[1].m[0] = (*(tint_symbol))[0].m[1].yx;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 02f86ed..e26ceae 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct Inner {
/* 0x0000 */ float3x2 m;
/* 0x0018 */ tint_array<int8_t, 40> tint_pad;
@@ -23,27 +27,28 @@
/* 0x0000 */ tint_array<Inner, 4> a;
};
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = *(tint_symbol_5);
- Outer const l_a_i = (*(tint_symbol_5))[p_a_i_save];
- tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_5))[p_a_i_save].a;
- Inner const l_a_i_a_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save];
- float3x2 const l_a_i_a_i_m = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m;
- float2 const l_a_i_a_i_m_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
- int const tint_symbol_3 = i();
- float const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
+ tint_array<Outer, 4> const l_a = *(tint_symbol_4);
+ Outer const l_a_i = (*(tint_symbol_4))[p_a_i_save];
+ tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_4))[p_a_i_save].a;
+ Inner const l_a_i_a_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save];
+ float3x2 const l_a_i_a_i_m = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m;
+ float2 const l_a_i_a_i_m_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ float const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.msl
index 118705a..6cbe201 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.msl
@@ -23,12 +23,16 @@
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_2;
};
-kernel void f(const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[3].m = (*(tint_symbol_1))[2].m;
- tint_symbol[1].m[0] = (*(tint_symbol_1))[0].m[1].yx;
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
+kernel void f(const constant tint_array<S, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[3].m = (*(tint_symbol))[2].m;
+ tint_private_vars.p[1].m[0] = (*(tint_symbol))[0].m[1].yx;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 0cf67e3..984567f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -72,27 +76,28 @@
return result;
}
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer_tint_packed_vec3, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer_tint_packed_vec3, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = tint_unpack_vec3_in_composite_4(*(tint_symbol_5));
- Outer const l_a_i = tint_unpack_vec3_in_composite_3((*(tint_symbol_5))[p_a_i_save]);
- tint_array<Inner, 4> const l_a_i_a = tint_unpack_vec3_in_composite_2((*(tint_symbol_5))[p_a_i_save].a);
- Inner const l_a_i_a_i = tint_unpack_vec3_in_composite_1((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save]);
- half3x3 const l_a_i_a_i_m = tint_unpack_vec3_in_composite((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m);
- half3 const l_a_i_a_i_m_i = half3((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements);
- int const tint_symbol_3 = i();
- half const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements[tint_symbol_3];
+ tint_array<Outer, 4> const l_a = tint_unpack_vec3_in_composite_4(*(tint_symbol_4));
+ Outer const l_a_i = tint_unpack_vec3_in_composite_3((*(tint_symbol_4))[p_a_i_save]);
+ tint_array<Inner, 4> const l_a_i_a = tint_unpack_vec3_in_composite_2((*(tint_symbol_4))[p_a_i_save].a);
+ Inner const l_a_i_a_i = tint_unpack_vec3_in_composite_1((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save]);
+ half3x3 const l_a_i_a_i_m = tint_unpack_vec3_in_composite((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m);
+ half3 const l_a_i_a_i_m_i = half3((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements);
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ half const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements[tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.msl
index 55bcb6a..2e942f5 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.msl
@@ -14,6 +14,16 @@
T elements[N];
};
+struct S {
+ int before;
+ half3x3 m;
+ int after;
+};
+
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -36,12 +46,6 @@
return result;
}
-struct S {
- int before;
- half3x3 m;
- int after;
-};
-
S tint_unpack_vec3_in_composite_1(S_tint_packed_vec3 in) {
S result = {};
result.before = in.before;
@@ -58,12 +62,12 @@
return result;
}
-kernel void f(const constant tint_array<S_tint_packed_vec3, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = tint_unpack_vec3_in_composite_2(*(tint_symbol_1));
- tint_symbol[1] = tint_unpack_vec3_in_composite_1((*(tint_symbol_1))[2]);
- tint_symbol[3].m = tint_unpack_vec3_in_composite((*(tint_symbol_1))[2].m);
- tint_symbol[1].m[0] = half3((*(tint_symbol_1))[0].m[1].elements).zxy;
+kernel void f(const constant tint_array<S_tint_packed_vec3, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite_2(*(tint_symbol));
+ tint_private_vars.p[1] = tint_unpack_vec3_in_composite_1((*(tint_symbol))[2]);
+ tint_private_vars.p[3].m = tint_unpack_vec3_in_composite((*(tint_symbol))[2].m);
+ tint_private_vars.p[1].m[0] = half3((*(tint_symbol))[0].m[1].elements).zxy;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
index fd95ea8..29361e5 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -72,27 +76,28 @@
return result;
}
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer_tint_packed_vec3, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer_tint_packed_vec3, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = tint_unpack_vec3_in_composite_4(*(tint_symbol_5));
- Outer const l_a_i = tint_unpack_vec3_in_composite_3((*(tint_symbol_5))[p_a_i_save]);
- tint_array<Inner, 4> const l_a_i_a = tint_unpack_vec3_in_composite_2((*(tint_symbol_5))[p_a_i_save].a);
- Inner const l_a_i_a_i = tint_unpack_vec3_in_composite_1((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save]);
- float3x3 const l_a_i_a_i_m = tint_unpack_vec3_in_composite((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m);
- float3 const l_a_i_a_i_m_i = float3((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements);
- int const tint_symbol_3 = i();
- float const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements[tint_symbol_3];
+ tint_array<Outer, 4> const l_a = tint_unpack_vec3_in_composite_4(*(tint_symbol_4));
+ Outer const l_a_i = tint_unpack_vec3_in_composite_3((*(tint_symbol_4))[p_a_i_save]);
+ tint_array<Inner, 4> const l_a_i_a = tint_unpack_vec3_in_composite_2((*(tint_symbol_4))[p_a_i_save].a);
+ Inner const l_a_i_a_i = tint_unpack_vec3_in_composite_1((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save]);
+ float3x3 const l_a_i_a_i_m = tint_unpack_vec3_in_composite((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m);
+ float3 const l_a_i_a_i_m_i = float3((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements);
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ float const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements[tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.msl
index f6812b4..166da04 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.msl
@@ -14,6 +14,16 @@
T elements[N];
};
+struct S {
+ int before;
+ float3x3 m;
+ int after;
+};
+
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -35,12 +45,6 @@
return result;
}
-struct S {
- int before;
- float3x3 m;
- int after;
-};
-
S tint_unpack_vec3_in_composite_1(S_tint_packed_vec3 in) {
S result = {};
result.before = in.before;
@@ -57,12 +61,12 @@
return result;
}
-kernel void f(const constant tint_array<S_tint_packed_vec3, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = tint_unpack_vec3_in_composite_2(*(tint_symbol_1));
- tint_symbol[1] = tint_unpack_vec3_in_composite_1((*(tint_symbol_1))[2]);
- tint_symbol[3].m = tint_unpack_vec3_in_composite((*(tint_symbol_1))[2].m);
- tint_symbol[1].m[0] = float3((*(tint_symbol_1))[0].m[1].elements).zxy;
+kernel void f(const constant tint_array<S_tint_packed_vec3, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite_2(*(tint_symbol));
+ tint_private_vars.p[1] = tint_unpack_vec3_in_composite_1((*(tint_symbol))[2]);
+ tint_private_vars.p[3].m = tint_unpack_vec3_in_composite((*(tint_symbol))[2].m);
+ tint_private_vars.p[1].m[0] = float3((*(tint_symbol))[0].m[1].elements).zxy;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
index eed6f51..985b40c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct Inner {
/* 0x0000 */ half3x4 m;
/* 0x0018 */ tint_array<int8_t, 40> tint_pad;
@@ -23,27 +27,28 @@
/* 0x0000 */ tint_array<Inner, 4> a;
};
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = *(tint_symbol_5);
- Outer const l_a_i = (*(tint_symbol_5))[p_a_i_save];
- tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_5))[p_a_i_save].a;
- Inner const l_a_i_a_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save];
- half3x4 const l_a_i_a_i_m = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m;
- half4 const l_a_i_a_i_m_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
- int const tint_symbol_3 = i();
- half const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
+ tint_array<Outer, 4> const l_a = *(tint_symbol_4);
+ Outer const l_a_i = (*(tint_symbol_4))[p_a_i_save];
+ tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_4))[p_a_i_save].a;
+ Inner const l_a_i_a_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save];
+ half3x4 const l_a_i_a_i_m = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m;
+ half4 const l_a_i_a_i_m_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ half const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.msl
index 6146923..ae9c315 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.msl
@@ -23,12 +23,16 @@
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_2;
};
-kernel void f(const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[3].m = (*(tint_symbol_1))[2].m;
- tint_symbol[1].m[0] = (*(tint_symbol_1))[0].m[1].ywxz;
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
+kernel void f(const constant tint_array<S, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[3].m = (*(tint_symbol))[2].m;
+ tint_private_vars.p[1].m[0] = (*(tint_symbol))[0].m[1].ywxz;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
index c277984..92e2f67 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct Inner {
/* 0x0000 */ float3x4 m;
/* 0x0030 */ tint_array<int8_t, 16> tint_pad;
@@ -23,27 +27,28 @@
/* 0x0000 */ tint_array<Inner, 4> a;
};
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = *(tint_symbol_5);
- Outer const l_a_i = (*(tint_symbol_5))[p_a_i_save];
- tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_5))[p_a_i_save].a;
- Inner const l_a_i_a_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save];
- float3x4 const l_a_i_a_i_m = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m;
- float4 const l_a_i_a_i_m_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
- int const tint_symbol_3 = i();
- float const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
+ tint_array<Outer, 4> const l_a = *(tint_symbol_4);
+ Outer const l_a_i = (*(tint_symbol_4))[p_a_i_save];
+ tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_4))[p_a_i_save].a;
+ Inner const l_a_i_a_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save];
+ float3x4 const l_a_i_a_i_m = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m;
+ float4 const l_a_i_a_i_m_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ float const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.msl
index d59f443..348de47 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.msl
@@ -22,12 +22,16 @@
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_1;
};
-kernel void f(const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[3].m = (*(tint_symbol_1))[2].m;
- tint_symbol[1].m[0] = (*(tint_symbol_1))[0].m[1].ywxz;
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
+kernel void f(const constant tint_array<S, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[3].m = (*(tint_symbol))[2].m;
+ tint_private_vars.p[1].m[0] = (*(tint_symbol))[0].m[1].ywxz;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 2ff783e..2988fc5 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct Inner {
/* 0x0000 */ half4x2 m;
/* 0x0010 */ tint_array<int8_t, 48> tint_pad;
@@ -23,27 +27,28 @@
/* 0x0000 */ tint_array<Inner, 4> a;
};
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = *(tint_symbol_5);
- Outer const l_a_i = (*(tint_symbol_5))[p_a_i_save];
- tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_5))[p_a_i_save].a;
- Inner const l_a_i_a_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save];
- half4x2 const l_a_i_a_i_m = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m;
- half2 const l_a_i_a_i_m_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
- int const tint_symbol_3 = i();
- half const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
+ tint_array<Outer, 4> const l_a = *(tint_symbol_4);
+ Outer const l_a_i = (*(tint_symbol_4))[p_a_i_save];
+ tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_4))[p_a_i_save].a;
+ Inner const l_a_i_a_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save];
+ half4x2 const l_a_i_a_i_m = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m;
+ half2 const l_a_i_a_i_m_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ half const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.msl
index 6141107..a850f51 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.msl
@@ -22,12 +22,16 @@
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_1;
};
-kernel void f(const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[3].m = (*(tint_symbol_1))[2].m;
- tint_symbol[1].m[0] = (*(tint_symbol_1))[0].m[1].yx;
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
+kernel void f(const constant tint_array<S, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[3].m = (*(tint_symbol))[2].m;
+ tint_private_vars.p[1].m[0] = (*(tint_symbol))[0].m[1].yx;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
index eca377a..dfb5b40 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct Inner {
/* 0x0000 */ float4x2 m;
/* 0x0020 */ tint_array<int8_t, 32> tint_pad;
@@ -23,27 +27,28 @@
/* 0x0000 */ tint_array<Inner, 4> a;
};
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = *(tint_symbol_5);
- Outer const l_a_i = (*(tint_symbol_5))[p_a_i_save];
- tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_5))[p_a_i_save].a;
- Inner const l_a_i_a_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save];
- float4x2 const l_a_i_a_i_m = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m;
- float2 const l_a_i_a_i_m_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
- int const tint_symbol_3 = i();
- float const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
+ tint_array<Outer, 4> const l_a = *(tint_symbol_4);
+ Outer const l_a_i = (*(tint_symbol_4))[p_a_i_save];
+ tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_4))[p_a_i_save].a;
+ Inner const l_a_i_a_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save];
+ float4x2 const l_a_i_a_i_m = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m;
+ float2 const l_a_i_a_i_m_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ float const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.msl
index 727a883..ff337eb 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.msl
@@ -23,12 +23,16 @@
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_2;
};
-kernel void f(const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[3].m = (*(tint_symbol_1))[2].m;
- tint_symbol[1].m[0] = (*(tint_symbol_1))[0].m[1].yx;
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
+kernel void f(const constant tint_array<S, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[3].m = (*(tint_symbol))[2].m;
+ tint_private_vars.p[1].m[0] = (*(tint_symbol))[0].m[1].yx;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 5b3d6f8..7cabe51 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -72,27 +76,28 @@
return result;
}
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer_tint_packed_vec3, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer_tint_packed_vec3, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = tint_unpack_vec3_in_composite_4(*(tint_symbol_5));
- Outer const l_a_i = tint_unpack_vec3_in_composite_3((*(tint_symbol_5))[p_a_i_save]);
- tint_array<Inner, 4> const l_a_i_a = tint_unpack_vec3_in_composite_2((*(tint_symbol_5))[p_a_i_save].a);
- Inner const l_a_i_a_i = tint_unpack_vec3_in_composite_1((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save]);
- half4x3 const l_a_i_a_i_m = tint_unpack_vec3_in_composite((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m);
- half3 const l_a_i_a_i_m_i = half3((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements);
- int const tint_symbol_3 = i();
- half const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements[tint_symbol_3];
+ tint_array<Outer, 4> const l_a = tint_unpack_vec3_in_composite_4(*(tint_symbol_4));
+ Outer const l_a_i = tint_unpack_vec3_in_composite_3((*(tint_symbol_4))[p_a_i_save]);
+ tint_array<Inner, 4> const l_a_i_a = tint_unpack_vec3_in_composite_2((*(tint_symbol_4))[p_a_i_save].a);
+ Inner const l_a_i_a_i = tint_unpack_vec3_in_composite_1((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save]);
+ half4x3 const l_a_i_a_i_m = tint_unpack_vec3_in_composite((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m);
+ half3 const l_a_i_a_i_m_i = half3((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements);
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ half const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements[tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.msl
index dae39c9..a1ac5a2 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.msl
@@ -14,6 +14,16 @@
T elements[N];
};
+struct S {
+ int before;
+ half4x3 m;
+ int after;
+};
+
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -36,12 +46,6 @@
return result;
}
-struct S {
- int before;
- half4x3 m;
- int after;
-};
-
S tint_unpack_vec3_in_composite_1(S_tint_packed_vec3 in) {
S result = {};
result.before = in.before;
@@ -58,12 +62,12 @@
return result;
}
-kernel void f(const constant tint_array<S_tint_packed_vec3, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = tint_unpack_vec3_in_composite_2(*(tint_symbol_1));
- tint_symbol[1] = tint_unpack_vec3_in_composite_1((*(tint_symbol_1))[2]);
- tint_symbol[3].m = tint_unpack_vec3_in_composite((*(tint_symbol_1))[2].m);
- tint_symbol[1].m[0] = half3((*(tint_symbol_1))[0].m[1].elements).zxy;
+kernel void f(const constant tint_array<S_tint_packed_vec3, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite_2(*(tint_symbol));
+ tint_private_vars.p[1] = tint_unpack_vec3_in_composite_1((*(tint_symbol))[2]);
+ tint_private_vars.p[3].m = tint_unpack_vec3_in_composite((*(tint_symbol))[2].m);
+ tint_private_vars.p[1].m[0] = half3((*(tint_symbol))[0].m[1].elements).zxy;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 0a6b698..e7bc473 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -71,27 +75,28 @@
return result;
}
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer_tint_packed_vec3, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer_tint_packed_vec3, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = tint_unpack_vec3_in_composite_4(*(tint_symbol_5));
- Outer const l_a_i = tint_unpack_vec3_in_composite_3((*(tint_symbol_5))[p_a_i_save]);
- tint_array<Inner, 4> const l_a_i_a = tint_unpack_vec3_in_composite_2((*(tint_symbol_5))[p_a_i_save].a);
- Inner const l_a_i_a_i = tint_unpack_vec3_in_composite_1((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save]);
- float4x3 const l_a_i_a_i_m = tint_unpack_vec3_in_composite((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m);
- float3 const l_a_i_a_i_m_i = float3((*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements);
- int const tint_symbol_3 = i();
- float const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements[tint_symbol_3];
+ tint_array<Outer, 4> const l_a = tint_unpack_vec3_in_composite_4(*(tint_symbol_4));
+ Outer const l_a_i = tint_unpack_vec3_in_composite_3((*(tint_symbol_4))[p_a_i_save]);
+ tint_array<Inner, 4> const l_a_i_a = tint_unpack_vec3_in_composite_2((*(tint_symbol_4))[p_a_i_save].a);
+ Inner const l_a_i_a_i = tint_unpack_vec3_in_composite_1((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save]);
+ float4x3 const l_a_i_a_i_m = tint_unpack_vec3_in_composite((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m);
+ float3 const l_a_i_a_i_m_i = float3((*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements);
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ float const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save].elements[tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.msl
index f8b9e4a..c57a58d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.msl
@@ -14,6 +14,16 @@
T elements[N];
};
+struct S {
+ int before;
+ float4x3 m;
+ int after;
+};
+
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -36,12 +46,6 @@
return result;
}
-struct S {
- int before;
- float4x3 m;
- int after;
-};
-
S tint_unpack_vec3_in_composite_1(S_tint_packed_vec3 in) {
S result = {};
result.before = in.before;
@@ -58,12 +62,12 @@
return result;
}
-kernel void f(const constant tint_array<S_tint_packed_vec3, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = tint_unpack_vec3_in_composite_2(*(tint_symbol_1));
- tint_symbol[1] = tint_unpack_vec3_in_composite_1((*(tint_symbol_1))[2]);
- tint_symbol[3].m = tint_unpack_vec3_in_composite((*(tint_symbol_1))[2].m);
- tint_symbol[1].m[0] = float3((*(tint_symbol_1))[0].m[1].elements).zxy;
+kernel void f(const constant tint_array<S_tint_packed_vec3, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite_2(*(tint_symbol));
+ tint_private_vars.p[1] = tint_unpack_vec3_in_composite_1((*(tint_symbol))[2]);
+ tint_private_vars.p[3].m = tint_unpack_vec3_in_composite((*(tint_symbol))[2].m);
+ tint_private_vars.p[1].m[0] = float3((*(tint_symbol))[0].m[1].elements).zxy;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 31fbf6a..6af3608 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct Inner {
/* 0x0000 */ half4x4 m;
/* 0x0020 */ tint_array<int8_t, 32> tint_pad;
@@ -23,27 +27,28 @@
/* 0x0000 */ tint_array<Inner, 4> a;
};
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = *(tint_symbol_5);
- Outer const l_a_i = (*(tint_symbol_5))[p_a_i_save];
- tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_5))[p_a_i_save].a;
- Inner const l_a_i_a_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save];
- half4x4 const l_a_i_a_i_m = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m;
- half4 const l_a_i_a_i_m_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
- int const tint_symbol_3 = i();
- half const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
+ tint_array<Outer, 4> const l_a = *(tint_symbol_4);
+ Outer const l_a_i = (*(tint_symbol_4))[p_a_i_save];
+ tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_4))[p_a_i_save].a;
+ Inner const l_a_i_a_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save];
+ half4x4 const l_a_i_a_i_m = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m;
+ half4 const l_a_i_a_i_m_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ half const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.msl
index 94334df..d094091 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.msl
@@ -23,12 +23,16 @@
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_2;
};
-kernel void f(const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[3].m = (*(tint_symbol_1))[2].m;
- tint_symbol[1].m[0] = (*(tint_symbol_1))[0].m[1].ywxz;
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
+kernel void f(const constant tint_array<S, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[3].m = (*(tint_symbol))[2].m;
+ tint_private_vars.p[1].m[0] = (*(tint_symbol))[0].m[1].ywxz;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 5fc5475..c191459 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct Inner {
/* 0x0000 */ float4x4 m;
};
@@ -22,27 +26,28 @@
/* 0x0000 */ tint_array<Inner, 4> a;
};
-int i() {
- thread int tint_symbol_4 = 0;
- tint_symbol_4 = as_type<int>((as_type<uint>(tint_symbol_4) + as_type<uint>(1)));
- return tint_symbol_4;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<Outer, 4>* tint_symbol_5 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<Outer, 4>* tint_symbol_4 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_a_i_save = tint_symbol;
- int const tint_symbol_1 = i();
+ int const tint_symbol_1 = i(&(tint_private_vars));
int const p_a_i_a_i_save = tint_symbol_1;
- int const tint_symbol_2 = i();
+ int const tint_symbol_2 = i(&(tint_private_vars));
int const p_a_i_a_i_m_i_save = tint_symbol_2;
- tint_array<Outer, 4> const l_a = *(tint_symbol_5);
- Outer const l_a_i = (*(tint_symbol_5))[p_a_i_save];
- tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_5))[p_a_i_save].a;
- Inner const l_a_i_a_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save];
- float4x4 const l_a_i_a_i_m = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m;
- float4 const l_a_i_a_i_m_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
- int const tint_symbol_3 = i();
- float const l_a_i_a_i_m_i_i = (*(tint_symbol_5))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
+ tint_array<Outer, 4> const l_a = *(tint_symbol_4);
+ Outer const l_a_i = (*(tint_symbol_4))[p_a_i_save];
+ tint_array<Inner, 4> const l_a_i_a = (*(tint_symbol_4))[p_a_i_save].a;
+ Inner const l_a_i_a_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save];
+ float4x4 const l_a_i_a_i_m = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m;
+ float4 const l_a_i_a_i_m_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save];
+ int const tint_symbol_3 = i(&(tint_private_vars));
+ float const l_a_i_a_i_m_i_i = (*(tint_symbol_4))[p_a_i_save].a[p_a_i_a_i_save].m[p_a_i_a_i_m_i_save][tint_symbol_3];
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.msl
index c124b5b..8f6adb8 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.msl
@@ -23,12 +23,16 @@
/* 0x0084 */ tint_array<int8_t, 60> tint_pad_2;
};
-kernel void f(const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread tint_array<S, 4> tint_symbol = {};
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[2];
- tint_symbol[3].m = (*(tint_symbol_1))[2].m;
- tint_symbol[1].m[0] = (*(tint_symbol_1))[0].m[1].ywxz;
+struct tint_private_vars_struct {
+ tint_array<S, 4> p;
+};
+
+kernel void f(const constant tint_array<S, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[2];
+ tint_private_vars.p[3].m = (*(tint_symbol))[2].m;
+ tint_private_vars.p[1].m[0] = (*(tint_symbol))[0].m[1].ywxz;
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
index f9562f6..5739bd5 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -1,17 +1,22 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant half2x2* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant half2x2* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- half2x2 const l_m = *(tint_symbol_2);
- half2 const l_m_i = (*(tint_symbol_2))[p_m_i_save];
+ half2x2 const l_m = *(tint_symbol_1);
+ half2 const l_m_i = (*(tint_symbol_1))[p_m_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/static_index_via_ptr.wgsl.expected.msl
index 59df3ba..cd82b02 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/static_index_via_ptr.wgsl.expected.msl
@@ -1,15 +1,18 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant half2x2* tint_symbol_1 [[buffer(0)]]) {
- half2x2 const l_m = *(tint_symbol_1);
- half2 const l_m_1 = (*(tint_symbol_1))[1];
+kernel void f(const constant half2x2* tint_symbol [[buffer(0)]]) {
+ half2x2 const l_m = *(tint_symbol);
+ half2 const l_m_1 = (*(tint_symbol))[1];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.msl
index 748687f..54d4889 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.msl
@@ -1,12 +1,16 @@
#include <metal_stdlib>
using namespace metal;
-kernel void f(const constant half2x2* tint_symbol_1 [[buffer(0)]]) {
- thread half2x2 tint_symbol = half2x2(0.0h);
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[0];
- tint_symbol[1] = (*(tint_symbol_1))[0].yx;
- tint_symbol[0][1] = (*(tint_symbol_1))[1][0];
+struct tint_private_vars_struct {
+ half2x2 p;
+};
+
+kernel void f(const constant half2x2* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[0];
+ tint_private_vars.p[1] = (*(tint_symbol))[0].yx;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 61e6798..1a7a358 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -1,17 +1,22 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant float2x2* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant float2x2* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- float2x2 const l_m = *(tint_symbol_2);
- float2 const l_m_i = (*(tint_symbol_2))[p_m_i_save];
+ float2x2 const l_m = *(tint_symbol_1);
+ float2 const l_m_i = (*(tint_symbol_1))[p_m_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.msl
index 6b2c368..f545a3a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.msl
@@ -1,15 +1,18 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant float2x2* tint_symbol_1 [[buffer(0)]]) {
- float2x2 const l_m = *(tint_symbol_1);
- float2 const l_m_1 = (*(tint_symbol_1))[1];
+kernel void f(const constant float2x2* tint_symbol [[buffer(0)]]) {
+ float2x2 const l_m = *(tint_symbol);
+ float2 const l_m_1 = (*(tint_symbol))[1];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.msl
index e80a8b6..2d08b3e 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.msl
@@ -1,12 +1,16 @@
#include <metal_stdlib>
using namespace metal;
-kernel void f(const constant float2x2* tint_symbol_1 [[buffer(0)]]) {
- thread float2x2 tint_symbol = float2x2(0.0f);
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[0];
- tint_symbol[1] = (*(tint_symbol_1))[0].yx;
- tint_symbol[0][1] = (*(tint_symbol_1))[1][0];
+struct tint_private_vars_struct {
+ float2x2 p;
+};
+
+kernel void f(const constant float2x2* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[0];
+ tint_private_vars.p[1] = (*(tint_symbol))[0].yx;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 4b6e675..8d82142 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -27,17 +31,18 @@
return result;
}
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 2>* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 2>* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- half2x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_2));
- half3 const l_m_i = half3((*(tint_symbol_2))[p_m_i_save].elements);
+ half2x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_1));
+ half3 const l_m_i = half3((*(tint_symbol_1))[p_m_i_save].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/static_index_via_ptr.wgsl.expected.msl
index 20f1196..6b09268 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/static_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -27,15 +31,14 @@
return result;
}
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 2>* tint_symbol_1 [[buffer(0)]]) {
- half2x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_1));
- half3 const l_m_1 = half3((*(tint_symbol_1))[1].elements);
+kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 2>* tint_symbol [[buffer(0)]]) {
+ half2x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol));
+ half3 const l_m_1 = half3((*(tint_symbol))[1].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.msl
index 2889fe9..f08c837 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ half2x3 p;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -27,12 +31,12 @@
return result;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 2>* tint_symbol_1 [[buffer(0)]]) {
- thread half2x3 tint_symbol = half2x3(0.0h);
- tint_symbol = tint_unpack_vec3_in_composite(*(tint_symbol_1));
- tint_symbol[1] = half3((*(tint_symbol_1))[0].elements);
- tint_symbol[1] = half3((*(tint_symbol_1))[0].elements).zxy;
- tint_symbol[0][1] = (*(tint_symbol_1))[1].elements[0];
+kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 2>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite(*(tint_symbol));
+ tint_private_vars.p[1] = half3((*(tint_symbol))[0].elements);
+ tint_private_vars.p[1] = half3((*(tint_symbol))[0].elements).zxy;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1].elements[0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 04c5d41..f79edc4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -27,17 +31,18 @@
return result;
}
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 2>* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 2>* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- float2x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_2));
- float3 const l_m_i = float3((*(tint_symbol_2))[p_m_i_save].elements);
+ float2x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_1));
+ float3 const l_m_i = float3((*(tint_symbol_1))[p_m_i_save].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.msl
index 6ab436c..69dc89f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -27,15 +31,14 @@
return result;
}
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 2>* tint_symbol_1 [[buffer(0)]]) {
- float2x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_1));
- float3 const l_m_1 = float3((*(tint_symbol_1))[1].elements);
+kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 2>* tint_symbol [[buffer(0)]]) {
+ float2x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol));
+ float3 const l_m_1 = float3((*(tint_symbol))[1].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.msl
index 8bc9638..76a7694 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ float2x3 p;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -27,12 +31,12 @@
return result;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 2>* tint_symbol_1 [[buffer(0)]]) {
- thread float2x3 tint_symbol = float2x3(0.0f);
- tint_symbol = tint_unpack_vec3_in_composite(*(tint_symbol_1));
- tint_symbol[1] = float3((*(tint_symbol_1))[0].elements);
- tint_symbol[1] = float3((*(tint_symbol_1))[0].elements).zxy;
- tint_symbol[0][1] = (*(tint_symbol_1))[1].elements[0];
+kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 2>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite(*(tint_symbol));
+ tint_private_vars.p[1] = float3((*(tint_symbol))[0].elements);
+ tint_private_vars.p[1] = float3((*(tint_symbol))[0].elements).zxy;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1].elements[0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 7ecbd42..b0c5224 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -1,17 +1,22 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant half2x4* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant half2x4* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- half2x4 const l_m = *(tint_symbol_2);
- half4 const l_m_i = (*(tint_symbol_2))[p_m_i_save];
+ half2x4 const l_m = *(tint_symbol_1);
+ half4 const l_m_i = (*(tint_symbol_1))[p_m_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/static_index_via_ptr.wgsl.expected.msl
index 760d2d2..337e8c2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/static_index_via_ptr.wgsl.expected.msl
@@ -1,15 +1,18 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant half2x4* tint_symbol_1 [[buffer(0)]]) {
- half2x4 const l_m = *(tint_symbol_1);
- half4 const l_m_1 = (*(tint_symbol_1))[1];
+kernel void f(const constant half2x4* tint_symbol [[buffer(0)]]) {
+ half2x4 const l_m = *(tint_symbol);
+ half4 const l_m_1 = (*(tint_symbol))[1];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.msl
index 4c18d53..cfa4924 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.msl
@@ -1,12 +1,16 @@
#include <metal_stdlib>
using namespace metal;
-kernel void f(const constant half2x4* tint_symbol_1 [[buffer(0)]]) {
- thread half2x4 tint_symbol = half2x4(0.0h);
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[0];
- tint_symbol[1] = (*(tint_symbol_1))[0].ywxz;
- tint_symbol[0][1] = (*(tint_symbol_1))[1][0];
+struct tint_private_vars_struct {
+ half2x4 p;
+};
+
+kernel void f(const constant half2x4* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[0];
+ tint_private_vars.p[1] = (*(tint_symbol))[0].ywxz;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 5c7026b..a7299df 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -1,17 +1,22 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant float2x4* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant float2x4* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- float2x4 const l_m = *(tint_symbol_2);
- float4 const l_m_i = (*(tint_symbol_2))[p_m_i_save];
+ float2x4 const l_m = *(tint_symbol_1);
+ float4 const l_m_i = (*(tint_symbol_1))[p_m_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.msl
index 51566cb..c839354 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.msl
@@ -1,15 +1,18 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant float2x4* tint_symbol_1 [[buffer(0)]]) {
- float2x4 const l_m = *(tint_symbol_1);
- float4 const l_m_1 = (*(tint_symbol_1))[1];
+kernel void f(const constant float2x4* tint_symbol [[buffer(0)]]) {
+ float2x4 const l_m = *(tint_symbol);
+ float4 const l_m_1 = (*(tint_symbol))[1];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.msl
index 5351247..076285d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.msl
@@ -1,12 +1,16 @@
#include <metal_stdlib>
using namespace metal;
-kernel void f(const constant float2x4* tint_symbol_1 [[buffer(0)]]) {
- thread float2x4 tint_symbol = float2x4(0.0f);
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[0];
- tint_symbol[1] = (*(tint_symbol_1))[0].ywxz;
- tint_symbol[0][1] = (*(tint_symbol_1))[1][0];
+struct tint_private_vars_struct {
+ float2x4 p;
+};
+
+kernel void f(const constant float2x4* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[0];
+ tint_private_vars.p[1] = (*(tint_symbol))[0].ywxz;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
index fec7c16..864db13 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -1,17 +1,22 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant half3x2* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant half3x2* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- half3x2 const l_m = *(tint_symbol_2);
- half2 const l_m_i = (*(tint_symbol_2))[p_m_i_save];
+ half3x2 const l_m = *(tint_symbol_1);
+ half2 const l_m_i = (*(tint_symbol_1))[p_m_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/static_index_via_ptr.wgsl.expected.msl
index 20f3c6a..535d5f4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/static_index_via_ptr.wgsl.expected.msl
@@ -1,15 +1,18 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant half3x2* tint_symbol_1 [[buffer(0)]]) {
- half3x2 const l_m = *(tint_symbol_1);
- half2 const l_m_1 = (*(tint_symbol_1))[1];
+kernel void f(const constant half3x2* tint_symbol [[buffer(0)]]) {
+ half3x2 const l_m = *(tint_symbol);
+ half2 const l_m_1 = (*(tint_symbol))[1];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.msl
index f88a3fa..3b920fa 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.msl
@@ -1,12 +1,16 @@
#include <metal_stdlib>
using namespace metal;
-kernel void f(const constant half3x2* tint_symbol_1 [[buffer(0)]]) {
- thread half3x2 tint_symbol = half3x2(0.0h);
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[0];
- tint_symbol[1] = (*(tint_symbol_1))[0].yx;
- tint_symbol[0][1] = (*(tint_symbol_1))[1][0];
+struct tint_private_vars_struct {
+ half3x2 p;
+};
+
+kernel void f(const constant half3x2* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[0];
+ tint_private_vars.p[1] = (*(tint_symbol))[0].yx;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
index ccda765..ed823d3 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -1,17 +1,22 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant float3x2* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant float3x2* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- float3x2 const l_m = *(tint_symbol_2);
- float2 const l_m_i = (*(tint_symbol_2))[p_m_i_save];
+ float3x2 const l_m = *(tint_symbol_1);
+ float2 const l_m_i = (*(tint_symbol_1))[p_m_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.msl
index df020b7..96ea15a0 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.msl
@@ -1,15 +1,18 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant float3x2* tint_symbol_1 [[buffer(0)]]) {
- float3x2 const l_m = *(tint_symbol_1);
- float2 const l_m_1 = (*(tint_symbol_1))[1];
+kernel void f(const constant float3x2* tint_symbol [[buffer(0)]]) {
+ float3x2 const l_m = *(tint_symbol);
+ float2 const l_m_1 = (*(tint_symbol))[1];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.msl
index f0f39fe..d26288a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.msl
@@ -1,12 +1,16 @@
#include <metal_stdlib>
using namespace metal;
-kernel void f(const constant float3x2* tint_symbol_1 [[buffer(0)]]) {
- thread float3x2 tint_symbol = float3x2(0.0f);
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[0];
- tint_symbol[1] = (*(tint_symbol_1))[0].yx;
- tint_symbol[0][1] = (*(tint_symbol_1))[1][0];
+struct tint_private_vars_struct {
+ float3x2 p;
+};
+
+kernel void f(const constant float3x2* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[0];
+ tint_private_vars.p[1] = (*(tint_symbol))[0].yx;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 52ad632..76a8717 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -27,17 +31,18 @@
return result;
}
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 3>* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 3>* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- half3x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_2));
- half3 const l_m_i = half3((*(tint_symbol_2))[p_m_i_save].elements);
+ half3x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_1));
+ half3 const l_m_i = half3((*(tint_symbol_1))[p_m_i_save].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/static_index_via_ptr.wgsl.expected.msl
index 0840049..3eddae1 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/static_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -27,15 +31,14 @@
return result;
}
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 3>* tint_symbol_1 [[buffer(0)]]) {
- half3x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_1));
- half3 const l_m_1 = half3((*(tint_symbol_1))[1].elements);
+kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 3>* tint_symbol [[buffer(0)]]) {
+ half3x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol));
+ half3 const l_m_1 = half3((*(tint_symbol))[1].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.msl
index 3249af1..197c3fe 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ half3x3 p;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -27,12 +31,12 @@
return result;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 3>* tint_symbol_1 [[buffer(0)]]) {
- thread half3x3 tint_symbol = half3x3(0.0h);
- tint_symbol = tint_unpack_vec3_in_composite(*(tint_symbol_1));
- tint_symbol[1] = half3((*(tint_symbol_1))[0].elements);
- tint_symbol[1] = half3((*(tint_symbol_1))[0].elements).zxy;
- tint_symbol[0][1] = (*(tint_symbol_1))[1].elements[0];
+kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 3>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite(*(tint_symbol));
+ tint_private_vars.p[1] = half3((*(tint_symbol))[0].elements);
+ tint_private_vars.p[1] = half3((*(tint_symbol))[0].elements).zxy;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1].elements[0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 98e4aa7..e35f7f6 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -27,17 +31,18 @@
return result;
}
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 3>* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 3>* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- float3x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_2));
- float3 const l_m_i = float3((*(tint_symbol_2))[p_m_i_save].elements);
+ float3x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_1));
+ float3 const l_m_i = float3((*(tint_symbol_1))[p_m_i_save].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.msl
index 06ae933..52ae088 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -27,15 +31,14 @@
return result;
}
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 3>* tint_symbol_1 [[buffer(0)]]) {
- float3x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_1));
- float3 const l_m_1 = float3((*(tint_symbol_1))[1].elements);
+kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 3>* tint_symbol [[buffer(0)]]) {
+ float3x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol));
+ float3 const l_m_1 = float3((*(tint_symbol))[1].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.msl
index 0b5388c..9bbecf4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ float3x3 p;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -27,12 +31,12 @@
return result;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 3>* tint_symbol_1 [[buffer(0)]]) {
- thread float3x3 tint_symbol = float3x3(0.0f);
- tint_symbol = tint_unpack_vec3_in_composite(*(tint_symbol_1));
- tint_symbol[1] = float3((*(tint_symbol_1))[0].elements);
- tint_symbol[1] = float3((*(tint_symbol_1))[0].elements).zxy;
- tint_symbol[0][1] = (*(tint_symbol_1))[1].elements[0];
+kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 3>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite(*(tint_symbol));
+ tint_private_vars.p[1] = float3((*(tint_symbol))[0].elements);
+ tint_private_vars.p[1] = float3((*(tint_symbol))[0].elements).zxy;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1].elements[0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 70345b3..b858eb1 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -1,17 +1,22 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant half3x4* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant half3x4* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- half3x4 const l_m = *(tint_symbol_2);
- half4 const l_m_i = (*(tint_symbol_2))[p_m_i_save];
+ half3x4 const l_m = *(tint_symbol_1);
+ half4 const l_m_i = (*(tint_symbol_1))[p_m_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/static_index_via_ptr.wgsl.expected.msl
index 82f5ec8..eee9c9f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/static_index_via_ptr.wgsl.expected.msl
@@ -1,15 +1,18 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant half3x4* tint_symbol_1 [[buffer(0)]]) {
- half3x4 const l_m = *(tint_symbol_1);
- half4 const l_m_1 = (*(tint_symbol_1))[1];
+kernel void f(const constant half3x4* tint_symbol [[buffer(0)]]) {
+ half3x4 const l_m = *(tint_symbol);
+ half4 const l_m_1 = (*(tint_symbol))[1];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.msl
index 67376a0..8811bf2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.msl
@@ -1,12 +1,16 @@
#include <metal_stdlib>
using namespace metal;
-kernel void f(const constant half3x4* tint_symbol_1 [[buffer(0)]]) {
- thread half3x4 tint_symbol = half3x4(0.0h);
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[0];
- tint_symbol[1] = (*(tint_symbol_1))[0].ywxz;
- tint_symbol[0][1] = (*(tint_symbol_1))[1][0];
+struct tint_private_vars_struct {
+ half3x4 p;
+};
+
+kernel void f(const constant half3x4* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[0];
+ tint_private_vars.p[1] = (*(tint_symbol))[0].ywxz;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 8774e83..0cc2a65 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -1,17 +1,22 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant float3x4* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant float3x4* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- float3x4 const l_m = *(tint_symbol_2);
- float4 const l_m_i = (*(tint_symbol_2))[p_m_i_save];
+ float3x4 const l_m = *(tint_symbol_1);
+ float4 const l_m_i = (*(tint_symbol_1))[p_m_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.msl
index e48a04b..311f43d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.msl
@@ -1,15 +1,18 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant float3x4* tint_symbol_1 [[buffer(0)]]) {
- float3x4 const l_m = *(tint_symbol_1);
- float4 const l_m_1 = (*(tint_symbol_1))[1];
+kernel void f(const constant float3x4* tint_symbol [[buffer(0)]]) {
+ float3x4 const l_m = *(tint_symbol);
+ float4 const l_m_1 = (*(tint_symbol))[1];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.msl
index 7a8aed3..e6015b9 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.msl
@@ -1,12 +1,16 @@
#include <metal_stdlib>
using namespace metal;
-kernel void f(const constant float3x4* tint_symbol_1 [[buffer(0)]]) {
- thread float3x4 tint_symbol = float3x4(0.0f);
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[0];
- tint_symbol[1] = (*(tint_symbol_1))[0].ywxz;
- tint_symbol[0][1] = (*(tint_symbol_1))[1][0];
+struct tint_private_vars_struct {
+ float3x4 p;
+};
+
+kernel void f(const constant float3x4* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[0];
+ tint_private_vars.p[1] = (*(tint_symbol))[0].ywxz;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 756ba6d..11618f7 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -1,17 +1,22 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant half4x2* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant half4x2* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- half4x2 const l_m = *(tint_symbol_2);
- half2 const l_m_i = (*(tint_symbol_2))[p_m_i_save];
+ half4x2 const l_m = *(tint_symbol_1);
+ half2 const l_m_i = (*(tint_symbol_1))[p_m_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/static_index_via_ptr.wgsl.expected.msl
index a054f04..2818371 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/static_index_via_ptr.wgsl.expected.msl
@@ -1,15 +1,18 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant half4x2* tint_symbol_1 [[buffer(0)]]) {
- half4x2 const l_m = *(tint_symbol_1);
- half2 const l_m_1 = (*(tint_symbol_1))[1];
+kernel void f(const constant half4x2* tint_symbol [[buffer(0)]]) {
+ half4x2 const l_m = *(tint_symbol);
+ half2 const l_m_1 = (*(tint_symbol))[1];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.msl
index 50b8bd6..a88ee0a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.msl
@@ -1,12 +1,16 @@
#include <metal_stdlib>
using namespace metal;
-kernel void f(const constant half4x2* tint_symbol_1 [[buffer(0)]]) {
- thread half4x2 tint_symbol = half4x2(0.0h);
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[0];
- tint_symbol[1] = (*(tint_symbol_1))[0].yx;
- tint_symbol[0][1] = (*(tint_symbol_1))[1][0];
+struct tint_private_vars_struct {
+ half4x2 p;
+};
+
+kernel void f(const constant half4x2* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[0];
+ tint_private_vars.p[1] = (*(tint_symbol))[0].yx;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
index ba9e110..dd84081 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -1,17 +1,22 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant float4x2* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant float4x2* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- float4x2 const l_m = *(tint_symbol_2);
- float2 const l_m_i = (*(tint_symbol_2))[p_m_i_save];
+ float4x2 const l_m = *(tint_symbol_1);
+ float2 const l_m_i = (*(tint_symbol_1))[p_m_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.msl
index 7bc8919..0d225fa 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.msl
@@ -1,15 +1,18 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant float4x2* tint_symbol_1 [[buffer(0)]]) {
- float4x2 const l_m = *(tint_symbol_1);
- float2 const l_m_1 = (*(tint_symbol_1))[1];
+kernel void f(const constant float4x2* tint_symbol [[buffer(0)]]) {
+ float4x2 const l_m = *(tint_symbol);
+ float2 const l_m_1 = (*(tint_symbol))[1];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.msl
index 9cfd512..bbe9c7c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.msl
@@ -1,12 +1,16 @@
#include <metal_stdlib>
using namespace metal;
-kernel void f(const constant float4x2* tint_symbol_1 [[buffer(0)]]) {
- thread float4x2 tint_symbol = float4x2(0.0f);
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[0];
- tint_symbol[1] = (*(tint_symbol_1))[0].yx;
- tint_symbol[0][1] = (*(tint_symbol_1))[1][0];
+struct tint_private_vars_struct {
+ float4x2 p;
+};
+
+kernel void f(const constant float4x2* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[0];
+ tint_private_vars.p[1] = (*(tint_symbol))[0].yx;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
index 7851572..27b22ff 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -27,17 +31,18 @@
return result;
}
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 4>* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 4>* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- half4x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_2));
- half3 const l_m_i = half3((*(tint_symbol_2))[p_m_i_save].elements);
+ half4x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_1));
+ half3 const l_m_i = half3((*(tint_symbol_1))[p_m_i_save].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/static_index_via_ptr.wgsl.expected.msl
index 97391f4..e324c0d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/static_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -27,15 +31,14 @@
return result;
}
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 4>* tint_symbol_1 [[buffer(0)]]) {
- half4x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_1));
- half3 const l_m_1 = half3((*(tint_symbol_1))[1].elements);
+kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 4>* tint_symbol [[buffer(0)]]) {
+ half4x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol));
+ half3 const l_m_1 = half3((*(tint_symbol))[1].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.msl
index 644a82a..9124188 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ half4x3 p;
+};
+
struct tint_packed_vec3_f16_array_element {
/* 0x0000 */ packed_half3 elements;
/* 0x0006 */ tint_array<int8_t, 2> tint_pad;
@@ -27,12 +31,12 @@
return result;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread half4x3 tint_symbol = half4x3(0.0h);
- tint_symbol = tint_unpack_vec3_in_composite(*(tint_symbol_1));
- tint_symbol[1] = half3((*(tint_symbol_1))[0].elements);
- tint_symbol[1] = half3((*(tint_symbol_1))[0].elements).zxy;
- tint_symbol[0][1] = (*(tint_symbol_1))[1].elements[0];
+kernel void f(const constant tint_array<tint_packed_vec3_f16_array_element, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite(*(tint_symbol));
+ tint_private_vars.p[1] = half3((*(tint_symbol))[0].elements);
+ tint_private_vars.p[1] = half3((*(tint_symbol))[0].elements).zxy;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1].elements[0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
index ef30c00..40b38c5 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -27,17 +31,18 @@
return result;
}
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 4>* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 4>* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- float4x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_2));
- float3 const l_m_i = float3((*(tint_symbol_2))[p_m_i_save].elements);
+ float4x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_1));
+ float3 const l_m_i = float3((*(tint_symbol_1))[p_m_i_save].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.msl
index 313cd69..90afeda 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -27,15 +31,14 @@
return result;
}
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 4>* tint_symbol_1 [[buffer(0)]]) {
- float4x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol_1));
- float3 const l_m_1 = float3((*(tint_symbol_1))[1].elements);
+kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 4>* tint_symbol [[buffer(0)]]) {
+ float4x3 const l_m = tint_unpack_vec3_in_composite(*(tint_symbol));
+ float3 const l_m_1 = float3((*(tint_symbol))[1].elements);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.msl
index c9b7814..2564332 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ float4x3 p;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -27,12 +31,12 @@
return result;
}
-kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 4>* tint_symbol_1 [[buffer(0)]]) {
- thread float4x3 tint_symbol = float4x3(0.0f);
- tint_symbol = tint_unpack_vec3_in_composite(*(tint_symbol_1));
- tint_symbol[1] = float3((*(tint_symbol_1))[0].elements);
- tint_symbol[1] = float3((*(tint_symbol_1))[0].elements).zxy;
- tint_symbol[0][1] = (*(tint_symbol_1))[1].elements[0];
+kernel void f(const constant tint_array<tint_packed_vec3_f32_array_element, 4>* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = tint_unpack_vec3_in_composite(*(tint_symbol));
+ tint_private_vars.p[1] = float3((*(tint_symbol))[0].elements);
+ tint_private_vars.p[1] = float3((*(tint_symbol))[0].elements).zxy;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1].elements[0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
index f8948a7..a84f36d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.msl
@@ -1,17 +1,22 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant half4x4* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant half4x4* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- half4x4 const l_m = *(tint_symbol_2);
- half4 const l_m_i = (*(tint_symbol_2))[p_m_i_save];
+ half4x4 const l_m = *(tint_symbol_1);
+ half4 const l_m_i = (*(tint_symbol_1))[p_m_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/static_index_via_ptr.wgsl.expected.msl
index 6e62a9c..ab3cc6d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/static_index_via_ptr.wgsl.expected.msl
@@ -1,15 +1,18 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant half4x4* tint_symbol_1 [[buffer(0)]]) {
- half4x4 const l_m = *(tint_symbol_1);
- half4 const l_m_1 = (*(tint_symbol_1))[1];
+kernel void f(const constant half4x4* tint_symbol [[buffer(0)]]) {
+ half4x4 const l_m = *(tint_symbol);
+ half4 const l_m_1 = (*(tint_symbol))[1];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.msl
index 2d3c84a..b148ea1 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.msl
@@ -1,12 +1,16 @@
#include <metal_stdlib>
using namespace metal;
-kernel void f(const constant half4x4* tint_symbol_1 [[buffer(0)]]) {
- thread half4x4 tint_symbol = half4x4(0.0h);
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[0];
- tint_symbol[1] = (*(tint_symbol_1))[0].ywxz;
- tint_symbol[0][1] = (*(tint_symbol_1))[1][0];
+struct tint_private_vars_struct {
+ half4x4 p;
+};
+
+kernel void f(const constant half4x4* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[0];
+ tint_private_vars.p[1] = (*(tint_symbol))[0].ywxz;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1][0];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
index 084622b..5650441 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.msl
@@ -1,17 +1,22 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
- return tint_symbol_1;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant float4x4* tint_symbol_2 [[buffer(0)]]) {
- int const tint_symbol = i();
+kernel void f(const constant float4x4* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.counter = 0;
+ int const tint_symbol = i(&(tint_private_vars));
int const p_m_i_save = tint_symbol;
- float4x4 const l_m = *(tint_symbol_2);
- float4 const l_m_i = (*(tint_symbol_2))[p_m_i_save];
+ float4x4 const l_m = *(tint_symbol_1);
+ float4 const l_m_i = (*(tint_symbol_1))[p_m_i_save];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.msl
index 8118193..64bd465 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.msl
@@ -1,15 +1,18 @@
#include <metal_stdlib>
using namespace metal;
-int i() {
- thread int tint_symbol = 0;
- tint_symbol = as_type<int>((as_type<uint>(tint_symbol) + as_type<uint>(1)));
- return tint_symbol;
+struct tint_private_vars_struct {
+ int counter;
+};
+
+int i(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-kernel void f(const constant float4x4* tint_symbol_1 [[buffer(0)]]) {
- float4x4 const l_m = *(tint_symbol_1);
- float4 const l_m_1 = (*(tint_symbol_1))[1];
+kernel void f(const constant float4x4* tint_symbol [[buffer(0)]]) {
+ float4x4 const l_m = *(tint_symbol);
+ float4 const l_m_1 = (*(tint_symbol))[1];
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.msl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.msl
index 85112c6..8abad4e 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.msl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.msl
@@ -1,12 +1,16 @@
#include <metal_stdlib>
using namespace metal;
-kernel void f(const constant float4x4* tint_symbol_1 [[buffer(0)]]) {
- thread float4x4 tint_symbol = float4x4(0.0f);
- tint_symbol = *(tint_symbol_1);
- tint_symbol[1] = (*(tint_symbol_1))[0];
- tint_symbol[1] = (*(tint_symbol_1))[0].ywxz;
- tint_symbol[0][1] = (*(tint_symbol_1))[1][0];
+struct tint_private_vars_struct {
+ float4x4 p;
+};
+
+kernel void f(const constant float4x4* tint_symbol [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.p = *(tint_symbol);
+ tint_private_vars.p[1] = (*(tint_symbol))[0];
+ tint_private_vars.p[1] = (*(tint_symbol))[0].ywxz;
+ tint_private_vars.p[0][1] = (*(tint_symbol))[1][0];
return;
}
diff --git a/test/tint/bug/chromium/1343242.wgsl.expected.msl b/test/tint/bug/chromium/1343242.wgsl.expected.msl
index 466ceaa..af0dfef 100644
--- a/test/tint/bug/chromium/1343242.wgsl.expected.msl
+++ b/test/tint/bug/chromium/1343242.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool o;
+};
+
diff --git a/test/tint/bug/chromium/1367602_private_space_initializer_valid_count.wgsl.expected.msl b/test/tint/bug/chromium/1367602_private_space_initializer_valid_count.wgsl.expected.msl
index 7e5829a..0720c79 100644
--- a/test/tint/bug/chromium/1367602_private_space_initializer_valid_count.wgsl.expected.msl
+++ b/test/tint/bug/chromium/1367602_private_space_initializer_valid_count.wgsl.expected.msl
@@ -1,6 +1,23 @@
#include <metal_stdlib>
using namespace metal;
+
+template<typename T, size_t N>
+struct tint_array {
+ const constant T& operator[](size_t i) const constant { return elements[i]; }
+ device T& operator[](size_t i) device { return elements[i]; }
+ const device T& operator[](size_t i) const device { return elements[i]; }
+ thread T& operator[](size_t i) thread { return elements[i]; }
+ const thread T& operator[](size_t i) const thread { return elements[i]; }
+ threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
+ const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
+ T elements[N];
+};
+
+struct tint_private_vars_struct {
+ tint_array<bool, 65535> v;
+};
+
void f() {
}
diff --git a/test/tint/bug/chromium/1367602_private_space_no_initializer_valid_count.wgsl.expected.msl b/test/tint/bug/chromium/1367602_private_space_no_initializer_valid_count.wgsl.expected.msl
index 7e5829a..0720c79 100644
--- a/test/tint/bug/chromium/1367602_private_space_no_initializer_valid_count.wgsl.expected.msl
+++ b/test/tint/bug/chromium/1367602_private_space_no_initializer_valid_count.wgsl.expected.msl
@@ -1,6 +1,23 @@
#include <metal_stdlib>
using namespace metal;
+
+template<typename T, size_t N>
+struct tint_array {
+ const constant T& operator[](size_t i) const constant { return elements[i]; }
+ device T& operator[](size_t i) device { return elements[i]; }
+ const device T& operator[](size_t i) const device { return elements[i]; }
+ thread T& operator[](size_t i) thread { return elements[i]; }
+ const thread T& operator[](size_t i) const thread { return elements[i]; }
+ threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
+ const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
+ T elements[N];
+};
+
+struct tint_private_vars_struct {
+ tint_array<bool, 65535> v;
+};
+
void f() {
}
diff --git a/test/tint/bug/dawn/947.wgsl.expected.msl b/test/tint/bug/dawn/947.wgsl.expected.msl
index 02084ce..be7f37f 100644
--- a/test/tint/bug/dawn/947.wgsl.expected.msl
+++ b/test/tint/bug/dawn/947.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ bool tint_discarded;
+};
+
struct Uniforms {
/* 0x0000 */ float2 u_scale;
/* 0x0008 */ float2 u_offset;
@@ -58,21 +62,22 @@
float4 value [[color(0)]];
};
-float4 fs_main_inner(float2 texcoord, thread bool* const tint_symbol_6) {
+float4 fs_main_inner(float2 texcoord, thread tint_private_vars_struct* const tint_private_vars) {
float2 clampedTexcoord = clamp(texcoord, float2(0.0f), float2(1.0f));
if (!(all((clampedTexcoord == texcoord)))) {
- *(tint_symbol_6) = true;
+ (*(tint_private_vars)).tint_discarded = true;
}
float4 srcColor = float4(0.0f);
return srcColor;
}
fragment tint_symbol_3 fs_main(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
- thread bool tint_symbol_7 = false;
- float4 const inner_result_1 = fs_main_inner(tint_symbol_1.texcoord, &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.tint_discarded = false;
+ float4 const inner_result_1 = fs_main_inner(tint_symbol_1.texcoord, &(tint_private_vars));
tint_symbol_3 wrapper_result_1 = {};
wrapper_result_1.value = inner_result_1;
- if (tint_symbol_7) {
+ if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return wrapper_result_1;
diff --git a/test/tint/bug/fxc/dyn_array_idx/read/private.wgsl.expected.msl b/test/tint/bug/fxc/dyn_array_idx/read/private.wgsl.expected.msl
index 8ac8114..b21bb5e 100644
--- a/test/tint/bug/fxc/dyn_array_idx/read/private.wgsl.expected.msl
+++ b/test/tint/bug/fxc/dyn_array_idx/read/private.wgsl.expected.msl
@@ -14,21 +14,25 @@
T elements[N];
};
-struct UBO {
- /* 0x0000 */ int dynamic_idx;
-};
-
struct S {
tint_array<int, 64> data;
};
+struct tint_private_vars_struct {
+ S s;
+};
+
+struct UBO {
+ /* 0x0000 */ int dynamic_idx;
+};
+
struct Result {
/* 0x0000 */ int out;
};
-kernel void f(device Result* tint_symbol [[buffer(1)]], const constant UBO* tint_symbol_2 [[buffer(0)]]) {
- thread S tint_symbol_1 = {};
- (*(tint_symbol)).out = tint_symbol_1.data[(*(tint_symbol_2)).dynamic_idx];
+kernel void f(device Result* tint_symbol [[buffer(1)]], const constant UBO* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ (*(tint_symbol)).out = tint_private_vars.s.data[(*(tint_symbol_1)).dynamic_idx];
return;
}
diff --git a/test/tint/bug/fxc/dyn_array_idx/write/private.wgsl.expected.msl b/test/tint/bug/fxc/dyn_array_idx/write/private.wgsl.expected.msl
index 6f94f24..a720c5a 100644
--- a/test/tint/bug/fxc/dyn_array_idx/write/private.wgsl.expected.msl
+++ b/test/tint/bug/fxc/dyn_array_idx/write/private.wgsl.expected.msl
@@ -14,22 +14,26 @@
T elements[N];
};
-struct UBO {
- /* 0x0000 */ int dynamic_idx;
-};
-
struct S {
tint_array<int, 64> data;
};
+struct tint_private_vars_struct {
+ S s;
+};
+
+struct UBO {
+ /* 0x0000 */ int dynamic_idx;
+};
+
struct Result {
/* 0x0000 */ int out;
};
-kernel void f(const constant UBO* tint_symbol_1 [[buffer(0)]], device Result* tint_symbol_2 [[buffer(1)]]) {
- thread S tint_symbol = {};
- tint_symbol.data[(*(tint_symbol_1)).dynamic_idx] = 1;
- (*(tint_symbol_2)).out = tint_symbol.data[3];
+kernel void f(const constant UBO* tint_symbol [[buffer(0)]], device Result* tint_symbol_1 [[buffer(1)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.s.data[(*(tint_symbol)).dynamic_idx] = 1;
+ (*(tint_symbol_1)).out = tint_private_vars.s.data[3];
return;
}
diff --git a/test/tint/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.msl b/test/tint/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.msl
index 0a31f28..baad148 100644
--- a/test/tint/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.msl
+++ b/test/tint/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.msl
@@ -14,14 +14,18 @@
T elements[N];
};
-struct UBO {
- /* 0x0000 */ int dynamic_idx;
-};
-
struct S {
tint_array<int, 64> data;
};
+struct tint_private_vars_struct {
+ S s;
+};
+
+struct UBO {
+ /* 0x0000 */ int dynamic_idx;
+};
+
struct Result {
/* 0x0000 */ int out;
};
@@ -30,10 +34,10 @@
(*(p)).data[(*(tint_symbol)).dynamic_idx] = 1;
}
-kernel void f(const constant UBO* tint_symbol_2 [[buffer(0)]], device Result* tint_symbol_3 [[buffer(1)]]) {
- thread S tint_symbol_1 = {};
- x(&(tint_symbol_1), tint_symbol_2);
- (*(tint_symbol_3)).out = tint_symbol_1.data[3];
+kernel void f(const constant UBO* tint_symbol_1 [[buffer(0)]], device Result* tint_symbol_2 [[buffer(1)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ x(&(tint_private_vars.s), tint_symbol_1);
+ (*(tint_symbol_2)).out = tint_private_vars.s.data[3];
return;
}
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.msl
index 4e4bb57..d599ebc 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.msl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.msl
@@ -1,14 +1,18 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 m1;
+};
+
struct Uniforms {
/* 0x0000 */ uint i;
/* 0x0004 */ uint j;
};
-kernel void tint_symbol(const constant Uniforms* tint_symbol_2 [[buffer(0)]]) {
- thread float2x4 tint_symbol_1 = float2x4(0.0f);
- tint_symbol_1[0][(*(tint_symbol_2)).j] = 1.0f;
+kernel void tint_symbol(const constant Uniforms* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.m1[0][(*(tint_symbol_1)).j] = 1.0f;
return;
}
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.msl
index 31c3003..236ea4b 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.msl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.msl
@@ -1,14 +1,18 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 m1;
+};
+
struct Uniforms {
/* 0x0000 */ uint i;
/* 0x0004 */ uint j;
};
-kernel void tint_symbol(const constant Uniforms* tint_symbol_2 [[buffer(0)]]) {
- thread float2x4 tint_symbol_1 = float2x4(0.0f);
- tint_symbol_1[(*(tint_symbol_2)).i][0] = 1.0f;
+kernel void tint_symbol(const constant Uniforms* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.m1[(*(tint_symbol_1)).i][0] = 1.0f;
return;
}
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.msl
index 7215cb0..41f85ae 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.msl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.msl
@@ -1,14 +1,18 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 m1;
+};
+
struct Uniforms {
/* 0x0000 */ uint i;
/* 0x0004 */ uint j;
};
-kernel void tint_symbol(const constant Uniforms* tint_symbol_2 [[buffer(0)]]) {
- thread float2x4 tint_symbol_1 = float2x4(0.0f);
- tint_symbol_1[(*(tint_symbol_2)).i][(*(tint_symbol_2)).j] = 1.0f;
+kernel void tint_symbol(const constant Uniforms* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.m1[(*(tint_symbol_1)).i][(*(tint_symbol_1)).j] = 1.0f;
return;
}
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.msl
index 4e4bb57..d599ebc 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.msl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.msl
@@ -1,14 +1,18 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 m1;
+};
+
struct Uniforms {
/* 0x0000 */ uint i;
/* 0x0004 */ uint j;
};
-kernel void tint_symbol(const constant Uniforms* tint_symbol_2 [[buffer(0)]]) {
- thread float2x4 tint_symbol_1 = float2x4(0.0f);
- tint_symbol_1[0][(*(tint_symbol_2)).j] = 1.0f;
+kernel void tint_symbol(const constant Uniforms* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.m1[0][(*(tint_symbol_1)).j] = 1.0f;
return;
}
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.msl
index 6c3bb03..fbdeeb9 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.msl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.msl
@@ -1,14 +1,18 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 m1;
+};
+
struct Uniforms {
/* 0x0000 */ uint i;
/* 0x0004 */ uint j;
};
-kernel void tint_symbol(const constant Uniforms* tint_symbol_2 [[buffer(0)]]) {
- thread float2x4 tint_symbol_1 = float2x4(0.0f);
- tint_symbol_1[(*(tint_symbol_2)).i] = float4(1.0f);
+kernel void tint_symbol(const constant Uniforms* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.m1[(*(tint_symbol_1)).i] = float4(1.0f);
return;
}
diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.msl b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.msl
index e30b1c1..91fd58a 100644
--- a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.msl
+++ b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.msl
@@ -1,22 +1,26 @@
#include <metal_stdlib>
using namespace metal;
-void foo() {
- thread float2 tint_symbol_1 = 0.0f;
- thread int3 tint_symbol_2 = 0;
- thread uint4 tint_symbol_3 = 0u;
- thread bool2 tint_symbol_4 = false;
+struct tint_private_vars_struct {
+ float2 v2f;
+ int3 v3i;
+ uint4 v4u;
+ bool2 v2b;
+};
+
+void foo(thread tint_private_vars_struct* const tint_private_vars) {
for(int i = 0; (i < 2); i = as_type<int>((as_type<uint>(i) + as_type<uint>(1)))) {
- tint_symbol_1[i] = 1.0f;
- tint_symbol_2[i] = 1;
- tint_symbol_3[i] = 1u;
- tint_symbol_4[i] = true;
+ (*(tint_private_vars)).v2f[i] = 1.0f;
+ (*(tint_private_vars)).v3i[i] = 1;
+ (*(tint_private_vars)).v4u[i] = 1u;
+ (*(tint_private_vars)).v2b[i] = true;
}
}
kernel void tint_symbol() {
+ thread tint_private_vars_struct tint_private_vars = {};
for(int i = 0; (i < 2); i = as_type<int>((as_type<uint>(i) + as_type<uint>(1)))) {
- foo();
+ foo(&(tint_private_vars));
}
return;
}
diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.msl b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.msl
index 920f566..1c06a5e 100644
--- a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.msl
+++ b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.msl
@@ -1,21 +1,25 @@
#include <metal_stdlib>
using namespace metal;
-void foo() {
- thread float2 tint_symbol_1 = 0.0f;
- thread int3 tint_symbol_2 = 0;
- thread uint4 tint_symbol_3 = 0u;
- thread bool2 tint_symbol_4 = false;
+struct tint_private_vars_struct {
+ float2 v2f;
+ int3 v3i;
+ uint4 v4u;
+ bool2 v2b;
+};
+
+void foo(thread tint_private_vars_struct* const tint_private_vars) {
int i = 0;
- tint_symbol_1[i] = 1.0f;
- tint_symbol_2[i] = 1;
- tint_symbol_3[i] = 1u;
- tint_symbol_4[i] = true;
+ (*(tint_private_vars)).v2f[i] = 1.0f;
+ (*(tint_private_vars)).v3i[i] = 1;
+ (*(tint_private_vars)).v4u[i] = 1u;
+ (*(tint_private_vars)).v2b[i] = true;
}
kernel void tint_symbol() {
+ thread tint_private_vars_struct tint_private_vars = {};
for(int i = 0; (i < 2); i = as_type<int>((as_type<uint>(i) + as_type<uint>(1)))) {
- foo();
+ foo(&(tint_private_vars));
}
return;
}
diff --git a/test/tint/bug/tint/1061.spvasm.expected.msl b/test/tint/bug/tint/1061.spvasm.expected.msl
index 2ef0acd..8563c71 100644
--- a/test/tint/bug/tint/1061.spvasm.expected.msl
+++ b/test/tint/bug/tint/1061.spvasm.expected.msl
@@ -1,11 +1,15 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 x_GLF_color;
+};
+
struct buf0 {
/* 0x0000 */ float4 r;
};
-void main_1(const constant buf0* const tint_symbol_3, thread float4* const tint_symbol_4) {
+void main_1(thread tint_private_vars_struct* const tint_private_vars, const constant buf0* const tint_symbol_3) {
float f = 0.0f;
float4 v = 0.0f;
f = 1.0f;
@@ -17,9 +21,9 @@
float4 const x_42 = v;
float4 const x_44 = (*(tint_symbol_3)).r;
if ((distance(x_42, x_44) < 0.10000000149011611938f)) {
- *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
+ (*(tint_private_vars)).x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
- *(tint_symbol_4) = float4(0.0f);
+ (*(tint_private_vars)).x_GLF_color = float4(0.0f);
}
return;
}
@@ -32,15 +36,15 @@
float4 x_GLF_color_1 [[color(0)]];
};
-main_out tint_symbol_inner(const constant buf0* const tint_symbol_5, thread float4* const tint_symbol_6) {
- main_1(tint_symbol_5, tint_symbol_6);
- main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_6)};
+main_out tint_symbol_inner(thread tint_private_vars_struct* const tint_private_vars, const constant buf0* const tint_symbol_4) {
+ main_1(tint_private_vars, tint_symbol_4);
+ main_out const tint_symbol_2 = {.x_GLF_color_1=(*(tint_private_vars)).x_GLF_color};
return tint_symbol_2;
}
-fragment tint_symbol_1 tint_symbol(const constant buf0* tint_symbol_7 [[buffer(0)]]) {
- thread float4 tint_symbol_8 = 0.0f;
- main_out const inner_result = tint_symbol_inner(tint_symbol_7, &(tint_symbol_8));
+fragment tint_symbol_1 tint_symbol(const constant buf0* tint_symbol_5 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ main_out const inner_result = tint_symbol_inner(&(tint_private_vars), tint_symbol_5);
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
diff --git a/test/tint/bug/tint/1081.wgsl.expected.msl b/test/tint/bug/tint/1081.wgsl.expected.msl
index 1194ebf..5b9ce54 100644
--- a/test/tint/bug/tint/1081.wgsl.expected.msl
+++ b/test/tint/bug/tint/1081.wgsl.expected.msl
@@ -1,9 +1,13 @@
#include <metal_stdlib>
using namespace metal;
-int f(int x, thread bool* const tint_symbol_4) {
+struct tint_private_vars_struct {
+ bool tint_discarded;
+};
+
+int f(int x, thread tint_private_vars_struct* const tint_private_vars) {
if ((x == 10)) {
- *(tint_symbol_4) = true;
+ (*(tint_private_vars)).tint_discarded = true;
}
return x;
}
@@ -16,10 +20,10 @@
int value [[color(2)]];
};
-int tint_symbol_inner(int3 x, thread bool* const tint_symbol_5) {
+int tint_symbol_inner(int3 x, thread tint_private_vars_struct* const tint_private_vars) {
int y = x[0];
while (true) {
- int const r = f(y, tint_symbol_5);
+ int const r = f(y, tint_private_vars);
if ((r == 0)) {
break;
}
@@ -28,11 +32,12 @@
}
fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
- thread bool tint_symbol_6 = false;
- int const inner_result = tint_symbol_inner(tint_symbol_1.x, &(tint_symbol_6));
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.tint_discarded = false;
+ int const inner_result = tint_symbol_inner(tint_symbol_1.x, &(tint_private_vars));
tint_symbol_3 wrapper_result = {};
wrapper_result.value = inner_result;
- if (tint_symbol_6) {
+ if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return wrapper_result;
diff --git a/test/tint/bug/tint/1086.wgsl.expected.msl b/test/tint/bug/tint/1086.wgsl.expected.msl
index 8ea0e89..52ba66b 100644
--- a/test/tint/bug/tint/1086.wgsl.expected.msl
+++ b/test/tint/bug/tint/1086.wgsl.expected.msl
@@ -1,17 +1,21 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float v;
+};
+
void x(thread float* const p) {
*(p) = 0.0f;
}
-void g() {
- thread float tint_symbol = 0.0f;
- x(&(tint_symbol));
+void g(thread tint_private_vars_struct* const tint_private_vars) {
+ x(&((*(tint_private_vars)).v));
}
fragment void f() {
- g();
+ thread tint_private_vars_struct tint_private_vars = {};
+ g(&(tint_private_vars));
return;
}
diff --git a/test/tint/bug/tint/1088.spvasm.expected.msl b/test/tint/bug/tint/1088.spvasm.expected.msl
index 2fc3f5f..cd127ac 100644
--- a/test/tint/bug/tint/1088.spvasm.expected.msl
+++ b/test/tint/bug/tint/1088.spvasm.expected.msl
@@ -14,6 +14,14 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ float3 position_1;
+ float2 vUV;
+ float2 uv;
+ float3 normal;
+ float4 gl_Position;
+};
+
struct strided_arr {
/* 0x0000 */ float el;
/* 0x0004 */ tint_array<int8_t, 12> tint_pad;
@@ -27,28 +35,28 @@
/* 0x00d0 */ tint_array<strided_arr, 4> test;
};
-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) {
+void main_1(thread tint_private_vars_struct* const tint_private_vars, const constant LeftOver* const tint_symbol_5) {
float4 q = 0.0f;
float3 p = 0.0f;
- float3 const x_13 = *(tint_symbol_5);
+ float3 const x_13 = (*(tint_private_vars)).position_1;
q = float4(x_13[0], x_13[1], x_13[2], 1.0f);
float4 const x_21 = q;
p = float3(x_21[0], x_21[1], x_21[2]);
float const x_27 = p[0];
- float const x_41 = (*(tint_symbol_6)).test[0].el;
- float const x_45 = (*(tint_symbol_5))[1];
- float const x_49 = (*(tint_symbol_6)).time;
+ float const x_41 = (*(tint_symbol_5)).test[0].el;
+ float const x_45 = (*(tint_private_vars)).position_1[1];
+ float const x_49 = (*(tint_symbol_5)).time;
p[0] = (x_27 + sin(((x_41 * x_45) + x_49)));
float const x_55 = p[1];
- float const x_57 = (*(tint_symbol_6)).time;
+ float const x_57 = (*(tint_symbol_5)).time;
p[1] = (x_55 + sin((x_57 + 4.0f)));
- float4x4 const x_69 = (*(tint_symbol_6)).worldViewProjection;
+ float4x4 const x_69 = (*(tint_symbol_5)).worldViewProjection;
float3 const x_70 = p;
- *(tint_symbol_7) = (x_69 * float4(x_70[0], x_70[1], x_70[2], 1.0f));
- float2 const x_83 = *(tint_symbol_8);
- *(tint_symbol_9) = x_83;
- float const x_87 = (*(tint_symbol_7))[1];
- (*(tint_symbol_7))[1] = (x_87 * -1.0f);
+ (*(tint_private_vars)).gl_Position = (x_69 * float4(x_70[0], x_70[1], x_70[2], 1.0f));
+ float2 const x_83 = (*(tint_private_vars)).uv;
+ (*(tint_private_vars)).vUV = x_83;
+ float const x_87 = (*(tint_private_vars)).gl_Position[1];
+ (*(tint_private_vars)).gl_Position[1] = (x_87 * -1.0f);
return;
}
@@ -68,22 +76,18 @@
float4 gl_Position [[position]];
};
-main_out tint_symbol_inner(float3 position_1_param, float2 uv_param, float3 normal_param, thread float3* const tint_symbol_10, thread float2* const tint_symbol_11, const constant LeftOver* const tint_symbol_13, thread float4* const tint_symbol_14, thread float2* const tint_symbol_15) {
- thread float3 tint_symbol_12 = 0.0f;
- *(tint_symbol_10) = position_1_param;
- *(tint_symbol_11) = uv_param;
- tint_symbol_12 = normal_param;
- 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_14), .vUV_1=*(tint_symbol_15)};
+main_out tint_symbol_inner(float3 position_1_param, float2 uv_param, float3 normal_param, thread tint_private_vars_struct* const tint_private_vars, const constant LeftOver* const tint_symbol_6) {
+ (*(tint_private_vars)).position_1 = position_1_param;
+ (*(tint_private_vars)).uv = uv_param;
+ (*(tint_private_vars)).normal = normal_param;
+ main_1(tint_private_vars, tint_symbol_6);
+ main_out const tint_symbol_4 = {.gl_Position=(*(tint_private_vars)).gl_Position, .vUV_1=(*(tint_private_vars)).vUV};
return tint_symbol_4;
}
-vertex tint_symbol_3 tint_symbol(const constant LeftOver* tint_symbol_18 [[buffer(0)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
- thread float3 tint_symbol_16 = 0.0f;
- thread float2 tint_symbol_17 = 0.0f;
- thread float4 tint_symbol_19 = 0.0f;
- thread float2 tint_symbol_20 = 0.0f;
- main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_1_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));
+vertex tint_symbol_3 tint_symbol(const constant LeftOver* tint_symbol_7 [[buffer(0)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ main_out const inner_result = tint_symbol_inner(tint_symbol_1.position_1_param, tint_symbol_1.uv_param, tint_symbol_1.normal_param, &(tint_private_vars), tint_symbol_7);
tint_symbol_3 wrapper_result = {};
wrapper_result.gl_Position = inner_result.gl_Position;
wrapper_result.vUV_1 = inner_result.vUV_1;
diff --git a/test/tint/bug/tint/1118.wgsl.expected.msl b/test/tint/bug/tint/1118.wgsl.expected.msl
index 2b4c8d4..f81aa50 100644
--- a/test/tint/bug/tint/1118.wgsl.expected.msl
+++ b/test/tint/bug/tint/1118.wgsl.expected.msl
@@ -1,6 +1,13 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool tint_discarded;
+ float fClipDistance3;
+ float fClipDistance4;
+ float4 glFragColor;
+};
+
struct Material_tint_packed_vec3 {
/* 0x0000 */ float4 vDiffuseColor;
/* 0x0010 */ packed_float3 vAmbientColor;
@@ -25,7 +32,7 @@
/* 0x0000 */ float visibility;
};
-void main_1(thread float* const tint_symbol_5, thread bool* const tint_symbol_6, thread float* const tint_symbol_7, const constant Scene* const tint_symbol_8, const constant Material_tint_packed_vec3* const tint_symbol_9, const constant Mesh* const tint_symbol_10, thread float4* const tint_symbol_11) {
+void main_1(thread tint_private_vars_struct* const tint_private_vars, const constant Scene* const tint_symbol_5, const constant Material_tint_packed_vec3* const tint_symbol_6, const constant Mesh* const tint_symbol_7) {
float3 viewDirectionW = 0.0f;
float4 baseColor = 0.0f;
float3 diffuseColor = 0.0f;
@@ -42,21 +49,21 @@
float3 finalDiffuse = 0.0f;
float3 finalSpecular = 0.0f;
float4 color = 0.0f;
- float const x_9 = *(tint_symbol_5);
+ float const x_9 = (*(tint_private_vars)).fClipDistance3;
if ((x_9 > 0.0f)) {
- *(tint_symbol_6) = true;
+ (*(tint_private_vars)).tint_discarded = true;
}
- float const x_17 = *(tint_symbol_7);
+ float const x_17 = (*(tint_private_vars)).fClipDistance4;
if ((x_17 > 0.0f)) {
- *(tint_symbol_6) = true;
+ (*(tint_private_vars)).tint_discarded = true;
}
- float4 const x_34 = (*(tint_symbol_8)).vEyePosition;
+ float4 const x_34 = (*(tint_symbol_5)).vEyePosition;
float3 const x_38 = float3(0.0f);
viewDirectionW = normalize((float3(x_34[0], x_34[1], x_34[2]) - x_38));
baseColor = float4(1.0f);
- float4 const x_52 = (*(tint_symbol_9)).vDiffuseColor;
+ float4 const x_52 = (*(tint_symbol_6)).vDiffuseColor;
diffuseColor = float3(x_52[0], x_52[1], x_52[2]);
- float const x_60 = (*(tint_symbol_9)).vDiffuseColor[3];
+ float const x_60 = (*(tint_symbol_6)).vDiffuseColor[3];
alpha = x_60;
float3 const x_62 = float3(0.0f);
float3 const x_64 = float3(0.0f);
@@ -72,12 +79,12 @@
shadow = 1.0f;
refractionColor = float4(0.0f, 0.0f, 0.0f, 1.0f);
reflectionColor = float4(0.0f, 0.0f, 0.0f, 1.0f);
- float3 const x_94 = float3((*(tint_symbol_9)).vEmissiveColor);
+ float3 const x_94 = float3((*(tint_symbol_6)).vEmissiveColor);
emissiveColor = x_94;
float3 const x_96 = diffuseBase;
float3 const x_97 = diffuseColor;
float3 const x_99 = emissiveColor;
- float3 const x_103 = float3((*(tint_symbol_9)).vAmbientColor);
+ float3 const x_103 = float3((*(tint_symbol_6)).vAmbientColor);
float4 const x_108 = baseColor;
finalDiffuse = (clamp((((x_96 * x_97) + x_99) + x_103), float3(0.0f), float3(1.0f)) * float3(x_108[0], x_108[1], x_108[2]));
finalSpecular = float3(0.0f);
@@ -93,11 +100,11 @@
float3 const x_132 = fmax(float3(x_129[0], x_129[1], x_129[2]), float3(0.0f));
float4 const x_133 = color;
color = float4(x_132[0], x_132[1], x_132[2], x_133[3]);
- float const x_140 = (*(tint_symbol_10)).visibility;
+ float const x_140 = (*(tint_symbol_7)).visibility;
float const x_142 = color[3];
color[3] = (x_142 * x_140);
float4 const x_147 = color;
- *(tint_symbol_11) = x_147;
+ (*(tint_private_vars)).glFragColor = x_147;
return;
}
@@ -114,23 +121,21 @@
float4 glFragColor_1 [[color(0)]];
};
-main_out tint_symbol_inner(float fClipDistance3_param, float fClipDistance4_param, thread float* const tint_symbol_12, thread float* const tint_symbol_13, thread bool* const tint_symbol_14, const constant Scene* const tint_symbol_15, const constant Material_tint_packed_vec3* const tint_symbol_16, const constant Mesh* const tint_symbol_17, thread float4* const tint_symbol_18) {
- *(tint_symbol_12) = fClipDistance3_param;
- *(tint_symbol_13) = fClipDistance4_param;
- main_1(tint_symbol_12, tint_symbol_14, tint_symbol_13, tint_symbol_15, tint_symbol_16, tint_symbol_17, tint_symbol_18);
- main_out const tint_symbol_4 = {.glFragColor_1=*(tint_symbol_18)};
+main_out tint_symbol_inner(float fClipDistance3_param, float fClipDistance4_param, thread tint_private_vars_struct* const tint_private_vars, const constant Scene* const tint_symbol_8, const constant Material_tint_packed_vec3* const tint_symbol_9, const constant Mesh* const tint_symbol_10) {
+ (*(tint_private_vars)).fClipDistance3 = fClipDistance3_param;
+ (*(tint_private_vars)).fClipDistance4 = fClipDistance4_param;
+ main_1(tint_private_vars, tint_symbol_8, tint_symbol_9, tint_symbol_10);
+ main_out const tint_symbol_4 = {.glFragColor_1=(*(tint_private_vars)).glFragColor};
return tint_symbol_4;
}
-fragment tint_symbol_3 tint_symbol(const constant Scene* tint_symbol_22 [[buffer(0)]], const constant Material_tint_packed_vec3* tint_symbol_23 [[buffer(1)]], const constant Mesh* tint_symbol_24 [[buffer(2)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
- thread float tint_symbol_19 = 0.0f;
- thread float tint_symbol_20 = 0.0f;
- thread bool tint_symbol_21 = false;
- thread float4 tint_symbol_25 = 0.0f;
- main_out const inner_result = tint_symbol_inner(tint_symbol_1.fClipDistance3_param, tint_symbol_1.fClipDistance4_param, &(tint_symbol_19), &(tint_symbol_20), &(tint_symbol_21), tint_symbol_22, tint_symbol_23, tint_symbol_24, &(tint_symbol_25));
+fragment tint_symbol_3 tint_symbol(const constant Scene* tint_symbol_11 [[buffer(0)]], const constant Material_tint_packed_vec3* tint_symbol_12 [[buffer(1)]], const constant Mesh* tint_symbol_13 [[buffer(2)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.tint_discarded = false;
+ main_out const inner_result = tint_symbol_inner(tint_symbol_1.fClipDistance3_param, tint_symbol_1.fClipDistance4_param, &(tint_private_vars), tint_symbol_11, tint_symbol_12, tint_symbol_13);
tint_symbol_3 wrapper_result = {};
wrapper_result.glFragColor_1 = inner_result.glFragColor_1;
- if (tint_symbol_21) {
+ if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return wrapper_result;
diff --git a/test/tint/bug/tint/1369.wgsl.expected.msl b/test/tint/bug/tint/1369.wgsl.expected.msl
index 8793220..516228f 100644
--- a/test/tint/bug/tint/1369.wgsl.expected.msl
+++ b/test/tint/bug/tint/1369.wgsl.expected.msl
@@ -1,16 +1,21 @@
#include <metal_stdlib>
using namespace metal;
-bool call_discard(thread bool* const tint_symbol) {
- *(tint_symbol) = true;
+struct tint_private_vars_struct {
+ bool tint_discarded;
+};
+
+bool call_discard(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).tint_discarded = true;
return true;
}
fragment void f() {
- thread bool tint_symbol_1 = false;
- bool v = call_discard(&(tint_symbol_1));
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.tint_discarded = false;
+ bool v = call_discard(&(tint_private_vars));
bool also_unreachable = false;
- if (tint_symbol_1) {
+ if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return;
diff --git a/test/tint/bug/tint/1509.wgsl.expected.msl b/test/tint/bug/tint/1509.wgsl.expected.msl
index 6578403..0bcc2a4 100644
--- a/test/tint/bug/tint/1509.wgsl.expected.msl
+++ b/test/tint/bug/tint/1509.wgsl.expected.msl
@@ -1,2008 +1,2011 @@
#include <metal_stdlib>
using namespace metal;
-uint foo() {
- thread uint tint_symbol_2 = 0u;
- thread uint tint_symbol_3 = 0u;
- thread uint tint_symbol_4 = 0u;
- thread uint tint_symbol_5 = 0u;
- thread uint tint_symbol_6 = 0u;
- thread uint tint_symbol_7 = 0u;
- thread uint tint_symbol_8 = 0u;
- thread uint tint_symbol_9 = 0u;
- thread uint tint_symbol_10 = 0u;
- thread uint tint_symbol_11 = 0u;
- thread uint tint_symbol_12 = 0u;
- thread uint tint_symbol_13 = 0u;
- thread uint tint_symbol_14 = 0u;
- thread uint tint_symbol_15 = 0u;
- thread uint tint_symbol_16 = 0u;
- thread uint tint_symbol_17 = 0u;
- thread uint tint_symbol_18 = 0u;
- thread uint tint_symbol_19 = 0u;
- thread uint tint_symbol_20 = 0u;
- thread uint tint_symbol_21 = 0u;
- thread uint tint_symbol_22 = 0u;
- thread uint tint_symbol_23 = 0u;
- thread uint tint_symbol_24 = 0u;
- thread uint tint_symbol_25 = 0u;
- thread uint tint_symbol_26 = 0u;
- thread uint tint_symbol_27 = 0u;
- thread uint tint_symbol_28 = 0u;
- thread uint tint_symbol_29 = 0u;
- thread uint tint_symbol_30 = 0u;
- thread uint tint_symbol_31 = 0u;
- thread uint tint_symbol_32 = 0u;
- thread uint tint_symbol_33 = 0u;
- thread uint tint_symbol_34 = 0u;
- thread uint tint_symbol_35 = 0u;
- thread uint tint_symbol_36 = 0u;
- thread uint tint_symbol_37 = 0u;
- thread uint tint_symbol_38 = 0u;
- thread uint tint_symbol_39 = 0u;
- thread uint tint_symbol_40 = 0u;
- thread uint tint_symbol_41 = 0u;
- thread uint tint_symbol_42 = 0u;
- thread uint tint_symbol_43 = 0u;
- thread uint tint_symbol_44 = 0u;
- thread uint tint_symbol_45 = 0u;
- thread uint tint_symbol_46 = 0u;
- thread uint tint_symbol_47 = 0u;
- thread uint tint_symbol_48 = 0u;
- thread uint tint_symbol_49 = 0u;
- thread uint tint_symbol_50 = 0u;
- thread uint tint_symbol_51 = 0u;
- thread uint tint_symbol_52 = 0u;
- thread uint tint_symbol_53 = 0u;
- thread uint tint_symbol_54 = 0u;
- thread uint tint_symbol_55 = 0u;
- thread uint tint_symbol_56 = 0u;
- thread uint tint_symbol_57 = 0u;
- thread uint tint_symbol_58 = 0u;
- thread uint tint_symbol_59 = 0u;
- thread uint tint_symbol_60 = 0u;
- thread uint tint_symbol_61 = 0u;
- thread uint tint_symbol_62 = 0u;
- thread uint tint_symbol_63 = 0u;
- thread uint tint_symbol_64 = 0u;
- thread uint tint_symbol_65 = 0u;
- thread uint tint_symbol_66 = 0u;
- thread uint tint_symbol_67 = 0u;
- thread uint tint_symbol_68 = 0u;
- thread uint tint_symbol_69 = 0u;
- thread uint tint_symbol_70 = 0u;
- thread uint tint_symbol_71 = 0u;
- thread uint tint_symbol_72 = 0u;
- thread uint tint_symbol_73 = 0u;
- thread uint tint_symbol_74 = 0u;
- thread uint tint_symbol_75 = 0u;
- thread uint tint_symbol_76 = 0u;
- thread uint tint_symbol_77 = 0u;
- thread uint tint_symbol_78 = 0u;
- thread uint tint_symbol_79 = 0u;
- thread uint tint_symbol_80 = 0u;
- thread uint tint_symbol_81 = 0u;
- thread uint tint_symbol_82 = 0u;
- thread uint tint_symbol_83 = 0u;
- thread uint tint_symbol_84 = 0u;
- thread uint tint_symbol_85 = 0u;
- thread uint tint_symbol_86 = 0u;
- thread uint tint_symbol_87 = 0u;
- thread uint tint_symbol_88 = 0u;
- thread uint tint_symbol_89 = 0u;
- thread uint tint_symbol_90 = 0u;
- thread uint tint_symbol_91 = 0u;
- thread uint tint_symbol_92 = 0u;
- thread uint tint_symbol_93 = 0u;
- thread uint tint_symbol_94 = 0u;
- thread uint tint_symbol_95 = 0u;
- thread uint tint_symbol_96 = 0u;
- thread uint tint_symbol_97 = 0u;
- thread uint tint_symbol_98 = 0u;
- thread uint tint_symbol_99 = 0u;
- thread uint tint_symbol_100 = 0u;
- thread uint tint_symbol_101 = 0u;
- thread uint tint_symbol_102 = 0u;
- thread uint tint_symbol_103 = 0u;
- thread uint tint_symbol_104 = 0u;
- thread uint tint_symbol_105 = 0u;
- thread uint tint_symbol_106 = 0u;
- thread uint tint_symbol_107 = 0u;
- thread uint tint_symbol_108 = 0u;
- thread uint tint_symbol_109 = 0u;
- thread uint tint_symbol_110 = 0u;
- thread uint tint_symbol_111 = 0u;
- thread uint tint_symbol_112 = 0u;
- thread uint tint_symbol_113 = 0u;
- thread uint tint_symbol_114 = 0u;
- thread uint tint_symbol_115 = 0u;
- thread uint tint_symbol_116 = 0u;
- thread uint tint_symbol_117 = 0u;
- thread uint tint_symbol_118 = 0u;
- thread uint tint_symbol_119 = 0u;
- thread uint tint_symbol_120 = 0u;
- thread uint tint_symbol_121 = 0u;
- thread uint tint_symbol_122 = 0u;
- thread uint tint_symbol_123 = 0u;
- thread uint tint_symbol_124 = 0u;
- thread uint tint_symbol_125 = 0u;
- thread uint tint_symbol_126 = 0u;
- thread uint tint_symbol_127 = 0u;
- thread uint tint_symbol_128 = 0u;
- thread uint tint_symbol_129 = 0u;
- thread uint tint_symbol_130 = 0u;
- thread uint tint_symbol_131 = 0u;
- thread uint tint_symbol_132 = 0u;
- thread uint tint_symbol_133 = 0u;
- thread uint tint_symbol_134 = 0u;
- thread uint tint_symbol_135 = 0u;
- thread uint tint_symbol_136 = 0u;
- thread uint tint_symbol_137 = 0u;
- thread uint tint_symbol_138 = 0u;
- thread uint tint_symbol_139 = 0u;
- thread uint tint_symbol_140 = 0u;
- thread uint tint_symbol_141 = 0u;
- thread uint tint_symbol_142 = 0u;
- thread uint tint_symbol_143 = 0u;
- thread uint tint_symbol_144 = 0u;
- thread uint tint_symbol_145 = 0u;
- thread uint tint_symbol_146 = 0u;
- thread uint tint_symbol_147 = 0u;
- thread uint tint_symbol_148 = 0u;
- thread uint tint_symbol_149 = 0u;
- thread uint tint_symbol_150 = 0u;
- thread uint tint_symbol_151 = 0u;
- thread uint tint_symbol_152 = 0u;
- thread uint tint_symbol_153 = 0u;
- thread uint tint_symbol_154 = 0u;
- thread uint tint_symbol_155 = 0u;
- thread uint tint_symbol_156 = 0u;
- thread uint tint_symbol_157 = 0u;
- thread uint tint_symbol_158 = 0u;
- thread uint tint_symbol_159 = 0u;
- thread uint tint_symbol_160 = 0u;
- thread uint tint_symbol_161 = 0u;
- thread uint tint_symbol_162 = 0u;
- thread uint tint_symbol_163 = 0u;
- thread uint tint_symbol_164 = 0u;
- thread uint tint_symbol_165 = 0u;
- thread uint tint_symbol_166 = 0u;
- thread uint tint_symbol_167 = 0u;
- thread uint tint_symbol_168 = 0u;
- thread uint tint_symbol_169 = 0u;
- thread uint tint_symbol_170 = 0u;
- thread uint tint_symbol_171 = 0u;
- thread uint tint_symbol_172 = 0u;
- thread uint tint_symbol_173 = 0u;
- thread uint tint_symbol_174 = 0u;
- thread uint tint_symbol_175 = 0u;
- thread uint tint_symbol_176 = 0u;
- thread uint tint_symbol_177 = 0u;
- thread uint tint_symbol_178 = 0u;
- thread uint tint_symbol_179 = 0u;
- thread uint tint_symbol_180 = 0u;
- thread uint tint_symbol_181 = 0u;
- thread uint tint_symbol_182 = 0u;
- thread uint tint_symbol_183 = 0u;
- thread uint tint_symbol_184 = 0u;
- thread uint tint_symbol_185 = 0u;
- thread uint tint_symbol_186 = 0u;
- thread uint tint_symbol_187 = 0u;
- thread uint tint_symbol_188 = 0u;
- thread uint tint_symbol_189 = 0u;
- thread uint tint_symbol_190 = 0u;
- thread uint tint_symbol_191 = 0u;
- thread uint tint_symbol_192 = 0u;
- thread uint tint_symbol_193 = 0u;
- thread uint tint_symbol_194 = 0u;
- thread uint tint_symbol_195 = 0u;
- thread uint tint_symbol_196 = 0u;
- thread uint tint_symbol_197 = 0u;
- thread uint tint_symbol_198 = 0u;
- thread uint tint_symbol_199 = 0u;
- thread uint tint_symbol_200 = 0u;
- thread uint tint_symbol_201 = 0u;
- thread uint tint_symbol_202 = 0u;
- thread uint tint_symbol_203 = 0u;
- thread uint tint_symbol_204 = 0u;
- thread uint tint_symbol_205 = 0u;
- thread uint tint_symbol_206 = 0u;
- thread uint tint_symbol_207 = 0u;
- thread uint tint_symbol_208 = 0u;
- thread uint tint_symbol_209 = 0u;
- thread uint tint_symbol_210 = 0u;
- thread uint tint_symbol_211 = 0u;
- thread uint tint_symbol_212 = 0u;
- thread uint tint_symbol_213 = 0u;
- thread uint tint_symbol_214 = 0u;
- thread uint tint_symbol_215 = 0u;
- thread uint tint_symbol_216 = 0u;
- thread uint tint_symbol_217 = 0u;
- thread uint tint_symbol_218 = 0u;
- thread uint tint_symbol_219 = 0u;
- thread uint tint_symbol_220 = 0u;
- thread uint tint_symbol_221 = 0u;
- thread uint tint_symbol_222 = 0u;
- thread uint tint_symbol_223 = 0u;
- thread uint tint_symbol_224 = 0u;
- thread uint tint_symbol_225 = 0u;
- thread uint tint_symbol_226 = 0u;
- thread uint tint_symbol_227 = 0u;
- thread uint tint_symbol_228 = 0u;
- thread uint tint_symbol_229 = 0u;
- thread uint tint_symbol_230 = 0u;
- thread uint tint_symbol_231 = 0u;
- thread uint tint_symbol_232 = 0u;
- thread uint tint_symbol_233 = 0u;
- thread uint tint_symbol_234 = 0u;
- thread uint tint_symbol_235 = 0u;
- thread uint tint_symbol_236 = 0u;
- thread uint tint_symbol_237 = 0u;
- thread uint tint_symbol_238 = 0u;
- thread uint tint_symbol_239 = 0u;
- thread uint tint_symbol_240 = 0u;
- thread uint tint_symbol_241 = 0u;
- thread uint tint_symbol_242 = 0u;
- thread uint tint_symbol_243 = 0u;
- thread uint tint_symbol_244 = 0u;
- thread uint tint_symbol_245 = 0u;
- thread uint tint_symbol_246 = 0u;
- thread uint tint_symbol_247 = 0u;
- thread uint tint_symbol_248 = 0u;
- thread uint tint_symbol_249 = 0u;
- thread uint tint_symbol_250 = 0u;
- thread uint tint_symbol_251 = 0u;
- thread uint tint_symbol_252 = 0u;
- thread uint tint_symbol_253 = 0u;
- thread uint tint_symbol_254 = 0u;
- thread uint tint_symbol_255 = 0u;
- thread uint tint_symbol_256 = 0u;
- thread uint tint_symbol_257 = 0u;
- thread uint tint_symbol_258 = 0u;
- thread uint tint_symbol_259 = 0u;
- thread uint tint_symbol_260 = 0u;
- thread uint tint_symbol_261 = 0u;
- thread uint tint_symbol_262 = 0u;
- thread uint tint_symbol_263 = 0u;
- thread uint tint_symbol_264 = 0u;
- thread uint tint_symbol_265 = 0u;
- thread uint tint_symbol_266 = 0u;
- thread uint tint_symbol_267 = 0u;
- thread uint tint_symbol_268 = 0u;
- thread uint tint_symbol_269 = 0u;
- thread uint tint_symbol_270 = 0u;
- thread uint tint_symbol_271 = 0u;
- thread uint tint_symbol_272 = 0u;
- thread uint tint_symbol_273 = 0u;
- thread uint tint_symbol_274 = 0u;
- thread uint tint_symbol_275 = 0u;
- thread uint tint_symbol_276 = 0u;
- thread uint tint_symbol_277 = 0u;
- thread uint tint_symbol_278 = 0u;
- thread uint tint_symbol_279 = 0u;
- thread uint tint_symbol_280 = 0u;
- thread uint tint_symbol_281 = 0u;
- thread uint tint_symbol_282 = 0u;
- thread uint tint_symbol_283 = 0u;
- thread uint tint_symbol_284 = 0u;
- thread uint tint_symbol_285 = 0u;
- thread uint tint_symbol_286 = 0u;
- thread uint tint_symbol_287 = 0u;
- thread uint tint_symbol_288 = 0u;
- thread uint tint_symbol_289 = 0u;
- thread uint tint_symbol_290 = 0u;
- thread uint tint_symbol_291 = 0u;
- thread uint tint_symbol_292 = 0u;
- thread uint tint_symbol_293 = 0u;
- thread uint tint_symbol_294 = 0u;
- thread uint tint_symbol_295 = 0u;
- thread uint tint_symbol_296 = 0u;
- thread uint tint_symbol_297 = 0u;
- thread uint tint_symbol_298 = 0u;
- thread uint tint_symbol_299 = 0u;
- thread uint tint_symbol_300 = 0u;
- thread uint tint_symbol_301 = 0u;
- thread uint tint_symbol_302 = 0u;
- thread uint tint_symbol_303 = 0u;
- thread uint tint_symbol_304 = 0u;
- thread uint tint_symbol_305 = 0u;
- thread uint tint_symbol_306 = 0u;
- thread uint tint_symbol_307 = 0u;
- thread uint tint_symbol_308 = 0u;
- thread uint tint_symbol_309 = 0u;
- thread uint tint_symbol_310 = 0u;
- thread uint tint_symbol_311 = 0u;
- thread uint tint_symbol_312 = 0u;
- thread uint tint_symbol_313 = 0u;
- thread uint tint_symbol_314 = 0u;
- thread uint tint_symbol_315 = 0u;
- thread uint tint_symbol_316 = 0u;
- thread uint tint_symbol_317 = 0u;
- thread uint tint_symbol_318 = 0u;
- thread uint tint_symbol_319 = 0u;
- thread uint tint_symbol_320 = 0u;
- thread uint tint_symbol_321 = 0u;
- thread uint tint_symbol_322 = 0u;
- thread uint tint_symbol_323 = 0u;
- thread uint tint_symbol_324 = 0u;
- thread uint tint_symbol_325 = 0u;
- thread uint tint_symbol_326 = 0u;
- thread uint tint_symbol_327 = 0u;
- thread uint tint_symbol_328 = 0u;
- thread uint tint_symbol_329 = 0u;
- thread uint tint_symbol_330 = 0u;
- thread uint tint_symbol_331 = 0u;
- thread uint tint_symbol_332 = 0u;
- thread uint tint_symbol_333 = 0u;
- thread uint tint_symbol_334 = 0u;
- thread uint tint_symbol_335 = 0u;
- thread uint tint_symbol_336 = 0u;
- thread uint tint_symbol_337 = 0u;
- thread uint tint_symbol_338 = 0u;
- thread uint tint_symbol_339 = 0u;
- thread uint tint_symbol_340 = 0u;
- thread uint tint_symbol_341 = 0u;
- thread uint tint_symbol_342 = 0u;
- thread uint tint_symbol_343 = 0u;
- thread uint tint_symbol_344 = 0u;
- thread uint tint_symbol_345 = 0u;
- thread uint tint_symbol_346 = 0u;
- thread uint tint_symbol_347 = 0u;
- thread uint tint_symbol_348 = 0u;
- thread uint tint_symbol_349 = 0u;
- thread uint tint_symbol_350 = 0u;
- thread uint tint_symbol_351 = 0u;
- thread uint tint_symbol_352 = 0u;
- thread uint tint_symbol_353 = 0u;
- thread uint tint_symbol_354 = 0u;
- thread uint tint_symbol_355 = 0u;
- thread uint tint_symbol_356 = 0u;
- thread uint tint_symbol_357 = 0u;
- thread uint tint_symbol_358 = 0u;
- thread uint tint_symbol_359 = 0u;
- thread uint tint_symbol_360 = 0u;
- thread uint tint_symbol_361 = 0u;
- thread uint tint_symbol_362 = 0u;
- thread uint tint_symbol_363 = 0u;
- thread uint tint_symbol_364 = 0u;
- thread uint tint_symbol_365 = 0u;
- thread uint tint_symbol_366 = 0u;
- thread uint tint_symbol_367 = 0u;
- thread uint tint_symbol_368 = 0u;
- thread uint tint_symbol_369 = 0u;
- thread uint tint_symbol_370 = 0u;
- thread uint tint_symbol_371 = 0u;
- thread uint tint_symbol_372 = 0u;
- thread uint tint_symbol_373 = 0u;
- thread uint tint_symbol_374 = 0u;
- thread uint tint_symbol_375 = 0u;
- thread uint tint_symbol_376 = 0u;
- thread uint tint_symbol_377 = 0u;
- thread uint tint_symbol_378 = 0u;
- thread uint tint_symbol_379 = 0u;
- thread uint tint_symbol_380 = 0u;
- thread uint tint_symbol_381 = 0u;
- thread uint tint_symbol_382 = 0u;
- thread uint tint_symbol_383 = 0u;
- thread uint tint_symbol_384 = 0u;
- thread uint tint_symbol_385 = 0u;
- thread uint tint_symbol_386 = 0u;
- thread uint tint_symbol_387 = 0u;
- thread uint tint_symbol_388 = 0u;
- thread uint tint_symbol_389 = 0u;
- thread uint tint_symbol_390 = 0u;
- thread uint tint_symbol_391 = 0u;
- thread uint tint_symbol_392 = 0u;
- thread uint tint_symbol_393 = 0u;
- thread uint tint_symbol_394 = 0u;
- thread uint tint_symbol_395 = 0u;
- thread uint tint_symbol_396 = 0u;
- thread uint tint_symbol_397 = 0u;
- thread uint tint_symbol_398 = 0u;
- thread uint tint_symbol_399 = 0u;
- thread uint tint_symbol_400 = 0u;
- thread uint tint_symbol_401 = 0u;
- thread uint tint_symbol_402 = 0u;
- thread uint tint_symbol_403 = 0u;
- thread uint tint_symbol_404 = 0u;
- thread uint tint_symbol_405 = 0u;
- thread uint tint_symbol_406 = 0u;
- thread uint tint_symbol_407 = 0u;
- thread uint tint_symbol_408 = 0u;
- thread uint tint_symbol_409 = 0u;
- thread uint tint_symbol_410 = 0u;
- thread uint tint_symbol_411 = 0u;
- thread uint tint_symbol_412 = 0u;
- thread uint tint_symbol_413 = 0u;
- thread uint tint_symbol_414 = 0u;
- thread uint tint_symbol_415 = 0u;
- thread uint tint_symbol_416 = 0u;
- thread uint tint_symbol_417 = 0u;
- thread uint tint_symbol_418 = 0u;
- thread uint tint_symbol_419 = 0u;
- thread uint tint_symbol_420 = 0u;
- thread uint tint_symbol_421 = 0u;
- thread uint tint_symbol_422 = 0u;
- thread uint tint_symbol_423 = 0u;
- thread uint tint_symbol_424 = 0u;
- thread uint tint_symbol_425 = 0u;
- thread uint tint_symbol_426 = 0u;
- thread uint tint_symbol_427 = 0u;
- thread uint tint_symbol_428 = 0u;
- thread uint tint_symbol_429 = 0u;
- thread uint tint_symbol_430 = 0u;
- thread uint tint_symbol_431 = 0u;
- thread uint tint_symbol_432 = 0u;
- thread uint tint_symbol_433 = 0u;
- thread uint tint_symbol_434 = 0u;
- thread uint tint_symbol_435 = 0u;
- thread uint tint_symbol_436 = 0u;
- thread uint tint_symbol_437 = 0u;
- thread uint tint_symbol_438 = 0u;
- thread uint tint_symbol_439 = 0u;
- thread uint tint_symbol_440 = 0u;
- thread uint tint_symbol_441 = 0u;
- thread uint tint_symbol_442 = 0u;
- thread uint tint_symbol_443 = 0u;
- thread uint tint_symbol_444 = 0u;
- thread uint tint_symbol_445 = 0u;
- thread uint tint_symbol_446 = 0u;
- thread uint tint_symbol_447 = 0u;
- thread uint tint_symbol_448 = 0u;
- thread uint tint_symbol_449 = 0u;
- thread uint tint_symbol_450 = 0u;
- thread uint tint_symbol_451 = 0u;
- thread uint tint_symbol_452 = 0u;
- thread uint tint_symbol_453 = 0u;
- thread uint tint_symbol_454 = 0u;
- thread uint tint_symbol_455 = 0u;
- thread uint tint_symbol_456 = 0u;
- thread uint tint_symbol_457 = 0u;
- thread uint tint_symbol_458 = 0u;
- thread uint tint_symbol_459 = 0u;
- thread uint tint_symbol_460 = 0u;
- thread uint tint_symbol_461 = 0u;
- thread uint tint_symbol_462 = 0u;
- thread uint tint_symbol_463 = 0u;
- thread uint tint_symbol_464 = 0u;
- thread uint tint_symbol_465 = 0u;
- thread uint tint_symbol_466 = 0u;
- thread uint tint_symbol_467 = 0u;
- thread uint tint_symbol_468 = 0u;
- thread uint tint_symbol_469 = 0u;
- thread uint tint_symbol_470 = 0u;
- thread uint tint_symbol_471 = 0u;
- thread uint tint_symbol_472 = 0u;
- thread uint tint_symbol_473 = 0u;
- thread uint tint_symbol_474 = 0u;
- thread uint tint_symbol_475 = 0u;
- thread uint tint_symbol_476 = 0u;
- thread uint tint_symbol_477 = 0u;
- thread uint tint_symbol_478 = 0u;
- thread uint tint_symbol_479 = 0u;
- thread uint tint_symbol_480 = 0u;
- thread uint tint_symbol_481 = 0u;
- thread uint tint_symbol_482 = 0u;
- thread uint tint_symbol_483 = 0u;
- thread uint tint_symbol_484 = 0u;
- thread uint tint_symbol_485 = 0u;
- thread uint tint_symbol_486 = 0u;
- thread uint tint_symbol_487 = 0u;
- thread uint tint_symbol_488 = 0u;
- thread uint tint_symbol_489 = 0u;
- thread uint tint_symbol_490 = 0u;
- thread uint tint_symbol_491 = 0u;
- thread uint tint_symbol_492 = 0u;
- thread uint tint_symbol_493 = 0u;
- thread uint tint_symbol_494 = 0u;
- thread uint tint_symbol_495 = 0u;
- thread uint tint_symbol_496 = 0u;
- thread uint tint_symbol_497 = 0u;
- thread uint tint_symbol_498 = 0u;
- thread uint tint_symbol_499 = 0u;
- thread uint tint_symbol_500 = 0u;
- thread uint tint_symbol_501 = 0u;
- thread uint tint_symbol_502 = 0u;
- thread uint tint_symbol_503 = 0u;
- thread uint tint_symbol_504 = 0u;
- thread uint tint_symbol_505 = 0u;
- thread uint tint_symbol_506 = 0u;
- thread uint tint_symbol_507 = 0u;
- thread uint tint_symbol_508 = 0u;
- thread uint tint_symbol_509 = 0u;
- thread uint tint_symbol_510 = 0u;
- thread uint tint_symbol_511 = 0u;
- thread uint tint_symbol_512 = 0u;
- thread uint tint_symbol_513 = 0u;
- thread uint tint_symbol_514 = 0u;
- thread uint tint_symbol_515 = 0u;
- thread uint tint_symbol_516 = 0u;
- thread uint tint_symbol_517 = 0u;
- thread uint tint_symbol_518 = 0u;
- thread uint tint_symbol_519 = 0u;
- thread uint tint_symbol_520 = 0u;
- thread uint tint_symbol_521 = 0u;
- thread uint tint_symbol_522 = 0u;
- thread uint tint_symbol_523 = 0u;
- thread uint tint_symbol_524 = 0u;
- thread uint tint_symbol_525 = 0u;
- thread uint tint_symbol_526 = 0u;
- thread uint tint_symbol_527 = 0u;
- thread uint tint_symbol_528 = 0u;
- thread uint tint_symbol_529 = 0u;
- thread uint tint_symbol_530 = 0u;
- thread uint tint_symbol_531 = 0u;
- thread uint tint_symbol_532 = 0u;
- thread uint tint_symbol_533 = 0u;
- thread uint tint_symbol_534 = 0u;
- thread uint tint_symbol_535 = 0u;
- thread uint tint_symbol_536 = 0u;
- thread uint tint_symbol_537 = 0u;
- thread uint tint_symbol_538 = 0u;
- thread uint tint_symbol_539 = 0u;
- thread uint tint_symbol_540 = 0u;
- thread uint tint_symbol_541 = 0u;
- thread uint tint_symbol_542 = 0u;
- thread uint tint_symbol_543 = 0u;
- thread uint tint_symbol_544 = 0u;
- thread uint tint_symbol_545 = 0u;
- thread uint tint_symbol_546 = 0u;
- thread uint tint_symbol_547 = 0u;
- thread uint tint_symbol_548 = 0u;
- thread uint tint_symbol_549 = 0u;
- thread uint tint_symbol_550 = 0u;
- thread uint tint_symbol_551 = 0u;
- thread uint tint_symbol_552 = 0u;
- thread uint tint_symbol_553 = 0u;
- thread uint tint_symbol_554 = 0u;
- thread uint tint_symbol_555 = 0u;
- thread uint tint_symbol_556 = 0u;
- thread uint tint_symbol_557 = 0u;
- thread uint tint_symbol_558 = 0u;
- thread uint tint_symbol_559 = 0u;
- thread uint tint_symbol_560 = 0u;
- thread uint tint_symbol_561 = 0u;
- thread uint tint_symbol_562 = 0u;
- thread uint tint_symbol_563 = 0u;
- thread uint tint_symbol_564 = 0u;
- thread uint tint_symbol_565 = 0u;
- thread uint tint_symbol_566 = 0u;
- thread uint tint_symbol_567 = 0u;
- thread uint tint_symbol_568 = 0u;
- thread uint tint_symbol_569 = 0u;
- thread uint tint_symbol_570 = 0u;
- thread uint tint_symbol_571 = 0u;
- thread uint tint_symbol_572 = 0u;
- thread uint tint_symbol_573 = 0u;
- thread uint tint_symbol_574 = 0u;
- thread uint tint_symbol_575 = 0u;
- thread uint tint_symbol_576 = 0u;
- thread uint tint_symbol_577 = 0u;
- thread uint tint_symbol_578 = 0u;
- thread uint tint_symbol_579 = 0u;
- thread uint tint_symbol_580 = 0u;
- thread uint tint_symbol_581 = 0u;
- thread uint tint_symbol_582 = 0u;
- thread uint tint_symbol_583 = 0u;
- thread uint tint_symbol_584 = 0u;
- thread uint tint_symbol_585 = 0u;
- thread uint tint_symbol_586 = 0u;
- thread uint tint_symbol_587 = 0u;
- thread uint tint_symbol_588 = 0u;
- thread uint tint_symbol_589 = 0u;
- thread uint tint_symbol_590 = 0u;
- thread uint tint_symbol_591 = 0u;
- thread uint tint_symbol_592 = 0u;
- thread uint tint_symbol_593 = 0u;
- thread uint tint_symbol_594 = 0u;
- thread uint tint_symbol_595 = 0u;
- thread uint tint_symbol_596 = 0u;
- thread uint tint_symbol_597 = 0u;
- thread uint tint_symbol_598 = 0u;
- thread uint tint_symbol_599 = 0u;
- thread uint tint_symbol_600 = 0u;
- thread uint tint_symbol_601 = 0u;
- thread uint tint_symbol_602 = 0u;
- thread uint tint_symbol_603 = 0u;
- thread uint tint_symbol_604 = 0u;
- thread uint tint_symbol_605 = 0u;
- thread uint tint_symbol_606 = 0u;
- thread uint tint_symbol_607 = 0u;
- thread uint tint_symbol_608 = 0u;
- thread uint tint_symbol_609 = 0u;
- thread uint tint_symbol_610 = 0u;
- thread uint tint_symbol_611 = 0u;
- thread uint tint_symbol_612 = 0u;
- thread uint tint_symbol_613 = 0u;
- thread uint tint_symbol_614 = 0u;
- thread uint tint_symbol_615 = 0u;
- thread uint tint_symbol_616 = 0u;
- thread uint tint_symbol_617 = 0u;
- thread uint tint_symbol_618 = 0u;
- thread uint tint_symbol_619 = 0u;
- thread uint tint_symbol_620 = 0u;
- thread uint tint_symbol_621 = 0u;
- thread uint tint_symbol_622 = 0u;
- thread uint tint_symbol_623 = 0u;
- thread uint tint_symbol_624 = 0u;
- thread uint tint_symbol_625 = 0u;
- thread uint tint_symbol_626 = 0u;
- thread uint tint_symbol_627 = 0u;
- thread uint tint_symbol_628 = 0u;
- thread uint tint_symbol_629 = 0u;
- thread uint tint_symbol_630 = 0u;
- thread uint tint_symbol_631 = 0u;
- thread uint tint_symbol_632 = 0u;
- thread uint tint_symbol_633 = 0u;
- thread uint tint_symbol_634 = 0u;
- thread uint tint_symbol_635 = 0u;
- thread uint tint_symbol_636 = 0u;
- thread uint tint_symbol_637 = 0u;
- thread uint tint_symbol_638 = 0u;
- thread uint tint_symbol_639 = 0u;
- thread uint tint_symbol_640 = 0u;
- thread uint tint_symbol_641 = 0u;
- thread uint tint_symbol_642 = 0u;
- thread uint tint_symbol_643 = 0u;
- thread uint tint_symbol_644 = 0u;
- thread uint tint_symbol_645 = 0u;
- thread uint tint_symbol_646 = 0u;
- thread uint tint_symbol_647 = 0u;
- thread uint tint_symbol_648 = 0u;
- thread uint tint_symbol_649 = 0u;
- thread uint tint_symbol_650 = 0u;
- thread uint tint_symbol_651 = 0u;
- thread uint tint_symbol_652 = 0u;
- thread uint tint_symbol_653 = 0u;
- thread uint tint_symbol_654 = 0u;
- thread uint tint_symbol_655 = 0u;
- thread uint tint_symbol_656 = 0u;
- thread uint tint_symbol_657 = 0u;
- thread uint tint_symbol_658 = 0u;
- thread uint tint_symbol_659 = 0u;
- thread uint tint_symbol_660 = 0u;
- thread uint tint_symbol_661 = 0u;
- thread uint tint_symbol_662 = 0u;
- thread uint tint_symbol_663 = 0u;
- thread uint tint_symbol_664 = 0u;
- thread uint tint_symbol_665 = 0u;
- thread uint tint_symbol_666 = 0u;
- thread uint tint_symbol_667 = 0u;
- thread uint tint_symbol_668 = 0u;
- thread uint tint_symbol_669 = 0u;
- thread uint tint_symbol_670 = 0u;
- thread uint tint_symbol_671 = 0u;
- thread uint tint_symbol_672 = 0u;
- thread uint tint_symbol_673 = 0u;
- thread uint tint_symbol_674 = 0u;
- thread uint tint_symbol_675 = 0u;
- thread uint tint_symbol_676 = 0u;
- thread uint tint_symbol_677 = 0u;
- thread uint tint_symbol_678 = 0u;
- thread uint tint_symbol_679 = 0u;
- thread uint tint_symbol_680 = 0u;
- thread uint tint_symbol_681 = 0u;
- thread uint tint_symbol_682 = 0u;
- thread uint tint_symbol_683 = 0u;
- thread uint tint_symbol_684 = 0u;
- thread uint tint_symbol_685 = 0u;
- thread uint tint_symbol_686 = 0u;
- thread uint tint_symbol_687 = 0u;
- thread uint tint_symbol_688 = 0u;
- thread uint tint_symbol_689 = 0u;
- thread uint tint_symbol_690 = 0u;
- thread uint tint_symbol_691 = 0u;
- thread uint tint_symbol_692 = 0u;
- thread uint tint_symbol_693 = 0u;
- thread uint tint_symbol_694 = 0u;
- thread uint tint_symbol_695 = 0u;
- thread uint tint_symbol_696 = 0u;
- thread uint tint_symbol_697 = 0u;
- thread uint tint_symbol_698 = 0u;
- thread uint tint_symbol_699 = 0u;
- thread uint tint_symbol_700 = 0u;
- thread uint tint_symbol_701 = 0u;
- thread uint tint_symbol_702 = 0u;
- thread uint tint_symbol_703 = 0u;
- thread uint tint_symbol_704 = 0u;
- thread uint tint_symbol_705 = 0u;
- thread uint tint_symbol_706 = 0u;
- thread uint tint_symbol_707 = 0u;
- thread uint tint_symbol_708 = 0u;
- thread uint tint_symbol_709 = 0u;
- thread uint tint_symbol_710 = 0u;
- thread uint tint_symbol_711 = 0u;
- thread uint tint_symbol_712 = 0u;
- thread uint tint_symbol_713 = 0u;
- thread uint tint_symbol_714 = 0u;
- thread uint tint_symbol_715 = 0u;
- thread uint tint_symbol_716 = 0u;
- thread uint tint_symbol_717 = 0u;
- thread uint tint_symbol_718 = 0u;
- thread uint tint_symbol_719 = 0u;
- thread uint tint_symbol_720 = 0u;
- thread uint tint_symbol_721 = 0u;
- thread uint tint_symbol_722 = 0u;
- thread uint tint_symbol_723 = 0u;
- thread uint tint_symbol_724 = 0u;
- thread uint tint_symbol_725 = 0u;
- thread uint tint_symbol_726 = 0u;
- thread uint tint_symbol_727 = 0u;
- thread uint tint_symbol_728 = 0u;
- thread uint tint_symbol_729 = 0u;
- thread uint tint_symbol_730 = 0u;
- thread uint tint_symbol_731 = 0u;
- thread uint tint_symbol_732 = 0u;
- thread uint tint_symbol_733 = 0u;
- thread uint tint_symbol_734 = 0u;
- thread uint tint_symbol_735 = 0u;
- thread uint tint_symbol_736 = 0u;
- thread uint tint_symbol_737 = 0u;
- thread uint tint_symbol_738 = 0u;
- thread uint tint_symbol_739 = 0u;
- thread uint tint_symbol_740 = 0u;
- thread uint tint_symbol_741 = 0u;
- thread uint tint_symbol_742 = 0u;
- thread uint tint_symbol_743 = 0u;
- thread uint tint_symbol_744 = 0u;
- thread uint tint_symbol_745 = 0u;
- thread uint tint_symbol_746 = 0u;
- thread uint tint_symbol_747 = 0u;
- thread uint tint_symbol_748 = 0u;
- thread uint tint_symbol_749 = 0u;
- thread uint tint_symbol_750 = 0u;
- thread uint tint_symbol_751 = 0u;
- thread uint tint_symbol_752 = 0u;
- thread uint tint_symbol_753 = 0u;
- thread uint tint_symbol_754 = 0u;
- thread uint tint_symbol_755 = 0u;
- thread uint tint_symbol_756 = 0u;
- thread uint tint_symbol_757 = 0u;
- thread uint tint_symbol_758 = 0u;
- thread uint tint_symbol_759 = 0u;
- thread uint tint_symbol_760 = 0u;
- thread uint tint_symbol_761 = 0u;
- thread uint tint_symbol_762 = 0u;
- thread uint tint_symbol_763 = 0u;
- thread uint tint_symbol_764 = 0u;
- thread uint tint_symbol_765 = 0u;
- thread uint tint_symbol_766 = 0u;
- thread uint tint_symbol_767 = 0u;
- thread uint tint_symbol_768 = 0u;
- thread uint tint_symbol_769 = 0u;
- thread uint tint_symbol_770 = 0u;
- thread uint tint_symbol_771 = 0u;
- thread uint tint_symbol_772 = 0u;
- thread uint tint_symbol_773 = 0u;
- thread uint tint_symbol_774 = 0u;
- thread uint tint_symbol_775 = 0u;
- thread uint tint_symbol_776 = 0u;
- thread uint tint_symbol_777 = 0u;
- thread uint tint_symbol_778 = 0u;
- thread uint tint_symbol_779 = 0u;
- thread uint tint_symbol_780 = 0u;
- thread uint tint_symbol_781 = 0u;
- thread uint tint_symbol_782 = 0u;
- thread uint tint_symbol_783 = 0u;
- thread uint tint_symbol_784 = 0u;
- thread uint tint_symbol_785 = 0u;
- thread uint tint_symbol_786 = 0u;
- thread uint tint_symbol_787 = 0u;
- thread uint tint_symbol_788 = 0u;
- thread uint tint_symbol_789 = 0u;
- thread uint tint_symbol_790 = 0u;
- thread uint tint_symbol_791 = 0u;
- thread uint tint_symbol_792 = 0u;
- thread uint tint_symbol_793 = 0u;
- thread uint tint_symbol_794 = 0u;
- thread uint tint_symbol_795 = 0u;
- thread uint tint_symbol_796 = 0u;
- thread uint tint_symbol_797 = 0u;
- thread uint tint_symbol_798 = 0u;
- thread uint tint_symbol_799 = 0u;
- thread uint tint_symbol_800 = 0u;
- thread uint tint_symbol_801 = 0u;
- thread uint tint_symbol_802 = 0u;
- thread uint tint_symbol_803 = 0u;
- thread uint tint_symbol_804 = 0u;
- thread uint tint_symbol_805 = 0u;
- thread uint tint_symbol_806 = 0u;
- thread uint tint_symbol_807 = 0u;
- thread uint tint_symbol_808 = 0u;
- thread uint tint_symbol_809 = 0u;
- thread uint tint_symbol_810 = 0u;
- thread uint tint_symbol_811 = 0u;
- thread uint tint_symbol_812 = 0u;
- thread uint tint_symbol_813 = 0u;
- thread uint tint_symbol_814 = 0u;
- thread uint tint_symbol_815 = 0u;
- thread uint tint_symbol_816 = 0u;
- thread uint tint_symbol_817 = 0u;
- thread uint tint_symbol_818 = 0u;
- thread uint tint_symbol_819 = 0u;
- thread uint tint_symbol_820 = 0u;
- thread uint tint_symbol_821 = 0u;
- thread uint tint_symbol_822 = 0u;
- thread uint tint_symbol_823 = 0u;
- thread uint tint_symbol_824 = 0u;
- thread uint tint_symbol_825 = 0u;
- thread uint tint_symbol_826 = 0u;
- thread uint tint_symbol_827 = 0u;
- thread uint tint_symbol_828 = 0u;
- thread uint tint_symbol_829 = 0u;
- thread uint tint_symbol_830 = 0u;
- thread uint tint_symbol_831 = 0u;
- thread uint tint_symbol_832 = 0u;
- thread uint tint_symbol_833 = 0u;
- thread uint tint_symbol_834 = 0u;
- thread uint tint_symbol_835 = 0u;
- thread uint tint_symbol_836 = 0u;
- thread uint tint_symbol_837 = 0u;
- thread uint tint_symbol_838 = 0u;
- thread uint tint_symbol_839 = 0u;
- thread uint tint_symbol_840 = 0u;
- thread uint tint_symbol_841 = 0u;
- thread uint tint_symbol_842 = 0u;
- thread uint tint_symbol_843 = 0u;
- thread uint tint_symbol_844 = 0u;
- thread uint tint_symbol_845 = 0u;
- thread uint tint_symbol_846 = 0u;
- thread uint tint_symbol_847 = 0u;
- thread uint tint_symbol_848 = 0u;
- thread uint tint_symbol_849 = 0u;
- thread uint tint_symbol_850 = 0u;
- thread uint tint_symbol_851 = 0u;
- thread uint tint_symbol_852 = 0u;
- thread uint tint_symbol_853 = 0u;
- thread uint tint_symbol_854 = 0u;
- thread uint tint_symbol_855 = 0u;
- thread uint tint_symbol_856 = 0u;
- thread uint tint_symbol_857 = 0u;
- thread uint tint_symbol_858 = 0u;
- thread uint tint_symbol_859 = 0u;
- thread uint tint_symbol_860 = 0u;
- thread uint tint_symbol_861 = 0u;
- thread uint tint_symbol_862 = 0u;
- thread uint tint_symbol_863 = 0u;
- thread uint tint_symbol_864 = 0u;
- thread uint tint_symbol_865 = 0u;
- thread uint tint_symbol_866 = 0u;
- thread uint tint_symbol_867 = 0u;
- thread uint tint_symbol_868 = 0u;
- thread uint tint_symbol_869 = 0u;
- thread uint tint_symbol_870 = 0u;
- thread uint tint_symbol_871 = 0u;
- thread uint tint_symbol_872 = 0u;
- thread uint tint_symbol_873 = 0u;
- thread uint tint_symbol_874 = 0u;
- thread uint tint_symbol_875 = 0u;
- thread uint tint_symbol_876 = 0u;
- thread uint tint_symbol_877 = 0u;
- thread uint tint_symbol_878 = 0u;
- thread uint tint_symbol_879 = 0u;
- thread uint tint_symbol_880 = 0u;
- thread uint tint_symbol_881 = 0u;
- thread uint tint_symbol_882 = 0u;
- thread uint tint_symbol_883 = 0u;
- thread uint tint_symbol_884 = 0u;
- thread uint tint_symbol_885 = 0u;
- thread uint tint_symbol_886 = 0u;
- thread uint tint_symbol_887 = 0u;
- thread uint tint_symbol_888 = 0u;
- thread uint tint_symbol_889 = 0u;
- thread uint tint_symbol_890 = 0u;
- thread uint tint_symbol_891 = 0u;
- thread uint tint_symbol_892 = 0u;
- thread uint tint_symbol_893 = 0u;
- thread uint tint_symbol_894 = 0u;
- thread uint tint_symbol_895 = 0u;
- thread uint tint_symbol_896 = 0u;
- thread uint tint_symbol_897 = 0u;
- thread uint tint_symbol_898 = 0u;
- thread uint tint_symbol_899 = 0u;
- thread uint tint_symbol_900 = 0u;
- thread uint tint_symbol_901 = 0u;
- thread uint tint_symbol_902 = 0u;
- thread uint tint_symbol_903 = 0u;
- thread uint tint_symbol_904 = 0u;
- thread uint tint_symbol_905 = 0u;
- thread uint tint_symbol_906 = 0u;
- thread uint tint_symbol_907 = 0u;
- thread uint tint_symbol_908 = 0u;
- thread uint tint_symbol_909 = 0u;
- thread uint tint_symbol_910 = 0u;
- thread uint tint_symbol_911 = 0u;
- thread uint tint_symbol_912 = 0u;
- thread uint tint_symbol_913 = 0u;
- thread uint tint_symbol_914 = 0u;
- thread uint tint_symbol_915 = 0u;
- thread uint tint_symbol_916 = 0u;
- thread uint tint_symbol_917 = 0u;
- thread uint tint_symbol_918 = 0u;
- thread uint tint_symbol_919 = 0u;
- thread uint tint_symbol_920 = 0u;
- thread uint tint_symbol_921 = 0u;
- thread uint tint_symbol_922 = 0u;
- thread uint tint_symbol_923 = 0u;
- thread uint tint_symbol_924 = 0u;
- thread uint tint_symbol_925 = 0u;
- thread uint tint_symbol_926 = 0u;
- thread uint tint_symbol_927 = 0u;
- thread uint tint_symbol_928 = 0u;
- thread uint tint_symbol_929 = 0u;
- thread uint tint_symbol_930 = 0u;
- thread uint tint_symbol_931 = 0u;
- thread uint tint_symbol_932 = 0u;
- thread uint tint_symbol_933 = 0u;
- thread uint tint_symbol_934 = 0u;
- thread uint tint_symbol_935 = 0u;
- thread uint tint_symbol_936 = 0u;
- thread uint tint_symbol_937 = 0u;
- thread uint tint_symbol_938 = 0u;
- thread uint tint_symbol_939 = 0u;
- thread uint tint_symbol_940 = 0u;
- thread uint tint_symbol_941 = 0u;
- thread uint tint_symbol_942 = 0u;
- thread uint tint_symbol_943 = 0u;
- thread uint tint_symbol_944 = 0u;
- thread uint tint_symbol_945 = 0u;
- thread uint tint_symbol_946 = 0u;
- thread uint tint_symbol_947 = 0u;
- thread uint tint_symbol_948 = 0u;
- thread uint tint_symbol_949 = 0u;
- thread uint tint_symbol_950 = 0u;
- thread uint tint_symbol_951 = 0u;
- thread uint tint_symbol_952 = 0u;
- thread uint tint_symbol_953 = 0u;
- thread uint tint_symbol_954 = 0u;
- thread uint tint_symbol_955 = 0u;
- thread uint tint_symbol_956 = 0u;
- thread uint tint_symbol_957 = 0u;
- thread uint tint_symbol_958 = 0u;
- thread uint tint_symbol_959 = 0u;
- thread uint tint_symbol_960 = 0u;
- thread uint tint_symbol_961 = 0u;
- thread uint tint_symbol_962 = 0u;
- thread uint tint_symbol_963 = 0u;
- thread uint tint_symbol_964 = 0u;
- thread uint tint_symbol_965 = 0u;
- thread uint tint_symbol_966 = 0u;
- thread uint tint_symbol_967 = 0u;
- thread uint tint_symbol_968 = 0u;
- thread uint tint_symbol_969 = 0u;
- thread uint tint_symbol_970 = 0u;
- thread uint tint_symbol_971 = 0u;
- thread uint tint_symbol_972 = 0u;
- thread uint tint_symbol_973 = 0u;
- thread uint tint_symbol_974 = 0u;
- thread uint tint_symbol_975 = 0u;
- thread uint tint_symbol_976 = 0u;
- thread uint tint_symbol_977 = 0u;
- thread uint tint_symbol_978 = 0u;
- thread uint tint_symbol_979 = 0u;
- thread uint tint_symbol_980 = 0u;
- thread uint tint_symbol_981 = 0u;
- thread uint tint_symbol_982 = 0u;
- thread uint tint_symbol_983 = 0u;
- thread uint tint_symbol_984 = 0u;
- thread uint tint_symbol_985 = 0u;
- thread uint tint_symbol_986 = 0u;
- thread uint tint_symbol_987 = 0u;
- thread uint tint_symbol_988 = 0u;
- thread uint tint_symbol_989 = 0u;
- thread uint tint_symbol_990 = 0u;
- thread uint tint_symbol_991 = 0u;
- thread uint tint_symbol_992 = 0u;
- thread uint tint_symbol_993 = 0u;
- thread uint tint_symbol_994 = 0u;
- thread uint tint_symbol_995 = 0u;
- thread uint tint_symbol_996 = 0u;
- thread uint tint_symbol_997 = 0u;
- thread uint tint_symbol_998 = 0u;
- thread uint tint_symbol_999 = 0u;
- thread uint tint_symbol_1000 = 0u;
- thread uint tint_symbol_1001 = 0u;
+struct tint_private_vars_struct {
+ uint v0;
+ uint v1;
+ uint v2;
+ uint v3;
+ uint v4;
+ uint v5;
+ uint v6;
+ uint v7;
+ uint v8;
+ uint v9;
+ uint v10;
+ uint v11;
+ uint v12;
+ uint v13;
+ uint v14;
+ uint v15;
+ uint v16;
+ uint v17;
+ uint v18;
+ uint v19;
+ uint v20;
+ uint v21;
+ uint v22;
+ uint v23;
+ uint v24;
+ uint v25;
+ uint v26;
+ uint v27;
+ uint v28;
+ uint v29;
+ uint v30;
+ uint v31;
+ uint v32;
+ uint v33;
+ uint v34;
+ uint v35;
+ uint v36;
+ uint v37;
+ uint v38;
+ uint v39;
+ uint v40;
+ uint v41;
+ uint v42;
+ uint v43;
+ uint v44;
+ uint v45;
+ uint v46;
+ uint v47;
+ uint v48;
+ uint v49;
+ uint v50;
+ uint v51;
+ uint v52;
+ uint v53;
+ uint v54;
+ uint v55;
+ uint v56;
+ uint v57;
+ uint v58;
+ uint v59;
+ uint v60;
+ uint v61;
+ uint v62;
+ uint v63;
+ uint v64;
+ uint v65;
+ uint v66;
+ uint v67;
+ uint v68;
+ uint v69;
+ uint v70;
+ uint v71;
+ uint v72;
+ uint v73;
+ uint v74;
+ uint v75;
+ uint v76;
+ uint v77;
+ uint v78;
+ uint v79;
+ uint v80;
+ uint v81;
+ uint v82;
+ uint v83;
+ uint v84;
+ uint v85;
+ uint v86;
+ uint v87;
+ uint v88;
+ uint v89;
+ uint v90;
+ uint v91;
+ uint v92;
+ uint v93;
+ uint v94;
+ uint v95;
+ uint v96;
+ uint v97;
+ uint v98;
+ uint v99;
+ uint v100;
+ uint v101;
+ uint v102;
+ uint v103;
+ uint v104;
+ uint v105;
+ uint v106;
+ uint v107;
+ uint v108;
+ uint v109;
+ uint v110;
+ uint v111;
+ uint v112;
+ uint v113;
+ uint v114;
+ uint v115;
+ uint v116;
+ uint v117;
+ uint v118;
+ uint v119;
+ uint v120;
+ uint v121;
+ uint v122;
+ uint v123;
+ uint v124;
+ uint v125;
+ uint v126;
+ uint v127;
+ uint v128;
+ uint v129;
+ uint v130;
+ uint v131;
+ uint v132;
+ uint v133;
+ uint v134;
+ uint v135;
+ uint v136;
+ uint v137;
+ uint v138;
+ uint v139;
+ uint v140;
+ uint v141;
+ uint v142;
+ uint v143;
+ uint v144;
+ uint v145;
+ uint v146;
+ uint v147;
+ uint v148;
+ uint v149;
+ uint v150;
+ uint v151;
+ uint v152;
+ uint v153;
+ uint v154;
+ uint v155;
+ uint v156;
+ uint v157;
+ uint v158;
+ uint v159;
+ uint v160;
+ uint v161;
+ uint v162;
+ uint v163;
+ uint v164;
+ uint v165;
+ uint v166;
+ uint v167;
+ uint v168;
+ uint v169;
+ uint v170;
+ uint v171;
+ uint v172;
+ uint v173;
+ uint v174;
+ uint v175;
+ uint v176;
+ uint v177;
+ uint v178;
+ uint v179;
+ uint v180;
+ uint v181;
+ uint v182;
+ uint v183;
+ uint v184;
+ uint v185;
+ uint v186;
+ uint v187;
+ uint v188;
+ uint v189;
+ uint v190;
+ uint v191;
+ uint v192;
+ uint v193;
+ uint v194;
+ uint v195;
+ uint v196;
+ uint v197;
+ uint v198;
+ uint v199;
+ uint v200;
+ uint v201;
+ uint v202;
+ uint v203;
+ uint v204;
+ uint v205;
+ uint v206;
+ uint v207;
+ uint v208;
+ uint v209;
+ uint v210;
+ uint v211;
+ uint v212;
+ uint v213;
+ uint v214;
+ uint v215;
+ uint v216;
+ uint v217;
+ uint v218;
+ uint v219;
+ uint v220;
+ uint v221;
+ uint v222;
+ uint v223;
+ uint v224;
+ uint v225;
+ uint v226;
+ uint v227;
+ uint v228;
+ uint v229;
+ uint v230;
+ uint v231;
+ uint v232;
+ uint v233;
+ uint v234;
+ uint v235;
+ uint v236;
+ uint v237;
+ uint v238;
+ uint v239;
+ uint v240;
+ uint v241;
+ uint v242;
+ uint v243;
+ uint v244;
+ uint v245;
+ uint v246;
+ uint v247;
+ uint v248;
+ uint v249;
+ uint v250;
+ uint v251;
+ uint v252;
+ uint v253;
+ uint v254;
+ uint v255;
+ uint v256;
+ uint v257;
+ uint v258;
+ uint v259;
+ uint v260;
+ uint v261;
+ uint v262;
+ uint v263;
+ uint v264;
+ uint v265;
+ uint v266;
+ uint v267;
+ uint v268;
+ uint v269;
+ uint v270;
+ uint v271;
+ uint v272;
+ uint v273;
+ uint v274;
+ uint v275;
+ uint v276;
+ uint v277;
+ uint v278;
+ uint v279;
+ uint v280;
+ uint v281;
+ uint v282;
+ uint v283;
+ uint v284;
+ uint v285;
+ uint v286;
+ uint v287;
+ uint v288;
+ uint v289;
+ uint v290;
+ uint v291;
+ uint v292;
+ uint v293;
+ uint v294;
+ uint v295;
+ uint v296;
+ uint v297;
+ uint v298;
+ uint v299;
+ uint v300;
+ uint v301;
+ uint v302;
+ uint v303;
+ uint v304;
+ uint v305;
+ uint v306;
+ uint v307;
+ uint v308;
+ uint v309;
+ uint v310;
+ uint v311;
+ uint v312;
+ uint v313;
+ uint v314;
+ uint v315;
+ uint v316;
+ uint v317;
+ uint v318;
+ uint v319;
+ uint v320;
+ uint v321;
+ uint v322;
+ uint v323;
+ uint v324;
+ uint v325;
+ uint v326;
+ uint v327;
+ uint v328;
+ uint v329;
+ uint v330;
+ uint v331;
+ uint v332;
+ uint v333;
+ uint v334;
+ uint v335;
+ uint v336;
+ uint v337;
+ uint v338;
+ uint v339;
+ uint v340;
+ uint v341;
+ uint v342;
+ uint v343;
+ uint v344;
+ uint v345;
+ uint v346;
+ uint v347;
+ uint v348;
+ uint v349;
+ uint v350;
+ uint v351;
+ uint v352;
+ uint v353;
+ uint v354;
+ uint v355;
+ uint v356;
+ uint v357;
+ uint v358;
+ uint v359;
+ uint v360;
+ uint v361;
+ uint v362;
+ uint v363;
+ uint v364;
+ uint v365;
+ uint v366;
+ uint v367;
+ uint v368;
+ uint v369;
+ uint v370;
+ uint v371;
+ uint v372;
+ uint v373;
+ uint v374;
+ uint v375;
+ uint v376;
+ uint v377;
+ uint v378;
+ uint v379;
+ uint v380;
+ uint v381;
+ uint v382;
+ uint v383;
+ uint v384;
+ uint v385;
+ uint v386;
+ uint v387;
+ uint v388;
+ uint v389;
+ uint v390;
+ uint v391;
+ uint v392;
+ uint v393;
+ uint v394;
+ uint v395;
+ uint v396;
+ uint v397;
+ uint v398;
+ uint v399;
+ uint v400;
+ uint v401;
+ uint v402;
+ uint v403;
+ uint v404;
+ uint v405;
+ uint v406;
+ uint v407;
+ uint v408;
+ uint v409;
+ uint v410;
+ uint v411;
+ uint v412;
+ uint v413;
+ uint v414;
+ uint v415;
+ uint v416;
+ uint v417;
+ uint v418;
+ uint v419;
+ uint v420;
+ uint v421;
+ uint v422;
+ uint v423;
+ uint v424;
+ uint v425;
+ uint v426;
+ uint v427;
+ uint v428;
+ uint v429;
+ uint v430;
+ uint v431;
+ uint v432;
+ uint v433;
+ uint v434;
+ uint v435;
+ uint v436;
+ uint v437;
+ uint v438;
+ uint v439;
+ uint v440;
+ uint v441;
+ uint v442;
+ uint v443;
+ uint v444;
+ uint v445;
+ uint v446;
+ uint v447;
+ uint v448;
+ uint v449;
+ uint v450;
+ uint v451;
+ uint v452;
+ uint v453;
+ uint v454;
+ uint v455;
+ uint v456;
+ uint v457;
+ uint v458;
+ uint v459;
+ uint v460;
+ uint v461;
+ uint v462;
+ uint v463;
+ uint v464;
+ uint v465;
+ uint v466;
+ uint v467;
+ uint v468;
+ uint v469;
+ uint v470;
+ uint v471;
+ uint v472;
+ uint v473;
+ uint v474;
+ uint v475;
+ uint v476;
+ uint v477;
+ uint v478;
+ uint v479;
+ uint v480;
+ uint v481;
+ uint v482;
+ uint v483;
+ uint v484;
+ uint v485;
+ uint v486;
+ uint v487;
+ uint v488;
+ uint v489;
+ uint v490;
+ uint v491;
+ uint v492;
+ uint v493;
+ uint v494;
+ uint v495;
+ uint v496;
+ uint v497;
+ uint v498;
+ uint v499;
+ uint v500;
+ uint v501;
+ uint v502;
+ uint v503;
+ uint v504;
+ uint v505;
+ uint v506;
+ uint v507;
+ uint v508;
+ uint v509;
+ uint v510;
+ uint v511;
+ uint v512;
+ uint v513;
+ uint v514;
+ uint v515;
+ uint v516;
+ uint v517;
+ uint v518;
+ uint v519;
+ uint v520;
+ uint v521;
+ uint v522;
+ uint v523;
+ uint v524;
+ uint v525;
+ uint v526;
+ uint v527;
+ uint v528;
+ uint v529;
+ uint v530;
+ uint v531;
+ uint v532;
+ uint v533;
+ uint v534;
+ uint v535;
+ uint v536;
+ uint v537;
+ uint v538;
+ uint v539;
+ uint v540;
+ uint v541;
+ uint v542;
+ uint v543;
+ uint v544;
+ uint v545;
+ uint v546;
+ uint v547;
+ uint v548;
+ uint v549;
+ uint v550;
+ uint v551;
+ uint v552;
+ uint v553;
+ uint v554;
+ uint v555;
+ uint v556;
+ uint v557;
+ uint v558;
+ uint v559;
+ uint v560;
+ uint v561;
+ uint v562;
+ uint v563;
+ uint v564;
+ uint v565;
+ uint v566;
+ uint v567;
+ uint v568;
+ uint v569;
+ uint v570;
+ uint v571;
+ uint v572;
+ uint v573;
+ uint v574;
+ uint v575;
+ uint v576;
+ uint v577;
+ uint v578;
+ uint v579;
+ uint v580;
+ uint v581;
+ uint v582;
+ uint v583;
+ uint v584;
+ uint v585;
+ uint v586;
+ uint v587;
+ uint v588;
+ uint v589;
+ uint v590;
+ uint v591;
+ uint v592;
+ uint v593;
+ uint v594;
+ uint v595;
+ uint v596;
+ uint v597;
+ uint v598;
+ uint v599;
+ uint v600;
+ uint v601;
+ uint v602;
+ uint v603;
+ uint v604;
+ uint v605;
+ uint v606;
+ uint v607;
+ uint v608;
+ uint v609;
+ uint v610;
+ uint v611;
+ uint v612;
+ uint v613;
+ uint v614;
+ uint v615;
+ uint v616;
+ uint v617;
+ uint v618;
+ uint v619;
+ uint v620;
+ uint v621;
+ uint v622;
+ uint v623;
+ uint v624;
+ uint v625;
+ uint v626;
+ uint v627;
+ uint v628;
+ uint v629;
+ uint v630;
+ uint v631;
+ uint v632;
+ uint v633;
+ uint v634;
+ uint v635;
+ uint v636;
+ uint v637;
+ uint v638;
+ uint v639;
+ uint v640;
+ uint v641;
+ uint v642;
+ uint v643;
+ uint v644;
+ uint v645;
+ uint v646;
+ uint v647;
+ uint v648;
+ uint v649;
+ uint v650;
+ uint v651;
+ uint v652;
+ uint v653;
+ uint v654;
+ uint v655;
+ uint v656;
+ uint v657;
+ uint v658;
+ uint v659;
+ uint v660;
+ uint v661;
+ uint v662;
+ uint v663;
+ uint v664;
+ uint v665;
+ uint v666;
+ uint v667;
+ uint v668;
+ uint v669;
+ uint v670;
+ uint v671;
+ uint v672;
+ uint v673;
+ uint v674;
+ uint v675;
+ uint v676;
+ uint v677;
+ uint v678;
+ uint v679;
+ uint v680;
+ uint v681;
+ uint v682;
+ uint v683;
+ uint v684;
+ uint v685;
+ uint v686;
+ uint v687;
+ uint v688;
+ uint v689;
+ uint v690;
+ uint v691;
+ uint v692;
+ uint v693;
+ uint v694;
+ uint v695;
+ uint v696;
+ uint v697;
+ uint v698;
+ uint v699;
+ uint v700;
+ uint v701;
+ uint v702;
+ uint v703;
+ uint v704;
+ uint v705;
+ uint v706;
+ uint v707;
+ uint v708;
+ uint v709;
+ uint v710;
+ uint v711;
+ uint v712;
+ uint v713;
+ uint v714;
+ uint v715;
+ uint v716;
+ uint v717;
+ uint v718;
+ uint v719;
+ uint v720;
+ uint v721;
+ uint v722;
+ uint v723;
+ uint v724;
+ uint v725;
+ uint v726;
+ uint v727;
+ uint v728;
+ uint v729;
+ uint v730;
+ uint v731;
+ uint v732;
+ uint v733;
+ uint v734;
+ uint v735;
+ uint v736;
+ uint v737;
+ uint v738;
+ uint v739;
+ uint v740;
+ uint v741;
+ uint v742;
+ uint v743;
+ uint v744;
+ uint v745;
+ uint v746;
+ uint v747;
+ uint v748;
+ uint v749;
+ uint v750;
+ uint v751;
+ uint v752;
+ uint v753;
+ uint v754;
+ uint v755;
+ uint v756;
+ uint v757;
+ uint v758;
+ uint v759;
+ uint v760;
+ uint v761;
+ uint v762;
+ uint v763;
+ uint v764;
+ uint v765;
+ uint v766;
+ uint v767;
+ uint v768;
+ uint v769;
+ uint v770;
+ uint v771;
+ uint v772;
+ uint v773;
+ uint v774;
+ uint v775;
+ uint v776;
+ uint v777;
+ uint v778;
+ uint v779;
+ uint v780;
+ uint v781;
+ uint v782;
+ uint v783;
+ uint v784;
+ uint v785;
+ uint v786;
+ uint v787;
+ uint v788;
+ uint v789;
+ uint v790;
+ uint v791;
+ uint v792;
+ uint v793;
+ uint v794;
+ uint v795;
+ uint v796;
+ uint v797;
+ uint v798;
+ uint v799;
+ uint v800;
+ uint v801;
+ uint v802;
+ uint v803;
+ uint v804;
+ uint v805;
+ uint v806;
+ uint v807;
+ uint v808;
+ uint v809;
+ uint v810;
+ uint v811;
+ uint v812;
+ uint v813;
+ uint v814;
+ uint v815;
+ uint v816;
+ uint v817;
+ uint v818;
+ uint v819;
+ uint v820;
+ uint v821;
+ uint v822;
+ uint v823;
+ uint v824;
+ uint v825;
+ uint v826;
+ uint v827;
+ uint v828;
+ uint v829;
+ uint v830;
+ uint v831;
+ uint v832;
+ uint v833;
+ uint v834;
+ uint v835;
+ uint v836;
+ uint v837;
+ uint v838;
+ uint v839;
+ uint v840;
+ uint v841;
+ uint v842;
+ uint v843;
+ uint v844;
+ uint v845;
+ uint v846;
+ uint v847;
+ uint v848;
+ uint v849;
+ uint v850;
+ uint v851;
+ uint v852;
+ uint v853;
+ uint v854;
+ uint v855;
+ uint v856;
+ uint v857;
+ uint v858;
+ uint v859;
+ uint v860;
+ uint v861;
+ uint v862;
+ uint v863;
+ uint v864;
+ uint v865;
+ uint v866;
+ uint v867;
+ uint v868;
+ uint v869;
+ uint v870;
+ uint v871;
+ uint v872;
+ uint v873;
+ uint v874;
+ uint v875;
+ uint v876;
+ uint v877;
+ uint v878;
+ uint v879;
+ uint v880;
+ uint v881;
+ uint v882;
+ uint v883;
+ uint v884;
+ uint v885;
+ uint v886;
+ uint v887;
+ uint v888;
+ uint v889;
+ uint v890;
+ uint v891;
+ uint v892;
+ uint v893;
+ uint v894;
+ uint v895;
+ uint v896;
+ uint v897;
+ uint v898;
+ uint v899;
+ uint v900;
+ uint v901;
+ uint v902;
+ uint v903;
+ uint v904;
+ uint v905;
+ uint v906;
+ uint v907;
+ uint v908;
+ uint v909;
+ uint v910;
+ uint v911;
+ uint v912;
+ uint v913;
+ uint v914;
+ uint v915;
+ uint v916;
+ uint v917;
+ uint v918;
+ uint v919;
+ uint v920;
+ uint v921;
+ uint v922;
+ uint v923;
+ uint v924;
+ uint v925;
+ uint v926;
+ uint v927;
+ uint v928;
+ uint v929;
+ uint v930;
+ uint v931;
+ uint v932;
+ uint v933;
+ uint v934;
+ uint v935;
+ uint v936;
+ uint v937;
+ uint v938;
+ uint v939;
+ uint v940;
+ uint v941;
+ uint v942;
+ uint v943;
+ uint v944;
+ uint v945;
+ uint v946;
+ uint v947;
+ uint v948;
+ uint v949;
+ uint v950;
+ uint v951;
+ uint v952;
+ uint v953;
+ uint v954;
+ uint v955;
+ uint v956;
+ uint v957;
+ uint v958;
+ uint v959;
+ uint v960;
+ uint v961;
+ uint v962;
+ uint v963;
+ uint v964;
+ uint v965;
+ uint v966;
+ uint v967;
+ uint v968;
+ uint v969;
+ uint v970;
+ uint v971;
+ uint v972;
+ uint v973;
+ uint v974;
+ uint v975;
+ uint v976;
+ uint v977;
+ uint v978;
+ uint v979;
+ uint v980;
+ uint v981;
+ uint v982;
+ uint v983;
+ uint v984;
+ uint v985;
+ uint v986;
+ uint v987;
+ uint v988;
+ uint v989;
+ uint v990;
+ uint v991;
+ uint v992;
+ uint v993;
+ uint v994;
+ uint v995;
+ uint v996;
+ uint v997;
+ uint v998;
+ uint v999;
+};
+
+uint foo(thread tint_private_vars_struct* const tint_private_vars) {
uint x = 0u;
- x = (x + tint_symbol_2);
- x = (x + tint_symbol_3);
- x = (x + tint_symbol_4);
- x = (x + tint_symbol_5);
- x = (x + tint_symbol_6);
- x = (x + tint_symbol_7);
- x = (x + tint_symbol_8);
- x = (x + tint_symbol_9);
- x = (x + tint_symbol_10);
- x = (x + tint_symbol_11);
- x = (x + tint_symbol_12);
- x = (x + tint_symbol_13);
- x = (x + tint_symbol_14);
- x = (x + tint_symbol_15);
- x = (x + tint_symbol_16);
- x = (x + tint_symbol_17);
- x = (x + tint_symbol_18);
- x = (x + tint_symbol_19);
- x = (x + tint_symbol_20);
- x = (x + tint_symbol_21);
- x = (x + tint_symbol_22);
- x = (x + tint_symbol_23);
- x = (x + tint_symbol_24);
- x = (x + tint_symbol_25);
- x = (x + tint_symbol_26);
- x = (x + tint_symbol_27);
- x = (x + tint_symbol_28);
- x = (x + tint_symbol_29);
- x = (x + tint_symbol_30);
- x = (x + tint_symbol_31);
- x = (x + tint_symbol_32);
- x = (x + tint_symbol_33);
- x = (x + tint_symbol_34);
- x = (x + tint_symbol_35);
- x = (x + tint_symbol_36);
- x = (x + tint_symbol_37);
- x = (x + tint_symbol_38);
- x = (x + tint_symbol_39);
- x = (x + tint_symbol_40);
- x = (x + tint_symbol_41);
- x = (x + tint_symbol_42);
- x = (x + tint_symbol_43);
- x = (x + tint_symbol_44);
- x = (x + tint_symbol_45);
- x = (x + tint_symbol_46);
- x = (x + tint_symbol_47);
- x = (x + tint_symbol_48);
- x = (x + tint_symbol_49);
- x = (x + tint_symbol_50);
- x = (x + tint_symbol_51);
- x = (x + tint_symbol_52);
- x = (x + tint_symbol_53);
- x = (x + tint_symbol_54);
- x = (x + tint_symbol_55);
- x = (x + tint_symbol_56);
- x = (x + tint_symbol_57);
- x = (x + tint_symbol_58);
- x = (x + tint_symbol_59);
- x = (x + tint_symbol_60);
- x = (x + tint_symbol_61);
- x = (x + tint_symbol_62);
- x = (x + tint_symbol_63);
- x = (x + tint_symbol_64);
- x = (x + tint_symbol_65);
- x = (x + tint_symbol_66);
- x = (x + tint_symbol_67);
- x = (x + tint_symbol_68);
- x = (x + tint_symbol_69);
- x = (x + tint_symbol_70);
- x = (x + tint_symbol_71);
- x = (x + tint_symbol_72);
- x = (x + tint_symbol_73);
- x = (x + tint_symbol_74);
- x = (x + tint_symbol_75);
- x = (x + tint_symbol_76);
- x = (x + tint_symbol_77);
- x = (x + tint_symbol_78);
- x = (x + tint_symbol_79);
- x = (x + tint_symbol_80);
- x = (x + tint_symbol_81);
- x = (x + tint_symbol_82);
- x = (x + tint_symbol_83);
- x = (x + tint_symbol_84);
- x = (x + tint_symbol_85);
- x = (x + tint_symbol_86);
- x = (x + tint_symbol_87);
- x = (x + tint_symbol_88);
- x = (x + tint_symbol_89);
- x = (x + tint_symbol_90);
- x = (x + tint_symbol_91);
- x = (x + tint_symbol_92);
- x = (x + tint_symbol_93);
- x = (x + tint_symbol_94);
- x = (x + tint_symbol_95);
- x = (x + tint_symbol_96);
- x = (x + tint_symbol_97);
- x = (x + tint_symbol_98);
- x = (x + tint_symbol_99);
- x = (x + tint_symbol_100);
- x = (x + tint_symbol_101);
- x = (x + tint_symbol_102);
- x = (x + tint_symbol_103);
- x = (x + tint_symbol_104);
- x = (x + tint_symbol_105);
- x = (x + tint_symbol_106);
- x = (x + tint_symbol_107);
- x = (x + tint_symbol_108);
- x = (x + tint_symbol_109);
- x = (x + tint_symbol_110);
- x = (x + tint_symbol_111);
- x = (x + tint_symbol_112);
- x = (x + tint_symbol_113);
- x = (x + tint_symbol_114);
- x = (x + tint_symbol_115);
- x = (x + tint_symbol_116);
- x = (x + tint_symbol_117);
- x = (x + tint_symbol_118);
- x = (x + tint_symbol_119);
- x = (x + tint_symbol_120);
- x = (x + tint_symbol_121);
- x = (x + tint_symbol_122);
- x = (x + tint_symbol_123);
- x = (x + tint_symbol_124);
- x = (x + tint_symbol_125);
- x = (x + tint_symbol_126);
- x = (x + tint_symbol_127);
- x = (x + tint_symbol_128);
- x = (x + tint_symbol_129);
- x = (x + tint_symbol_130);
- x = (x + tint_symbol_131);
- x = (x + tint_symbol_132);
- x = (x + tint_symbol_133);
- x = (x + tint_symbol_134);
- x = (x + tint_symbol_135);
- x = (x + tint_symbol_136);
- x = (x + tint_symbol_137);
- x = (x + tint_symbol_138);
- x = (x + tint_symbol_139);
- x = (x + tint_symbol_140);
- x = (x + tint_symbol_141);
- x = (x + tint_symbol_142);
- x = (x + tint_symbol_143);
- x = (x + tint_symbol_144);
- x = (x + tint_symbol_145);
- x = (x + tint_symbol_146);
- x = (x + tint_symbol_147);
- x = (x + tint_symbol_148);
- x = (x + tint_symbol_149);
- x = (x + tint_symbol_150);
- x = (x + tint_symbol_151);
- x = (x + tint_symbol_152);
- x = (x + tint_symbol_153);
- x = (x + tint_symbol_154);
- x = (x + tint_symbol_155);
- x = (x + tint_symbol_156);
- x = (x + tint_symbol_157);
- x = (x + tint_symbol_158);
- x = (x + tint_symbol_159);
- x = (x + tint_symbol_160);
- x = (x + tint_symbol_161);
- x = (x + tint_symbol_162);
- x = (x + tint_symbol_163);
- x = (x + tint_symbol_164);
- x = (x + tint_symbol_165);
- x = (x + tint_symbol_166);
- x = (x + tint_symbol_167);
- x = (x + tint_symbol_168);
- x = (x + tint_symbol_169);
- x = (x + tint_symbol_170);
- x = (x + tint_symbol_171);
- x = (x + tint_symbol_172);
- x = (x + tint_symbol_173);
- x = (x + tint_symbol_174);
- x = (x + tint_symbol_175);
- x = (x + tint_symbol_176);
- x = (x + tint_symbol_177);
- x = (x + tint_symbol_178);
- x = (x + tint_symbol_179);
- x = (x + tint_symbol_180);
- x = (x + tint_symbol_181);
- x = (x + tint_symbol_182);
- x = (x + tint_symbol_183);
- x = (x + tint_symbol_184);
- x = (x + tint_symbol_185);
- x = (x + tint_symbol_186);
- x = (x + tint_symbol_187);
- x = (x + tint_symbol_188);
- x = (x + tint_symbol_189);
- x = (x + tint_symbol_190);
- x = (x + tint_symbol_191);
- x = (x + tint_symbol_192);
- x = (x + tint_symbol_193);
- x = (x + tint_symbol_194);
- x = (x + tint_symbol_195);
- x = (x + tint_symbol_196);
- x = (x + tint_symbol_197);
- x = (x + tint_symbol_198);
- x = (x + tint_symbol_199);
- x = (x + tint_symbol_200);
- x = (x + tint_symbol_201);
- x = (x + tint_symbol_202);
- x = (x + tint_symbol_203);
- x = (x + tint_symbol_204);
- x = (x + tint_symbol_205);
- x = (x + tint_symbol_206);
- x = (x + tint_symbol_207);
- x = (x + tint_symbol_208);
- x = (x + tint_symbol_209);
- x = (x + tint_symbol_210);
- x = (x + tint_symbol_211);
- x = (x + tint_symbol_212);
- x = (x + tint_symbol_213);
- x = (x + tint_symbol_214);
- x = (x + tint_symbol_215);
- x = (x + tint_symbol_216);
- x = (x + tint_symbol_217);
- x = (x + tint_symbol_218);
- x = (x + tint_symbol_219);
- x = (x + tint_symbol_220);
- x = (x + tint_symbol_221);
- x = (x + tint_symbol_222);
- x = (x + tint_symbol_223);
- x = (x + tint_symbol_224);
- x = (x + tint_symbol_225);
- x = (x + tint_symbol_226);
- x = (x + tint_symbol_227);
- x = (x + tint_symbol_228);
- x = (x + tint_symbol_229);
- x = (x + tint_symbol_230);
- x = (x + tint_symbol_231);
- x = (x + tint_symbol_232);
- x = (x + tint_symbol_233);
- x = (x + tint_symbol_234);
- x = (x + tint_symbol_235);
- x = (x + tint_symbol_236);
- x = (x + tint_symbol_237);
- x = (x + tint_symbol_238);
- x = (x + tint_symbol_239);
- x = (x + tint_symbol_240);
- x = (x + tint_symbol_241);
- x = (x + tint_symbol_242);
- x = (x + tint_symbol_243);
- x = (x + tint_symbol_244);
- x = (x + tint_symbol_245);
- x = (x + tint_symbol_246);
- x = (x + tint_symbol_247);
- x = (x + tint_symbol_248);
- x = (x + tint_symbol_249);
- x = (x + tint_symbol_250);
- x = (x + tint_symbol_251);
- x = (x + tint_symbol_252);
- x = (x + tint_symbol_253);
- x = (x + tint_symbol_254);
- x = (x + tint_symbol_255);
- x = (x + tint_symbol_256);
- x = (x + tint_symbol_257);
- x = (x + tint_symbol_258);
- x = (x + tint_symbol_259);
- x = (x + tint_symbol_260);
- x = (x + tint_symbol_261);
- x = (x + tint_symbol_262);
- x = (x + tint_symbol_263);
- x = (x + tint_symbol_264);
- x = (x + tint_symbol_265);
- x = (x + tint_symbol_266);
- x = (x + tint_symbol_267);
- x = (x + tint_symbol_268);
- x = (x + tint_symbol_269);
- x = (x + tint_symbol_270);
- x = (x + tint_symbol_271);
- x = (x + tint_symbol_272);
- x = (x + tint_symbol_273);
- x = (x + tint_symbol_274);
- x = (x + tint_symbol_275);
- x = (x + tint_symbol_276);
- x = (x + tint_symbol_277);
- x = (x + tint_symbol_278);
- x = (x + tint_symbol_279);
- x = (x + tint_symbol_280);
- x = (x + tint_symbol_281);
- x = (x + tint_symbol_282);
- x = (x + tint_symbol_283);
- x = (x + tint_symbol_284);
- x = (x + tint_symbol_285);
- x = (x + tint_symbol_286);
- x = (x + tint_symbol_287);
- x = (x + tint_symbol_288);
- x = (x + tint_symbol_289);
- x = (x + tint_symbol_290);
- x = (x + tint_symbol_291);
- x = (x + tint_symbol_292);
- x = (x + tint_symbol_293);
- x = (x + tint_symbol_294);
- x = (x + tint_symbol_295);
- x = (x + tint_symbol_296);
- x = (x + tint_symbol_297);
- x = (x + tint_symbol_298);
- x = (x + tint_symbol_299);
- x = (x + tint_symbol_300);
- x = (x + tint_symbol_301);
- x = (x + tint_symbol_302);
- x = (x + tint_symbol_303);
- x = (x + tint_symbol_304);
- x = (x + tint_symbol_305);
- x = (x + tint_symbol_306);
- x = (x + tint_symbol_307);
- x = (x + tint_symbol_308);
- x = (x + tint_symbol_309);
- x = (x + tint_symbol_310);
- x = (x + tint_symbol_311);
- x = (x + tint_symbol_312);
- x = (x + tint_symbol_313);
- x = (x + tint_symbol_314);
- x = (x + tint_symbol_315);
- x = (x + tint_symbol_316);
- x = (x + tint_symbol_317);
- x = (x + tint_symbol_318);
- x = (x + tint_symbol_319);
- x = (x + tint_symbol_320);
- x = (x + tint_symbol_321);
- x = (x + tint_symbol_322);
- x = (x + tint_symbol_323);
- x = (x + tint_symbol_324);
- x = (x + tint_symbol_325);
- x = (x + tint_symbol_326);
- x = (x + tint_symbol_327);
- x = (x + tint_symbol_328);
- x = (x + tint_symbol_329);
- x = (x + tint_symbol_330);
- x = (x + tint_symbol_331);
- x = (x + tint_symbol_332);
- x = (x + tint_symbol_333);
- x = (x + tint_symbol_334);
- x = (x + tint_symbol_335);
- x = (x + tint_symbol_336);
- x = (x + tint_symbol_337);
- x = (x + tint_symbol_338);
- x = (x + tint_symbol_339);
- x = (x + tint_symbol_340);
- x = (x + tint_symbol_341);
- x = (x + tint_symbol_342);
- x = (x + tint_symbol_343);
- x = (x + tint_symbol_344);
- x = (x + tint_symbol_345);
- x = (x + tint_symbol_346);
- x = (x + tint_symbol_347);
- x = (x + tint_symbol_348);
- x = (x + tint_symbol_349);
- x = (x + tint_symbol_350);
- x = (x + tint_symbol_351);
- x = (x + tint_symbol_352);
- x = (x + tint_symbol_353);
- x = (x + tint_symbol_354);
- x = (x + tint_symbol_355);
- x = (x + tint_symbol_356);
- x = (x + tint_symbol_357);
- x = (x + tint_symbol_358);
- x = (x + tint_symbol_359);
- x = (x + tint_symbol_360);
- x = (x + tint_symbol_361);
- x = (x + tint_symbol_362);
- x = (x + tint_symbol_363);
- x = (x + tint_symbol_364);
- x = (x + tint_symbol_365);
- x = (x + tint_symbol_366);
- x = (x + tint_symbol_367);
- x = (x + tint_symbol_368);
- x = (x + tint_symbol_369);
- x = (x + tint_symbol_370);
- x = (x + tint_symbol_371);
- x = (x + tint_symbol_372);
- x = (x + tint_symbol_373);
- x = (x + tint_symbol_374);
- x = (x + tint_symbol_375);
- x = (x + tint_symbol_376);
- x = (x + tint_symbol_377);
- x = (x + tint_symbol_378);
- x = (x + tint_symbol_379);
- x = (x + tint_symbol_380);
- x = (x + tint_symbol_381);
- x = (x + tint_symbol_382);
- x = (x + tint_symbol_383);
- x = (x + tint_symbol_384);
- x = (x + tint_symbol_385);
- x = (x + tint_symbol_386);
- x = (x + tint_symbol_387);
- x = (x + tint_symbol_388);
- x = (x + tint_symbol_389);
- x = (x + tint_symbol_390);
- x = (x + tint_symbol_391);
- x = (x + tint_symbol_392);
- x = (x + tint_symbol_393);
- x = (x + tint_symbol_394);
- x = (x + tint_symbol_395);
- x = (x + tint_symbol_396);
- x = (x + tint_symbol_397);
- x = (x + tint_symbol_398);
- x = (x + tint_symbol_399);
- x = (x + tint_symbol_400);
- x = (x + tint_symbol_401);
- x = (x + tint_symbol_402);
- x = (x + tint_symbol_403);
- x = (x + tint_symbol_404);
- x = (x + tint_symbol_405);
- x = (x + tint_symbol_406);
- x = (x + tint_symbol_407);
- x = (x + tint_symbol_408);
- x = (x + tint_symbol_409);
- x = (x + tint_symbol_410);
- x = (x + tint_symbol_411);
- x = (x + tint_symbol_412);
- x = (x + tint_symbol_413);
- x = (x + tint_symbol_414);
- x = (x + tint_symbol_415);
- x = (x + tint_symbol_416);
- x = (x + tint_symbol_417);
- x = (x + tint_symbol_418);
- x = (x + tint_symbol_419);
- x = (x + tint_symbol_420);
- x = (x + tint_symbol_421);
- x = (x + tint_symbol_422);
- x = (x + tint_symbol_423);
- x = (x + tint_symbol_424);
- x = (x + tint_symbol_425);
- x = (x + tint_symbol_426);
- x = (x + tint_symbol_427);
- x = (x + tint_symbol_428);
- x = (x + tint_symbol_429);
- x = (x + tint_symbol_430);
- x = (x + tint_symbol_431);
- x = (x + tint_symbol_432);
- x = (x + tint_symbol_433);
- x = (x + tint_symbol_434);
- x = (x + tint_symbol_435);
- x = (x + tint_symbol_436);
- x = (x + tint_symbol_437);
- x = (x + tint_symbol_438);
- x = (x + tint_symbol_439);
- x = (x + tint_symbol_440);
- x = (x + tint_symbol_441);
- x = (x + tint_symbol_442);
- x = (x + tint_symbol_443);
- x = (x + tint_symbol_444);
- x = (x + tint_symbol_445);
- x = (x + tint_symbol_446);
- x = (x + tint_symbol_447);
- x = (x + tint_symbol_448);
- x = (x + tint_symbol_449);
- x = (x + tint_symbol_450);
- x = (x + tint_symbol_451);
- x = (x + tint_symbol_452);
- x = (x + tint_symbol_453);
- x = (x + tint_symbol_454);
- x = (x + tint_symbol_455);
- x = (x + tint_symbol_456);
- x = (x + tint_symbol_457);
- x = (x + tint_symbol_458);
- x = (x + tint_symbol_459);
- x = (x + tint_symbol_460);
- x = (x + tint_symbol_461);
- x = (x + tint_symbol_462);
- x = (x + tint_symbol_463);
- x = (x + tint_symbol_464);
- x = (x + tint_symbol_465);
- x = (x + tint_symbol_466);
- x = (x + tint_symbol_467);
- x = (x + tint_symbol_468);
- x = (x + tint_symbol_469);
- x = (x + tint_symbol_470);
- x = (x + tint_symbol_471);
- x = (x + tint_symbol_472);
- x = (x + tint_symbol_473);
- x = (x + tint_symbol_474);
- x = (x + tint_symbol_475);
- x = (x + tint_symbol_476);
- x = (x + tint_symbol_477);
- x = (x + tint_symbol_478);
- x = (x + tint_symbol_479);
- x = (x + tint_symbol_480);
- x = (x + tint_symbol_481);
- x = (x + tint_symbol_482);
- x = (x + tint_symbol_483);
- x = (x + tint_symbol_484);
- x = (x + tint_symbol_485);
- x = (x + tint_symbol_486);
- x = (x + tint_symbol_487);
- x = (x + tint_symbol_488);
- x = (x + tint_symbol_489);
- x = (x + tint_symbol_490);
- x = (x + tint_symbol_491);
- x = (x + tint_symbol_492);
- x = (x + tint_symbol_493);
- x = (x + tint_symbol_494);
- x = (x + tint_symbol_495);
- x = (x + tint_symbol_496);
- x = (x + tint_symbol_497);
- x = (x + tint_symbol_498);
- x = (x + tint_symbol_499);
- x = (x + tint_symbol_500);
- x = (x + tint_symbol_501);
- x = (x + tint_symbol_502);
- x = (x + tint_symbol_503);
- x = (x + tint_symbol_504);
- x = (x + tint_symbol_505);
- x = (x + tint_symbol_506);
- x = (x + tint_symbol_507);
- x = (x + tint_symbol_508);
- x = (x + tint_symbol_509);
- x = (x + tint_symbol_510);
- x = (x + tint_symbol_511);
- x = (x + tint_symbol_512);
- x = (x + tint_symbol_513);
- x = (x + tint_symbol_514);
- x = (x + tint_symbol_515);
- x = (x + tint_symbol_516);
- x = (x + tint_symbol_517);
- x = (x + tint_symbol_518);
- x = (x + tint_symbol_519);
- x = (x + tint_symbol_520);
- x = (x + tint_symbol_521);
- x = (x + tint_symbol_522);
- x = (x + tint_symbol_523);
- x = (x + tint_symbol_524);
- x = (x + tint_symbol_525);
- x = (x + tint_symbol_526);
- x = (x + tint_symbol_527);
- x = (x + tint_symbol_528);
- x = (x + tint_symbol_529);
- x = (x + tint_symbol_530);
- x = (x + tint_symbol_531);
- x = (x + tint_symbol_532);
- x = (x + tint_symbol_533);
- x = (x + tint_symbol_534);
- x = (x + tint_symbol_535);
- x = (x + tint_symbol_536);
- x = (x + tint_symbol_537);
- x = (x + tint_symbol_538);
- x = (x + tint_symbol_539);
- x = (x + tint_symbol_540);
- x = (x + tint_symbol_541);
- x = (x + tint_symbol_542);
- x = (x + tint_symbol_543);
- x = (x + tint_symbol_544);
- x = (x + tint_symbol_545);
- x = (x + tint_symbol_546);
- x = (x + tint_symbol_547);
- x = (x + tint_symbol_548);
- x = (x + tint_symbol_549);
- x = (x + tint_symbol_550);
- x = (x + tint_symbol_551);
- x = (x + tint_symbol_552);
- x = (x + tint_symbol_553);
- x = (x + tint_symbol_554);
- x = (x + tint_symbol_555);
- x = (x + tint_symbol_556);
- x = (x + tint_symbol_557);
- x = (x + tint_symbol_558);
- x = (x + tint_symbol_559);
- x = (x + tint_symbol_560);
- x = (x + tint_symbol_561);
- x = (x + tint_symbol_562);
- x = (x + tint_symbol_563);
- x = (x + tint_symbol_564);
- x = (x + tint_symbol_565);
- x = (x + tint_symbol_566);
- x = (x + tint_symbol_567);
- x = (x + tint_symbol_568);
- x = (x + tint_symbol_569);
- x = (x + tint_symbol_570);
- x = (x + tint_symbol_571);
- x = (x + tint_symbol_572);
- x = (x + tint_symbol_573);
- x = (x + tint_symbol_574);
- x = (x + tint_symbol_575);
- x = (x + tint_symbol_576);
- x = (x + tint_symbol_577);
- x = (x + tint_symbol_578);
- x = (x + tint_symbol_579);
- x = (x + tint_symbol_580);
- x = (x + tint_symbol_581);
- x = (x + tint_symbol_582);
- x = (x + tint_symbol_583);
- x = (x + tint_symbol_584);
- x = (x + tint_symbol_585);
- x = (x + tint_symbol_586);
- x = (x + tint_symbol_587);
- x = (x + tint_symbol_588);
- x = (x + tint_symbol_589);
- x = (x + tint_symbol_590);
- x = (x + tint_symbol_591);
- x = (x + tint_symbol_592);
- x = (x + tint_symbol_593);
- x = (x + tint_symbol_594);
- x = (x + tint_symbol_595);
- x = (x + tint_symbol_596);
- x = (x + tint_symbol_597);
- x = (x + tint_symbol_598);
- x = (x + tint_symbol_599);
- x = (x + tint_symbol_600);
- x = (x + tint_symbol_601);
- x = (x + tint_symbol_602);
- x = (x + tint_symbol_603);
- x = (x + tint_symbol_604);
- x = (x + tint_symbol_605);
- x = (x + tint_symbol_606);
- x = (x + tint_symbol_607);
- x = (x + tint_symbol_608);
- x = (x + tint_symbol_609);
- x = (x + tint_symbol_610);
- x = (x + tint_symbol_611);
- x = (x + tint_symbol_612);
- x = (x + tint_symbol_613);
- x = (x + tint_symbol_614);
- x = (x + tint_symbol_615);
- x = (x + tint_symbol_616);
- x = (x + tint_symbol_617);
- x = (x + tint_symbol_618);
- x = (x + tint_symbol_619);
- x = (x + tint_symbol_620);
- x = (x + tint_symbol_621);
- x = (x + tint_symbol_622);
- x = (x + tint_symbol_623);
- x = (x + tint_symbol_624);
- x = (x + tint_symbol_625);
- x = (x + tint_symbol_626);
- x = (x + tint_symbol_627);
- x = (x + tint_symbol_628);
- x = (x + tint_symbol_629);
- x = (x + tint_symbol_630);
- x = (x + tint_symbol_631);
- x = (x + tint_symbol_632);
- x = (x + tint_symbol_633);
- x = (x + tint_symbol_634);
- x = (x + tint_symbol_635);
- x = (x + tint_symbol_636);
- x = (x + tint_symbol_637);
- x = (x + tint_symbol_638);
- x = (x + tint_symbol_639);
- x = (x + tint_symbol_640);
- x = (x + tint_symbol_641);
- x = (x + tint_symbol_642);
- x = (x + tint_symbol_643);
- x = (x + tint_symbol_644);
- x = (x + tint_symbol_645);
- x = (x + tint_symbol_646);
- x = (x + tint_symbol_647);
- x = (x + tint_symbol_648);
- x = (x + tint_symbol_649);
- x = (x + tint_symbol_650);
- x = (x + tint_symbol_651);
- x = (x + tint_symbol_652);
- x = (x + tint_symbol_653);
- x = (x + tint_symbol_654);
- x = (x + tint_symbol_655);
- x = (x + tint_symbol_656);
- x = (x + tint_symbol_657);
- x = (x + tint_symbol_658);
- x = (x + tint_symbol_659);
- x = (x + tint_symbol_660);
- x = (x + tint_symbol_661);
- x = (x + tint_symbol_662);
- x = (x + tint_symbol_663);
- x = (x + tint_symbol_664);
- x = (x + tint_symbol_665);
- x = (x + tint_symbol_666);
- x = (x + tint_symbol_667);
- x = (x + tint_symbol_668);
- x = (x + tint_symbol_669);
- x = (x + tint_symbol_670);
- x = (x + tint_symbol_671);
- x = (x + tint_symbol_672);
- x = (x + tint_symbol_673);
- x = (x + tint_symbol_674);
- x = (x + tint_symbol_675);
- x = (x + tint_symbol_676);
- x = (x + tint_symbol_677);
- x = (x + tint_symbol_678);
- x = (x + tint_symbol_679);
- x = (x + tint_symbol_680);
- x = (x + tint_symbol_681);
- x = (x + tint_symbol_682);
- x = (x + tint_symbol_683);
- x = (x + tint_symbol_684);
- x = (x + tint_symbol_685);
- x = (x + tint_symbol_686);
- x = (x + tint_symbol_687);
- x = (x + tint_symbol_688);
- x = (x + tint_symbol_689);
- x = (x + tint_symbol_690);
- x = (x + tint_symbol_691);
- x = (x + tint_symbol_692);
- x = (x + tint_symbol_693);
- x = (x + tint_symbol_694);
- x = (x + tint_symbol_695);
- x = (x + tint_symbol_696);
- x = (x + tint_symbol_697);
- x = (x + tint_symbol_698);
- x = (x + tint_symbol_699);
- x = (x + tint_symbol_700);
- x = (x + tint_symbol_701);
- x = (x + tint_symbol_702);
- x = (x + tint_symbol_703);
- x = (x + tint_symbol_704);
- x = (x + tint_symbol_705);
- x = (x + tint_symbol_706);
- x = (x + tint_symbol_707);
- x = (x + tint_symbol_708);
- x = (x + tint_symbol_709);
- x = (x + tint_symbol_710);
- x = (x + tint_symbol_711);
- x = (x + tint_symbol_712);
- x = (x + tint_symbol_713);
- x = (x + tint_symbol_714);
- x = (x + tint_symbol_715);
- x = (x + tint_symbol_716);
- x = (x + tint_symbol_717);
- x = (x + tint_symbol_718);
- x = (x + tint_symbol_719);
- x = (x + tint_symbol_720);
- x = (x + tint_symbol_721);
- x = (x + tint_symbol_722);
- x = (x + tint_symbol_723);
- x = (x + tint_symbol_724);
- x = (x + tint_symbol_725);
- x = (x + tint_symbol_726);
- x = (x + tint_symbol_727);
- x = (x + tint_symbol_728);
- x = (x + tint_symbol_729);
- x = (x + tint_symbol_730);
- x = (x + tint_symbol_731);
- x = (x + tint_symbol_732);
- x = (x + tint_symbol_733);
- x = (x + tint_symbol_734);
- x = (x + tint_symbol_735);
- x = (x + tint_symbol_736);
- x = (x + tint_symbol_737);
- x = (x + tint_symbol_738);
- x = (x + tint_symbol_739);
- x = (x + tint_symbol_740);
- x = (x + tint_symbol_741);
- x = (x + tint_symbol_742);
- x = (x + tint_symbol_743);
- x = (x + tint_symbol_744);
- x = (x + tint_symbol_745);
- x = (x + tint_symbol_746);
- x = (x + tint_symbol_747);
- x = (x + tint_symbol_748);
- x = (x + tint_symbol_749);
- x = (x + tint_symbol_750);
- x = (x + tint_symbol_751);
- x = (x + tint_symbol_752);
- x = (x + tint_symbol_753);
- x = (x + tint_symbol_754);
- x = (x + tint_symbol_755);
- x = (x + tint_symbol_756);
- x = (x + tint_symbol_757);
- x = (x + tint_symbol_758);
- x = (x + tint_symbol_759);
- x = (x + tint_symbol_760);
- x = (x + tint_symbol_761);
- x = (x + tint_symbol_762);
- x = (x + tint_symbol_763);
- x = (x + tint_symbol_764);
- x = (x + tint_symbol_765);
- x = (x + tint_symbol_766);
- x = (x + tint_symbol_767);
- x = (x + tint_symbol_768);
- x = (x + tint_symbol_769);
- x = (x + tint_symbol_770);
- x = (x + tint_symbol_771);
- x = (x + tint_symbol_772);
- x = (x + tint_symbol_773);
- x = (x + tint_symbol_774);
- x = (x + tint_symbol_775);
- x = (x + tint_symbol_776);
- x = (x + tint_symbol_777);
- x = (x + tint_symbol_778);
- x = (x + tint_symbol_779);
- x = (x + tint_symbol_780);
- x = (x + tint_symbol_781);
- x = (x + tint_symbol_782);
- x = (x + tint_symbol_783);
- x = (x + tint_symbol_784);
- x = (x + tint_symbol_785);
- x = (x + tint_symbol_786);
- x = (x + tint_symbol_787);
- x = (x + tint_symbol_788);
- x = (x + tint_symbol_789);
- x = (x + tint_symbol_790);
- x = (x + tint_symbol_791);
- x = (x + tint_symbol_792);
- x = (x + tint_symbol_793);
- x = (x + tint_symbol_794);
- x = (x + tint_symbol_795);
- x = (x + tint_symbol_796);
- x = (x + tint_symbol_797);
- x = (x + tint_symbol_798);
- x = (x + tint_symbol_799);
- x = (x + tint_symbol_800);
- x = (x + tint_symbol_801);
- x = (x + tint_symbol_802);
- x = (x + tint_symbol_803);
- x = (x + tint_symbol_804);
- x = (x + tint_symbol_805);
- x = (x + tint_symbol_806);
- x = (x + tint_symbol_807);
- x = (x + tint_symbol_808);
- x = (x + tint_symbol_809);
- x = (x + tint_symbol_810);
- x = (x + tint_symbol_811);
- x = (x + tint_symbol_812);
- x = (x + tint_symbol_813);
- x = (x + tint_symbol_814);
- x = (x + tint_symbol_815);
- x = (x + tint_symbol_816);
- x = (x + tint_symbol_817);
- x = (x + tint_symbol_818);
- x = (x + tint_symbol_819);
- x = (x + tint_symbol_820);
- x = (x + tint_symbol_821);
- x = (x + tint_symbol_822);
- x = (x + tint_symbol_823);
- x = (x + tint_symbol_824);
- x = (x + tint_symbol_825);
- x = (x + tint_symbol_826);
- x = (x + tint_symbol_827);
- x = (x + tint_symbol_828);
- x = (x + tint_symbol_829);
- x = (x + tint_symbol_830);
- x = (x + tint_symbol_831);
- x = (x + tint_symbol_832);
- x = (x + tint_symbol_833);
- x = (x + tint_symbol_834);
- x = (x + tint_symbol_835);
- x = (x + tint_symbol_836);
- x = (x + tint_symbol_837);
- x = (x + tint_symbol_838);
- x = (x + tint_symbol_839);
- x = (x + tint_symbol_840);
- x = (x + tint_symbol_841);
- x = (x + tint_symbol_842);
- x = (x + tint_symbol_843);
- x = (x + tint_symbol_844);
- x = (x + tint_symbol_845);
- x = (x + tint_symbol_846);
- x = (x + tint_symbol_847);
- x = (x + tint_symbol_848);
- x = (x + tint_symbol_849);
- x = (x + tint_symbol_850);
- x = (x + tint_symbol_851);
- x = (x + tint_symbol_852);
- x = (x + tint_symbol_853);
- x = (x + tint_symbol_854);
- x = (x + tint_symbol_855);
- x = (x + tint_symbol_856);
- x = (x + tint_symbol_857);
- x = (x + tint_symbol_858);
- x = (x + tint_symbol_859);
- x = (x + tint_symbol_860);
- x = (x + tint_symbol_861);
- x = (x + tint_symbol_862);
- x = (x + tint_symbol_863);
- x = (x + tint_symbol_864);
- x = (x + tint_symbol_865);
- x = (x + tint_symbol_866);
- x = (x + tint_symbol_867);
- x = (x + tint_symbol_868);
- x = (x + tint_symbol_869);
- x = (x + tint_symbol_870);
- x = (x + tint_symbol_871);
- x = (x + tint_symbol_872);
- x = (x + tint_symbol_873);
- x = (x + tint_symbol_874);
- x = (x + tint_symbol_875);
- x = (x + tint_symbol_876);
- x = (x + tint_symbol_877);
- x = (x + tint_symbol_878);
- x = (x + tint_symbol_879);
- x = (x + tint_symbol_880);
- x = (x + tint_symbol_881);
- x = (x + tint_symbol_882);
- x = (x + tint_symbol_883);
- x = (x + tint_symbol_884);
- x = (x + tint_symbol_885);
- x = (x + tint_symbol_886);
- x = (x + tint_symbol_887);
- x = (x + tint_symbol_888);
- x = (x + tint_symbol_889);
- x = (x + tint_symbol_890);
- x = (x + tint_symbol_891);
- x = (x + tint_symbol_892);
- x = (x + tint_symbol_893);
- x = (x + tint_symbol_894);
- x = (x + tint_symbol_895);
- x = (x + tint_symbol_896);
- x = (x + tint_symbol_897);
- x = (x + tint_symbol_898);
- x = (x + tint_symbol_899);
- x = (x + tint_symbol_900);
- x = (x + tint_symbol_901);
- x = (x + tint_symbol_902);
- x = (x + tint_symbol_903);
- x = (x + tint_symbol_904);
- x = (x + tint_symbol_905);
- x = (x + tint_symbol_906);
- x = (x + tint_symbol_907);
- x = (x + tint_symbol_908);
- x = (x + tint_symbol_909);
- x = (x + tint_symbol_910);
- x = (x + tint_symbol_911);
- x = (x + tint_symbol_912);
- x = (x + tint_symbol_913);
- x = (x + tint_symbol_914);
- x = (x + tint_symbol_915);
- x = (x + tint_symbol_916);
- x = (x + tint_symbol_917);
- x = (x + tint_symbol_918);
- x = (x + tint_symbol_919);
- x = (x + tint_symbol_920);
- x = (x + tint_symbol_921);
- x = (x + tint_symbol_922);
- x = (x + tint_symbol_923);
- x = (x + tint_symbol_924);
- x = (x + tint_symbol_925);
- x = (x + tint_symbol_926);
- x = (x + tint_symbol_927);
- x = (x + tint_symbol_928);
- x = (x + tint_symbol_929);
- x = (x + tint_symbol_930);
- x = (x + tint_symbol_931);
- x = (x + tint_symbol_932);
- x = (x + tint_symbol_933);
- x = (x + tint_symbol_934);
- x = (x + tint_symbol_935);
- x = (x + tint_symbol_936);
- x = (x + tint_symbol_937);
- x = (x + tint_symbol_938);
- x = (x + tint_symbol_939);
- x = (x + tint_symbol_940);
- x = (x + tint_symbol_941);
- x = (x + tint_symbol_942);
- x = (x + tint_symbol_943);
- x = (x + tint_symbol_944);
- x = (x + tint_symbol_945);
- x = (x + tint_symbol_946);
- x = (x + tint_symbol_947);
- x = (x + tint_symbol_948);
- x = (x + tint_symbol_949);
- x = (x + tint_symbol_950);
- x = (x + tint_symbol_951);
- x = (x + tint_symbol_952);
- x = (x + tint_symbol_953);
- x = (x + tint_symbol_954);
- x = (x + tint_symbol_955);
- x = (x + tint_symbol_956);
- x = (x + tint_symbol_957);
- x = (x + tint_symbol_958);
- x = (x + tint_symbol_959);
- x = (x + tint_symbol_960);
- x = (x + tint_symbol_961);
- x = (x + tint_symbol_962);
- x = (x + tint_symbol_963);
- x = (x + tint_symbol_964);
- x = (x + tint_symbol_965);
- x = (x + tint_symbol_966);
- x = (x + tint_symbol_967);
- x = (x + tint_symbol_968);
- x = (x + tint_symbol_969);
- x = (x + tint_symbol_970);
- x = (x + tint_symbol_971);
- x = (x + tint_symbol_972);
- x = (x + tint_symbol_973);
- x = (x + tint_symbol_974);
- x = (x + tint_symbol_975);
- x = (x + tint_symbol_976);
- x = (x + tint_symbol_977);
- x = (x + tint_symbol_978);
- x = (x + tint_symbol_979);
- x = (x + tint_symbol_980);
- x = (x + tint_symbol_981);
- x = (x + tint_symbol_982);
- x = (x + tint_symbol_983);
- x = (x + tint_symbol_984);
- x = (x + tint_symbol_985);
- x = (x + tint_symbol_986);
- x = (x + tint_symbol_987);
- x = (x + tint_symbol_988);
- x = (x + tint_symbol_989);
- x = (x + tint_symbol_990);
- x = (x + tint_symbol_991);
- x = (x + tint_symbol_992);
- x = (x + tint_symbol_993);
- x = (x + tint_symbol_994);
- x = (x + tint_symbol_995);
- x = (x + tint_symbol_996);
- x = (x + tint_symbol_997);
- x = (x + tint_symbol_998);
- x = (x + tint_symbol_999);
- x = (x + tint_symbol_1000);
- x = (x + tint_symbol_1001);
+ x = (x + (*(tint_private_vars)).v0);
+ x = (x + (*(tint_private_vars)).v1);
+ x = (x + (*(tint_private_vars)).v2);
+ x = (x + (*(tint_private_vars)).v3);
+ x = (x + (*(tint_private_vars)).v4);
+ x = (x + (*(tint_private_vars)).v5);
+ x = (x + (*(tint_private_vars)).v6);
+ x = (x + (*(tint_private_vars)).v7);
+ x = (x + (*(tint_private_vars)).v8);
+ x = (x + (*(tint_private_vars)).v9);
+ x = (x + (*(tint_private_vars)).v10);
+ x = (x + (*(tint_private_vars)).v11);
+ x = (x + (*(tint_private_vars)).v12);
+ x = (x + (*(tint_private_vars)).v13);
+ x = (x + (*(tint_private_vars)).v14);
+ x = (x + (*(tint_private_vars)).v15);
+ x = (x + (*(tint_private_vars)).v16);
+ x = (x + (*(tint_private_vars)).v17);
+ x = (x + (*(tint_private_vars)).v18);
+ x = (x + (*(tint_private_vars)).v19);
+ x = (x + (*(tint_private_vars)).v20);
+ x = (x + (*(tint_private_vars)).v21);
+ x = (x + (*(tint_private_vars)).v22);
+ x = (x + (*(tint_private_vars)).v23);
+ x = (x + (*(tint_private_vars)).v24);
+ x = (x + (*(tint_private_vars)).v25);
+ x = (x + (*(tint_private_vars)).v26);
+ x = (x + (*(tint_private_vars)).v27);
+ x = (x + (*(tint_private_vars)).v28);
+ x = (x + (*(tint_private_vars)).v29);
+ x = (x + (*(tint_private_vars)).v30);
+ x = (x + (*(tint_private_vars)).v31);
+ x = (x + (*(tint_private_vars)).v32);
+ x = (x + (*(tint_private_vars)).v33);
+ x = (x + (*(tint_private_vars)).v34);
+ x = (x + (*(tint_private_vars)).v35);
+ x = (x + (*(tint_private_vars)).v36);
+ x = (x + (*(tint_private_vars)).v37);
+ x = (x + (*(tint_private_vars)).v38);
+ x = (x + (*(tint_private_vars)).v39);
+ x = (x + (*(tint_private_vars)).v40);
+ x = (x + (*(tint_private_vars)).v41);
+ x = (x + (*(tint_private_vars)).v42);
+ x = (x + (*(tint_private_vars)).v43);
+ x = (x + (*(tint_private_vars)).v44);
+ x = (x + (*(tint_private_vars)).v45);
+ x = (x + (*(tint_private_vars)).v46);
+ x = (x + (*(tint_private_vars)).v47);
+ x = (x + (*(tint_private_vars)).v48);
+ x = (x + (*(tint_private_vars)).v49);
+ x = (x + (*(tint_private_vars)).v50);
+ x = (x + (*(tint_private_vars)).v51);
+ x = (x + (*(tint_private_vars)).v52);
+ x = (x + (*(tint_private_vars)).v53);
+ x = (x + (*(tint_private_vars)).v54);
+ x = (x + (*(tint_private_vars)).v55);
+ x = (x + (*(tint_private_vars)).v56);
+ x = (x + (*(tint_private_vars)).v57);
+ x = (x + (*(tint_private_vars)).v58);
+ x = (x + (*(tint_private_vars)).v59);
+ x = (x + (*(tint_private_vars)).v60);
+ x = (x + (*(tint_private_vars)).v61);
+ x = (x + (*(tint_private_vars)).v62);
+ x = (x + (*(tint_private_vars)).v63);
+ x = (x + (*(tint_private_vars)).v64);
+ x = (x + (*(tint_private_vars)).v65);
+ x = (x + (*(tint_private_vars)).v66);
+ x = (x + (*(tint_private_vars)).v67);
+ x = (x + (*(tint_private_vars)).v68);
+ x = (x + (*(tint_private_vars)).v69);
+ x = (x + (*(tint_private_vars)).v70);
+ x = (x + (*(tint_private_vars)).v71);
+ x = (x + (*(tint_private_vars)).v72);
+ x = (x + (*(tint_private_vars)).v73);
+ x = (x + (*(tint_private_vars)).v74);
+ x = (x + (*(tint_private_vars)).v75);
+ x = (x + (*(tint_private_vars)).v76);
+ x = (x + (*(tint_private_vars)).v77);
+ x = (x + (*(tint_private_vars)).v78);
+ x = (x + (*(tint_private_vars)).v79);
+ x = (x + (*(tint_private_vars)).v80);
+ x = (x + (*(tint_private_vars)).v81);
+ x = (x + (*(tint_private_vars)).v82);
+ x = (x + (*(tint_private_vars)).v83);
+ x = (x + (*(tint_private_vars)).v84);
+ x = (x + (*(tint_private_vars)).v85);
+ x = (x + (*(tint_private_vars)).v86);
+ x = (x + (*(tint_private_vars)).v87);
+ x = (x + (*(tint_private_vars)).v88);
+ x = (x + (*(tint_private_vars)).v89);
+ x = (x + (*(tint_private_vars)).v90);
+ x = (x + (*(tint_private_vars)).v91);
+ x = (x + (*(tint_private_vars)).v92);
+ x = (x + (*(tint_private_vars)).v93);
+ x = (x + (*(tint_private_vars)).v94);
+ x = (x + (*(tint_private_vars)).v95);
+ x = (x + (*(tint_private_vars)).v96);
+ x = (x + (*(tint_private_vars)).v97);
+ x = (x + (*(tint_private_vars)).v98);
+ x = (x + (*(tint_private_vars)).v99);
+ x = (x + (*(tint_private_vars)).v100);
+ x = (x + (*(tint_private_vars)).v101);
+ x = (x + (*(tint_private_vars)).v102);
+ x = (x + (*(tint_private_vars)).v103);
+ x = (x + (*(tint_private_vars)).v104);
+ x = (x + (*(tint_private_vars)).v105);
+ x = (x + (*(tint_private_vars)).v106);
+ x = (x + (*(tint_private_vars)).v107);
+ x = (x + (*(tint_private_vars)).v108);
+ x = (x + (*(tint_private_vars)).v109);
+ x = (x + (*(tint_private_vars)).v110);
+ x = (x + (*(tint_private_vars)).v111);
+ x = (x + (*(tint_private_vars)).v112);
+ x = (x + (*(tint_private_vars)).v113);
+ x = (x + (*(tint_private_vars)).v114);
+ x = (x + (*(tint_private_vars)).v115);
+ x = (x + (*(tint_private_vars)).v116);
+ x = (x + (*(tint_private_vars)).v117);
+ x = (x + (*(tint_private_vars)).v118);
+ x = (x + (*(tint_private_vars)).v119);
+ x = (x + (*(tint_private_vars)).v120);
+ x = (x + (*(tint_private_vars)).v121);
+ x = (x + (*(tint_private_vars)).v122);
+ x = (x + (*(tint_private_vars)).v123);
+ x = (x + (*(tint_private_vars)).v124);
+ x = (x + (*(tint_private_vars)).v125);
+ x = (x + (*(tint_private_vars)).v126);
+ x = (x + (*(tint_private_vars)).v127);
+ x = (x + (*(tint_private_vars)).v128);
+ x = (x + (*(tint_private_vars)).v129);
+ x = (x + (*(tint_private_vars)).v130);
+ x = (x + (*(tint_private_vars)).v131);
+ x = (x + (*(tint_private_vars)).v132);
+ x = (x + (*(tint_private_vars)).v133);
+ x = (x + (*(tint_private_vars)).v134);
+ x = (x + (*(tint_private_vars)).v135);
+ x = (x + (*(tint_private_vars)).v136);
+ x = (x + (*(tint_private_vars)).v137);
+ x = (x + (*(tint_private_vars)).v138);
+ x = (x + (*(tint_private_vars)).v139);
+ x = (x + (*(tint_private_vars)).v140);
+ x = (x + (*(tint_private_vars)).v141);
+ x = (x + (*(tint_private_vars)).v142);
+ x = (x + (*(tint_private_vars)).v143);
+ x = (x + (*(tint_private_vars)).v144);
+ x = (x + (*(tint_private_vars)).v145);
+ x = (x + (*(tint_private_vars)).v146);
+ x = (x + (*(tint_private_vars)).v147);
+ x = (x + (*(tint_private_vars)).v148);
+ x = (x + (*(tint_private_vars)).v149);
+ x = (x + (*(tint_private_vars)).v150);
+ x = (x + (*(tint_private_vars)).v151);
+ x = (x + (*(tint_private_vars)).v152);
+ x = (x + (*(tint_private_vars)).v153);
+ x = (x + (*(tint_private_vars)).v154);
+ x = (x + (*(tint_private_vars)).v155);
+ x = (x + (*(tint_private_vars)).v156);
+ x = (x + (*(tint_private_vars)).v157);
+ x = (x + (*(tint_private_vars)).v158);
+ x = (x + (*(tint_private_vars)).v159);
+ x = (x + (*(tint_private_vars)).v160);
+ x = (x + (*(tint_private_vars)).v161);
+ x = (x + (*(tint_private_vars)).v162);
+ x = (x + (*(tint_private_vars)).v163);
+ x = (x + (*(tint_private_vars)).v164);
+ x = (x + (*(tint_private_vars)).v165);
+ x = (x + (*(tint_private_vars)).v166);
+ x = (x + (*(tint_private_vars)).v167);
+ x = (x + (*(tint_private_vars)).v168);
+ x = (x + (*(tint_private_vars)).v169);
+ x = (x + (*(tint_private_vars)).v170);
+ x = (x + (*(tint_private_vars)).v171);
+ x = (x + (*(tint_private_vars)).v172);
+ x = (x + (*(tint_private_vars)).v173);
+ x = (x + (*(tint_private_vars)).v174);
+ x = (x + (*(tint_private_vars)).v175);
+ x = (x + (*(tint_private_vars)).v176);
+ x = (x + (*(tint_private_vars)).v177);
+ x = (x + (*(tint_private_vars)).v178);
+ x = (x + (*(tint_private_vars)).v179);
+ x = (x + (*(tint_private_vars)).v180);
+ x = (x + (*(tint_private_vars)).v181);
+ x = (x + (*(tint_private_vars)).v182);
+ x = (x + (*(tint_private_vars)).v183);
+ x = (x + (*(tint_private_vars)).v184);
+ x = (x + (*(tint_private_vars)).v185);
+ x = (x + (*(tint_private_vars)).v186);
+ x = (x + (*(tint_private_vars)).v187);
+ x = (x + (*(tint_private_vars)).v188);
+ x = (x + (*(tint_private_vars)).v189);
+ x = (x + (*(tint_private_vars)).v190);
+ x = (x + (*(tint_private_vars)).v191);
+ x = (x + (*(tint_private_vars)).v192);
+ x = (x + (*(tint_private_vars)).v193);
+ x = (x + (*(tint_private_vars)).v194);
+ x = (x + (*(tint_private_vars)).v195);
+ x = (x + (*(tint_private_vars)).v196);
+ x = (x + (*(tint_private_vars)).v197);
+ x = (x + (*(tint_private_vars)).v198);
+ x = (x + (*(tint_private_vars)).v199);
+ x = (x + (*(tint_private_vars)).v200);
+ x = (x + (*(tint_private_vars)).v201);
+ x = (x + (*(tint_private_vars)).v202);
+ x = (x + (*(tint_private_vars)).v203);
+ x = (x + (*(tint_private_vars)).v204);
+ x = (x + (*(tint_private_vars)).v205);
+ x = (x + (*(tint_private_vars)).v206);
+ x = (x + (*(tint_private_vars)).v207);
+ x = (x + (*(tint_private_vars)).v208);
+ x = (x + (*(tint_private_vars)).v209);
+ x = (x + (*(tint_private_vars)).v210);
+ x = (x + (*(tint_private_vars)).v211);
+ x = (x + (*(tint_private_vars)).v212);
+ x = (x + (*(tint_private_vars)).v213);
+ x = (x + (*(tint_private_vars)).v214);
+ x = (x + (*(tint_private_vars)).v215);
+ x = (x + (*(tint_private_vars)).v216);
+ x = (x + (*(tint_private_vars)).v217);
+ x = (x + (*(tint_private_vars)).v218);
+ x = (x + (*(tint_private_vars)).v219);
+ x = (x + (*(tint_private_vars)).v220);
+ x = (x + (*(tint_private_vars)).v221);
+ x = (x + (*(tint_private_vars)).v222);
+ x = (x + (*(tint_private_vars)).v223);
+ x = (x + (*(tint_private_vars)).v224);
+ x = (x + (*(tint_private_vars)).v225);
+ x = (x + (*(tint_private_vars)).v226);
+ x = (x + (*(tint_private_vars)).v227);
+ x = (x + (*(tint_private_vars)).v228);
+ x = (x + (*(tint_private_vars)).v229);
+ x = (x + (*(tint_private_vars)).v230);
+ x = (x + (*(tint_private_vars)).v231);
+ x = (x + (*(tint_private_vars)).v232);
+ x = (x + (*(tint_private_vars)).v233);
+ x = (x + (*(tint_private_vars)).v234);
+ x = (x + (*(tint_private_vars)).v235);
+ x = (x + (*(tint_private_vars)).v236);
+ x = (x + (*(tint_private_vars)).v237);
+ x = (x + (*(tint_private_vars)).v238);
+ x = (x + (*(tint_private_vars)).v239);
+ x = (x + (*(tint_private_vars)).v240);
+ x = (x + (*(tint_private_vars)).v241);
+ x = (x + (*(tint_private_vars)).v242);
+ x = (x + (*(tint_private_vars)).v243);
+ x = (x + (*(tint_private_vars)).v244);
+ x = (x + (*(tint_private_vars)).v245);
+ x = (x + (*(tint_private_vars)).v246);
+ x = (x + (*(tint_private_vars)).v247);
+ x = (x + (*(tint_private_vars)).v248);
+ x = (x + (*(tint_private_vars)).v249);
+ x = (x + (*(tint_private_vars)).v250);
+ x = (x + (*(tint_private_vars)).v251);
+ x = (x + (*(tint_private_vars)).v252);
+ x = (x + (*(tint_private_vars)).v253);
+ x = (x + (*(tint_private_vars)).v254);
+ x = (x + (*(tint_private_vars)).v255);
+ x = (x + (*(tint_private_vars)).v256);
+ x = (x + (*(tint_private_vars)).v257);
+ x = (x + (*(tint_private_vars)).v258);
+ x = (x + (*(tint_private_vars)).v259);
+ x = (x + (*(tint_private_vars)).v260);
+ x = (x + (*(tint_private_vars)).v261);
+ x = (x + (*(tint_private_vars)).v262);
+ x = (x + (*(tint_private_vars)).v263);
+ x = (x + (*(tint_private_vars)).v264);
+ x = (x + (*(tint_private_vars)).v265);
+ x = (x + (*(tint_private_vars)).v266);
+ x = (x + (*(tint_private_vars)).v267);
+ x = (x + (*(tint_private_vars)).v268);
+ x = (x + (*(tint_private_vars)).v269);
+ x = (x + (*(tint_private_vars)).v270);
+ x = (x + (*(tint_private_vars)).v271);
+ x = (x + (*(tint_private_vars)).v272);
+ x = (x + (*(tint_private_vars)).v273);
+ x = (x + (*(tint_private_vars)).v274);
+ x = (x + (*(tint_private_vars)).v275);
+ x = (x + (*(tint_private_vars)).v276);
+ x = (x + (*(tint_private_vars)).v277);
+ x = (x + (*(tint_private_vars)).v278);
+ x = (x + (*(tint_private_vars)).v279);
+ x = (x + (*(tint_private_vars)).v280);
+ x = (x + (*(tint_private_vars)).v281);
+ x = (x + (*(tint_private_vars)).v282);
+ x = (x + (*(tint_private_vars)).v283);
+ x = (x + (*(tint_private_vars)).v284);
+ x = (x + (*(tint_private_vars)).v285);
+ x = (x + (*(tint_private_vars)).v286);
+ x = (x + (*(tint_private_vars)).v287);
+ x = (x + (*(tint_private_vars)).v288);
+ x = (x + (*(tint_private_vars)).v289);
+ x = (x + (*(tint_private_vars)).v290);
+ x = (x + (*(tint_private_vars)).v291);
+ x = (x + (*(tint_private_vars)).v292);
+ x = (x + (*(tint_private_vars)).v293);
+ x = (x + (*(tint_private_vars)).v294);
+ x = (x + (*(tint_private_vars)).v295);
+ x = (x + (*(tint_private_vars)).v296);
+ x = (x + (*(tint_private_vars)).v297);
+ x = (x + (*(tint_private_vars)).v298);
+ x = (x + (*(tint_private_vars)).v299);
+ x = (x + (*(tint_private_vars)).v300);
+ x = (x + (*(tint_private_vars)).v301);
+ x = (x + (*(tint_private_vars)).v302);
+ x = (x + (*(tint_private_vars)).v303);
+ x = (x + (*(tint_private_vars)).v304);
+ x = (x + (*(tint_private_vars)).v305);
+ x = (x + (*(tint_private_vars)).v306);
+ x = (x + (*(tint_private_vars)).v307);
+ x = (x + (*(tint_private_vars)).v308);
+ x = (x + (*(tint_private_vars)).v309);
+ x = (x + (*(tint_private_vars)).v310);
+ x = (x + (*(tint_private_vars)).v311);
+ x = (x + (*(tint_private_vars)).v312);
+ x = (x + (*(tint_private_vars)).v313);
+ x = (x + (*(tint_private_vars)).v314);
+ x = (x + (*(tint_private_vars)).v315);
+ x = (x + (*(tint_private_vars)).v316);
+ x = (x + (*(tint_private_vars)).v317);
+ x = (x + (*(tint_private_vars)).v318);
+ x = (x + (*(tint_private_vars)).v319);
+ x = (x + (*(tint_private_vars)).v320);
+ x = (x + (*(tint_private_vars)).v321);
+ x = (x + (*(tint_private_vars)).v322);
+ x = (x + (*(tint_private_vars)).v323);
+ x = (x + (*(tint_private_vars)).v324);
+ x = (x + (*(tint_private_vars)).v325);
+ x = (x + (*(tint_private_vars)).v326);
+ x = (x + (*(tint_private_vars)).v327);
+ x = (x + (*(tint_private_vars)).v328);
+ x = (x + (*(tint_private_vars)).v329);
+ x = (x + (*(tint_private_vars)).v330);
+ x = (x + (*(tint_private_vars)).v331);
+ x = (x + (*(tint_private_vars)).v332);
+ x = (x + (*(tint_private_vars)).v333);
+ x = (x + (*(tint_private_vars)).v334);
+ x = (x + (*(tint_private_vars)).v335);
+ x = (x + (*(tint_private_vars)).v336);
+ x = (x + (*(tint_private_vars)).v337);
+ x = (x + (*(tint_private_vars)).v338);
+ x = (x + (*(tint_private_vars)).v339);
+ x = (x + (*(tint_private_vars)).v340);
+ x = (x + (*(tint_private_vars)).v341);
+ x = (x + (*(tint_private_vars)).v342);
+ x = (x + (*(tint_private_vars)).v343);
+ x = (x + (*(tint_private_vars)).v344);
+ x = (x + (*(tint_private_vars)).v345);
+ x = (x + (*(tint_private_vars)).v346);
+ x = (x + (*(tint_private_vars)).v347);
+ x = (x + (*(tint_private_vars)).v348);
+ x = (x + (*(tint_private_vars)).v349);
+ x = (x + (*(tint_private_vars)).v350);
+ x = (x + (*(tint_private_vars)).v351);
+ x = (x + (*(tint_private_vars)).v352);
+ x = (x + (*(tint_private_vars)).v353);
+ x = (x + (*(tint_private_vars)).v354);
+ x = (x + (*(tint_private_vars)).v355);
+ x = (x + (*(tint_private_vars)).v356);
+ x = (x + (*(tint_private_vars)).v357);
+ x = (x + (*(tint_private_vars)).v358);
+ x = (x + (*(tint_private_vars)).v359);
+ x = (x + (*(tint_private_vars)).v360);
+ x = (x + (*(tint_private_vars)).v361);
+ x = (x + (*(tint_private_vars)).v362);
+ x = (x + (*(tint_private_vars)).v363);
+ x = (x + (*(tint_private_vars)).v364);
+ x = (x + (*(tint_private_vars)).v365);
+ x = (x + (*(tint_private_vars)).v366);
+ x = (x + (*(tint_private_vars)).v367);
+ x = (x + (*(tint_private_vars)).v368);
+ x = (x + (*(tint_private_vars)).v369);
+ x = (x + (*(tint_private_vars)).v370);
+ x = (x + (*(tint_private_vars)).v371);
+ x = (x + (*(tint_private_vars)).v372);
+ x = (x + (*(tint_private_vars)).v373);
+ x = (x + (*(tint_private_vars)).v374);
+ x = (x + (*(tint_private_vars)).v375);
+ x = (x + (*(tint_private_vars)).v376);
+ x = (x + (*(tint_private_vars)).v377);
+ x = (x + (*(tint_private_vars)).v378);
+ x = (x + (*(tint_private_vars)).v379);
+ x = (x + (*(tint_private_vars)).v380);
+ x = (x + (*(tint_private_vars)).v381);
+ x = (x + (*(tint_private_vars)).v382);
+ x = (x + (*(tint_private_vars)).v383);
+ x = (x + (*(tint_private_vars)).v384);
+ x = (x + (*(tint_private_vars)).v385);
+ x = (x + (*(tint_private_vars)).v386);
+ x = (x + (*(tint_private_vars)).v387);
+ x = (x + (*(tint_private_vars)).v388);
+ x = (x + (*(tint_private_vars)).v389);
+ x = (x + (*(tint_private_vars)).v390);
+ x = (x + (*(tint_private_vars)).v391);
+ x = (x + (*(tint_private_vars)).v392);
+ x = (x + (*(tint_private_vars)).v393);
+ x = (x + (*(tint_private_vars)).v394);
+ x = (x + (*(tint_private_vars)).v395);
+ x = (x + (*(tint_private_vars)).v396);
+ x = (x + (*(tint_private_vars)).v397);
+ x = (x + (*(tint_private_vars)).v398);
+ x = (x + (*(tint_private_vars)).v399);
+ x = (x + (*(tint_private_vars)).v400);
+ x = (x + (*(tint_private_vars)).v401);
+ x = (x + (*(tint_private_vars)).v402);
+ x = (x + (*(tint_private_vars)).v403);
+ x = (x + (*(tint_private_vars)).v404);
+ x = (x + (*(tint_private_vars)).v405);
+ x = (x + (*(tint_private_vars)).v406);
+ x = (x + (*(tint_private_vars)).v407);
+ x = (x + (*(tint_private_vars)).v408);
+ x = (x + (*(tint_private_vars)).v409);
+ x = (x + (*(tint_private_vars)).v410);
+ x = (x + (*(tint_private_vars)).v411);
+ x = (x + (*(tint_private_vars)).v412);
+ x = (x + (*(tint_private_vars)).v413);
+ x = (x + (*(tint_private_vars)).v414);
+ x = (x + (*(tint_private_vars)).v415);
+ x = (x + (*(tint_private_vars)).v416);
+ x = (x + (*(tint_private_vars)).v417);
+ x = (x + (*(tint_private_vars)).v418);
+ x = (x + (*(tint_private_vars)).v419);
+ x = (x + (*(tint_private_vars)).v420);
+ x = (x + (*(tint_private_vars)).v421);
+ x = (x + (*(tint_private_vars)).v422);
+ x = (x + (*(tint_private_vars)).v423);
+ x = (x + (*(tint_private_vars)).v424);
+ x = (x + (*(tint_private_vars)).v425);
+ x = (x + (*(tint_private_vars)).v426);
+ x = (x + (*(tint_private_vars)).v427);
+ x = (x + (*(tint_private_vars)).v428);
+ x = (x + (*(tint_private_vars)).v429);
+ x = (x + (*(tint_private_vars)).v430);
+ x = (x + (*(tint_private_vars)).v431);
+ x = (x + (*(tint_private_vars)).v432);
+ x = (x + (*(tint_private_vars)).v433);
+ x = (x + (*(tint_private_vars)).v434);
+ x = (x + (*(tint_private_vars)).v435);
+ x = (x + (*(tint_private_vars)).v436);
+ x = (x + (*(tint_private_vars)).v437);
+ x = (x + (*(tint_private_vars)).v438);
+ x = (x + (*(tint_private_vars)).v439);
+ x = (x + (*(tint_private_vars)).v440);
+ x = (x + (*(tint_private_vars)).v441);
+ x = (x + (*(tint_private_vars)).v442);
+ x = (x + (*(tint_private_vars)).v443);
+ x = (x + (*(tint_private_vars)).v444);
+ x = (x + (*(tint_private_vars)).v445);
+ x = (x + (*(tint_private_vars)).v446);
+ x = (x + (*(tint_private_vars)).v447);
+ x = (x + (*(tint_private_vars)).v448);
+ x = (x + (*(tint_private_vars)).v449);
+ x = (x + (*(tint_private_vars)).v450);
+ x = (x + (*(tint_private_vars)).v451);
+ x = (x + (*(tint_private_vars)).v452);
+ x = (x + (*(tint_private_vars)).v453);
+ x = (x + (*(tint_private_vars)).v454);
+ x = (x + (*(tint_private_vars)).v455);
+ x = (x + (*(tint_private_vars)).v456);
+ x = (x + (*(tint_private_vars)).v457);
+ x = (x + (*(tint_private_vars)).v458);
+ x = (x + (*(tint_private_vars)).v459);
+ x = (x + (*(tint_private_vars)).v460);
+ x = (x + (*(tint_private_vars)).v461);
+ x = (x + (*(tint_private_vars)).v462);
+ x = (x + (*(tint_private_vars)).v463);
+ x = (x + (*(tint_private_vars)).v464);
+ x = (x + (*(tint_private_vars)).v465);
+ x = (x + (*(tint_private_vars)).v466);
+ x = (x + (*(tint_private_vars)).v467);
+ x = (x + (*(tint_private_vars)).v468);
+ x = (x + (*(tint_private_vars)).v469);
+ x = (x + (*(tint_private_vars)).v470);
+ x = (x + (*(tint_private_vars)).v471);
+ x = (x + (*(tint_private_vars)).v472);
+ x = (x + (*(tint_private_vars)).v473);
+ x = (x + (*(tint_private_vars)).v474);
+ x = (x + (*(tint_private_vars)).v475);
+ x = (x + (*(tint_private_vars)).v476);
+ x = (x + (*(tint_private_vars)).v477);
+ x = (x + (*(tint_private_vars)).v478);
+ x = (x + (*(tint_private_vars)).v479);
+ x = (x + (*(tint_private_vars)).v480);
+ x = (x + (*(tint_private_vars)).v481);
+ x = (x + (*(tint_private_vars)).v482);
+ x = (x + (*(tint_private_vars)).v483);
+ x = (x + (*(tint_private_vars)).v484);
+ x = (x + (*(tint_private_vars)).v485);
+ x = (x + (*(tint_private_vars)).v486);
+ x = (x + (*(tint_private_vars)).v487);
+ x = (x + (*(tint_private_vars)).v488);
+ x = (x + (*(tint_private_vars)).v489);
+ x = (x + (*(tint_private_vars)).v490);
+ x = (x + (*(tint_private_vars)).v491);
+ x = (x + (*(tint_private_vars)).v492);
+ x = (x + (*(tint_private_vars)).v493);
+ x = (x + (*(tint_private_vars)).v494);
+ x = (x + (*(tint_private_vars)).v495);
+ x = (x + (*(tint_private_vars)).v496);
+ x = (x + (*(tint_private_vars)).v497);
+ x = (x + (*(tint_private_vars)).v498);
+ x = (x + (*(tint_private_vars)).v499);
+ x = (x + (*(tint_private_vars)).v500);
+ x = (x + (*(tint_private_vars)).v501);
+ x = (x + (*(tint_private_vars)).v502);
+ x = (x + (*(tint_private_vars)).v503);
+ x = (x + (*(tint_private_vars)).v504);
+ x = (x + (*(tint_private_vars)).v505);
+ x = (x + (*(tint_private_vars)).v506);
+ x = (x + (*(tint_private_vars)).v507);
+ x = (x + (*(tint_private_vars)).v508);
+ x = (x + (*(tint_private_vars)).v509);
+ x = (x + (*(tint_private_vars)).v510);
+ x = (x + (*(tint_private_vars)).v511);
+ x = (x + (*(tint_private_vars)).v512);
+ x = (x + (*(tint_private_vars)).v513);
+ x = (x + (*(tint_private_vars)).v514);
+ x = (x + (*(tint_private_vars)).v515);
+ x = (x + (*(tint_private_vars)).v516);
+ x = (x + (*(tint_private_vars)).v517);
+ x = (x + (*(tint_private_vars)).v518);
+ x = (x + (*(tint_private_vars)).v519);
+ x = (x + (*(tint_private_vars)).v520);
+ x = (x + (*(tint_private_vars)).v521);
+ x = (x + (*(tint_private_vars)).v522);
+ x = (x + (*(tint_private_vars)).v523);
+ x = (x + (*(tint_private_vars)).v524);
+ x = (x + (*(tint_private_vars)).v525);
+ x = (x + (*(tint_private_vars)).v526);
+ x = (x + (*(tint_private_vars)).v527);
+ x = (x + (*(tint_private_vars)).v528);
+ x = (x + (*(tint_private_vars)).v529);
+ x = (x + (*(tint_private_vars)).v530);
+ x = (x + (*(tint_private_vars)).v531);
+ x = (x + (*(tint_private_vars)).v532);
+ x = (x + (*(tint_private_vars)).v533);
+ x = (x + (*(tint_private_vars)).v534);
+ x = (x + (*(tint_private_vars)).v535);
+ x = (x + (*(tint_private_vars)).v536);
+ x = (x + (*(tint_private_vars)).v537);
+ x = (x + (*(tint_private_vars)).v538);
+ x = (x + (*(tint_private_vars)).v539);
+ x = (x + (*(tint_private_vars)).v540);
+ x = (x + (*(tint_private_vars)).v541);
+ x = (x + (*(tint_private_vars)).v542);
+ x = (x + (*(tint_private_vars)).v543);
+ x = (x + (*(tint_private_vars)).v544);
+ x = (x + (*(tint_private_vars)).v545);
+ x = (x + (*(tint_private_vars)).v546);
+ x = (x + (*(tint_private_vars)).v547);
+ x = (x + (*(tint_private_vars)).v548);
+ x = (x + (*(tint_private_vars)).v549);
+ x = (x + (*(tint_private_vars)).v550);
+ x = (x + (*(tint_private_vars)).v551);
+ x = (x + (*(tint_private_vars)).v552);
+ x = (x + (*(tint_private_vars)).v553);
+ x = (x + (*(tint_private_vars)).v554);
+ x = (x + (*(tint_private_vars)).v555);
+ x = (x + (*(tint_private_vars)).v556);
+ x = (x + (*(tint_private_vars)).v557);
+ x = (x + (*(tint_private_vars)).v558);
+ x = (x + (*(tint_private_vars)).v559);
+ x = (x + (*(tint_private_vars)).v560);
+ x = (x + (*(tint_private_vars)).v561);
+ x = (x + (*(tint_private_vars)).v562);
+ x = (x + (*(tint_private_vars)).v563);
+ x = (x + (*(tint_private_vars)).v564);
+ x = (x + (*(tint_private_vars)).v565);
+ x = (x + (*(tint_private_vars)).v566);
+ x = (x + (*(tint_private_vars)).v567);
+ x = (x + (*(tint_private_vars)).v568);
+ x = (x + (*(tint_private_vars)).v569);
+ x = (x + (*(tint_private_vars)).v570);
+ x = (x + (*(tint_private_vars)).v571);
+ x = (x + (*(tint_private_vars)).v572);
+ x = (x + (*(tint_private_vars)).v573);
+ x = (x + (*(tint_private_vars)).v574);
+ x = (x + (*(tint_private_vars)).v575);
+ x = (x + (*(tint_private_vars)).v576);
+ x = (x + (*(tint_private_vars)).v577);
+ x = (x + (*(tint_private_vars)).v578);
+ x = (x + (*(tint_private_vars)).v579);
+ x = (x + (*(tint_private_vars)).v580);
+ x = (x + (*(tint_private_vars)).v581);
+ x = (x + (*(tint_private_vars)).v582);
+ x = (x + (*(tint_private_vars)).v583);
+ x = (x + (*(tint_private_vars)).v584);
+ x = (x + (*(tint_private_vars)).v585);
+ x = (x + (*(tint_private_vars)).v586);
+ x = (x + (*(tint_private_vars)).v587);
+ x = (x + (*(tint_private_vars)).v588);
+ x = (x + (*(tint_private_vars)).v589);
+ x = (x + (*(tint_private_vars)).v590);
+ x = (x + (*(tint_private_vars)).v591);
+ x = (x + (*(tint_private_vars)).v592);
+ x = (x + (*(tint_private_vars)).v593);
+ x = (x + (*(tint_private_vars)).v594);
+ x = (x + (*(tint_private_vars)).v595);
+ x = (x + (*(tint_private_vars)).v596);
+ x = (x + (*(tint_private_vars)).v597);
+ x = (x + (*(tint_private_vars)).v598);
+ x = (x + (*(tint_private_vars)).v599);
+ x = (x + (*(tint_private_vars)).v600);
+ x = (x + (*(tint_private_vars)).v601);
+ x = (x + (*(tint_private_vars)).v602);
+ x = (x + (*(tint_private_vars)).v603);
+ x = (x + (*(tint_private_vars)).v604);
+ x = (x + (*(tint_private_vars)).v605);
+ x = (x + (*(tint_private_vars)).v606);
+ x = (x + (*(tint_private_vars)).v607);
+ x = (x + (*(tint_private_vars)).v608);
+ x = (x + (*(tint_private_vars)).v609);
+ x = (x + (*(tint_private_vars)).v610);
+ x = (x + (*(tint_private_vars)).v611);
+ x = (x + (*(tint_private_vars)).v612);
+ x = (x + (*(tint_private_vars)).v613);
+ x = (x + (*(tint_private_vars)).v614);
+ x = (x + (*(tint_private_vars)).v615);
+ x = (x + (*(tint_private_vars)).v616);
+ x = (x + (*(tint_private_vars)).v617);
+ x = (x + (*(tint_private_vars)).v618);
+ x = (x + (*(tint_private_vars)).v619);
+ x = (x + (*(tint_private_vars)).v620);
+ x = (x + (*(tint_private_vars)).v621);
+ x = (x + (*(tint_private_vars)).v622);
+ x = (x + (*(tint_private_vars)).v623);
+ x = (x + (*(tint_private_vars)).v624);
+ x = (x + (*(tint_private_vars)).v625);
+ x = (x + (*(tint_private_vars)).v626);
+ x = (x + (*(tint_private_vars)).v627);
+ x = (x + (*(tint_private_vars)).v628);
+ x = (x + (*(tint_private_vars)).v629);
+ x = (x + (*(tint_private_vars)).v630);
+ x = (x + (*(tint_private_vars)).v631);
+ x = (x + (*(tint_private_vars)).v632);
+ x = (x + (*(tint_private_vars)).v633);
+ x = (x + (*(tint_private_vars)).v634);
+ x = (x + (*(tint_private_vars)).v635);
+ x = (x + (*(tint_private_vars)).v636);
+ x = (x + (*(tint_private_vars)).v637);
+ x = (x + (*(tint_private_vars)).v638);
+ x = (x + (*(tint_private_vars)).v639);
+ x = (x + (*(tint_private_vars)).v640);
+ x = (x + (*(tint_private_vars)).v641);
+ x = (x + (*(tint_private_vars)).v642);
+ x = (x + (*(tint_private_vars)).v643);
+ x = (x + (*(tint_private_vars)).v644);
+ x = (x + (*(tint_private_vars)).v645);
+ x = (x + (*(tint_private_vars)).v646);
+ x = (x + (*(tint_private_vars)).v647);
+ x = (x + (*(tint_private_vars)).v648);
+ x = (x + (*(tint_private_vars)).v649);
+ x = (x + (*(tint_private_vars)).v650);
+ x = (x + (*(tint_private_vars)).v651);
+ x = (x + (*(tint_private_vars)).v652);
+ x = (x + (*(tint_private_vars)).v653);
+ x = (x + (*(tint_private_vars)).v654);
+ x = (x + (*(tint_private_vars)).v655);
+ x = (x + (*(tint_private_vars)).v656);
+ x = (x + (*(tint_private_vars)).v657);
+ x = (x + (*(tint_private_vars)).v658);
+ x = (x + (*(tint_private_vars)).v659);
+ x = (x + (*(tint_private_vars)).v660);
+ x = (x + (*(tint_private_vars)).v661);
+ x = (x + (*(tint_private_vars)).v662);
+ x = (x + (*(tint_private_vars)).v663);
+ x = (x + (*(tint_private_vars)).v664);
+ x = (x + (*(tint_private_vars)).v665);
+ x = (x + (*(tint_private_vars)).v666);
+ x = (x + (*(tint_private_vars)).v667);
+ x = (x + (*(tint_private_vars)).v668);
+ x = (x + (*(tint_private_vars)).v669);
+ x = (x + (*(tint_private_vars)).v670);
+ x = (x + (*(tint_private_vars)).v671);
+ x = (x + (*(tint_private_vars)).v672);
+ x = (x + (*(tint_private_vars)).v673);
+ x = (x + (*(tint_private_vars)).v674);
+ x = (x + (*(tint_private_vars)).v675);
+ x = (x + (*(tint_private_vars)).v676);
+ x = (x + (*(tint_private_vars)).v677);
+ x = (x + (*(tint_private_vars)).v678);
+ x = (x + (*(tint_private_vars)).v679);
+ x = (x + (*(tint_private_vars)).v680);
+ x = (x + (*(tint_private_vars)).v681);
+ x = (x + (*(tint_private_vars)).v682);
+ x = (x + (*(tint_private_vars)).v683);
+ x = (x + (*(tint_private_vars)).v684);
+ x = (x + (*(tint_private_vars)).v685);
+ x = (x + (*(tint_private_vars)).v686);
+ x = (x + (*(tint_private_vars)).v687);
+ x = (x + (*(tint_private_vars)).v688);
+ x = (x + (*(tint_private_vars)).v689);
+ x = (x + (*(tint_private_vars)).v690);
+ x = (x + (*(tint_private_vars)).v691);
+ x = (x + (*(tint_private_vars)).v692);
+ x = (x + (*(tint_private_vars)).v693);
+ x = (x + (*(tint_private_vars)).v694);
+ x = (x + (*(tint_private_vars)).v695);
+ x = (x + (*(tint_private_vars)).v696);
+ x = (x + (*(tint_private_vars)).v697);
+ x = (x + (*(tint_private_vars)).v698);
+ x = (x + (*(tint_private_vars)).v699);
+ x = (x + (*(tint_private_vars)).v700);
+ x = (x + (*(tint_private_vars)).v701);
+ x = (x + (*(tint_private_vars)).v702);
+ x = (x + (*(tint_private_vars)).v703);
+ x = (x + (*(tint_private_vars)).v704);
+ x = (x + (*(tint_private_vars)).v705);
+ x = (x + (*(tint_private_vars)).v706);
+ x = (x + (*(tint_private_vars)).v707);
+ x = (x + (*(tint_private_vars)).v708);
+ x = (x + (*(tint_private_vars)).v709);
+ x = (x + (*(tint_private_vars)).v710);
+ x = (x + (*(tint_private_vars)).v711);
+ x = (x + (*(tint_private_vars)).v712);
+ x = (x + (*(tint_private_vars)).v713);
+ x = (x + (*(tint_private_vars)).v714);
+ x = (x + (*(tint_private_vars)).v715);
+ x = (x + (*(tint_private_vars)).v716);
+ x = (x + (*(tint_private_vars)).v717);
+ x = (x + (*(tint_private_vars)).v718);
+ x = (x + (*(tint_private_vars)).v719);
+ x = (x + (*(tint_private_vars)).v720);
+ x = (x + (*(tint_private_vars)).v721);
+ x = (x + (*(tint_private_vars)).v722);
+ x = (x + (*(tint_private_vars)).v723);
+ x = (x + (*(tint_private_vars)).v724);
+ x = (x + (*(tint_private_vars)).v725);
+ x = (x + (*(tint_private_vars)).v726);
+ x = (x + (*(tint_private_vars)).v727);
+ x = (x + (*(tint_private_vars)).v728);
+ x = (x + (*(tint_private_vars)).v729);
+ x = (x + (*(tint_private_vars)).v730);
+ x = (x + (*(tint_private_vars)).v731);
+ x = (x + (*(tint_private_vars)).v732);
+ x = (x + (*(tint_private_vars)).v733);
+ x = (x + (*(tint_private_vars)).v734);
+ x = (x + (*(tint_private_vars)).v735);
+ x = (x + (*(tint_private_vars)).v736);
+ x = (x + (*(tint_private_vars)).v737);
+ x = (x + (*(tint_private_vars)).v738);
+ x = (x + (*(tint_private_vars)).v739);
+ x = (x + (*(tint_private_vars)).v740);
+ x = (x + (*(tint_private_vars)).v741);
+ x = (x + (*(tint_private_vars)).v742);
+ x = (x + (*(tint_private_vars)).v743);
+ x = (x + (*(tint_private_vars)).v744);
+ x = (x + (*(tint_private_vars)).v745);
+ x = (x + (*(tint_private_vars)).v746);
+ x = (x + (*(tint_private_vars)).v747);
+ x = (x + (*(tint_private_vars)).v748);
+ x = (x + (*(tint_private_vars)).v749);
+ x = (x + (*(tint_private_vars)).v750);
+ x = (x + (*(tint_private_vars)).v751);
+ x = (x + (*(tint_private_vars)).v752);
+ x = (x + (*(tint_private_vars)).v753);
+ x = (x + (*(tint_private_vars)).v754);
+ x = (x + (*(tint_private_vars)).v755);
+ x = (x + (*(tint_private_vars)).v756);
+ x = (x + (*(tint_private_vars)).v757);
+ x = (x + (*(tint_private_vars)).v758);
+ x = (x + (*(tint_private_vars)).v759);
+ x = (x + (*(tint_private_vars)).v760);
+ x = (x + (*(tint_private_vars)).v761);
+ x = (x + (*(tint_private_vars)).v762);
+ x = (x + (*(tint_private_vars)).v763);
+ x = (x + (*(tint_private_vars)).v764);
+ x = (x + (*(tint_private_vars)).v765);
+ x = (x + (*(tint_private_vars)).v766);
+ x = (x + (*(tint_private_vars)).v767);
+ x = (x + (*(tint_private_vars)).v768);
+ x = (x + (*(tint_private_vars)).v769);
+ x = (x + (*(tint_private_vars)).v770);
+ x = (x + (*(tint_private_vars)).v771);
+ x = (x + (*(tint_private_vars)).v772);
+ x = (x + (*(tint_private_vars)).v773);
+ x = (x + (*(tint_private_vars)).v774);
+ x = (x + (*(tint_private_vars)).v775);
+ x = (x + (*(tint_private_vars)).v776);
+ x = (x + (*(tint_private_vars)).v777);
+ x = (x + (*(tint_private_vars)).v778);
+ x = (x + (*(tint_private_vars)).v779);
+ x = (x + (*(tint_private_vars)).v780);
+ x = (x + (*(tint_private_vars)).v781);
+ x = (x + (*(tint_private_vars)).v782);
+ x = (x + (*(tint_private_vars)).v783);
+ x = (x + (*(tint_private_vars)).v784);
+ x = (x + (*(tint_private_vars)).v785);
+ x = (x + (*(tint_private_vars)).v786);
+ x = (x + (*(tint_private_vars)).v787);
+ x = (x + (*(tint_private_vars)).v788);
+ x = (x + (*(tint_private_vars)).v789);
+ x = (x + (*(tint_private_vars)).v790);
+ x = (x + (*(tint_private_vars)).v791);
+ x = (x + (*(tint_private_vars)).v792);
+ x = (x + (*(tint_private_vars)).v793);
+ x = (x + (*(tint_private_vars)).v794);
+ x = (x + (*(tint_private_vars)).v795);
+ x = (x + (*(tint_private_vars)).v796);
+ x = (x + (*(tint_private_vars)).v797);
+ x = (x + (*(tint_private_vars)).v798);
+ x = (x + (*(tint_private_vars)).v799);
+ x = (x + (*(tint_private_vars)).v800);
+ x = (x + (*(tint_private_vars)).v801);
+ x = (x + (*(tint_private_vars)).v802);
+ x = (x + (*(tint_private_vars)).v803);
+ x = (x + (*(tint_private_vars)).v804);
+ x = (x + (*(tint_private_vars)).v805);
+ x = (x + (*(tint_private_vars)).v806);
+ x = (x + (*(tint_private_vars)).v807);
+ x = (x + (*(tint_private_vars)).v808);
+ x = (x + (*(tint_private_vars)).v809);
+ x = (x + (*(tint_private_vars)).v810);
+ x = (x + (*(tint_private_vars)).v811);
+ x = (x + (*(tint_private_vars)).v812);
+ x = (x + (*(tint_private_vars)).v813);
+ x = (x + (*(tint_private_vars)).v814);
+ x = (x + (*(tint_private_vars)).v815);
+ x = (x + (*(tint_private_vars)).v816);
+ x = (x + (*(tint_private_vars)).v817);
+ x = (x + (*(tint_private_vars)).v818);
+ x = (x + (*(tint_private_vars)).v819);
+ x = (x + (*(tint_private_vars)).v820);
+ x = (x + (*(tint_private_vars)).v821);
+ x = (x + (*(tint_private_vars)).v822);
+ x = (x + (*(tint_private_vars)).v823);
+ x = (x + (*(tint_private_vars)).v824);
+ x = (x + (*(tint_private_vars)).v825);
+ x = (x + (*(tint_private_vars)).v826);
+ x = (x + (*(tint_private_vars)).v827);
+ x = (x + (*(tint_private_vars)).v828);
+ x = (x + (*(tint_private_vars)).v829);
+ x = (x + (*(tint_private_vars)).v830);
+ x = (x + (*(tint_private_vars)).v831);
+ x = (x + (*(tint_private_vars)).v832);
+ x = (x + (*(tint_private_vars)).v833);
+ x = (x + (*(tint_private_vars)).v834);
+ x = (x + (*(tint_private_vars)).v835);
+ x = (x + (*(tint_private_vars)).v836);
+ x = (x + (*(tint_private_vars)).v837);
+ x = (x + (*(tint_private_vars)).v838);
+ x = (x + (*(tint_private_vars)).v839);
+ x = (x + (*(tint_private_vars)).v840);
+ x = (x + (*(tint_private_vars)).v841);
+ x = (x + (*(tint_private_vars)).v842);
+ x = (x + (*(tint_private_vars)).v843);
+ x = (x + (*(tint_private_vars)).v844);
+ x = (x + (*(tint_private_vars)).v845);
+ x = (x + (*(tint_private_vars)).v846);
+ x = (x + (*(tint_private_vars)).v847);
+ x = (x + (*(tint_private_vars)).v848);
+ x = (x + (*(tint_private_vars)).v849);
+ x = (x + (*(tint_private_vars)).v850);
+ x = (x + (*(tint_private_vars)).v851);
+ x = (x + (*(tint_private_vars)).v852);
+ x = (x + (*(tint_private_vars)).v853);
+ x = (x + (*(tint_private_vars)).v854);
+ x = (x + (*(tint_private_vars)).v855);
+ x = (x + (*(tint_private_vars)).v856);
+ x = (x + (*(tint_private_vars)).v857);
+ x = (x + (*(tint_private_vars)).v858);
+ x = (x + (*(tint_private_vars)).v859);
+ x = (x + (*(tint_private_vars)).v860);
+ x = (x + (*(tint_private_vars)).v861);
+ x = (x + (*(tint_private_vars)).v862);
+ x = (x + (*(tint_private_vars)).v863);
+ x = (x + (*(tint_private_vars)).v864);
+ x = (x + (*(tint_private_vars)).v865);
+ x = (x + (*(tint_private_vars)).v866);
+ x = (x + (*(tint_private_vars)).v867);
+ x = (x + (*(tint_private_vars)).v868);
+ x = (x + (*(tint_private_vars)).v869);
+ x = (x + (*(tint_private_vars)).v870);
+ x = (x + (*(tint_private_vars)).v871);
+ x = (x + (*(tint_private_vars)).v872);
+ x = (x + (*(tint_private_vars)).v873);
+ x = (x + (*(tint_private_vars)).v874);
+ x = (x + (*(tint_private_vars)).v875);
+ x = (x + (*(tint_private_vars)).v876);
+ x = (x + (*(tint_private_vars)).v877);
+ x = (x + (*(tint_private_vars)).v878);
+ x = (x + (*(tint_private_vars)).v879);
+ x = (x + (*(tint_private_vars)).v880);
+ x = (x + (*(tint_private_vars)).v881);
+ x = (x + (*(tint_private_vars)).v882);
+ x = (x + (*(tint_private_vars)).v883);
+ x = (x + (*(tint_private_vars)).v884);
+ x = (x + (*(tint_private_vars)).v885);
+ x = (x + (*(tint_private_vars)).v886);
+ x = (x + (*(tint_private_vars)).v887);
+ x = (x + (*(tint_private_vars)).v888);
+ x = (x + (*(tint_private_vars)).v889);
+ x = (x + (*(tint_private_vars)).v890);
+ x = (x + (*(tint_private_vars)).v891);
+ x = (x + (*(tint_private_vars)).v892);
+ x = (x + (*(tint_private_vars)).v893);
+ x = (x + (*(tint_private_vars)).v894);
+ x = (x + (*(tint_private_vars)).v895);
+ x = (x + (*(tint_private_vars)).v896);
+ x = (x + (*(tint_private_vars)).v897);
+ x = (x + (*(tint_private_vars)).v898);
+ x = (x + (*(tint_private_vars)).v899);
+ x = (x + (*(tint_private_vars)).v900);
+ x = (x + (*(tint_private_vars)).v901);
+ x = (x + (*(tint_private_vars)).v902);
+ x = (x + (*(tint_private_vars)).v903);
+ x = (x + (*(tint_private_vars)).v904);
+ x = (x + (*(tint_private_vars)).v905);
+ x = (x + (*(tint_private_vars)).v906);
+ x = (x + (*(tint_private_vars)).v907);
+ x = (x + (*(tint_private_vars)).v908);
+ x = (x + (*(tint_private_vars)).v909);
+ x = (x + (*(tint_private_vars)).v910);
+ x = (x + (*(tint_private_vars)).v911);
+ x = (x + (*(tint_private_vars)).v912);
+ x = (x + (*(tint_private_vars)).v913);
+ x = (x + (*(tint_private_vars)).v914);
+ x = (x + (*(tint_private_vars)).v915);
+ x = (x + (*(tint_private_vars)).v916);
+ x = (x + (*(tint_private_vars)).v917);
+ x = (x + (*(tint_private_vars)).v918);
+ x = (x + (*(tint_private_vars)).v919);
+ x = (x + (*(tint_private_vars)).v920);
+ x = (x + (*(tint_private_vars)).v921);
+ x = (x + (*(tint_private_vars)).v922);
+ x = (x + (*(tint_private_vars)).v923);
+ x = (x + (*(tint_private_vars)).v924);
+ x = (x + (*(tint_private_vars)).v925);
+ x = (x + (*(tint_private_vars)).v926);
+ x = (x + (*(tint_private_vars)).v927);
+ x = (x + (*(tint_private_vars)).v928);
+ x = (x + (*(tint_private_vars)).v929);
+ x = (x + (*(tint_private_vars)).v930);
+ x = (x + (*(tint_private_vars)).v931);
+ x = (x + (*(tint_private_vars)).v932);
+ x = (x + (*(tint_private_vars)).v933);
+ x = (x + (*(tint_private_vars)).v934);
+ x = (x + (*(tint_private_vars)).v935);
+ x = (x + (*(tint_private_vars)).v936);
+ x = (x + (*(tint_private_vars)).v937);
+ x = (x + (*(tint_private_vars)).v938);
+ x = (x + (*(tint_private_vars)).v939);
+ x = (x + (*(tint_private_vars)).v940);
+ x = (x + (*(tint_private_vars)).v941);
+ x = (x + (*(tint_private_vars)).v942);
+ x = (x + (*(tint_private_vars)).v943);
+ x = (x + (*(tint_private_vars)).v944);
+ x = (x + (*(tint_private_vars)).v945);
+ x = (x + (*(tint_private_vars)).v946);
+ x = (x + (*(tint_private_vars)).v947);
+ x = (x + (*(tint_private_vars)).v948);
+ x = (x + (*(tint_private_vars)).v949);
+ x = (x + (*(tint_private_vars)).v950);
+ x = (x + (*(tint_private_vars)).v951);
+ x = (x + (*(tint_private_vars)).v952);
+ x = (x + (*(tint_private_vars)).v953);
+ x = (x + (*(tint_private_vars)).v954);
+ x = (x + (*(tint_private_vars)).v955);
+ x = (x + (*(tint_private_vars)).v956);
+ x = (x + (*(tint_private_vars)).v957);
+ x = (x + (*(tint_private_vars)).v958);
+ x = (x + (*(tint_private_vars)).v959);
+ x = (x + (*(tint_private_vars)).v960);
+ x = (x + (*(tint_private_vars)).v961);
+ x = (x + (*(tint_private_vars)).v962);
+ x = (x + (*(tint_private_vars)).v963);
+ x = (x + (*(tint_private_vars)).v964);
+ x = (x + (*(tint_private_vars)).v965);
+ x = (x + (*(tint_private_vars)).v966);
+ x = (x + (*(tint_private_vars)).v967);
+ x = (x + (*(tint_private_vars)).v968);
+ x = (x + (*(tint_private_vars)).v969);
+ x = (x + (*(tint_private_vars)).v970);
+ x = (x + (*(tint_private_vars)).v971);
+ x = (x + (*(tint_private_vars)).v972);
+ x = (x + (*(tint_private_vars)).v973);
+ x = (x + (*(tint_private_vars)).v974);
+ x = (x + (*(tint_private_vars)).v975);
+ x = (x + (*(tint_private_vars)).v976);
+ x = (x + (*(tint_private_vars)).v977);
+ x = (x + (*(tint_private_vars)).v978);
+ x = (x + (*(tint_private_vars)).v979);
+ x = (x + (*(tint_private_vars)).v980);
+ x = (x + (*(tint_private_vars)).v981);
+ x = (x + (*(tint_private_vars)).v982);
+ x = (x + (*(tint_private_vars)).v983);
+ x = (x + (*(tint_private_vars)).v984);
+ x = (x + (*(tint_private_vars)).v985);
+ x = (x + (*(tint_private_vars)).v986);
+ x = (x + (*(tint_private_vars)).v987);
+ x = (x + (*(tint_private_vars)).v988);
+ x = (x + (*(tint_private_vars)).v989);
+ x = (x + (*(tint_private_vars)).v990);
+ x = (x + (*(tint_private_vars)).v991);
+ x = (x + (*(tint_private_vars)).v992);
+ x = (x + (*(tint_private_vars)).v993);
+ x = (x + (*(tint_private_vars)).v994);
+ x = (x + (*(tint_private_vars)).v995);
+ x = (x + (*(tint_private_vars)).v996);
+ x = (x + (*(tint_private_vars)).v997);
+ x = (x + (*(tint_private_vars)).v998);
+ x = (x + (*(tint_private_vars)).v999);
return x;
}
@@ -2010,12 +2013,13 @@
uint value [[color(0)]];
};
-uint tint_symbol_inner() {
- return foo();
+uint tint_symbol_inner(thread tint_private_vars_struct* const tint_private_vars) {
+ return foo(tint_private_vars);
}
fragment tint_symbol_1 tint_symbol() {
- uint const inner_result = tint_symbol_inner();
+ thread tint_private_vars_struct tint_private_vars = {};
+ uint const inner_result = tint_symbol_inner(&(tint_private_vars));
tint_symbol_1 wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
diff --git a/test/tint/bug/tint/1520.spvasm.expected.msl b/test/tint/bug/tint/1520.spvasm.expected.msl
index d3244ac..3a7ff63 100644
--- a/test/tint/bug/tint/1520.spvasm.expected.msl
+++ b/test/tint/bug/tint/1520.spvasm.expected.msl
@@ -14,6 +14,12 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ float4 sk_FragColor;
+ bool sk_Clockwise;
+ float4 vcolor_S0;
+};
+
struct tint_packed_vec3_f32_array_element {
/* 0x0000 */ packed_float3 elements;
/* 0x000c */ tint_array<int8_t, 4> tint_pad;
@@ -96,7 +102,7 @@
return x_66;
}
-void main_1(thread float4* const tint_symbol_6, const constant UniformBuffer_tint_packed_vec3* const tint_symbol_7, thread float4* const tint_symbol_8) {
+void main_1(thread tint_private_vars_struct* const tint_private_vars, const constant UniformBuffer_tint_packed_vec3* const tint_symbol_6) {
float4 outputColor_S0 = 0.0f;
float4 output_S1 = 0.0f;
float x_8_unknown = 0.0f;
@@ -111,9 +117,9 @@
bool x_111 = false;
bool x_114 = false;
bool x_115 = false;
- float4 const x_72 = *(tint_symbol_6);
+ float4 const x_72 = (*(tint_private_vars)).vcolor_S0;
outputColor_S0 = x_72;
- float const x_77 = (*(tint_symbol_7)).unknownInput_S1_c0;
+ float const x_77 = (*(tint_symbol_6)).unknownInput_S1_c0;
x_8_unknown = x_77;
x_9_ok = true;
x_87 = false;
@@ -154,19 +160,19 @@
x_9_ok = x_111;
x_115 = false;
if (x_111) {
- x_114 = test_int_S1_c0_b(tint_symbol_7);
+ x_114 = test_int_S1_c0_b(tint_symbol_6);
x_115 = x_114;
}
if (x_115) {
- float4 const x_122 = (*(tint_symbol_7)).ucolorGreen_S1_c0;
+ float4 const x_122 = (*(tint_symbol_6)).ucolorGreen_S1_c0;
x_116 = x_122;
} else {
- float4 const x_124 = (*(tint_symbol_7)).ucolorRed_S1_c0;
+ float4 const x_124 = (*(tint_symbol_6)).ucolorRed_S1_c0;
x_116 = x_124;
}
float4 const x_125 = x_116;
output_S1 = x_125;
- *(tint_symbol_8) = x_125;
+ (*(tint_private_vars)).sk_FragColor = x_125;
return;
}
@@ -182,19 +188,17 @@
float4 sk_FragColor_1 [[color(0)]];
};
-main_out tint_symbol_inner(bool sk_Clockwise_param, float4 vcolor_S0_param, thread float4* const tint_symbol_10, const constant UniformBuffer_tint_packed_vec3* const tint_symbol_11, thread float4* const tint_symbol_12) {
- thread bool tint_symbol_9 = false;
- tint_symbol_9 = sk_Clockwise_param;
- *(tint_symbol_10) = vcolor_S0_param;
- main_1(tint_symbol_10, tint_symbol_11, tint_symbol_12);
- main_out const tint_symbol_4 = {.sk_FragColor_1=*(tint_symbol_12)};
+main_out tint_symbol_inner(bool sk_Clockwise_param, float4 vcolor_S0_param, thread tint_private_vars_struct* const tint_private_vars, const constant UniformBuffer_tint_packed_vec3* const tint_symbol_7) {
+ (*(tint_private_vars)).sk_Clockwise = sk_Clockwise_param;
+ (*(tint_private_vars)).vcolor_S0 = vcolor_S0_param;
+ main_1(tint_private_vars, tint_symbol_7);
+ main_out const tint_symbol_4 = {.sk_FragColor_1=(*(tint_private_vars)).sk_FragColor};
return tint_symbol_4;
}
-fragment tint_symbol_3 tint_symbol(const constant UniformBuffer_tint_packed_vec3* tint_symbol_14 [[buffer(0)]], bool sk_Clockwise_param [[front_facing]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
- thread float4 tint_symbol_13 = 0.0f;
- thread float4 tint_symbol_15 = 0.0f;
- main_out const inner_result = tint_symbol_inner(sk_Clockwise_param, tint_symbol_1.vcolor_S0_param, &(tint_symbol_13), tint_symbol_14, &(tint_symbol_15));
+fragment tint_symbol_3 tint_symbol(const constant UniformBuffer_tint_packed_vec3* tint_symbol_8 [[buffer(0)]], bool sk_Clockwise_param [[front_facing]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ main_out const inner_result = tint_symbol_inner(sk_Clockwise_param, tint_symbol_1.vcolor_S0_param, &(tint_private_vars), tint_symbol_8);
tint_symbol_3 wrapper_result = {};
wrapper_result.sk_FragColor_1 = inner_result.sk_FragColor_1;
return wrapper_result;
diff --git a/test/tint/bug/tint/1703.wgsl.expected.msl b/test/tint/bug/tint/1703.wgsl.expected.msl
index c2380c4..a19c983 100644
--- a/test/tint/bug/tint/1703.wgsl.expected.msl
+++ b/test/tint/bug/tint/1703.wgsl.expected.msl
@@ -1,23 +1,27 @@
#include <metal_stdlib>
using namespace metal;
-void foo_member_initialize(thread float4* const tint_symbol, const constant float* const tint_symbol_1, texture2d<float, access::sample> tint_symbol_2, sampler tint_symbol_3) {
+struct tint_private_vars_struct {
+ float4 my_global;
+};
+
+void foo_member_initialize(thread tint_private_vars_struct* const tint_private_vars, const constant float* const tint_symbol, texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
bool2 vb2 = false;
- vb2[0] = ((*(tint_symbol))[2] != 0.0f);
- vb2[0] = (*(tint_symbol_1) == -1.0f);
- vb2 = bool2((*(tint_symbol_1) == -1.0f), false);
+ vb2[0] = ((*(tint_private_vars)).my_global[2] != 0.0f);
+ vb2[0] = (*(tint_symbol) == -1.0f);
+ vb2 = bool2((*(tint_symbol) == -1.0f), false);
if (vb2[0]) {
- float4 const r = tint_symbol_2.sample(tint_symbol_3, float2(0.0f), bias(0.0f));
+ float4 const r = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), bias(0.0f));
}
}
-void foo_default_initialize(thread float4* const tint_symbol_4, const constant float* const tint_symbol_5, texture2d<float, access::sample> tint_symbol_6, sampler tint_symbol_7) {
+void foo_default_initialize(thread tint_private_vars_struct* const tint_private_vars, const constant float* const tint_symbol_3, texture2d<float, access::sample> tint_symbol_4, sampler tint_symbol_5) {
bool2 vb2 = false;
- vb2[0] = ((*(tint_symbol_4))[2] != 0.0f);
- vb2[0] = (*(tint_symbol_5) == -1.0f);
+ vb2[0] = ((*(tint_private_vars)).my_global[2] != 0.0f);
+ vb2[0] = (*(tint_symbol_3) == -1.0f);
vb2 = bool2(false);
if (vb2[0]) {
- float4 const r = tint_symbol_6.sample(tint_symbol_7, float2(0.0f), bias(0.0f));
+ float4 const r = tint_symbol_4.sample(tint_symbol_5, float2(0.0f), bias(0.0f));
}
}
diff --git a/test/tint/bug/tint/1820.wgsl.expected.msl b/test/tint/bug/tint/1820.wgsl.expected.msl
index 4c26583..fec8589 100644
--- a/test/tint/bug/tint/1820.wgsl.expected.msl
+++ b/test/tint/bug/tint/1820.wgsl.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int global;
+};
+
int tint_ftoi(float v) {
return select(2147483647, select(int(v), (-2147483647 - 1), (v < -2147483648.0f)), (v < 2147483520.0f));
}
@@ -13,14 +17,13 @@
}
}
-int baz(int x) {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 42;
+int baz(int x, thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).global = 42;
return x;
}
-void bar(float x) {
- switch(baz(tint_ftoi(x))) {
+void bar(float x, thread tint_private_vars_struct* const tint_private_vars) {
+ switch(baz(tint_ftoi(x), tint_private_vars)) {
default: {
break;
}
diff --git a/test/tint/bug/tint/1875.wgsl b/test/tint/bug/tint/1875.wgsl
new file mode 100644
index 0000000..0c389f7
--- /dev/null
+++ b/test/tint/bug/tint/1875.wgsl
@@ -0,0 +1,28 @@
+struct Outputs {
+ data : array<u32>,
+};
+var<private> count: u32 = 0;
+
+@group(0) @binding(1) var<storage, read_write> outputs : Outputs;
+
+fn push_output(value : u32) {
+ outputs.data[count] = value;
+ count += 1;
+}
+
+@compute @workgroup_size(1)
+fn main() {
+ _ = &outputs;
+
+ var a: u32 = 0;
+ var b: u32 = 10;
+ var c: u32 = 4294967294;
+
+ a++;
+ b++;
+ c++;
+
+ push_output(a);
+ push_output(b);
+ push_output(c);
+}
diff --git a/test/tint/bug/tint/1875.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/1875.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8867c17
--- /dev/null
+++ b/test/tint/bug/tint/1875.wgsl.expected.dxc.hlsl
@@ -0,0 +1,21 @@
+static uint count = 0u;
+RWByteAddressBuffer outputs : register(u1, space0);
+
+void push_output(uint value) {
+ outputs.Store((4u * count), asuint(value));
+ count = (count + 1u);
+}
+
+[numthreads(1, 1, 1)]
+void main() {
+ uint a = 0u;
+ uint b = 10u;
+ uint c = 4294967294u;
+ a = (a + 1u);
+ b = (b + 1u);
+ c = (c + 1u);
+ push_output(a);
+ push_output(b);
+ push_output(c);
+ return;
+}
diff --git a/test/tint/bug/tint/1875.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/1875.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8867c17
--- /dev/null
+++ b/test/tint/bug/tint/1875.wgsl.expected.fxc.hlsl
@@ -0,0 +1,21 @@
+static uint count = 0u;
+RWByteAddressBuffer outputs : register(u1, space0);
+
+void push_output(uint value) {
+ outputs.Store((4u * count), asuint(value));
+ count = (count + 1u);
+}
+
+[numthreads(1, 1, 1)]
+void main() {
+ uint a = 0u;
+ uint b = 10u;
+ uint c = 4294967294u;
+ a = (a + 1u);
+ b = (b + 1u);
+ c = (c + 1u);
+ push_output(a);
+ push_output(b);
+ push_output(c);
+ return;
+}
diff --git a/test/tint/bug/tint/1875.wgsl.expected.glsl b/test/tint/bug/tint/1875.wgsl.expected.glsl
new file mode 100644
index 0000000..cca3c5c
--- /dev/null
+++ b/test/tint/bug/tint/1875.wgsl.expected.glsl
@@ -0,0 +1,29 @@
+#version 310 es
+
+uint count = 0u;
+layout(binding = 1, std430) buffer Outputs_ssbo {
+ uint data[];
+} outputs;
+
+void push_output(uint value) {
+ outputs.data[count] = value;
+ count = (count + 1u);
+}
+
+void tint_symbol() {
+ uint a = 0u;
+ uint b = 10u;
+ uint c = 4294967294u;
+ a = (a + 1u);
+ b = (b + 1u);
+ c = (c + 1u);
+ push_output(a);
+ push_output(b);
+ push_output(c);
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ tint_symbol();
+ return;
+}
diff --git a/test/tint/bug/tint/1875.wgsl.expected.msl b/test/tint/bug/tint/1875.wgsl.expected.msl
new file mode 100644
index 0000000..f3abb69
--- /dev/null
+++ b/test/tint/bug/tint/1875.wgsl.expected.msl
@@ -0,0 +1,44 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+template<typename T, size_t N>
+struct tint_array {
+ const constant T& operator[](size_t i) const constant { return elements[i]; }
+ device T& operator[](size_t i) device { return elements[i]; }
+ const device T& operator[](size_t i) const device { return elements[i]; }
+ thread T& operator[](size_t i) thread { return elements[i]; }
+ const thread T& operator[](size_t i) const thread { return elements[i]; }
+ threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
+ const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
+ T elements[N];
+};
+
+struct tint_private_vars_struct {
+ uint count;
+};
+
+struct Outputs {
+ /* 0x0000 */ tint_array<uint, 1> data;
+};
+
+void push_output(uint value, thread tint_private_vars_struct* const tint_private_vars, device Outputs* const tint_symbol_1) {
+ (*(tint_symbol_1)).data[(*(tint_private_vars)).count] = value;
+ (*(tint_private_vars)).count = ((*(tint_private_vars)).count + 1u);
+}
+
+kernel void tint_symbol(device Outputs* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.count = 0u;
+ uint a = 0u;
+ uint b = 10u;
+ uint c = 4294967294u;
+ a = (a + 1u);
+ b = (b + 1u);
+ c = (c + 1u);
+ push_output(a, &(tint_private_vars), tint_symbol_2);
+ push_output(b, &(tint_private_vars), tint_symbol_2);
+ push_output(c, &(tint_private_vars), tint_symbol_2);
+ return;
+}
+
diff --git a/test/tint/bug/tint/1875.wgsl.expected.spvasm b/test/tint/bug/tint/1875.wgsl.expected.spvasm
new file mode 100644
index 0000000..0071087
--- /dev/null
+++ b/test/tint/bug/tint/1875.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main"
+ OpExecutionMode %main LocalSize 1 1 1
+ OpName %count "count"
+ OpName %Outputs "Outputs"
+ OpMemberName %Outputs 0 "data"
+ OpName %outputs "outputs"
+ OpName %push_output "push_output"
+ OpName %value "value"
+ OpName %main "main"
+ OpName %a "a"
+ OpName %b "b"
+ OpName %c "c"
+ OpDecorate %Outputs Block
+ OpMemberDecorate %Outputs 0 Offset 0
+ OpDecorate %_runtimearr_uint ArrayStride 4
+ OpDecorate %outputs DescriptorSet 0
+ OpDecorate %outputs Binding 1
+ %uint = OpTypeInt 32 0
+ %2 = OpConstantNull %uint
+%_ptr_Private_uint = OpTypePointer Private %uint
+ %count = OpVariable %_ptr_Private_uint Private %2
+%_runtimearr_uint = OpTypeRuntimeArray %uint
+ %Outputs = OpTypeStruct %_runtimearr_uint
+%_ptr_StorageBuffer_Outputs = OpTypePointer StorageBuffer %Outputs
+ %outputs = OpVariable %_ptr_StorageBuffer_Outputs StorageBuffer
+ %void = OpTypeVoid
+ %9 = OpTypeFunction %void %uint
+ %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+ %uint_1 = OpConstant %uint 1
+ %21 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+ %uint_10 = OpConstant %uint 10
+%uint_4294967294 = OpConstant %uint 4294967294
+%push_output = OpFunction %void None %9
+ %value = OpFunctionParameter %uint
+ %13 = OpLabel
+ %15 = OpLoad %uint %count
+ %17 = OpAccessChain %_ptr_StorageBuffer_uint %outputs %uint_0 %15
+ OpStore %17 %value
+ %18 = OpLoad %uint %count
+ %20 = OpIAdd %uint %18 %uint_1
+ OpStore %count %20
+ OpReturn
+ OpFunctionEnd
+ %main = OpFunction %void None %21
+ %23 = OpLabel
+ %a = OpVariable %_ptr_Function_uint Function %2
+ %b = OpVariable %_ptr_Function_uint Function %2
+ %c = OpVariable %_ptr_Function_uint Function %2
+ OpStore %a %2
+ OpStore %b %uint_10
+ OpStore %c %uint_4294967294
+ %30 = OpLoad %uint %a
+ %31 = OpIAdd %uint %30 %uint_1
+ OpStore %a %31
+ %32 = OpLoad %uint %b
+ %33 = OpIAdd %uint %32 %uint_1
+ OpStore %b %33
+ %34 = OpLoad %uint %c
+ %35 = OpIAdd %uint %34 %uint_1
+ OpStore %c %35
+ %37 = OpLoad %uint %a
+ %36 = OpFunctionCall %void %push_output %37
+ %39 = OpLoad %uint %b
+ %38 = OpFunctionCall %void %push_output %39
+ %41 = OpLoad %uint %c
+ %40 = OpFunctionCall %void %push_output %41
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/bug/tint/1875.wgsl.expected.wgsl b/test/tint/bug/tint/1875.wgsl.expected.wgsl
new file mode 100644
index 0000000..2fa7345
--- /dev/null
+++ b/test/tint/bug/tint/1875.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+struct Outputs {
+ data : array<u32>,
+}
+
+var<private> count : u32 = 0;
+
+@group(0) @binding(1) var<storage, read_write> outputs : Outputs;
+
+fn push_output(value : u32) {
+ outputs.data[count] = value;
+ count += 1;
+}
+
+@compute @workgroup_size(1)
+fn main() {
+ _ = &(outputs);
+ var a : u32 = 0;
+ var b : u32 = 10;
+ var c : u32 = 4294967294;
+ a++;
+ b++;
+ c++;
+ push_output(a);
+ push_output(b);
+ push_output(c);
+}
diff --git a/test/tint/bug/tint/922.wgsl.expected.msl b/test/tint/bug/tint/922.wgsl.expected.msl
index 71503ce..2d9e6a2 100644
--- a/test/tint/bug/tint/922.wgsl.expected.msl
+++ b/test/tint/bug/tint/922.wgsl.expected.msl
@@ -14,6 +14,17 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ float3 a_Position1;
+ float2 a_UV1;
+ float4 a_Color1;
+ float3 a_Normal1;
+ float a_PosMtxIdx1;
+ float4 v_Color;
+ float2 v_TexCoord;
+ float4 gl_Position;
+};
+
int tint_ftoi(float v) {
return select(2147483647, select(int(v), (-2147483647 - 1), (v < -2147483648.0f)), (v < 2147483520.0f));
}
@@ -227,48 +238,48 @@
return x_e12;
}
-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) {
+void main1(thread tint_private_vars_struct* const tint_private_vars, const constant ub_PacketParams* const tint_symbol_5, const constant ub_SceneParams* const tint_symbol_6, const constant ub_MaterialParams* const tint_symbol_7) {
Mat4x3_ t_PosMtx = {};
float2 t_TexSpaceCoord = 0.0f;
- float const x_e15 = *(tint_symbol_5);
- Mat4x3_ const x_e18 = (*(tint_symbol_6)).u_PosMtx[tint_ftoi(x_e15)];
+ float const x_e15 = (*(tint_private_vars)).a_PosMtxIdx1;
+ Mat4x3_ const x_e18 = (*(tint_symbol_5)).u_PosMtx[tint_ftoi(x_e15)];
t_PosMtx = x_e18;
Mat4x3_ const x_e23 = t_PosMtx;
Mat4x4_ const x_e24 = x_Mat4x4_1(x_e23);
- float3 const x_e25 = *(tint_symbol_7);
+ float3 const x_e25 = (*(tint_private_vars)).a_Position1;
Mat4x3_ const x_e29 = t_PosMtx;
Mat4x4_ const x_e30 = x_Mat4x4_1(x_e29);
- float3 const x_e31 = *(tint_symbol_7);
+ float3 const x_e31 = (*(tint_private_vars)).a_Position1;
float4 const x_e34 = Mul(x_e30, float4(x_e31, 1.0f));
- Mat4x4_ const x_e35 = (*(tint_symbol_8)).u_Projection;
+ Mat4x4_ const x_e35 = (*(tint_symbol_6)).u_Projection;
Mat4x3_ const x_e37 = t_PosMtx;
Mat4x4_ const x_e38 = x_Mat4x4_1(x_e37);
- float3 const x_e39 = *(tint_symbol_7);
+ float3 const x_e39 = (*(tint_private_vars)).a_Position1;
Mat4x3_ const x_e43 = t_PosMtx;
Mat4x4_ const x_e44 = x_Mat4x4_1(x_e43);
- float3 const x_e45 = *(tint_symbol_7);
+ float3 const x_e45 = (*(tint_private_vars)).a_Position1;
float4 const x_e48 = Mul(x_e44, float4(x_e45, 1.0f));
float4 const x_e49 = Mul(x_e35, x_e48);
- *(tint_symbol_9) = x_e49;
- float4 const x_e50 = *(tint_symbol_10);
- *(tint_symbol_11) = x_e50;
- float4 const x_e52 = (*(tint_symbol_12)).u_Misc0_;
+ (*(tint_private_vars)).gl_Position = x_e49;
+ float4 const x_e50 = (*(tint_private_vars)).a_Color1;
+ (*(tint_private_vars)).v_Color = x_e50;
+ float4 const x_e52 = (*(tint_symbol_7)).u_Misc0_;
if ((x_e52[0] == 2.0f)) {
{
- float3 const x_e59 = *(tint_symbol_13);
- Mat4x2_ const x_e64 = (*(tint_symbol_12)).u_TexMtx[0];
- float3 const x_e65 = *(tint_symbol_13);
+ float3 const x_e59 = (*(tint_private_vars)).a_Normal1;
+ Mat4x2_ const x_e64 = (*(tint_symbol_7)).u_TexMtx[0];
+ float3 const x_e65 = (*(tint_private_vars)).a_Normal1;
float2 const x_e68 = Mul2(x_e64, float4(x_e65, 1.0f));
- *(tint_symbol_14) = x_e68.xy;
+ (*(tint_private_vars)).v_TexCoord = x_e68.xy;
return;
}
} else {
{
- float2 const x_e73 = *(tint_symbol_15);
- Mat4x2_ const x_e79 = (*(tint_symbol_12)).u_TexMtx[0];
- float2 const x_e80 = *(tint_symbol_15);
+ float2 const x_e73 = (*(tint_private_vars)).a_UV1;
+ Mat4x2_ const x_e79 = (*(tint_symbol_7)).u_TexMtx[0];
+ float2 const x_e80 = (*(tint_private_vars)).a_UV1;
float2 const x_e84 = Mul2(x_e79, float4(x_e80, 1.0f, 1.0f));
- *(tint_symbol_14) = x_e84.xy;
+ (*(tint_private_vars)).v_TexCoord = x_e84.xy;
return;
}
}
@@ -288,30 +299,23 @@
float4 member [[position]];
};
-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_16) = a_Position;
- *(tint_symbol_17) = a_UV;
- *(tint_symbol_18) = a_Color;
- *(tint_symbol_19) = a_Normal;
- *(tint_symbol_20) = a_PosMtxIdx;
- 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_24);
- float2 const x_e13 = *(tint_symbol_26);
- float4 const x_e15 = *(tint_symbol_23);
+VertexOutput tint_symbol_inner(float3 a_Position, float2 a_UV, float4 a_Color, float3 a_Normal, float a_PosMtxIdx, thread tint_private_vars_struct* const tint_private_vars, const constant ub_PacketParams* const tint_symbol_8, const constant ub_SceneParams* const tint_symbol_9, const constant ub_MaterialParams* const tint_symbol_10) {
+ (*(tint_private_vars)).a_Position1 = a_Position;
+ (*(tint_private_vars)).a_UV1 = a_UV;
+ (*(tint_private_vars)).a_Color1 = a_Color;
+ (*(tint_private_vars)).a_Normal1 = a_Normal;
+ (*(tint_private_vars)).a_PosMtxIdx1 = a_PosMtxIdx;
+ main1(tint_private_vars, tint_symbol_8, tint_symbol_9, tint_symbol_10);
+ float4 const x_e11 = (*(tint_private_vars)).v_Color;
+ float2 const x_e13 = (*(tint_private_vars)).v_TexCoord;
+ float4 const x_e15 = (*(tint_private_vars)).gl_Position;
VertexOutput const tint_symbol_4 = {.v_Color=x_e11, .v_TexCoord=x_e13, .member=x_e15};
return tint_symbol_4;
}
-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_27 = 0.0f;
- thread float2 tint_symbol_28 = 0.0f;
- 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));
+vertex tint_symbol_3 tint_symbol(const constant ub_PacketParams* tint_symbol_11 [[buffer(0)]], const constant ub_SceneParams* tint_symbol_12 [[buffer(1)]], const constant ub_MaterialParams* tint_symbol_13 [[buffer(2)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ 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_private_vars), tint_symbol_11, tint_symbol_12, tint_symbol_13);
tint_symbol_3 wrapper_result = {};
wrapper_result.v_Color = inner_result.v_Color;
wrapper_result.v_TexCoord = inner_result.v_TexCoord;
diff --git a/test/tint/bug/tint/926.wgsl.expected.msl b/test/tint/bug/tint/926.wgsl.expected.msl
index 34e8d8d..1b88705 100644
--- a/test/tint/bug/tint/926.wgsl.expected.msl
+++ b/test/tint/bug/tint/926.wgsl.expected.msl
@@ -1,17 +1,22 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint cubeVerts;
+};
+
struct DrawIndirectArgs {
/* 0x0000 */ atomic_uint vertexCount;
};
-void computeMain_inner(uint3 global_id, device DrawIndirectArgs* const tint_symbol) {
- thread uint tint_symbol_1 = 0u;
- uint const firstVertex = atomic_fetch_add_explicit(&((*(tint_symbol)).vertexCount), tint_symbol_1, memory_order_relaxed);
+void computeMain_inner(uint3 global_id, thread tint_private_vars_struct* const tint_private_vars, device DrawIndirectArgs* const tint_symbol) {
+ uint const firstVertex = atomic_fetch_add_explicit(&((*(tint_symbol)).vertexCount), (*(tint_private_vars)).cubeVerts, memory_order_relaxed);
}
-kernel void computeMain(device DrawIndirectArgs* tint_symbol_2 [[buffer(0)]], uint3 global_id [[thread_position_in_grid]]) {
- computeMain_inner(global_id, tint_symbol_2);
+kernel void computeMain(device DrawIndirectArgs* tint_symbol_1 [[buffer(0)]], uint3 global_id [[thread_position_in_grid]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.cubeVerts = 0u;
+ computeMain_inner(global_id, &(tint_private_vars), tint_symbol_1);
return;
}
diff --git a/test/tint/bug/tint/948.wgsl.expected.msl b/test/tint/bug/tint/948.wgsl.expected.msl
index 85775c9..ae3f8b8 100644
--- a/test/tint/bug/tint/948.wgsl.expected.msl
+++ b/test/tint/bug/tint/948.wgsl.expected.msl
@@ -14,6 +14,17 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ float2 tUV;
+ float mt;
+ float4 glFragColor;
+ float2 tileID_1;
+ float2 levelUnits;
+ float2 stageUnits_1;
+ float3 vPosition;
+ float2 vUV;
+};
+
struct LeftOver_tint_packed_vec3 {
/* 0x0000 */ float time;
/* 0x0004 */ uint padding;
@@ -54,8 +65,7 @@
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(0.0f));
}
-void main_1(thread float2* const tint_symbol_8, const constant LeftOver_tint_packed_vec3* 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, 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) {
- thread float tint_symbol_15 = 0.0f;
+void main_1(thread tint_private_vars_struct* const tint_private_vars, const constant LeftOver_tint_packed_vec3* const tint_symbol_8, texture2d<float, access::sample> tint_symbol_9, sampler tint_symbol_10, texture2d<float, access::sample> tint_symbol_11, texture2d<float, access::sample> tint_symbol_12, sampler 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) {
float4 color = 0.0f;
float2 tileUV = 0.0f;
float2 tileID = 0.0f;
@@ -75,17 +85,17 @@
float alpha = 0.0f;
float3 mixed = 0.0f;
color = float4(0.0f);
- float2 const x_86 = *(tint_symbol_8);
+ float2 const x_86 = (*(tint_private_vars)).tUV;
tileUV = fract(x_86);
float const x_91 = tileUV[1];
tileUV[1] = (1.0f - x_91);
- float2 const x_95 = *(tint_symbol_8);
+ float2 const x_95 = (*(tint_private_vars)).tUV;
tileID = floor(x_95);
- float2 const x_101 = (*(tint_symbol_9)).spriteMapSize;
+ float2 const x_101 = (*(tint_symbol_8)).spriteMapSize;
sheetUnits = (float2(1.0f) / x_101);
- float const x_106 = (*(tint_symbol_9)).spriteCount;
+ float const x_106 = (*(tint_symbol_8)).spriteCount;
spriteUnits = (1.0f / x_106);
- float2 const x_111 = (*(tint_symbol_9)).stageSize;
+ float2 const x_111 = (*(tint_symbol_8)).stageSize;
stageUnits = (float2(1.0f) / x_111);
i = 0;
while (true) {
@@ -98,15 +108,15 @@
switch(x_126) {
case 1: {
float2 const x_150 = tileID;
- float2 const x_154 = (*(tint_symbol_9)).stageSize;
- float4 const x_156 = tint_symbol_10.sample(tint_symbol_11, ((x_150 + float2(0.5f)) / x_154), bias(0.0f));
+ float2 const x_154 = (*(tint_symbol_8)).stageSize;
+ float4 const x_156 = tint_symbol_9.sample(tint_symbol_10, ((x_150 + float2(0.5f)) / x_154), bias(0.0f));
frameID_1 = x_156[0];
break;
}
case 0: {
float2 const x_136 = tileID;
- float2 const x_140 = (*(tint_symbol_9)).stageSize;
- float4 const x_142 = tint_symbol_12.sample(tint_symbol_11, ((x_136 + float2(0.5f)) / x_140), bias(0.0f));
+ float2 const x_140 = (*(tint_symbol_8)).stageSize;
+ float4 const x_142 = tint_symbol_11.sample(tint_symbol_10, ((x_136 + float2(0.5f)) / x_140), bias(0.0f));
frameID_1 = x_142[0];
break;
}
@@ -115,14 +125,14 @@
}
}
float const x_166 = frameID_1;
- float const x_169 = (*(tint_symbol_9)).spriteCount;
- float4 const x_172 = tint_symbol_13.sample(tint_symbol_14, float2(((x_166 + 0.5f) / x_169), 0.0f), bias(0.0f));
+ float const x_169 = (*(tint_symbol_8)).spriteCount;
+ float4 const x_172 = tint_symbol_12.sample(tint_symbol_13, float2(((x_166 + 0.5f) / x_169), 0.0f), bias(0.0f));
animationData = x_172;
float const x_174 = animationData[1];
if ((x_174 > 0.0f)) {
- float const x_181 = (*(tint_symbol_9)).time;
+ float const x_181 = (*(tint_symbol_8)).time;
float const x_184 = animationData[2];
- tint_symbol_15 = fmod((x_181 * x_184), 1.0f);
+ (*(tint_private_vars)).mt = fmod((x_181 * x_184), 1.0f);
f = 0.0f;
while (true) {
float const x_193 = f;
@@ -131,14 +141,14 @@
break;
}
float const x_197 = animationData[1];
- float const x_198 = tint_symbol_15;
+ float const x_198 = (*(tint_private_vars)).mt;
if ((x_197 > x_198)) {
float const x_203 = animationData[0];
frameID_1 = x_203;
break;
}
float const x_208 = frameID_1;
- float const x_211 = (*(tint_symbol_9)).spriteCount;
+ float const x_211 = (*(tint_symbol_8)).spriteCount;
float const x_214 = f;
float4 const x_217 = float4(0.0f);
animationData = x_217;
@@ -150,10 +160,10 @@
}
float const x_222 = frameID_1;
param = (x_222 + 0.5f);
- float4x4 const x_225 = getFrameData_f1_(&(param), tint_symbol_9, tint_symbol_16, tint_symbol_17);
+ float4x4 const x_225 = getFrameData_f1_(&(param), tint_symbol_8, tint_symbol_14, tint_symbol_15);
frameData = x_225;
float4 const x_228 = frameData[0];
- float2 const x_231 = (*(tint_symbol_9)).spriteMapSize;
+ float2 const x_231 = (*(tint_symbol_8)).spriteMapSize;
frameSize = (float2(x_228[3], x_228[2]) / x_231);
float4 const x_235 = frameData[0];
float2 const x_237 = sheetUnits;
@@ -171,13 +181,13 @@
float2 const x_263 = tileUV;
float2 const x_264 = frameSize;
float2 const x_266 = offset_1;
- float4 const x_268 = tint_symbol_18.sample(tint_symbol_19, ((x_263 * x_264) + x_266));
+ float4 const x_268 = tint_symbol_16.sample(tint_symbol_17, ((x_263 * x_264) + x_266));
color = x_268;
} else {
float2 const x_274 = tileUV;
float2 const x_275 = frameSize;
float2 const x_277 = offset_1;
- float4 const x_279 = tint_symbol_18.sample(tint_symbol_19, ((x_274 * x_275) + x_277));
+ float4 const x_279 = tint_symbol_16.sample(tint_symbol_17, ((x_274 * x_275) + x_277));
nc = x_279;
float const x_283 = color[3];
float const x_285 = nc[3];
@@ -195,13 +205,13 @@
i = as_type<int>((as_type<uint>(x_304) + as_type<uint>(1)));
}
}
- float3 const x_310 = float3((*(tint_symbol_9)).colorMul);
+ float3 const x_310 = float3((*(tint_symbol_8)).colorMul);
float4 const x_311 = color;
float3 const x_313 = (float3(x_311[0], x_311[1], x_311[2]) * x_310);
float4 const x_314 = color;
color = float4(x_313[0], x_313[1], x_313[2], x_314[3]);
float4 const x_318 = color;
- *(tint_symbol_20) = x_318;
+ (*(tint_private_vars)).glFragColor = x_318;
return;
}
@@ -222,27 +232,21 @@
float4 glFragColor_1 [[color(0)]];
};
-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, const constant LeftOver_tint_packed_vec3* 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, texture2d<float, access::sample> tint_symbol_33, sampler tint_symbol_34, texture2d<float, access::sample> tint_symbol_35, sampler tint_symbol_36, thread float4* const tint_symbol_37) {
- thread float2 tint_symbol_22 = 0.0f;
- thread float2 tint_symbol_23 = 0.0f;
- thread float2 tint_symbol_24 = 0.0f;
- thread float3 tint_symbol_25 = 0.0f;
- thread float2 tint_symbol_26 = 0.0f;
- *(tint_symbol_21) = tUV_param;
- tint_symbol_22 = tileID_1_param;
- tint_symbol_23 = levelUnits_param;
- tint_symbol_24 = stageUnits_1_param;
- tint_symbol_25 = vPosition_param;
- tint_symbol_26 = vUV_param;
- 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);
- main_out const tint_symbol_4 = {.glFragColor_1=*(tint_symbol_37)};
+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 tint_private_vars_struct* const tint_private_vars, const constant LeftOver_tint_packed_vec3* const tint_symbol_18, texture2d<float, access::sample> tint_symbol_19, sampler tint_symbol_20, texture2d<float, access::sample> tint_symbol_21, texture2d<float, access::sample> tint_symbol_22, sampler 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) {
+ (*(tint_private_vars)).tUV = tUV_param;
+ (*(tint_private_vars)).tileID_1 = tileID_1_param;
+ (*(tint_private_vars)).levelUnits = levelUnits_param;
+ (*(tint_private_vars)).stageUnits_1 = stageUnits_1_param;
+ (*(tint_private_vars)).vPosition = vPosition_param;
+ (*(tint_private_vars)).vUV = vUV_param;
+ main_1(tint_private_vars, tint_symbol_18, tint_symbol_19, tint_symbol_20, tint_symbol_21, tint_symbol_22, tint_symbol_23, tint_symbol_24, tint_symbol_25, tint_symbol_26, tint_symbol_27);
+ main_out const tint_symbol_4 = {.glFragColor_1=(*(tint_private_vars)).glFragColor};
return tint_symbol_4;
}
-fragment tint_symbol_3 tint_symbol(const constant LeftOver_tint_packed_vec3* tint_symbol_39 [[buffer(0)]], texture2d<float, access::sample> tint_symbol_40 [[texture(0)]], sampler tint_symbol_41 [[sampler(0)]], texture2d<float, access::sample> tint_symbol_42 [[texture(1)]], texture2d<float, access::sample> tint_symbol_43 [[texture(2)]], sampler tint_symbol_44 [[sampler(1)]], texture2d<float, access::sample> tint_symbol_45 [[texture(3)]], sampler tint_symbol_46 [[sampler(2)]], texture2d<float, access::sample> tint_symbol_47 [[texture(4)]], sampler tint_symbol_48 [[sampler(3)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
- thread float2 tint_symbol_38 = 0.0f;
- thread float4 tint_symbol_49 = 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_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));
+fragment tint_symbol_3 tint_symbol(const constant LeftOver_tint_packed_vec3* tint_symbol_28 [[buffer(0)]], texture2d<float, access::sample> tint_symbol_29 [[texture(0)]], sampler tint_symbol_30 [[sampler(0)]], texture2d<float, access::sample> tint_symbol_31 [[texture(1)]], texture2d<float, access::sample> tint_symbol_32 [[texture(2)]], sampler tint_symbol_33 [[sampler(1)]], texture2d<float, access::sample> tint_symbol_34 [[texture(3)]], sampler tint_symbol_35 [[sampler(2)]], texture2d<float, access::sample> tint_symbol_36 [[texture(4)]], sampler tint_symbol_37 [[sampler(3)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ 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_private_vars), 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 = {};
wrapper_result.glFragColor_1 = inner_result.glFragColor_1;
return wrapper_result;
diff --git a/test/tint/bug/tint/949.wgsl.expected.msl b/test/tint/bug/tint/949.wgsl.expected.msl
index 779b99b..fb8ec0f 100644
--- a/test/tint/bug/tint/949.wgsl.expected.msl
+++ b/test/tint/bug/tint/949.wgsl.expected.msl
@@ -14,6 +14,17 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ float u_Float;
+ float3 u_Color;
+ float2 vMainuv;
+ float4 v_output1;
+ bool gl_FrontFacing;
+ float2 v_uv;
+ float4 v_output2;
+ float4 glFragColor;
+};
+
struct LeftOver_tint_packed_vec3 {
/* 0x0000 */ float4x4 u_World;
/* 0x0040 */ float4x4 u_ViewProjection;
@@ -196,9 +207,7 @@
return x_245;
}
-void main_1(thread float2* const tint_symbol_7, texture2d<float, access::sample> tint_symbol_8, sampler tint_symbol_9, const constant LeftOver_tint_packed_vec3* 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_tint_packed_vec3* const tint_symbol_17, thread float4* const tint_symbol_18) {
- thread float tint_symbol_5 = 0.0f;
- thread float3 tint_symbol_6 = 0.0f;
+void main_1(thread tint_private_vars_struct* const tint_private_vars, texture2d<float, access::sample> tint_symbol_5, sampler tint_symbol_6, const constant LeftOver_tint_packed_vec3* const tint_symbol_7, texture2d<float, access::sample> tint_symbol_8, sampler tint_symbol_9, const constant Light0_tint_packed_vec3* const tint_symbol_10) {
float4 tempTextureRead = 0.0f;
float3 rgb = 0.0f;
float3 output5 = 0.0f;
@@ -252,39 +261,39 @@
float3 diffuseOutput = 0.0f;
float3 specularOutput = 0.0f;
float3 output3 = 0.0f;
- tint_symbol_5 = 100.0f;
- tint_symbol_6 = float3(0.5f);
- float2 const x_261 = *(tint_symbol_7);
- float4 const x_262 = tint_symbol_8.sample(tint_symbol_9, x_261);
+ (*(tint_private_vars)).u_Float = 100.0f;
+ (*(tint_private_vars)).u_Color = float3(0.5f);
+ float2 const x_261 = (*(tint_private_vars)).vMainuv;
+ float4 const x_262 = tint_symbol_5.sample(tint_symbol_6, x_261);
tempTextureRead = x_262;
float4 const x_264 = tempTextureRead;
- float const x_273 = (*(tint_symbol_10)).textureInfoName;
+ float const x_273 = (*(tint_symbol_7)).textureInfoName;
rgb = (float3(x_264[0], x_264[1], x_264[2]) * x_273);
- float3 const x_279 = float3((*(tint_symbol_10)).u_cameraPosition);
- float4 const x_282 = *(tint_symbol_11);
+ float3 const x_279 = float3((*(tint_symbol_7)).u_cameraPosition);
+ float4 const x_282 = (*(tint_private_vars)).v_output1;
output5 = normalize((x_279 - float3(x_282[0], x_282[1], x_282[2])));
output4 = float4(0.0f);
uvOffset = float2(0.0f);
- float const x_292 = (*(tint_symbol_10)).u_bumpStrength;
+ float const x_292 = (*(tint_symbol_7)).u_bumpStrength;
normalScale = (1.0f / x_292);
- bool const x_298 = *(tint_symbol_12);
+ bool const x_298 = (*(tint_private_vars)).gl_FrontFacing;
if (x_298) {
- float2 const x_303 = *(tint_symbol_13);
+ float2 const x_303 = (*(tint_private_vars)).v_uv;
x_299 = x_303;
} else {
- float2 const x_305 = *(tint_symbol_13);
+ float2 const x_305 = (*(tint_private_vars)).v_uv;
x_299 = -(x_305);
}
float2 const x_307 = x_299;
TBNUV = x_307;
- float4 const x_310 = *(tint_symbol_14);
+ float4 const x_310 = (*(tint_private_vars)).v_output2;
float const x_312 = normalScale;
param_3 = (float3(x_310[0], x_310[1], x_310[2]) * x_312);
- float4 const x_317 = *(tint_symbol_11);
+ float4 const x_317 = (*(tint_private_vars)).v_output1;
param_4 = float3(x_317[0], x_317[1], x_317[2]);
float2 const x_320 = TBNUV;
param_5 = x_320;
- float2 const x_324 = (*(tint_symbol_10)).tangentSpaceParameter0;
+ float2 const x_324 = (*(tint_symbol_7)).tangentSpaceParameter0;
param_6 = x_324;
float3x3 const x_325 = cotangent_frame_vf3_vf3_vf2_vf2_(&(param_3), &(param_4), &(param_5), &(param_6));
TBN = x_325;
@@ -298,7 +307,7 @@
float3x3 const x_337 = invTBN;
float3 const x_338 = output5;
parallaxLimit = (length(float2(x_334[0], x_334[1])) / ((x_337 * -(x_338)))[2]);
- float const x_345 = (*(tint_symbol_10)).u_parallaxScale;
+ float const x_345 = (*(tint_symbol_7)).u_parallaxScale;
float const x_346 = parallaxLimit;
parallaxLimit = (x_346 * x_345);
float3x3 const x_349 = invTBN;
@@ -311,7 +320,7 @@
float3x3 const x_361 = invTBN;
float3 const x_362 = output5;
float3x3 const x_365 = invTBN;
- float4 const x_366 = *(tint_symbol_14);
+ float4 const x_366 = (*(tint_private_vars)).v_output2;
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;
stepSize = (1.0f / x_374);
@@ -327,7 +336,7 @@
} else {
break;
}
- float2 const x_394 = *(tint_symbol_13);
+ float2 const x_394 = (*(tint_private_vars)).v_uv;
float2 const x_395 = vCurrOffset;
float4 const x_397 = float4(0.0f);
currSampledHeight = x_397[3];
@@ -373,10 +382,10 @@
parallaxOcclusion_0 = x_444;
float2 const x_445 = parallaxOcclusion_0;
uvOffset = x_445;
- float2 const x_449 = *(tint_symbol_13);
+ float2 const x_449 = (*(tint_private_vars)).v_uv;
float2 const x_450 = uvOffset;
- float4 const x_452 = tint_symbol_8.sample(tint_symbol_9, (x_449 + x_450));
- float const x_454 = (*(tint_symbol_10)).u_bumpStrength;
+ float4 const x_452 = tint_symbol_5.sample(tint_symbol_6, (x_449 + x_450));
+ float const x_454 = (*(tint_symbol_7)).u_bumpStrength;
float3x3 const x_457 = TBN;
param_8 = x_457;
param_9 = float3(x_452[0], x_452[1], x_452[2]);
@@ -384,19 +393,19 @@
float3 const x_461 = perturbNormal_mf33_vf3_f1_(&(param_8), &(param_9), &(param_10));
float4 const x_462 = output4;
output4 = float4(x_461[0], x_461[1], x_461[2], x_462[3]);
- float2 const x_465 = *(tint_symbol_13);
+ float2 const x_465 = (*(tint_private_vars)).v_uv;
float2 const x_466 = uvOffset;
output6 = (x_465 + x_466);
float2 const x_474 = output6;
- float4 const x_475 = tint_symbol_15.sample(tint_symbol_16, x_474);
+ float4 const x_475 = tint_symbol_8.sample(tint_symbol_9, x_474);
tempTextureRead1 = x_475;
float4 const x_477 = tempTextureRead1;
rgb1 = float3(x_477[0], x_477[1], x_477[2]);
- float3 const x_481 = float3((*(tint_symbol_10)).u_cameraPosition);
- float4 const x_482 = *(tint_symbol_11);
+ float3 const x_481 = float3((*(tint_symbol_7)).u_cameraPosition);
+ float4 const x_482 = (*(tint_private_vars)).v_output1;
viewDirectionW_1 = normalize((x_481 - float3(x_482[0], x_482[1], x_482[2])));
shadow = 1.0f;
- float const x_488 = tint_symbol_5;
+ float const x_488 = (*(tint_private_vars)).u_Float;
glossiness_1 = (1.0f * x_488);
diffuseBase = float3(0.0f);
specularBase = float3(0.0f);
@@ -406,13 +415,13 @@
param_11 = x_501;
float3 const x_503 = normalW;
param_12 = x_503;
- float4 const x_507 = (*(tint_symbol_17)).vLightData;
+ float4 const x_507 = (*(tint_symbol_10)).vLightData;
param_13 = x_507;
- float4 const x_510 = (*(tint_symbol_17)).vLightDiffuse;
+ float4 const x_510 = (*(tint_symbol_10)).vLightDiffuse;
param_14 = float3(x_510[0], x_510[1], x_510[2]);
- float4 const x_514 = (*(tint_symbol_17)).vLightSpecular;
+ float4 const x_514 = (*(tint_symbol_10)).vLightSpecular;
param_15 = float3(x_514[0], x_514[1], x_514[2]);
- float3 const x_518 = float3((*(tint_symbol_17)).vLightGround);
+ float3 const x_518 = float3((*(tint_symbol_10)).vLightGround);
param_16 = x_518;
float const x_520 = glossiness_1;
param_17 = x_520;
@@ -431,13 +440,13 @@
float3 const x_536 = rgb1;
diffuseOutput = (x_535 * x_536);
float3 const x_539 = specularBase;
- float3 const x_540 = tint_symbol_6;
+ float3 const x_540 = (*(tint_private_vars)).u_Color;
specularOutput = (x_539 * x_540);
float3 const x_543 = diffuseOutput;
float3 const x_544 = specularOutput;
output3 = (x_543 + x_544);
float3 const x_548 = output3;
- *(tint_symbol_18) = float4(x_548[0], x_548[1], x_548[2], 1.0f);
+ (*(tint_private_vars)).glFragColor = float4(x_548[0], x_548[1], x_548[2], 1.0f);
return;
}
@@ -456,25 +465,20 @@
float4 glFragColor_1 [[color(0)]];
};
-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, texture2d<float, access::sample> tint_symbol_24, sampler tint_symbol_25, const constant LeftOver_tint_packed_vec3* const tint_symbol_26, texture2d<float, access::sample> tint_symbol_27, sampler tint_symbol_28, const constant Light0_tint_packed_vec3* const tint_symbol_29, thread float4* const tint_symbol_30) {
- *(tint_symbol_19) = vMainuv_param;
- *(tint_symbol_20) = v_output1_param;
- *(tint_symbol_21) = gl_FrontFacing_param;
- *(tint_symbol_22) = v_uv_param;
- *(tint_symbol_23) = v_output2_param;
- main_1(tint_symbol_19, tint_symbol_24, tint_symbol_25, tint_symbol_26, tint_symbol_20, tint_symbol_21, tint_symbol_22, tint_symbol_23, tint_symbol_27, tint_symbol_28, tint_symbol_29, tint_symbol_30);
- main_out const tint_symbol_4 = {.glFragColor_1=*(tint_symbol_30)};
+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 tint_private_vars_struct* const tint_private_vars, texture2d<float, access::sample> tint_symbol_11, sampler tint_symbol_12, const constant LeftOver_tint_packed_vec3* const tint_symbol_13, texture2d<float, access::sample> tint_symbol_14, sampler tint_symbol_15, const constant Light0_tint_packed_vec3* const tint_symbol_16) {
+ (*(tint_private_vars)).vMainuv = vMainuv_param;
+ (*(tint_private_vars)).v_output1 = v_output1_param;
+ (*(tint_private_vars)).gl_FrontFacing = gl_FrontFacing_param;
+ (*(tint_private_vars)).v_uv = v_uv_param;
+ (*(tint_private_vars)).v_output2 = v_output2_param;
+ main_1(tint_private_vars, tint_symbol_11, tint_symbol_12, tint_symbol_13, tint_symbol_14, tint_symbol_15, tint_symbol_16);
+ main_out const tint_symbol_4 = {.glFragColor_1=(*(tint_private_vars)).glFragColor};
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)]], const constant LeftOver_tint_packed_vec3* tint_symbol_38 [[buffer(0)]], texture2d<float, access::sample> tint_symbol_39 [[texture(1)]], sampler tint_symbol_40 [[sampler(1)]], const constant Light0_tint_packed_vec3* tint_symbol_41 [[buffer(1)]], bool gl_FrontFacing_param [[front_facing]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
- thread float2 tint_symbol_31 = 0.0f;
- thread float4 tint_symbol_32 = 0.0f;
- thread bool tint_symbol_33 = false;
- thread float2 tint_symbol_34 = 0.0f;
- thread float4 tint_symbol_35 = 0.0f;
- thread float4 tint_symbol_42 = 0.0f;
- 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_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, tint_symbol_41, &(tint_symbol_42));
+fragment tint_symbol_3 tint_symbol(texture2d<float, access::sample> tint_symbol_17 [[texture(0)]], sampler tint_symbol_18 [[sampler(0)]], const constant LeftOver_tint_packed_vec3* tint_symbol_19 [[buffer(0)]], texture2d<float, access::sample> tint_symbol_20 [[texture(1)]], sampler tint_symbol_21 [[sampler(1)]], const constant Light0_tint_packed_vec3* tint_symbol_22 [[buffer(1)]], bool gl_FrontFacing_param [[front_facing]], tint_symbol_2 tint_symbol_1 [[stage_in]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ 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_private_vars), tint_symbol_17, tint_symbol_18, tint_symbol_19, tint_symbol_20, tint_symbol_21, tint_symbol_22);
tint_symbol_3 wrapper_result = {};
wrapper_result.glFragColor_1 = inner_result.glFragColor_1;
return wrapper_result;
diff --git a/test/tint/bug/tint/977.spvasm.expected.msl b/test/tint/bug/tint/977.spvasm.expected.msl
index 83b2b6c..8ecff85 100644
--- a/test/tint/bug/tint/977.spvasm.expected.msl
+++ b/test/tint/bug/tint/977.spvasm.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ uint3 gl_GlobalInvocationID;
+};
+
struct ResultMatrix {
/* 0x0000 */ tint_array<float, 1> numbers;
};
@@ -53,30 +57,30 @@
return x_41;
}
-void main_1(thread uint3* const tint_symbol_2, device ResultMatrix* const tint_symbol_3) {
+void main_1(thread tint_private_vars_struct* const tint_private_vars, device ResultMatrix* const tint_symbol_2) {
int index = 0;
int a_1 = 0;
float param = 0.0f;
float param_1 = 0.0f;
- uint const x_54 = (*(tint_symbol_2))[0];
+ uint const x_54 = (*(tint_private_vars)).gl_GlobalInvocationID[0];
index = as_type<int>(x_54);
a_1 = -10;
int const x_63 = index;
param = -4.0f;
param_1 = -3.0f;
float const x_68 = binaryOperation_f1_f1_(&(param), &(param_1));
- (*(tint_symbol_3)).numbers[x_63] = x_68;
+ (*(tint_symbol_2)).numbers[x_63] = x_68;
return;
}
-void tint_symbol_1_inner(uint3 gl_GlobalInvocationID_param, thread uint3* const tint_symbol_4, device ResultMatrix* const tint_symbol_5) {
- *(tint_symbol_4) = gl_GlobalInvocationID_param;
- main_1(tint_symbol_4, tint_symbol_5);
+void tint_symbol_1_inner(uint3 gl_GlobalInvocationID_param, thread tint_private_vars_struct* const tint_private_vars, device ResultMatrix* const tint_symbol_3) {
+ (*(tint_private_vars)).gl_GlobalInvocationID = gl_GlobalInvocationID_param;
+ main_1(tint_private_vars, tint_symbol_3);
}
-kernel void tint_symbol_1(device ResultMatrix* tint_symbol_7 [[buffer(0)]], uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]]) {
- thread uint3 tint_symbol_6 = 0u;
- tint_symbol_1_inner(gl_GlobalInvocationID_param, &(tint_symbol_6), tint_symbol_7);
+kernel void tint_symbol_1(device ResultMatrix* tint_symbol_4 [[buffer(0)]], uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_symbol_1_inner(gl_GlobalInvocationID_param, &(tint_private_vars), tint_symbol_4);
return;
}
diff --git a/test/tint/bug/tint/998.wgsl.expected.msl b/test/tint/bug/tint/998.wgsl.expected.msl
index c9dd773..89d43d5 100644
--- a/test/tint/bug/tint/998.wgsl.expected.msl
+++ b/test/tint/bug/tint/998.wgsl.expected.msl
@@ -14,6 +14,14 @@
T elements[N];
};
+struct S {
+ tint_array<uint, 3> data;
+};
+
+struct tint_private_vars_struct {
+ S s;
+};
+
struct Constants {
/* 0x0000 */ uint zero;
};
@@ -22,13 +30,9 @@
uint value;
};
-struct S {
- tint_array<uint, 3> data;
-};
-
-kernel void tint_symbol(const constant Constants* tint_symbol_2 [[buffer(0)]]) {
- thread S tint_symbol_1 = {};
- tint_symbol_1.data[(*(tint_symbol_2)).zero] = 0u;
+kernel void tint_symbol(const constant Constants* tint_symbol_1 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.s.data[(*(tint_symbol_1)).zero] = 0u;
return;
}
diff --git a/test/tint/builtins/atomicStore/array/aliased_arrays.spvasm.expected.msl b/test/tint/builtins/atomicStore/array/aliased_arrays.spvasm.expected.msl
index e7a3bfe..25c4b42 100644
--- a/test/tint/builtins/atomicStore/array/aliased_arrays.spvasm.expected.msl
+++ b/test/tint/builtins/atomicStore/array/aliased_arrays.spvasm.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
uint tint_div(uint lhs, uint rhs) {
return (lhs / select(rhs, 1u, (rhs == 0u)));
}
@@ -44,28 +48,28 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_1, threadgroup tint_array<tint_array<tint_array<atomic_uint, 1>, 2>, 3>* const tint_symbol_2) {
- uint const x_57 = *(tint_symbol_1);
- compute_main_inner(x_57, tint_symbol_2);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup tint_array<tint_array<tint_array<atomic_uint, 1>, 2>, 3>* const tint_symbol_1) {
+ uint const x_57 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_57, tint_symbol_1);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup tint_array<tint_array<tint_array<atomic_uint, 1>, 2>, 3>* const tint_symbol_3, thread uint* const tint_symbol_4) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup tint_array<tint_array<tint_array<atomic_uint, 1>, 2>, 3>* const tint_symbol_2) {
for(uint idx_1 = local_invocation_index_1_param; (idx_1 < 6u); idx_1 = (idx_1 + 1u)) {
uint const i = (idx_1 / 2u);
uint const i_1 = (idx_1 % 2u);
uint const i_2 = (idx_1 % 1u);
- atomic_store_explicit(&((*(tint_symbol_3))[i][i_1][i_2]), 0u, memory_order_relaxed);
+ atomic_store_explicit(&((*(tint_symbol_2))[i][i_1][i_2]), 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_4) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_4, tint_symbol_3);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_2);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup tint_array<tint_array<tint_array<atomic_uint, 1>, 2>, 3> tint_symbol_5;
- thread uint tint_symbol_6 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_5), &(tint_symbol_6));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup tint_array<tint_array<tint_array<atomic_uint, 1>, 2>, 3> tint_symbol_3;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_3));
return;
}
diff --git a/test/tint/builtins/atomicStore/array/array.spvasm.expected.msl b/test/tint/builtins/atomicStore/array/array.spvasm.expected.msl
index a4eb243..196bf9c 100644
--- a/test/tint/builtins/atomicStore/array/array.spvasm.expected.msl
+++ b/test/tint/builtins/atomicStore/array/array.spvasm.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void compute_main_inner(uint local_invocation_index_2, threadgroup tint_array<atomic_uint, 4>* const tint_symbol) {
uint idx = 0u;
idx = local_invocation_index_2;
@@ -34,26 +38,26 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_1, threadgroup tint_array<atomic_uint, 4>* const tint_symbol_2) {
- uint const x_47 = *(tint_symbol_1);
- compute_main_inner(x_47, tint_symbol_2);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup tint_array<atomic_uint, 4>* const tint_symbol_1) {
+ uint const x_47 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_47, tint_symbol_1);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup tint_array<atomic_uint, 4>* const tint_symbol_3, thread uint* const tint_symbol_4) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup tint_array<atomic_uint, 4>* const tint_symbol_2) {
for(uint idx_1 = local_invocation_index_1_param; (idx_1 < 4u); idx_1 = (idx_1 + 1u)) {
uint const i = idx_1;
- atomic_store_explicit(&((*(tint_symbol_3))[i]), 0u, memory_order_relaxed);
+ atomic_store_explicit(&((*(tint_symbol_2))[i]), 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_4) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_4, tint_symbol_3);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_2);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup tint_array<atomic_uint, 4> tint_symbol_5;
- thread uint tint_symbol_6 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_5), &(tint_symbol_6));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup tint_array<atomic_uint, 4> tint_symbol_3;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_3));
return;
}
diff --git a/test/tint/builtins/atomicStore/array/arrays.spvasm.expected.msl b/test/tint/builtins/atomicStore/array/arrays.spvasm.expected.msl
index e7a3bfe..25c4b42 100644
--- a/test/tint/builtins/atomicStore/array/arrays.spvasm.expected.msl
+++ b/test/tint/builtins/atomicStore/array/arrays.spvasm.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
uint tint_div(uint lhs, uint rhs) {
return (lhs / select(rhs, 1u, (rhs == 0u)));
}
@@ -44,28 +48,28 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_1, threadgroup tint_array<tint_array<tint_array<atomic_uint, 1>, 2>, 3>* const tint_symbol_2) {
- uint const x_57 = *(tint_symbol_1);
- compute_main_inner(x_57, tint_symbol_2);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup tint_array<tint_array<tint_array<atomic_uint, 1>, 2>, 3>* const tint_symbol_1) {
+ uint const x_57 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_57, tint_symbol_1);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup tint_array<tint_array<tint_array<atomic_uint, 1>, 2>, 3>* const tint_symbol_3, thread uint* const tint_symbol_4) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup tint_array<tint_array<tint_array<atomic_uint, 1>, 2>, 3>* const tint_symbol_2) {
for(uint idx_1 = local_invocation_index_1_param; (idx_1 < 6u); idx_1 = (idx_1 + 1u)) {
uint const i = (idx_1 / 2u);
uint const i_1 = (idx_1 % 2u);
uint const i_2 = (idx_1 % 1u);
- atomic_store_explicit(&((*(tint_symbol_3))[i][i_1][i_2]), 0u, memory_order_relaxed);
+ atomic_store_explicit(&((*(tint_symbol_2))[i][i_1][i_2]), 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_4) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_4, tint_symbol_3);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_2);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup tint_array<tint_array<tint_array<atomic_uint, 1>, 2>, 3> tint_symbol_5;
- thread uint tint_symbol_6 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_5), &(tint_symbol_6));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup tint_array<tint_array<tint_array<atomic_uint, 1>, 2>, 3> tint_symbol_3;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_3));
return;
}
diff --git a/test/tint/builtins/atomicStore/struct/array_of_struct.spvasm.expected.msl b/test/tint/builtins/atomicStore/struct/array_of_struct.spvasm.expected.msl
index f9bac41..91a23ba 100644
--- a/test/tint/builtins/atomicStore/struct/array_of_struct.spvasm.expected.msl
+++ b/test/tint/builtins/atomicStore/struct/array_of_struct.spvasm.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
struct S_atomic {
int x;
atomic_uint a;
@@ -48,28 +52,28 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_1, threadgroup tint_array<S_atomic, 10>* const tint_symbol_2) {
- uint const x_53 = *(tint_symbol_1);
- compute_main_inner(x_53, tint_symbol_2);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup tint_array<S_atomic, 10>* const tint_symbol_1) {
+ uint const x_53 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_53, tint_symbol_1);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup tint_array<S_atomic, 10>* const tint_symbol_3, thread uint* const tint_symbol_4) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup tint_array<S_atomic, 10>* const tint_symbol_2) {
for(uint idx_1 = local_invocation_index_1_param; (idx_1 < 10u); idx_1 = (idx_1 + 1u)) {
uint const i = idx_1;
- (*(tint_symbol_3))[i].x = 0;
- atomic_store_explicit(&((*(tint_symbol_3))[i].a), 0u, memory_order_relaxed);
- (*(tint_symbol_3))[i].y = 0u;
+ (*(tint_symbol_2))[i].x = 0;
+ atomic_store_explicit(&((*(tint_symbol_2))[i].a), 0u, memory_order_relaxed);
+ (*(tint_symbol_2))[i].y = 0u;
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_4) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_4, tint_symbol_3);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_2);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup tint_array<S_atomic, 10> tint_symbol_5;
- thread uint tint_symbol_6 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_5), &(tint_symbol_6));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup tint_array<S_atomic, 10> tint_symbol_3;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_3));
return;
}
diff --git a/test/tint/builtins/atomicStore/struct/flat_multiple_atomics.spvasm.expected.msl b/test/tint/builtins/atomicStore/struct/flat_multiple_atomics.spvasm.expected.msl
index 9ff385d..b109f31 100644
--- a/test/tint/builtins/atomicStore/struct/flat_multiple_atomics.spvasm.expected.msl
+++ b/test/tint/builtins/atomicStore/struct/flat_multiple_atomics.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
struct S_atomic {
int x;
atomic_uint a;
@@ -23,27 +27,27 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_1, threadgroup S_atomic* const tint_symbol_2) {
- uint const x_39 = *(tint_symbol_1);
- compute_main_inner(x_39, tint_symbol_2);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup S_atomic* const tint_symbol_1) {
+ uint const x_39 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_39, tint_symbol_1);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup S_atomic* const tint_symbol_3, thread uint* const tint_symbol_4) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup S_atomic* const tint_symbol_2) {
{
- (*(tint_symbol_3)).x = 0;
- atomic_store_explicit(&((*(tint_symbol_3)).a), 0u, memory_order_relaxed);
- atomic_store_explicit(&((*(tint_symbol_3)).b), 0u, memory_order_relaxed);
+ (*(tint_symbol_2)).x = 0;
+ atomic_store_explicit(&((*(tint_symbol_2)).a), 0u, memory_order_relaxed);
+ atomic_store_explicit(&((*(tint_symbol_2)).b), 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_4) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_4, tint_symbol_3);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_2);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup S_atomic tint_symbol_5;
- thread uint tint_symbol_6 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_5), &(tint_symbol_6));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup S_atomic tint_symbol_3;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_3));
return;
}
diff --git a/test/tint/builtins/atomicStore/struct/flat_single_atomic.spvasm.expected.msl b/test/tint/builtins/atomicStore/struct/flat_single_atomic.spvasm.expected.msl
index 7e1b7dc..49df29f 100644
--- a/test/tint/builtins/atomicStore/struct/flat_single_atomic.spvasm.expected.msl
+++ b/test/tint/builtins/atomicStore/struct/flat_single_atomic.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
struct S_atomic {
int x;
atomic_uint a;
@@ -22,27 +26,27 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_1, threadgroup S_atomic* const tint_symbol_2) {
- uint const x_35 = *(tint_symbol_1);
- compute_main_inner(x_35, tint_symbol_2);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup S_atomic* const tint_symbol_1) {
+ uint const x_35 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_35, tint_symbol_1);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup S_atomic* const tint_symbol_3, thread uint* const tint_symbol_4) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup S_atomic* const tint_symbol_2) {
{
- (*(tint_symbol_3)).x = 0;
- atomic_store_explicit(&((*(tint_symbol_3)).a), 0u, memory_order_relaxed);
- (*(tint_symbol_3)).y = 0u;
+ (*(tint_symbol_2)).x = 0;
+ atomic_store_explicit(&((*(tint_symbol_2)).a), 0u, memory_order_relaxed);
+ (*(tint_symbol_2)).y = 0u;
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_4) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_4, tint_symbol_3);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_2);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup S_atomic tint_symbol_5;
- thread uint tint_symbol_6 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_5), &(tint_symbol_6));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup S_atomic tint_symbol_3;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_3));
return;
}
diff --git a/test/tint/builtins/atomicStore/struct/nested.spvasm.expected.msl b/test/tint/builtins/atomicStore/struct/nested.spvasm.expected.msl
index 0e4963c..8eafbbb 100644
--- a/test/tint/builtins/atomicStore/struct/nested.spvasm.expected.msl
+++ b/test/tint/builtins/atomicStore/struct/nested.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
struct S0_atomic {
int x;
atomic_uint a;
@@ -59,34 +63,34 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_1, threadgroup S2_atomic* const tint_symbol_2) {
- uint const x_44 = *(tint_symbol_1);
- compute_main_inner(x_44, tint_symbol_2);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup S2_atomic* const tint_symbol_1) {
+ uint const x_44 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_44, tint_symbol_1);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup S2_atomic* const tint_symbol_3, thread uint* const tint_symbol_4) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup S2_atomic* const tint_symbol_2) {
{
- (*(tint_symbol_3)).x = 0;
- (*(tint_symbol_3)).y = 0;
- (*(tint_symbol_3)).z = 0;
- (*(tint_symbol_3)).a.x = 0;
- (*(tint_symbol_3)).a.a.x = 0;
- atomic_store_explicit(&((*(tint_symbol_3)).a.a.a), 0u, memory_order_relaxed);
- (*(tint_symbol_3)).a.a.y = 0;
- (*(tint_symbol_3)).a.a.z = 0;
- (*(tint_symbol_3)).a.y = 0;
- (*(tint_symbol_3)).a.z = 0;
+ (*(tint_symbol_2)).x = 0;
+ (*(tint_symbol_2)).y = 0;
+ (*(tint_symbol_2)).z = 0;
+ (*(tint_symbol_2)).a.x = 0;
+ (*(tint_symbol_2)).a.a.x = 0;
+ atomic_store_explicit(&((*(tint_symbol_2)).a.a.a), 0u, memory_order_relaxed);
+ (*(tint_symbol_2)).a.a.y = 0;
+ (*(tint_symbol_2)).a.a.z = 0;
+ (*(tint_symbol_2)).a.y = 0;
+ (*(tint_symbol_2)).a.z = 0;
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_4) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_4, tint_symbol_3);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_2);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup S2_atomic tint_symbol_5;
- thread uint tint_symbol_6 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_5), &(tint_symbol_6));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup S2_atomic tint_symbol_3;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_3));
return;
}
diff --git a/test/tint/builtins/atomicStore/struct/struct_of_array.spvasm.expected.msl b/test/tint/builtins/atomicStore/struct/struct_of_array.spvasm.expected.msl
index fc28533..46020d9 100644
--- a/test/tint/builtins/atomicStore/struct/struct_of_array.spvasm.expected.msl
+++ b/test/tint/builtins/atomicStore/struct/struct_of_array.spvasm.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
struct S_atomic {
int x;
tint_array<atomic_uint, 10> a;
@@ -48,30 +52,30 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_1, threadgroup S_atomic* const tint_symbol_2) {
- uint const x_53 = *(tint_symbol_1);
- compute_main_inner(x_53, tint_symbol_2);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup S_atomic* const tint_symbol_1) {
+ uint const x_53 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_53, tint_symbol_1);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup S_atomic* const tint_symbol_3, thread uint* const tint_symbol_4) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup S_atomic* const tint_symbol_2) {
{
- (*(tint_symbol_3)).x = 0;
- (*(tint_symbol_3)).y = 0u;
+ (*(tint_symbol_2)).x = 0;
+ (*(tint_symbol_2)).y = 0u;
}
for(uint idx_1 = local_invocation_index_1_param; (idx_1 < 10u); idx_1 = (idx_1 + 1u)) {
uint const i = idx_1;
- atomic_store_explicit(&((*(tint_symbol_3)).a[i]), 0u, memory_order_relaxed);
+ atomic_store_explicit(&((*(tint_symbol_2)).a[i]), 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_4) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_4, tint_symbol_3);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_2);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup S_atomic tint_symbol_5;
- thread uint tint_symbol_6 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_5), &(tint_symbol_6));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup S_atomic tint_symbol_3;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_3));
return;
}
diff --git a/test/tint/builtins/atomicStore/struct/via_ptr_let.spvasm.expected.msl b/test/tint/builtins/atomicStore/struct/via_ptr_let.spvasm.expected.msl
index 7e1b7dc..49df29f 100644
--- a/test/tint/builtins/atomicStore/struct/via_ptr_let.spvasm.expected.msl
+++ b/test/tint/builtins/atomicStore/struct/via_ptr_let.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
struct S_atomic {
int x;
atomic_uint a;
@@ -22,27 +26,27 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_1, threadgroup S_atomic* const tint_symbol_2) {
- uint const x_35 = *(tint_symbol_1);
- compute_main_inner(x_35, tint_symbol_2);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup S_atomic* const tint_symbol_1) {
+ uint const x_35 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_35, tint_symbol_1);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup S_atomic* const tint_symbol_3, thread uint* const tint_symbol_4) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup S_atomic* const tint_symbol_2) {
{
- (*(tint_symbol_3)).x = 0;
- atomic_store_explicit(&((*(tint_symbol_3)).a), 0u, memory_order_relaxed);
- (*(tint_symbol_3)).y = 0u;
+ (*(tint_symbol_2)).x = 0;
+ atomic_store_explicit(&((*(tint_symbol_2)).a), 0u, memory_order_relaxed);
+ (*(tint_symbol_2)).y = 0u;
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_4) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_4, tint_symbol_3);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_2);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup S_atomic tint_symbol_5;
- thread uint tint_symbol_6 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_5), &(tint_symbol_6));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup S_atomic tint_symbol_3;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_3));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/workgroup_i32.spvasm.expected.msl
index 5f8945f..c5a0ca2 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAdd_794055(threadgroup atomic_int* const tint_symbol) {
int res = 0;
int const x_11 = atomic_fetch_add_explicit(tint_symbol, 1, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_31 = *(tint_symbol_2);
- compute_main_inner(x_31, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_31 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_31, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/workgroup_u32.spvasm.expected.msl
index 6dab262..75573c2 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAdd_d5db1d(threadgroup atomic_uint* const tint_symbol) {
uint res = 0u;
uint const x_10 = atomic_fetch_add_explicit(tint_symbol, 1u, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_30 = *(tint_symbol_2);
- compute_main_inner(x_30, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_30 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_30, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/workgroup_i32.spvasm.expected.msl
index af7eadc..0efeff8 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAnd_45a819(threadgroup atomic_int* const tint_symbol) {
int res = 0;
int const x_11 = atomic_fetch_and_explicit(tint_symbol, 1, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_31 = *(tint_symbol_2);
- compute_main_inner(x_31, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_31 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_31, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/workgroup_u32.spvasm.expected.msl
index 2da6bbd..d871f2e 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAnd_34edd3(threadgroup atomic_uint* const tint_symbol) {
uint res = 0u;
uint const x_10 = atomic_fetch_and_explicit(tint_symbol, 1u, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_30 = *(tint_symbol_2);
- compute_main_inner(x_30, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_30 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_30, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl
index 25e9db3..136bec8 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl
@@ -12,6 +12,10 @@
return {old_value, exchanged};
}
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
struct x__atomic_compare_exchange_resulti32 {
int old_value;
bool exchanged;
@@ -34,25 +38,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_4, threadgroup atomic_int* const tint_symbol_5) {
- uint const x_36 = *(tint_symbol_4);
- compute_main_inner(x_36, tint_symbol_5);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_4) {
+ uint const x_36 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_36, tint_symbol_4);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_6, thread uint* const tint_symbol_7) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_5) {
{
- atomic_store_explicit(tint_symbol_6, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_5, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_7) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_7, tint_symbol_6);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_5);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_8;
- thread uint tint_symbol_9 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_8), &(tint_symbol_9));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_6;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_6));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl
index 287ea41..a704ffa 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl
@@ -12,6 +12,10 @@
return {old_value, exchanged};
}
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
struct x__atomic_compare_exchange_resultu32 {
uint old_value;
bool exchanged;
@@ -34,25 +38,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_4, threadgroup atomic_uint* const tint_symbol_5) {
- uint const x_35 = *(tint_symbol_4);
- compute_main_inner(x_35, tint_symbol_5);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_4) {
+ uint const x_35 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_35, tint_symbol_4);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_6, thread uint* const tint_symbol_7) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_5) {
{
- atomic_store_explicit(tint_symbol_6, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_5, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_7) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_7, tint_symbol_6);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_5);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_8;
- thread uint tint_symbol_9 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_8), &(tint_symbol_9));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_6;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_6));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/workgroup_i32.spvasm.expected.msl
index d0b8f90..7f59ed0 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicExchange_e114ba(threadgroup atomic_int* const tint_symbol) {
int res = 0;
int const x_11 = atomic_exchange_explicit(tint_symbol, 1, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_31 = *(tint_symbol_2);
- compute_main_inner(x_31, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_31 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_31, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/workgroup_u32.spvasm.expected.msl
index b562965..41db18a 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicExchange_0a5dca(threadgroup atomic_uint* const tint_symbol) {
uint res = 0u;
uint const x_10 = atomic_exchange_explicit(tint_symbol, 1u, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_30 = *(tint_symbol_2);
- compute_main_inner(x_30, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_30 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_30, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/workgroup_i32.spvasm.expected.msl
index 3f9bc5f..7c43ef3 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicLoad_afcc03(threadgroup atomic_int* const tint_symbol) {
int res = 0;
int const x_11 = atomic_load_explicit(tint_symbol, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_30 = *(tint_symbol_2);
- compute_main_inner(x_30, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_30 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_30, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/workgroup_u32.spvasm.expected.msl
index c9f5cd3..dcc1980 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicLoad_361bf1(threadgroup atomic_uint* const tint_symbol) {
uint res = 0u;
uint const x_10 = atomic_load_explicit(tint_symbol, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_29 = *(tint_symbol_2);
- compute_main_inner(x_29, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_29 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_29, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMax/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicMax/workgroup_i32.spvasm.expected.msl
index c309d8b..12ba18d 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicMax/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicMax/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicMax_a89cc3(threadgroup atomic_int* const tint_symbol) {
int res = 0;
int const x_11 = atomic_fetch_max_explicit(tint_symbol, 1, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_31 = *(tint_symbol_2);
- compute_main_inner(x_31, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_31 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_31, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMax/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicMax/workgroup_u32.spvasm.expected.msl
index 8519e90..b26d432 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicMax/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicMax/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicMax_beccfc(threadgroup atomic_uint* const tint_symbol) {
uint res = 0u;
uint const x_10 = atomic_fetch_max_explicit(tint_symbol, 1u, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_30 = *(tint_symbol_2);
- compute_main_inner(x_30, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_30 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_30, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMin/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicMin/workgroup_i32.spvasm.expected.msl
index f82688a..58bb34e 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicMin/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicMin/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicMin_278235(threadgroup atomic_int* const tint_symbol) {
int res = 0;
int const x_11 = atomic_fetch_min_explicit(tint_symbol, 1, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_31 = *(tint_symbol_2);
- compute_main_inner(x_31, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_31 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_31, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMin/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicMin/workgroup_u32.spvasm.expected.msl
index d03bb77..8ddcfb5 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicMin/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicMin/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicMin_69d383(threadgroup atomic_uint* const tint_symbol) {
uint res = 0u;
uint const x_10 = atomic_fetch_min_explicit(tint_symbol, 1u, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_30 = *(tint_symbol_2);
- compute_main_inner(x_30, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_30 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_30, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicOr/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicOr/workgroup_i32.spvasm.expected.msl
index 980a7d6..1307bc7 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicOr/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicOr/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicOr_d09248(threadgroup atomic_int* const tint_symbol) {
int res = 0;
int const x_11 = atomic_fetch_or_explicit(tint_symbol, 1, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_31 = *(tint_symbol_2);
- compute_main_inner(x_31, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_31 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_31, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicOr/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicOr/workgroup_u32.spvasm.expected.msl
index 1111dc3..1fcc8d8 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicOr/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicOr/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicOr_5e3d61(threadgroup atomic_uint* const tint_symbol) {
uint res = 0u;
uint const x_10 = atomic_fetch_or_explicit(tint_symbol, 1u, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_30 = *(tint_symbol_2);
- compute_main_inner(x_30, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_30 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_30, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicStore/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicStore/workgroup_i32.spvasm.expected.msl
index fbccdc4..a816570 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicStore/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicStore/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicStore_8bea94(threadgroup atomic_int* const tint_symbol) {
atomic_store_explicit(tint_symbol, 1, memory_order_relaxed);
return;
@@ -13,25 +17,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_29 = *(tint_symbol_2);
- compute_main_inner(x_29, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_29 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_29, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicStore/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicStore/workgroup_u32.spvasm.expected.msl
index 33849ed..9764bb4 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicStore/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicStore/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicStore_726882(threadgroup atomic_uint* const tint_symbol) {
atomic_store_explicit(tint_symbol, 1u, memory_order_relaxed);
return;
@@ -13,25 +17,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_28 = *(tint_symbol_2);
- compute_main_inner(x_28, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_28 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_28, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicSub/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicSub/workgroup_i32.spvasm.expected.msl
index fcc7910..555921f 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicSub/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicSub/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicSub_77883a(threadgroup atomic_int* const tint_symbol) {
int res = 0;
int const x_11 = atomic_fetch_sub_explicit(tint_symbol, 1, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_31 = *(tint_symbol_2);
- compute_main_inner(x_31, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_31 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_31, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicSub/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicSub/workgroup_u32.spvasm.expected.msl
index a166d08..6768b6c 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicSub/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicSub/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicSub_0d26c2(threadgroup atomic_uint* const tint_symbol) {
uint res = 0u;
uint const x_10 = atomic_fetch_sub_explicit(tint_symbol, 1u, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_30 = *(tint_symbol_2);
- compute_main_inner(x_30, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_30 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_30, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicXor/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicXor/workgroup_i32.spvasm.expected.msl
index 70c0e42..7643cf0 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicXor/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicXor/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicXor_75dc95(threadgroup atomic_int* const tint_symbol) {
int res = 0;
int const x_11 = atomic_fetch_xor_explicit(tint_symbol, 1, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_31 = *(tint_symbol_2);
- compute_main_inner(x_31, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_31 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_31, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicXor/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/atomicXor/workgroup_u32.spvasm.expected.msl
index 784f870..61ab423 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicXor/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicXor/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicXor_c8e6be(threadgroup atomic_uint* const tint_symbol) {
uint res = 0u;
uint const x_10 = atomic_fetch_xor_explicit(tint_symbol, 1u, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_30 = *(tint_symbol_2);
- compute_main_inner(x_30, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_30 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_30, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/workgroup_i32.spvasm.expected.msl
index 6e646d5..1ec7d77 100644
--- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAdd_794055(threadgroup atomic_int* const tint_symbol) {
int res = 0;
int const x_11 = atomic_fetch_sub_explicit(tint_symbol, 1, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_31 = *(tint_symbol_2);
- compute_main_inner(x_31, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_31 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_31, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/workgroup_u32.spvasm.expected.msl
index 39ec3fd..bb60527 100644
--- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAdd_d5db1d(threadgroup atomic_uint* const tint_symbol) {
uint res = 0u;
uint const x_10 = atomic_fetch_sub_explicit(tint_symbol, 1u, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_30 = *(tint_symbol_2);
- compute_main_inner(x_30, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_30 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_30, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/workgroup_i32.spvasm.expected.msl
index 5f8945f..c5a0ca2 100644
--- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAdd_794055(threadgroup atomic_int* const tint_symbol) {
int res = 0;
int const x_11 = atomic_fetch_add_explicit(tint_symbol, 1, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_31 = *(tint_symbol_2);
- compute_main_inner(x_31, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_31 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_31, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/workgroup_u32.spvasm.expected.msl
index 6dab262..75573c2 100644
--- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAdd_d5db1d(threadgroup atomic_uint* const tint_symbol) {
uint res = 0u;
uint const x_10 = atomic_fetch_add_explicit(tint_symbol, 1u, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_30 = *(tint_symbol_2);
- compute_main_inner(x_30, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_30 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_30, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAdd/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicAdd/workgroup_i32.spvasm.expected.msl
index 19c4023..c9f879a 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicAdd/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicAdd/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAdd_794055(threadgroup atomic_int* const tint_symbol) {
int arg_1 = 0;
int res = 0;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_33 = *(tint_symbol_2);
- compute_main_inner(x_33, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_33 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_33, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAdd/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicAdd/workgroup_u32.spvasm.expected.msl
index 9664a87..bbf5519 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicAdd/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicAdd/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAdd_d5db1d(threadgroup atomic_uint* const tint_symbol) {
uint arg_1 = 0u;
uint res = 0u;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_32 = *(tint_symbol_2);
- compute_main_inner(x_32, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_32 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_32, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAnd/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicAnd/workgroup_i32.spvasm.expected.msl
index a319bdb..c55ddd6 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicAnd/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicAnd/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAnd_45a819(threadgroup atomic_int* const tint_symbol) {
int arg_1 = 0;
int res = 0;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_33 = *(tint_symbol_2);
- compute_main_inner(x_33, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_33 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_33, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAnd/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicAnd/workgroup_u32.spvasm.expected.msl
index e6c7e39..890c186 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicAnd/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicAnd/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAnd_34edd3(threadgroup atomic_uint* const tint_symbol) {
uint arg_1 = 0u;
uint res = 0u;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_32 = *(tint_symbol_2);
- compute_main_inner(x_32, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_32 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_32, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl
index ce8a6a0..412c26a 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_i32.spvasm.expected.msl
@@ -12,6 +12,10 @@
return {old_value, exchanged};
}
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
struct x__atomic_compare_exchange_resulti32 {
int old_value;
bool exchanged;
@@ -40,25 +44,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_4, threadgroup atomic_int* const tint_symbol_5) {
- uint const x_41 = *(tint_symbol_4);
- compute_main_inner(x_41, tint_symbol_5);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_4) {
+ uint const x_41 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_41, tint_symbol_4);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_6, thread uint* const tint_symbol_7) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_5) {
{
- atomic_store_explicit(tint_symbol_6, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_5, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_7) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_7, tint_symbol_6);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_5);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_8;
- thread uint tint_symbol_9 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_8), &(tint_symbol_9));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_6;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_6));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl
index 4590197..7984286 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/workgroup_u32.spvasm.expected.msl
@@ -12,6 +12,10 @@
return {old_value, exchanged};
}
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
struct x__atomic_compare_exchange_resultu32 {
uint old_value;
bool exchanged;
@@ -40,25 +44,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_4, threadgroup atomic_uint* const tint_symbol_5) {
- uint const x_40 = *(tint_symbol_4);
- compute_main_inner(x_40, tint_symbol_5);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_4) {
+ uint const x_40 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_40, tint_symbol_4);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_6, thread uint* const tint_symbol_7) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_5) {
{
- atomic_store_explicit(tint_symbol_6, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_5, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_7) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_7, tint_symbol_6);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_5);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_8;
- thread uint tint_symbol_9 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_8), &(tint_symbol_9));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_6;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_6));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicExchange/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicExchange/workgroup_i32.spvasm.expected.msl
index bfb645d..bb77abe 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicExchange/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicExchange/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicExchange_e114ba(threadgroup atomic_int* const tint_symbol) {
int arg_1 = 0;
int res = 0;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_33 = *(tint_symbol_2);
- compute_main_inner(x_33, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_33 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_33, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicExchange/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicExchange/workgroup_u32.spvasm.expected.msl
index d805421..9ef0ae7 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicExchange/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicExchange/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicExchange_0a5dca(threadgroup atomic_uint* const tint_symbol) {
uint arg_1 = 0u;
uint res = 0u;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_32 = *(tint_symbol_2);
- compute_main_inner(x_32, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_32 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_32, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicLoad/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicLoad/workgroup_i32.spvasm.expected.msl
index 3f9bc5f..7c43ef3 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicLoad/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicLoad/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicLoad_afcc03(threadgroup atomic_int* const tint_symbol) {
int res = 0;
int const x_11 = atomic_load_explicit(tint_symbol, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_30 = *(tint_symbol_2);
- compute_main_inner(x_30, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_30 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_30, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicLoad/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicLoad/workgroup_u32.spvasm.expected.msl
index c9f5cd3..dcc1980 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicLoad/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicLoad/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicLoad_361bf1(threadgroup atomic_uint* const tint_symbol) {
uint res = 0u;
uint const x_10 = atomic_load_explicit(tint_symbol, memory_order_relaxed);
@@ -15,25 +19,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_29 = *(tint_symbol_2);
- compute_main_inner(x_29, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_29 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_29, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMax/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicMax/workgroup_i32.spvasm.expected.msl
index b026733..03d2bd6 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicMax/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicMax/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicMax_a89cc3(threadgroup atomic_int* const tint_symbol) {
int arg_1 = 0;
int res = 0;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_33 = *(tint_symbol_2);
- compute_main_inner(x_33, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_33 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_33, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMax/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicMax/workgroup_u32.spvasm.expected.msl
index e8951d4..ad5a3b8 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicMax/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicMax/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicMax_beccfc(threadgroup atomic_uint* const tint_symbol) {
uint arg_1 = 0u;
uint res = 0u;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_32 = *(tint_symbol_2);
- compute_main_inner(x_32, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_32 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_32, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMin/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicMin/workgroup_i32.spvasm.expected.msl
index ca77a67..fadd0ba 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicMin/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicMin/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicMin_278235(threadgroup atomic_int* const tint_symbol) {
int arg_1 = 0;
int res = 0;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_33 = *(tint_symbol_2);
- compute_main_inner(x_33, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_33 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_33, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMin/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicMin/workgroup_u32.spvasm.expected.msl
index 4731075..aab02e1 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicMin/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicMin/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicMin_69d383(threadgroup atomic_uint* const tint_symbol) {
uint arg_1 = 0u;
uint res = 0u;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_32 = *(tint_symbol_2);
- compute_main_inner(x_32, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_32 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_32, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicOr/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicOr/workgroup_i32.spvasm.expected.msl
index 1f405c7..529a691 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicOr/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicOr/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicOr_d09248(threadgroup atomic_int* const tint_symbol) {
int arg_1 = 0;
int res = 0;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_33 = *(tint_symbol_2);
- compute_main_inner(x_33, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_33 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_33, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicOr/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicOr/workgroup_u32.spvasm.expected.msl
index 5079e80..9dc2681 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicOr/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicOr/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicOr_5e3d61(threadgroup atomic_uint* const tint_symbol) {
uint arg_1 = 0u;
uint res = 0u;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_32 = *(tint_symbol_2);
- compute_main_inner(x_32, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_32 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_32, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicStore/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicStore/workgroup_i32.spvasm.expected.msl
index ba6fa5a..cdd8348 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicStore/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicStore/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicStore_8bea94(threadgroup atomic_int* const tint_symbol) {
int arg_1 = 0;
arg_1 = 1;
@@ -16,25 +20,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_32 = *(tint_symbol_2);
- compute_main_inner(x_32, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_32 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_32, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicStore/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicStore/workgroup_u32.spvasm.expected.msl
index 1c721e4..1fa8744 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicStore/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicStore/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicStore_726882(threadgroup atomic_uint* const tint_symbol) {
uint arg_1 = 0u;
arg_1 = 1u;
@@ -16,25 +20,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_31 = *(tint_symbol_2);
- compute_main_inner(x_31, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_31 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_31, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicSub/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicSub/workgroup_i32.spvasm.expected.msl
index 7eb4abe..82e4aaf 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicSub/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicSub/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicSub_77883a(threadgroup atomic_int* const tint_symbol) {
int arg_1 = 0;
int res = 0;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_33 = *(tint_symbol_2);
- compute_main_inner(x_33, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_33 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_33, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicSub/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicSub/workgroup_u32.spvasm.expected.msl
index 11750e7..f9ce87a 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicSub/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicSub/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicSub_0d26c2(threadgroup atomic_uint* const tint_symbol) {
uint arg_1 = 0u;
uint res = 0u;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_32 = *(tint_symbol_2);
- compute_main_inner(x_32, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_32 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_32, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicXor/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicXor/workgroup_i32.spvasm.expected.msl
index 7578844..da22ea0 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicXor/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicXor/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicXor_75dc95(threadgroup atomic_int* const tint_symbol) {
int arg_1 = 0;
int res = 0;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_33 = *(tint_symbol_2);
- compute_main_inner(x_33, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_33 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_33, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicXor/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/atomicXor/workgroup_u32.spvasm.expected.msl
index 6c75f1e..2401067 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicXor/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicXor/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicXor_c8e6be(threadgroup atomic_uint* const tint_symbol) {
uint arg_1 = 0u;
uint res = 0u;
@@ -18,25 +22,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_32 = *(tint_symbol_2);
- compute_main_inner(x_32, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_32 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_32, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/workgroup_i32.spvasm.expected.msl
index 6c220f4..192b51e 100644
--- a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAdd_794055(threadgroup atomic_int* const tint_symbol) {
int arg_1 = 0;
int res = 0;
@@ -17,25 +21,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_33 = *(tint_symbol_2);
- compute_main_inner(x_33, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_33 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_33, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/workgroup_u32.spvasm.expected.msl
index ca9e8e5..2d6d7a5 100644
--- a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAdd_d5db1d(threadgroup atomic_uint* const tint_symbol) {
uint arg_1 = 0u;
uint res = 0u;
@@ -17,25 +21,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_32 = *(tint_symbol_2);
- compute_main_inner(x_32, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_32 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_32, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/workgroup_i32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/workgroup_i32.spvasm.expected.msl
index d5ea965..174577b 100644
--- a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/workgroup_i32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/workgroup_i32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAdd_794055(threadgroup atomic_int* const tint_symbol) {
int arg_1 = 0;
int res = 0;
@@ -17,25 +21,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_int* const tint_symbol_3) {
- uint const x_33 = *(tint_symbol_2);
- compute_main_inner(x_33, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_2) {
+ uint const x_33 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_33, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_int* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_int* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_int tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_int tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/workgroup_u32.spvasm.expected.msl b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/workgroup_u32.spvasm.expected.msl
index 02a71ee..837094e 100644
--- a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/workgroup_u32.spvasm.expected.msl
+++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/workgroup_u32.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint local_invocation_index_1;
+};
+
void atomicAdd_d5db1d(threadgroup atomic_uint* const tint_symbol) {
uint arg_1 = 0u;
uint res = 0u;
@@ -17,25 +21,25 @@
return;
}
-void compute_main_1(thread uint* const tint_symbol_2, threadgroup atomic_uint* const tint_symbol_3) {
- uint const x_32 = *(tint_symbol_2);
- compute_main_inner(x_32, tint_symbol_3);
+void compute_main_1(thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_2) {
+ uint const x_32 = (*(tint_private_vars)).local_invocation_index_1;
+ compute_main_inner(x_32, tint_symbol_2);
return;
}
-void compute_main_inner_1(uint local_invocation_index_1_param, threadgroup atomic_uint* const tint_symbol_4, thread uint* const tint_symbol_5) {
+void compute_main_inner_1(uint local_invocation_index_1_param, thread tint_private_vars_struct* const tint_private_vars, threadgroup atomic_uint* const tint_symbol_3) {
{
- atomic_store_explicit(tint_symbol_4, 0u, memory_order_relaxed);
+ atomic_store_explicit(tint_symbol_3, 0u, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
- *(tint_symbol_5) = local_invocation_index_1_param;
- compute_main_1(tint_symbol_5, tint_symbol_4);
+ (*(tint_private_vars)).local_invocation_index_1 = local_invocation_index_1_param;
+ compute_main_1(tint_private_vars, tint_symbol_3);
}
kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]]) {
- threadgroup atomic_uint tint_symbol_6;
- thread uint tint_symbol_7 = 0u;
- compute_main_inner_1(local_invocation_index_1_param, &(tint_symbol_6), &(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ threadgroup atomic_uint tint_symbol_4;
+ compute_main_inner_1(local_invocation_index_1_param, &(tint_private_vars), &(tint_symbol_4));
return;
}
diff --git a/test/tint/builtins/textureDimensions/depth_ms.spvasm.expected.msl b/test/tint/builtins/textureDimensions/depth_ms.spvasm.expected.msl
index 865461f..5d29ed5 100644
--- a/test/tint/builtins/textureDimensions/depth_ms.spvasm.expected.msl
+++ b/test/tint/builtins/textureDimensions/depth_ms.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 tint_symbol_1;
+};
+
void textureDimensions_f60bdb(depth2d_ms<float, access::read> tint_symbol_5) {
int2 res = int2(0);
int2 const x_16 = int2(uint2(tint_symbol_5.get_width(), tint_symbol_5.get_height()));
@@ -8,14 +12,14 @@
return;
}
-void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_6) {
- *(tint_symbol_6) = tint_symbol;
+void tint_symbol_2(float4 tint_symbol, thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).tint_symbol_1 = tint_symbol;
return;
}
-void vertex_main_1(depth2d_ms<float, access::read> tint_symbol_7, thread float4* const tint_symbol_8) {
- textureDimensions_f60bdb(tint_symbol_7);
- tint_symbol_2(float4(0.0f), tint_symbol_8);
+void vertex_main_1(thread tint_private_vars_struct* const tint_private_vars, depth2d_ms<float, access::read> tint_symbol_6) {
+ textureDimensions_f60bdb(tint_symbol_6);
+ tint_symbol_2(float4(0.0f), tint_private_vars);
return;
}
@@ -27,37 +31,38 @@
float4 tint_symbol_1_1 [[position]];
};
-vertex_main_out vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_9, thread float4* const tint_symbol_10) {
- vertex_main_1(tint_symbol_9, tint_symbol_10);
- vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=*(tint_symbol_10)};
+vertex_main_out vertex_main_inner(thread tint_private_vars_struct* const tint_private_vars, depth2d_ms<float, access::read> tint_symbol_7) {
+ vertex_main_1(tint_private_vars, tint_symbol_7);
+ vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=(*(tint_private_vars)).tint_symbol_1};
return tint_symbol_4;
}
-vertex tint_symbol_3 vertex_main(depth2d_ms<float, access::read> tint_symbol_11 [[texture(0)]]) {
- thread float4 tint_symbol_12 = float4(0.0f);
- vertex_main_out const inner_result = vertex_main_inner(tint_symbol_11, &(tint_symbol_12));
+vertex tint_symbol_3 vertex_main(depth2d_ms<float, access::read> tint_symbol_8 [[texture(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.tint_symbol_1 = float4(0.0f);
+ vertex_main_out const inner_result = vertex_main_inner(&(tint_private_vars), tint_symbol_8);
tint_symbol_3 wrapper_result = {};
wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1;
return wrapper_result;
}
-void fragment_main_1(depth2d_ms<float, access::read> tint_symbol_13) {
- textureDimensions_f60bdb(tint_symbol_13);
+void fragment_main_1(depth2d_ms<float, access::read> tint_symbol_9) {
+ textureDimensions_f60bdb(tint_symbol_9);
return;
}
-fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_14 [[texture(0)]]) {
- fragment_main_1(tint_symbol_14);
+fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_10 [[texture(0)]]) {
+ fragment_main_1(tint_symbol_10);
return;
}
-void compute_main_1(depth2d_ms<float, access::read> tint_symbol_15) {
- textureDimensions_f60bdb(tint_symbol_15);
+void compute_main_1(depth2d_ms<float, access::read> tint_symbol_11) {
+ textureDimensions_f60bdb(tint_symbol_11);
return;
}
-kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_16 [[texture(0)]]) {
- compute_main_1(tint_symbol_16);
+kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_12 [[texture(0)]]) {
+ compute_main_1(tint_symbol_12);
return;
}
diff --git a/test/tint/builtins/textureLoad/depth_ms.spvasm.expected.msl b/test/tint/builtins/textureLoad/depth_ms.spvasm.expected.msl
index 4fdc4b6..b34e2dc 100644
--- a/test/tint/builtins/textureLoad/depth_ms.spvasm.expected.msl
+++ b/test/tint/builtins/textureLoad/depth_ms.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 tint_symbol_1;
+};
+
void textureLoad_6273b1(depth2d_ms<float, access::read> tint_symbol_5) {
float res = 0.0f;
float4 const x_17 = float4(tint_symbol_5.read(uint2(int2(0)), 1), 0.0f, 0.0f, 0.0f);
@@ -8,14 +12,14 @@
return;
}
-void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_6) {
- *(tint_symbol_6) = tint_symbol;
+void tint_symbol_2(float4 tint_symbol, thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).tint_symbol_1 = tint_symbol;
return;
}
-void vertex_main_1(depth2d_ms<float, access::read> tint_symbol_7, thread float4* const tint_symbol_8) {
- textureLoad_6273b1(tint_symbol_7);
- tint_symbol_2(float4(0.0f), tint_symbol_8);
+void vertex_main_1(thread tint_private_vars_struct* const tint_private_vars, depth2d_ms<float, access::read> tint_symbol_6) {
+ textureLoad_6273b1(tint_symbol_6);
+ tint_symbol_2(float4(0.0f), tint_private_vars);
return;
}
@@ -27,37 +31,38 @@
float4 tint_symbol_1_1 [[position]];
};
-vertex_main_out vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_9, thread float4* const tint_symbol_10) {
- vertex_main_1(tint_symbol_9, tint_symbol_10);
- vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=*(tint_symbol_10)};
+vertex_main_out vertex_main_inner(thread tint_private_vars_struct* const tint_private_vars, depth2d_ms<float, access::read> tint_symbol_7) {
+ vertex_main_1(tint_private_vars, tint_symbol_7);
+ vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=(*(tint_private_vars)).tint_symbol_1};
return tint_symbol_4;
}
-vertex tint_symbol_3 vertex_main(depth2d_ms<float, access::read> tint_symbol_11 [[texture(0)]]) {
- thread float4 tint_symbol_12 = float4(0.0f);
- vertex_main_out const inner_result = vertex_main_inner(tint_symbol_11, &(tint_symbol_12));
+vertex tint_symbol_3 vertex_main(depth2d_ms<float, access::read> tint_symbol_8 [[texture(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.tint_symbol_1 = float4(0.0f);
+ vertex_main_out const inner_result = vertex_main_inner(&(tint_private_vars), tint_symbol_8);
tint_symbol_3 wrapper_result = {};
wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1;
return wrapper_result;
}
-void fragment_main_1(depth2d_ms<float, access::read> tint_symbol_13) {
- textureLoad_6273b1(tint_symbol_13);
+void fragment_main_1(depth2d_ms<float, access::read> tint_symbol_9) {
+ textureLoad_6273b1(tint_symbol_9);
return;
}
-fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_14 [[texture(0)]]) {
- fragment_main_1(tint_symbol_14);
+fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_10 [[texture(0)]]) {
+ fragment_main_1(tint_symbol_10);
return;
}
-void compute_main_1(depth2d_ms<float, access::read> tint_symbol_15) {
- textureLoad_6273b1(tint_symbol_15);
+void compute_main_1(depth2d_ms<float, access::read> tint_symbol_11) {
+ textureLoad_6273b1(tint_symbol_11);
return;
}
-kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_16 [[texture(0)]]) {
- compute_main_1(tint_symbol_16);
+kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_12 [[texture(0)]]) {
+ compute_main_1(tint_symbol_12);
return;
}
diff --git a/test/tint/builtins/textureNumSamples/depth_ms.spvasm.expected.msl b/test/tint/builtins/textureNumSamples/depth_ms.spvasm.expected.msl
index cd3bb3b..0b23556 100644
--- a/test/tint/builtins/textureNumSamples/depth_ms.spvasm.expected.msl
+++ b/test/tint/builtins/textureNumSamples/depth_ms.spvasm.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 tint_symbol_1;
+};
+
void textureNumSamples_a3c8a0(depth2d_ms<float, access::read> tint_symbol_5) {
int res = 0;
int const x_16 = int(tint_symbol_5.get_num_samples());
@@ -8,14 +12,14 @@
return;
}
-void tint_symbol_2(float4 tint_symbol, thread float4* const tint_symbol_6) {
- *(tint_symbol_6) = tint_symbol;
+void tint_symbol_2(float4 tint_symbol, thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).tint_symbol_1 = tint_symbol;
return;
}
-void vertex_main_1(depth2d_ms<float, access::read> tint_symbol_7, thread float4* const tint_symbol_8) {
- textureNumSamples_a3c8a0(tint_symbol_7);
- tint_symbol_2(float4(0.0f), tint_symbol_8);
+void vertex_main_1(thread tint_private_vars_struct* const tint_private_vars, depth2d_ms<float, access::read> tint_symbol_6) {
+ textureNumSamples_a3c8a0(tint_symbol_6);
+ tint_symbol_2(float4(0.0f), tint_private_vars);
return;
}
@@ -27,37 +31,38 @@
float4 tint_symbol_1_1 [[position]];
};
-vertex_main_out vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_9, thread float4* const tint_symbol_10) {
- vertex_main_1(tint_symbol_9, tint_symbol_10);
- vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=*(tint_symbol_10)};
+vertex_main_out vertex_main_inner(thread tint_private_vars_struct* const tint_private_vars, depth2d_ms<float, access::read> tint_symbol_7) {
+ vertex_main_1(tint_private_vars, tint_symbol_7);
+ vertex_main_out const tint_symbol_4 = {.tint_symbol_1_1=(*(tint_private_vars)).tint_symbol_1};
return tint_symbol_4;
}
-vertex tint_symbol_3 vertex_main(depth2d_ms<float, access::read> tint_symbol_11 [[texture(0)]]) {
- thread float4 tint_symbol_12 = float4(0.0f);
- vertex_main_out const inner_result = vertex_main_inner(tint_symbol_11, &(tint_symbol_12));
+vertex tint_symbol_3 vertex_main(depth2d_ms<float, access::read> tint_symbol_8 [[texture(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.tint_symbol_1 = float4(0.0f);
+ vertex_main_out const inner_result = vertex_main_inner(&(tint_private_vars), tint_symbol_8);
tint_symbol_3 wrapper_result = {};
wrapper_result.tint_symbol_1_1 = inner_result.tint_symbol_1_1;
return wrapper_result;
}
-void fragment_main_1(depth2d_ms<float, access::read> tint_symbol_13) {
- textureNumSamples_a3c8a0(tint_symbol_13);
+void fragment_main_1(depth2d_ms<float, access::read> tint_symbol_9) {
+ textureNumSamples_a3c8a0(tint_symbol_9);
return;
}
-fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_14 [[texture(0)]]) {
- fragment_main_1(tint_symbol_14);
+fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_10 [[texture(0)]]) {
+ fragment_main_1(tint_symbol_10);
return;
}
-void compute_main_1(depth2d_ms<float, access::read> tint_symbol_15) {
- textureNumSamples_a3c8a0(tint_symbol_15);
+void compute_main_1(depth2d_ms<float, access::read> tint_symbol_11) {
+ textureNumSamples_a3c8a0(tint_symbol_11);
return;
}
-kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_16 [[texture(0)]]) {
- compute_main_1(tint_symbol_16);
+kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_12 [[texture(0)]]) {
+ compute_main_1(tint_symbol_12);
return;
}
diff --git a/test/tint/expressions/swizzle/read/vec3/f16.wgsl.expected.msl b/test/tint/expressions/swizzle/read/vec3/f16.wgsl.expected.msl
index 4650bf0..d2ff2a1 100644
--- a/test/tint/expressions/swizzle/read/vec3/f16.wgsl.expected.msl
+++ b/test/tint/expressions/swizzle/read/vec3/f16.wgsl.expected.msl
@@ -5,128 +5,131 @@
half3 v;
};
-void f() {
- thread S tint_symbol = {};
- half3 v = tint_symbol.v;
- half x = tint_symbol.v[0];
- half y = tint_symbol.v[1];
- half z = tint_symbol.v[2];
- half2 xx = tint_symbol.v.xx;
- half2 xy = tint_symbol.v.xy;
- half2 xz = tint_symbol.v.xz;
- half2 yx = tint_symbol.v.yx;
- half2 yy = tint_symbol.v.yy;
- half2 yz = tint_symbol.v.yz;
- half2 zx = tint_symbol.v.zx;
- half2 zy = tint_symbol.v.zy;
- half2 zz = tint_symbol.v.zz;
- half3 xxx = tint_symbol.v.xxx;
- half3 xxy = tint_symbol.v.xxy;
- half3 xxz = tint_symbol.v.xxz;
- half3 xyx = tint_symbol.v.xyx;
- half3 xyy = tint_symbol.v.xyy;
- half3 xyz = tint_symbol.v.xyz;
- half3 xzx = tint_symbol.v.xzx;
- half3 xzy = tint_symbol.v.xzy;
- half3 xzz = tint_symbol.v.xzz;
- half3 yxx = tint_symbol.v.yxx;
- half3 yxy = tint_symbol.v.yxy;
- half3 yxz = tint_symbol.v.yxz;
- half3 yyx = tint_symbol.v.yyx;
- half3 yyy = tint_symbol.v.yyy;
- half3 yyz = tint_symbol.v.yyz;
- half3 yzx = tint_symbol.v.yzx;
- half3 yzy = tint_symbol.v.yzy;
- half3 yzz = tint_symbol.v.yzz;
- half3 zxx = tint_symbol.v.zxx;
- half3 zxy = tint_symbol.v.zxy;
- half3 zxz = tint_symbol.v.zxz;
- half3 zyx = tint_symbol.v.zyx;
- half3 zyy = tint_symbol.v.zyy;
- half3 zyz = tint_symbol.v.zyz;
- half3 zzx = tint_symbol.v.zzx;
- half3 zzy = tint_symbol.v.zzy;
- half3 zzz = tint_symbol.v.zzz;
- half4 xxxx = tint_symbol.v.xxxx;
- half4 xxxy = tint_symbol.v.xxxy;
- half4 xxxz = tint_symbol.v.xxxz;
- half4 xxyx = tint_symbol.v.xxyx;
- half4 xxyy = tint_symbol.v.xxyy;
- half4 xxyz = tint_symbol.v.xxyz;
- half4 xxzx = tint_symbol.v.xxzx;
- half4 xxzy = tint_symbol.v.xxzy;
- half4 xxzz = tint_symbol.v.xxzz;
- half4 xyxx = tint_symbol.v.xyxx;
- half4 xyxy = tint_symbol.v.xyxy;
- half4 xyxz = tint_symbol.v.xyxz;
- half4 xyyx = tint_symbol.v.xyyx;
- half4 xyyy = tint_symbol.v.xyyy;
- half4 xyyz = tint_symbol.v.xyyz;
- half4 xyzx = tint_symbol.v.xyzx;
- half4 xyzy = tint_symbol.v.xyzy;
- half4 xyzz = tint_symbol.v.xyzz;
- half4 xzxx = tint_symbol.v.xzxx;
- half4 xzxy = tint_symbol.v.xzxy;
- half4 xzxz = tint_symbol.v.xzxz;
- half4 xzyx = tint_symbol.v.xzyx;
- half4 xzyy = tint_symbol.v.xzyy;
- half4 xzyz = tint_symbol.v.xzyz;
- half4 xzzx = tint_symbol.v.xzzx;
- half4 xzzy = tint_symbol.v.xzzy;
- half4 xzzz = tint_symbol.v.xzzz;
- half4 yxxx = tint_symbol.v.yxxx;
- half4 yxxy = tint_symbol.v.yxxy;
- half4 yxxz = tint_symbol.v.yxxz;
- half4 yxyx = tint_symbol.v.yxyx;
- half4 yxyy = tint_symbol.v.yxyy;
- half4 yxyz = tint_symbol.v.yxyz;
- half4 yxzx = tint_symbol.v.yxzx;
- half4 yxzy = tint_symbol.v.yxzy;
- half4 yxzz = tint_symbol.v.yxzz;
- half4 yyxx = tint_symbol.v.yyxx;
- half4 yyxy = tint_symbol.v.yyxy;
- half4 yyxz = tint_symbol.v.yyxz;
- half4 yyyx = tint_symbol.v.yyyx;
- half4 yyyy = tint_symbol.v.yyyy;
- half4 yyyz = tint_symbol.v.yyyz;
- half4 yyzx = tint_symbol.v.yyzx;
- half4 yyzy = tint_symbol.v.yyzy;
- half4 yyzz = tint_symbol.v.yyzz;
- half4 yzxx = tint_symbol.v.yzxx;
- half4 yzxy = tint_symbol.v.yzxy;
- half4 yzxz = tint_symbol.v.yzxz;
- half4 yzyx = tint_symbol.v.yzyx;
- half4 yzyy = tint_symbol.v.yzyy;
- half4 yzyz = tint_symbol.v.yzyz;
- half4 yzzx = tint_symbol.v.yzzx;
- half4 yzzy = tint_symbol.v.yzzy;
- half4 yzzz = tint_symbol.v.yzzz;
- half4 zxxx = tint_symbol.v.zxxx;
- half4 zxxy = tint_symbol.v.zxxy;
- half4 zxxz = tint_symbol.v.zxxz;
- half4 zxyx = tint_symbol.v.zxyx;
- half4 zxyy = tint_symbol.v.zxyy;
- half4 zxyz = tint_symbol.v.zxyz;
- half4 zxzx = tint_symbol.v.zxzx;
- half4 zxzy = tint_symbol.v.zxzy;
- half4 zxzz = tint_symbol.v.zxzz;
- half4 zyxx = tint_symbol.v.zyxx;
- half4 zyxy = tint_symbol.v.zyxy;
- half4 zyxz = tint_symbol.v.zyxz;
- half4 zyyx = tint_symbol.v.zyyx;
- half4 zyyy = tint_symbol.v.zyyy;
- half4 zyyz = tint_symbol.v.zyyz;
- half4 zyzx = tint_symbol.v.zyzx;
- half4 zyzy = tint_symbol.v.zyzy;
- half4 zyzz = tint_symbol.v.zyzz;
- half4 zzxx = tint_symbol.v.zzxx;
- half4 zzxy = tint_symbol.v.zzxy;
- half4 zzxz = tint_symbol.v.zzxz;
- half4 zzyx = tint_symbol.v.zzyx;
- half4 zzyy = tint_symbol.v.zzyy;
- half4 zzyz = tint_symbol.v.zzyz;
- half4 zzzx = tint_symbol.v.zzzx;
- half4 zzzy = tint_symbol.v.zzzy;
- half4 zzzz = tint_symbol.v.zzzz;
+struct tint_private_vars_struct {
+ S P;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3 v = (*(tint_private_vars)).P.v;
+ half x = (*(tint_private_vars)).P.v[0];
+ half y = (*(tint_private_vars)).P.v[1];
+ half z = (*(tint_private_vars)).P.v[2];
+ half2 xx = (*(tint_private_vars)).P.v.xx;
+ half2 xy = (*(tint_private_vars)).P.v.xy;
+ half2 xz = (*(tint_private_vars)).P.v.xz;
+ half2 yx = (*(tint_private_vars)).P.v.yx;
+ half2 yy = (*(tint_private_vars)).P.v.yy;
+ half2 yz = (*(tint_private_vars)).P.v.yz;
+ half2 zx = (*(tint_private_vars)).P.v.zx;
+ half2 zy = (*(tint_private_vars)).P.v.zy;
+ half2 zz = (*(tint_private_vars)).P.v.zz;
+ half3 xxx = (*(tint_private_vars)).P.v.xxx;
+ half3 xxy = (*(tint_private_vars)).P.v.xxy;
+ half3 xxz = (*(tint_private_vars)).P.v.xxz;
+ half3 xyx = (*(tint_private_vars)).P.v.xyx;
+ half3 xyy = (*(tint_private_vars)).P.v.xyy;
+ half3 xyz = (*(tint_private_vars)).P.v.xyz;
+ half3 xzx = (*(tint_private_vars)).P.v.xzx;
+ half3 xzy = (*(tint_private_vars)).P.v.xzy;
+ half3 xzz = (*(tint_private_vars)).P.v.xzz;
+ half3 yxx = (*(tint_private_vars)).P.v.yxx;
+ half3 yxy = (*(tint_private_vars)).P.v.yxy;
+ half3 yxz = (*(tint_private_vars)).P.v.yxz;
+ half3 yyx = (*(tint_private_vars)).P.v.yyx;
+ half3 yyy = (*(tint_private_vars)).P.v.yyy;
+ half3 yyz = (*(tint_private_vars)).P.v.yyz;
+ half3 yzx = (*(tint_private_vars)).P.v.yzx;
+ half3 yzy = (*(tint_private_vars)).P.v.yzy;
+ half3 yzz = (*(tint_private_vars)).P.v.yzz;
+ half3 zxx = (*(tint_private_vars)).P.v.zxx;
+ half3 zxy = (*(tint_private_vars)).P.v.zxy;
+ half3 zxz = (*(tint_private_vars)).P.v.zxz;
+ half3 zyx = (*(tint_private_vars)).P.v.zyx;
+ half3 zyy = (*(tint_private_vars)).P.v.zyy;
+ half3 zyz = (*(tint_private_vars)).P.v.zyz;
+ half3 zzx = (*(tint_private_vars)).P.v.zzx;
+ half3 zzy = (*(tint_private_vars)).P.v.zzy;
+ half3 zzz = (*(tint_private_vars)).P.v.zzz;
+ half4 xxxx = (*(tint_private_vars)).P.v.xxxx;
+ half4 xxxy = (*(tint_private_vars)).P.v.xxxy;
+ half4 xxxz = (*(tint_private_vars)).P.v.xxxz;
+ half4 xxyx = (*(tint_private_vars)).P.v.xxyx;
+ half4 xxyy = (*(tint_private_vars)).P.v.xxyy;
+ half4 xxyz = (*(tint_private_vars)).P.v.xxyz;
+ half4 xxzx = (*(tint_private_vars)).P.v.xxzx;
+ half4 xxzy = (*(tint_private_vars)).P.v.xxzy;
+ half4 xxzz = (*(tint_private_vars)).P.v.xxzz;
+ half4 xyxx = (*(tint_private_vars)).P.v.xyxx;
+ half4 xyxy = (*(tint_private_vars)).P.v.xyxy;
+ half4 xyxz = (*(tint_private_vars)).P.v.xyxz;
+ half4 xyyx = (*(tint_private_vars)).P.v.xyyx;
+ half4 xyyy = (*(tint_private_vars)).P.v.xyyy;
+ half4 xyyz = (*(tint_private_vars)).P.v.xyyz;
+ half4 xyzx = (*(tint_private_vars)).P.v.xyzx;
+ half4 xyzy = (*(tint_private_vars)).P.v.xyzy;
+ half4 xyzz = (*(tint_private_vars)).P.v.xyzz;
+ half4 xzxx = (*(tint_private_vars)).P.v.xzxx;
+ half4 xzxy = (*(tint_private_vars)).P.v.xzxy;
+ half4 xzxz = (*(tint_private_vars)).P.v.xzxz;
+ half4 xzyx = (*(tint_private_vars)).P.v.xzyx;
+ half4 xzyy = (*(tint_private_vars)).P.v.xzyy;
+ half4 xzyz = (*(tint_private_vars)).P.v.xzyz;
+ half4 xzzx = (*(tint_private_vars)).P.v.xzzx;
+ half4 xzzy = (*(tint_private_vars)).P.v.xzzy;
+ half4 xzzz = (*(tint_private_vars)).P.v.xzzz;
+ half4 yxxx = (*(tint_private_vars)).P.v.yxxx;
+ half4 yxxy = (*(tint_private_vars)).P.v.yxxy;
+ half4 yxxz = (*(tint_private_vars)).P.v.yxxz;
+ half4 yxyx = (*(tint_private_vars)).P.v.yxyx;
+ half4 yxyy = (*(tint_private_vars)).P.v.yxyy;
+ half4 yxyz = (*(tint_private_vars)).P.v.yxyz;
+ half4 yxzx = (*(tint_private_vars)).P.v.yxzx;
+ half4 yxzy = (*(tint_private_vars)).P.v.yxzy;
+ half4 yxzz = (*(tint_private_vars)).P.v.yxzz;
+ half4 yyxx = (*(tint_private_vars)).P.v.yyxx;
+ half4 yyxy = (*(tint_private_vars)).P.v.yyxy;
+ half4 yyxz = (*(tint_private_vars)).P.v.yyxz;
+ half4 yyyx = (*(tint_private_vars)).P.v.yyyx;
+ half4 yyyy = (*(tint_private_vars)).P.v.yyyy;
+ half4 yyyz = (*(tint_private_vars)).P.v.yyyz;
+ half4 yyzx = (*(tint_private_vars)).P.v.yyzx;
+ half4 yyzy = (*(tint_private_vars)).P.v.yyzy;
+ half4 yyzz = (*(tint_private_vars)).P.v.yyzz;
+ half4 yzxx = (*(tint_private_vars)).P.v.yzxx;
+ half4 yzxy = (*(tint_private_vars)).P.v.yzxy;
+ half4 yzxz = (*(tint_private_vars)).P.v.yzxz;
+ half4 yzyx = (*(tint_private_vars)).P.v.yzyx;
+ half4 yzyy = (*(tint_private_vars)).P.v.yzyy;
+ half4 yzyz = (*(tint_private_vars)).P.v.yzyz;
+ half4 yzzx = (*(tint_private_vars)).P.v.yzzx;
+ half4 yzzy = (*(tint_private_vars)).P.v.yzzy;
+ half4 yzzz = (*(tint_private_vars)).P.v.yzzz;
+ half4 zxxx = (*(tint_private_vars)).P.v.zxxx;
+ half4 zxxy = (*(tint_private_vars)).P.v.zxxy;
+ half4 zxxz = (*(tint_private_vars)).P.v.zxxz;
+ half4 zxyx = (*(tint_private_vars)).P.v.zxyx;
+ half4 zxyy = (*(tint_private_vars)).P.v.zxyy;
+ half4 zxyz = (*(tint_private_vars)).P.v.zxyz;
+ half4 zxzx = (*(tint_private_vars)).P.v.zxzx;
+ half4 zxzy = (*(tint_private_vars)).P.v.zxzy;
+ half4 zxzz = (*(tint_private_vars)).P.v.zxzz;
+ half4 zyxx = (*(tint_private_vars)).P.v.zyxx;
+ half4 zyxy = (*(tint_private_vars)).P.v.zyxy;
+ half4 zyxz = (*(tint_private_vars)).P.v.zyxz;
+ half4 zyyx = (*(tint_private_vars)).P.v.zyyx;
+ half4 zyyy = (*(tint_private_vars)).P.v.zyyy;
+ half4 zyyz = (*(tint_private_vars)).P.v.zyyz;
+ half4 zyzx = (*(tint_private_vars)).P.v.zyzx;
+ half4 zyzy = (*(tint_private_vars)).P.v.zyzy;
+ half4 zyzz = (*(tint_private_vars)).P.v.zyzz;
+ half4 zzxx = (*(tint_private_vars)).P.v.zzxx;
+ half4 zzxy = (*(tint_private_vars)).P.v.zzxy;
+ half4 zzxz = (*(tint_private_vars)).P.v.zzxz;
+ half4 zzyx = (*(tint_private_vars)).P.v.zzyx;
+ half4 zzyy = (*(tint_private_vars)).P.v.zzyy;
+ half4 zzyz = (*(tint_private_vars)).P.v.zzyz;
+ half4 zzzx = (*(tint_private_vars)).P.v.zzzx;
+ half4 zzzy = (*(tint_private_vars)).P.v.zzzy;
+ half4 zzzz = (*(tint_private_vars)).P.v.zzzz;
}
diff --git a/test/tint/expressions/swizzle/read/vec3/f32.wgsl.expected.msl b/test/tint/expressions/swizzle/read/vec3/f32.wgsl.expected.msl
index eda312d..0d86f0d 100644
--- a/test/tint/expressions/swizzle/read/vec3/f32.wgsl.expected.msl
+++ b/test/tint/expressions/swizzle/read/vec3/f32.wgsl.expected.msl
@@ -5,128 +5,131 @@
float3 v;
};
-void f() {
- thread S tint_symbol = {};
- float3 v = tint_symbol.v;
- float x = tint_symbol.v[0];
- float y = tint_symbol.v[1];
- float z = tint_symbol.v[2];
- float2 xx = tint_symbol.v.xx;
- float2 xy = tint_symbol.v.xy;
- float2 xz = tint_symbol.v.xz;
- float2 yx = tint_symbol.v.yx;
- float2 yy = tint_symbol.v.yy;
- float2 yz = tint_symbol.v.yz;
- float2 zx = tint_symbol.v.zx;
- float2 zy = tint_symbol.v.zy;
- float2 zz = tint_symbol.v.zz;
- float3 xxx = tint_symbol.v.xxx;
- float3 xxy = tint_symbol.v.xxy;
- float3 xxz = tint_symbol.v.xxz;
- float3 xyx = tint_symbol.v.xyx;
- float3 xyy = tint_symbol.v.xyy;
- float3 xyz = tint_symbol.v.xyz;
- float3 xzx = tint_symbol.v.xzx;
- float3 xzy = tint_symbol.v.xzy;
- float3 xzz = tint_symbol.v.xzz;
- float3 yxx = tint_symbol.v.yxx;
- float3 yxy = tint_symbol.v.yxy;
- float3 yxz = tint_symbol.v.yxz;
- float3 yyx = tint_symbol.v.yyx;
- float3 yyy = tint_symbol.v.yyy;
- float3 yyz = tint_symbol.v.yyz;
- float3 yzx = tint_symbol.v.yzx;
- float3 yzy = tint_symbol.v.yzy;
- float3 yzz = tint_symbol.v.yzz;
- float3 zxx = tint_symbol.v.zxx;
- float3 zxy = tint_symbol.v.zxy;
- float3 zxz = tint_symbol.v.zxz;
- float3 zyx = tint_symbol.v.zyx;
- float3 zyy = tint_symbol.v.zyy;
- float3 zyz = tint_symbol.v.zyz;
- float3 zzx = tint_symbol.v.zzx;
- float3 zzy = tint_symbol.v.zzy;
- float3 zzz = tint_symbol.v.zzz;
- float4 xxxx = tint_symbol.v.xxxx;
- float4 xxxy = tint_symbol.v.xxxy;
- float4 xxxz = tint_symbol.v.xxxz;
- float4 xxyx = tint_symbol.v.xxyx;
- float4 xxyy = tint_symbol.v.xxyy;
- float4 xxyz = tint_symbol.v.xxyz;
- float4 xxzx = tint_symbol.v.xxzx;
- float4 xxzy = tint_symbol.v.xxzy;
- float4 xxzz = tint_symbol.v.xxzz;
- float4 xyxx = tint_symbol.v.xyxx;
- float4 xyxy = tint_symbol.v.xyxy;
- float4 xyxz = tint_symbol.v.xyxz;
- float4 xyyx = tint_symbol.v.xyyx;
- float4 xyyy = tint_symbol.v.xyyy;
- float4 xyyz = tint_symbol.v.xyyz;
- float4 xyzx = tint_symbol.v.xyzx;
- float4 xyzy = tint_symbol.v.xyzy;
- float4 xyzz = tint_symbol.v.xyzz;
- float4 xzxx = tint_symbol.v.xzxx;
- float4 xzxy = tint_symbol.v.xzxy;
- float4 xzxz = tint_symbol.v.xzxz;
- float4 xzyx = tint_symbol.v.xzyx;
- float4 xzyy = tint_symbol.v.xzyy;
- float4 xzyz = tint_symbol.v.xzyz;
- float4 xzzx = tint_symbol.v.xzzx;
- float4 xzzy = tint_symbol.v.xzzy;
- float4 xzzz = tint_symbol.v.xzzz;
- float4 yxxx = tint_symbol.v.yxxx;
- float4 yxxy = tint_symbol.v.yxxy;
- float4 yxxz = tint_symbol.v.yxxz;
- float4 yxyx = tint_symbol.v.yxyx;
- float4 yxyy = tint_symbol.v.yxyy;
- float4 yxyz = tint_symbol.v.yxyz;
- float4 yxzx = tint_symbol.v.yxzx;
- float4 yxzy = tint_symbol.v.yxzy;
- float4 yxzz = tint_symbol.v.yxzz;
- float4 yyxx = tint_symbol.v.yyxx;
- float4 yyxy = tint_symbol.v.yyxy;
- float4 yyxz = tint_symbol.v.yyxz;
- float4 yyyx = tint_symbol.v.yyyx;
- float4 yyyy = tint_symbol.v.yyyy;
- float4 yyyz = tint_symbol.v.yyyz;
- float4 yyzx = tint_symbol.v.yyzx;
- float4 yyzy = tint_symbol.v.yyzy;
- float4 yyzz = tint_symbol.v.yyzz;
- float4 yzxx = tint_symbol.v.yzxx;
- float4 yzxy = tint_symbol.v.yzxy;
- float4 yzxz = tint_symbol.v.yzxz;
- float4 yzyx = tint_symbol.v.yzyx;
- float4 yzyy = tint_symbol.v.yzyy;
- float4 yzyz = tint_symbol.v.yzyz;
- float4 yzzx = tint_symbol.v.yzzx;
- float4 yzzy = tint_symbol.v.yzzy;
- float4 yzzz = tint_symbol.v.yzzz;
- float4 zxxx = tint_symbol.v.zxxx;
- float4 zxxy = tint_symbol.v.zxxy;
- float4 zxxz = tint_symbol.v.zxxz;
- float4 zxyx = tint_symbol.v.zxyx;
- float4 zxyy = tint_symbol.v.zxyy;
- float4 zxyz = tint_symbol.v.zxyz;
- float4 zxzx = tint_symbol.v.zxzx;
- float4 zxzy = tint_symbol.v.zxzy;
- float4 zxzz = tint_symbol.v.zxzz;
- float4 zyxx = tint_symbol.v.zyxx;
- float4 zyxy = tint_symbol.v.zyxy;
- float4 zyxz = tint_symbol.v.zyxz;
- float4 zyyx = tint_symbol.v.zyyx;
- float4 zyyy = tint_symbol.v.zyyy;
- float4 zyyz = tint_symbol.v.zyyz;
- float4 zyzx = tint_symbol.v.zyzx;
- float4 zyzy = tint_symbol.v.zyzy;
- float4 zyzz = tint_symbol.v.zyzz;
- float4 zzxx = tint_symbol.v.zzxx;
- float4 zzxy = tint_symbol.v.zzxy;
- float4 zzxz = tint_symbol.v.zzxz;
- float4 zzyx = tint_symbol.v.zzyx;
- float4 zzyy = tint_symbol.v.zzyy;
- float4 zzyz = tint_symbol.v.zzyz;
- float4 zzzx = tint_symbol.v.zzzx;
- float4 zzzy = tint_symbol.v.zzzy;
- float4 zzzz = tint_symbol.v.zzzz;
+struct tint_private_vars_struct {
+ S P;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3 v = (*(tint_private_vars)).P.v;
+ float x = (*(tint_private_vars)).P.v[0];
+ float y = (*(tint_private_vars)).P.v[1];
+ float z = (*(tint_private_vars)).P.v[2];
+ float2 xx = (*(tint_private_vars)).P.v.xx;
+ float2 xy = (*(tint_private_vars)).P.v.xy;
+ float2 xz = (*(tint_private_vars)).P.v.xz;
+ float2 yx = (*(tint_private_vars)).P.v.yx;
+ float2 yy = (*(tint_private_vars)).P.v.yy;
+ float2 yz = (*(tint_private_vars)).P.v.yz;
+ float2 zx = (*(tint_private_vars)).P.v.zx;
+ float2 zy = (*(tint_private_vars)).P.v.zy;
+ float2 zz = (*(tint_private_vars)).P.v.zz;
+ float3 xxx = (*(tint_private_vars)).P.v.xxx;
+ float3 xxy = (*(tint_private_vars)).P.v.xxy;
+ float3 xxz = (*(tint_private_vars)).P.v.xxz;
+ float3 xyx = (*(tint_private_vars)).P.v.xyx;
+ float3 xyy = (*(tint_private_vars)).P.v.xyy;
+ float3 xyz = (*(tint_private_vars)).P.v.xyz;
+ float3 xzx = (*(tint_private_vars)).P.v.xzx;
+ float3 xzy = (*(tint_private_vars)).P.v.xzy;
+ float3 xzz = (*(tint_private_vars)).P.v.xzz;
+ float3 yxx = (*(tint_private_vars)).P.v.yxx;
+ float3 yxy = (*(tint_private_vars)).P.v.yxy;
+ float3 yxz = (*(tint_private_vars)).P.v.yxz;
+ float3 yyx = (*(tint_private_vars)).P.v.yyx;
+ float3 yyy = (*(tint_private_vars)).P.v.yyy;
+ float3 yyz = (*(tint_private_vars)).P.v.yyz;
+ float3 yzx = (*(tint_private_vars)).P.v.yzx;
+ float3 yzy = (*(tint_private_vars)).P.v.yzy;
+ float3 yzz = (*(tint_private_vars)).P.v.yzz;
+ float3 zxx = (*(tint_private_vars)).P.v.zxx;
+ float3 zxy = (*(tint_private_vars)).P.v.zxy;
+ float3 zxz = (*(tint_private_vars)).P.v.zxz;
+ float3 zyx = (*(tint_private_vars)).P.v.zyx;
+ float3 zyy = (*(tint_private_vars)).P.v.zyy;
+ float3 zyz = (*(tint_private_vars)).P.v.zyz;
+ float3 zzx = (*(tint_private_vars)).P.v.zzx;
+ float3 zzy = (*(tint_private_vars)).P.v.zzy;
+ float3 zzz = (*(tint_private_vars)).P.v.zzz;
+ float4 xxxx = (*(tint_private_vars)).P.v.xxxx;
+ float4 xxxy = (*(tint_private_vars)).P.v.xxxy;
+ float4 xxxz = (*(tint_private_vars)).P.v.xxxz;
+ float4 xxyx = (*(tint_private_vars)).P.v.xxyx;
+ float4 xxyy = (*(tint_private_vars)).P.v.xxyy;
+ float4 xxyz = (*(tint_private_vars)).P.v.xxyz;
+ float4 xxzx = (*(tint_private_vars)).P.v.xxzx;
+ float4 xxzy = (*(tint_private_vars)).P.v.xxzy;
+ float4 xxzz = (*(tint_private_vars)).P.v.xxzz;
+ float4 xyxx = (*(tint_private_vars)).P.v.xyxx;
+ float4 xyxy = (*(tint_private_vars)).P.v.xyxy;
+ float4 xyxz = (*(tint_private_vars)).P.v.xyxz;
+ float4 xyyx = (*(tint_private_vars)).P.v.xyyx;
+ float4 xyyy = (*(tint_private_vars)).P.v.xyyy;
+ float4 xyyz = (*(tint_private_vars)).P.v.xyyz;
+ float4 xyzx = (*(tint_private_vars)).P.v.xyzx;
+ float4 xyzy = (*(tint_private_vars)).P.v.xyzy;
+ float4 xyzz = (*(tint_private_vars)).P.v.xyzz;
+ float4 xzxx = (*(tint_private_vars)).P.v.xzxx;
+ float4 xzxy = (*(tint_private_vars)).P.v.xzxy;
+ float4 xzxz = (*(tint_private_vars)).P.v.xzxz;
+ float4 xzyx = (*(tint_private_vars)).P.v.xzyx;
+ float4 xzyy = (*(tint_private_vars)).P.v.xzyy;
+ float4 xzyz = (*(tint_private_vars)).P.v.xzyz;
+ float4 xzzx = (*(tint_private_vars)).P.v.xzzx;
+ float4 xzzy = (*(tint_private_vars)).P.v.xzzy;
+ float4 xzzz = (*(tint_private_vars)).P.v.xzzz;
+ float4 yxxx = (*(tint_private_vars)).P.v.yxxx;
+ float4 yxxy = (*(tint_private_vars)).P.v.yxxy;
+ float4 yxxz = (*(tint_private_vars)).P.v.yxxz;
+ float4 yxyx = (*(tint_private_vars)).P.v.yxyx;
+ float4 yxyy = (*(tint_private_vars)).P.v.yxyy;
+ float4 yxyz = (*(tint_private_vars)).P.v.yxyz;
+ float4 yxzx = (*(tint_private_vars)).P.v.yxzx;
+ float4 yxzy = (*(tint_private_vars)).P.v.yxzy;
+ float4 yxzz = (*(tint_private_vars)).P.v.yxzz;
+ float4 yyxx = (*(tint_private_vars)).P.v.yyxx;
+ float4 yyxy = (*(tint_private_vars)).P.v.yyxy;
+ float4 yyxz = (*(tint_private_vars)).P.v.yyxz;
+ float4 yyyx = (*(tint_private_vars)).P.v.yyyx;
+ float4 yyyy = (*(tint_private_vars)).P.v.yyyy;
+ float4 yyyz = (*(tint_private_vars)).P.v.yyyz;
+ float4 yyzx = (*(tint_private_vars)).P.v.yyzx;
+ float4 yyzy = (*(tint_private_vars)).P.v.yyzy;
+ float4 yyzz = (*(tint_private_vars)).P.v.yyzz;
+ float4 yzxx = (*(tint_private_vars)).P.v.yzxx;
+ float4 yzxy = (*(tint_private_vars)).P.v.yzxy;
+ float4 yzxz = (*(tint_private_vars)).P.v.yzxz;
+ float4 yzyx = (*(tint_private_vars)).P.v.yzyx;
+ float4 yzyy = (*(tint_private_vars)).P.v.yzyy;
+ float4 yzyz = (*(tint_private_vars)).P.v.yzyz;
+ float4 yzzx = (*(tint_private_vars)).P.v.yzzx;
+ float4 yzzy = (*(tint_private_vars)).P.v.yzzy;
+ float4 yzzz = (*(tint_private_vars)).P.v.yzzz;
+ float4 zxxx = (*(tint_private_vars)).P.v.zxxx;
+ float4 zxxy = (*(tint_private_vars)).P.v.zxxy;
+ float4 zxxz = (*(tint_private_vars)).P.v.zxxz;
+ float4 zxyx = (*(tint_private_vars)).P.v.zxyx;
+ float4 zxyy = (*(tint_private_vars)).P.v.zxyy;
+ float4 zxyz = (*(tint_private_vars)).P.v.zxyz;
+ float4 zxzx = (*(tint_private_vars)).P.v.zxzx;
+ float4 zxzy = (*(tint_private_vars)).P.v.zxzy;
+ float4 zxzz = (*(tint_private_vars)).P.v.zxzz;
+ float4 zyxx = (*(tint_private_vars)).P.v.zyxx;
+ float4 zyxy = (*(tint_private_vars)).P.v.zyxy;
+ float4 zyxz = (*(tint_private_vars)).P.v.zyxz;
+ float4 zyyx = (*(tint_private_vars)).P.v.zyyx;
+ float4 zyyy = (*(tint_private_vars)).P.v.zyyy;
+ float4 zyyz = (*(tint_private_vars)).P.v.zyyz;
+ float4 zyzx = (*(tint_private_vars)).P.v.zyzx;
+ float4 zyzy = (*(tint_private_vars)).P.v.zyzy;
+ float4 zyzz = (*(tint_private_vars)).P.v.zyzz;
+ float4 zzxx = (*(tint_private_vars)).P.v.zzxx;
+ float4 zzxy = (*(tint_private_vars)).P.v.zzxy;
+ float4 zzxz = (*(tint_private_vars)).P.v.zzxz;
+ float4 zzyx = (*(tint_private_vars)).P.v.zzyx;
+ float4 zzyy = (*(tint_private_vars)).P.v.zzyy;
+ float4 zzyz = (*(tint_private_vars)).P.v.zzyz;
+ float4 zzzx = (*(tint_private_vars)).P.v.zzzx;
+ float4 zzzy = (*(tint_private_vars)).P.v.zzzy;
+ float4 zzzz = (*(tint_private_vars)).P.v.zzzz;
}
diff --git a/test/tint/expressions/swizzle/read/vec3/i32.wgsl.expected.msl b/test/tint/expressions/swizzle/read/vec3/i32.wgsl.expected.msl
index 9fd3e2f..ff90507 100644
--- a/test/tint/expressions/swizzle/read/vec3/i32.wgsl.expected.msl
+++ b/test/tint/expressions/swizzle/read/vec3/i32.wgsl.expected.msl
@@ -5,128 +5,131 @@
int3 v;
};
-void f() {
- thread S tint_symbol = {};
- int3 v = tint_symbol.v;
- int x = tint_symbol.v[0];
- int y = tint_symbol.v[1];
- int z = tint_symbol.v[2];
- int2 xx = tint_symbol.v.xx;
- int2 xy = tint_symbol.v.xy;
- int2 xz = tint_symbol.v.xz;
- int2 yx = tint_symbol.v.yx;
- int2 yy = tint_symbol.v.yy;
- int2 yz = tint_symbol.v.yz;
- int2 zx = tint_symbol.v.zx;
- int2 zy = tint_symbol.v.zy;
- int2 zz = tint_symbol.v.zz;
- int3 xxx = tint_symbol.v.xxx;
- int3 xxy = tint_symbol.v.xxy;
- int3 xxz = tint_symbol.v.xxz;
- int3 xyx = tint_symbol.v.xyx;
- int3 xyy = tint_symbol.v.xyy;
- int3 xyz = tint_symbol.v.xyz;
- int3 xzx = tint_symbol.v.xzx;
- int3 xzy = tint_symbol.v.xzy;
- int3 xzz = tint_symbol.v.xzz;
- int3 yxx = tint_symbol.v.yxx;
- int3 yxy = tint_symbol.v.yxy;
- int3 yxz = tint_symbol.v.yxz;
- int3 yyx = tint_symbol.v.yyx;
- int3 yyy = tint_symbol.v.yyy;
- int3 yyz = tint_symbol.v.yyz;
- int3 yzx = tint_symbol.v.yzx;
- int3 yzy = tint_symbol.v.yzy;
- int3 yzz = tint_symbol.v.yzz;
- int3 zxx = tint_symbol.v.zxx;
- int3 zxy = tint_symbol.v.zxy;
- int3 zxz = tint_symbol.v.zxz;
- int3 zyx = tint_symbol.v.zyx;
- int3 zyy = tint_symbol.v.zyy;
- int3 zyz = tint_symbol.v.zyz;
- int3 zzx = tint_symbol.v.zzx;
- int3 zzy = tint_symbol.v.zzy;
- int3 zzz = tint_symbol.v.zzz;
- int4 xxxx = tint_symbol.v.xxxx;
- int4 xxxy = tint_symbol.v.xxxy;
- int4 xxxz = tint_symbol.v.xxxz;
- int4 xxyx = tint_symbol.v.xxyx;
- int4 xxyy = tint_symbol.v.xxyy;
- int4 xxyz = tint_symbol.v.xxyz;
- int4 xxzx = tint_symbol.v.xxzx;
- int4 xxzy = tint_symbol.v.xxzy;
- int4 xxzz = tint_symbol.v.xxzz;
- int4 xyxx = tint_symbol.v.xyxx;
- int4 xyxy = tint_symbol.v.xyxy;
- int4 xyxz = tint_symbol.v.xyxz;
- int4 xyyx = tint_symbol.v.xyyx;
- int4 xyyy = tint_symbol.v.xyyy;
- int4 xyyz = tint_symbol.v.xyyz;
- int4 xyzx = tint_symbol.v.xyzx;
- int4 xyzy = tint_symbol.v.xyzy;
- int4 xyzz = tint_symbol.v.xyzz;
- int4 xzxx = tint_symbol.v.xzxx;
- int4 xzxy = tint_symbol.v.xzxy;
- int4 xzxz = tint_symbol.v.xzxz;
- int4 xzyx = tint_symbol.v.xzyx;
- int4 xzyy = tint_symbol.v.xzyy;
- int4 xzyz = tint_symbol.v.xzyz;
- int4 xzzx = tint_symbol.v.xzzx;
- int4 xzzy = tint_symbol.v.xzzy;
- int4 xzzz = tint_symbol.v.xzzz;
- int4 yxxx = tint_symbol.v.yxxx;
- int4 yxxy = tint_symbol.v.yxxy;
- int4 yxxz = tint_symbol.v.yxxz;
- int4 yxyx = tint_symbol.v.yxyx;
- int4 yxyy = tint_symbol.v.yxyy;
- int4 yxyz = tint_symbol.v.yxyz;
- int4 yxzx = tint_symbol.v.yxzx;
- int4 yxzy = tint_symbol.v.yxzy;
- int4 yxzz = tint_symbol.v.yxzz;
- int4 yyxx = tint_symbol.v.yyxx;
- int4 yyxy = tint_symbol.v.yyxy;
- int4 yyxz = tint_symbol.v.yyxz;
- int4 yyyx = tint_symbol.v.yyyx;
- int4 yyyy = tint_symbol.v.yyyy;
- int4 yyyz = tint_symbol.v.yyyz;
- int4 yyzx = tint_symbol.v.yyzx;
- int4 yyzy = tint_symbol.v.yyzy;
- int4 yyzz = tint_symbol.v.yyzz;
- int4 yzxx = tint_symbol.v.yzxx;
- int4 yzxy = tint_symbol.v.yzxy;
- int4 yzxz = tint_symbol.v.yzxz;
- int4 yzyx = tint_symbol.v.yzyx;
- int4 yzyy = tint_symbol.v.yzyy;
- int4 yzyz = tint_symbol.v.yzyz;
- int4 yzzx = tint_symbol.v.yzzx;
- int4 yzzy = tint_symbol.v.yzzy;
- int4 yzzz = tint_symbol.v.yzzz;
- int4 zxxx = tint_symbol.v.zxxx;
- int4 zxxy = tint_symbol.v.zxxy;
- int4 zxxz = tint_symbol.v.zxxz;
- int4 zxyx = tint_symbol.v.zxyx;
- int4 zxyy = tint_symbol.v.zxyy;
- int4 zxyz = tint_symbol.v.zxyz;
- int4 zxzx = tint_symbol.v.zxzx;
- int4 zxzy = tint_symbol.v.zxzy;
- int4 zxzz = tint_symbol.v.zxzz;
- int4 zyxx = tint_symbol.v.zyxx;
- int4 zyxy = tint_symbol.v.zyxy;
- int4 zyxz = tint_symbol.v.zyxz;
- int4 zyyx = tint_symbol.v.zyyx;
- int4 zyyy = tint_symbol.v.zyyy;
- int4 zyyz = tint_symbol.v.zyyz;
- int4 zyzx = tint_symbol.v.zyzx;
- int4 zyzy = tint_symbol.v.zyzy;
- int4 zyzz = tint_symbol.v.zyzz;
- int4 zzxx = tint_symbol.v.zzxx;
- int4 zzxy = tint_symbol.v.zzxy;
- int4 zzxz = tint_symbol.v.zzxz;
- int4 zzyx = tint_symbol.v.zzyx;
- int4 zzyy = tint_symbol.v.zzyy;
- int4 zzyz = tint_symbol.v.zzyz;
- int4 zzzx = tint_symbol.v.zzzx;
- int4 zzzy = tint_symbol.v.zzzy;
- int4 zzzz = tint_symbol.v.zzzz;
+struct tint_private_vars_struct {
+ S P;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int3 v = (*(tint_private_vars)).P.v;
+ int x = (*(tint_private_vars)).P.v[0];
+ int y = (*(tint_private_vars)).P.v[1];
+ int z = (*(tint_private_vars)).P.v[2];
+ int2 xx = (*(tint_private_vars)).P.v.xx;
+ int2 xy = (*(tint_private_vars)).P.v.xy;
+ int2 xz = (*(tint_private_vars)).P.v.xz;
+ int2 yx = (*(tint_private_vars)).P.v.yx;
+ int2 yy = (*(tint_private_vars)).P.v.yy;
+ int2 yz = (*(tint_private_vars)).P.v.yz;
+ int2 zx = (*(tint_private_vars)).P.v.zx;
+ int2 zy = (*(tint_private_vars)).P.v.zy;
+ int2 zz = (*(tint_private_vars)).P.v.zz;
+ int3 xxx = (*(tint_private_vars)).P.v.xxx;
+ int3 xxy = (*(tint_private_vars)).P.v.xxy;
+ int3 xxz = (*(tint_private_vars)).P.v.xxz;
+ int3 xyx = (*(tint_private_vars)).P.v.xyx;
+ int3 xyy = (*(tint_private_vars)).P.v.xyy;
+ int3 xyz = (*(tint_private_vars)).P.v.xyz;
+ int3 xzx = (*(tint_private_vars)).P.v.xzx;
+ int3 xzy = (*(tint_private_vars)).P.v.xzy;
+ int3 xzz = (*(tint_private_vars)).P.v.xzz;
+ int3 yxx = (*(tint_private_vars)).P.v.yxx;
+ int3 yxy = (*(tint_private_vars)).P.v.yxy;
+ int3 yxz = (*(tint_private_vars)).P.v.yxz;
+ int3 yyx = (*(tint_private_vars)).P.v.yyx;
+ int3 yyy = (*(tint_private_vars)).P.v.yyy;
+ int3 yyz = (*(tint_private_vars)).P.v.yyz;
+ int3 yzx = (*(tint_private_vars)).P.v.yzx;
+ int3 yzy = (*(tint_private_vars)).P.v.yzy;
+ int3 yzz = (*(tint_private_vars)).P.v.yzz;
+ int3 zxx = (*(tint_private_vars)).P.v.zxx;
+ int3 zxy = (*(tint_private_vars)).P.v.zxy;
+ int3 zxz = (*(tint_private_vars)).P.v.zxz;
+ int3 zyx = (*(tint_private_vars)).P.v.zyx;
+ int3 zyy = (*(tint_private_vars)).P.v.zyy;
+ int3 zyz = (*(tint_private_vars)).P.v.zyz;
+ int3 zzx = (*(tint_private_vars)).P.v.zzx;
+ int3 zzy = (*(tint_private_vars)).P.v.zzy;
+ int3 zzz = (*(tint_private_vars)).P.v.zzz;
+ int4 xxxx = (*(tint_private_vars)).P.v.xxxx;
+ int4 xxxy = (*(tint_private_vars)).P.v.xxxy;
+ int4 xxxz = (*(tint_private_vars)).P.v.xxxz;
+ int4 xxyx = (*(tint_private_vars)).P.v.xxyx;
+ int4 xxyy = (*(tint_private_vars)).P.v.xxyy;
+ int4 xxyz = (*(tint_private_vars)).P.v.xxyz;
+ int4 xxzx = (*(tint_private_vars)).P.v.xxzx;
+ int4 xxzy = (*(tint_private_vars)).P.v.xxzy;
+ int4 xxzz = (*(tint_private_vars)).P.v.xxzz;
+ int4 xyxx = (*(tint_private_vars)).P.v.xyxx;
+ int4 xyxy = (*(tint_private_vars)).P.v.xyxy;
+ int4 xyxz = (*(tint_private_vars)).P.v.xyxz;
+ int4 xyyx = (*(tint_private_vars)).P.v.xyyx;
+ int4 xyyy = (*(tint_private_vars)).P.v.xyyy;
+ int4 xyyz = (*(tint_private_vars)).P.v.xyyz;
+ int4 xyzx = (*(tint_private_vars)).P.v.xyzx;
+ int4 xyzy = (*(tint_private_vars)).P.v.xyzy;
+ int4 xyzz = (*(tint_private_vars)).P.v.xyzz;
+ int4 xzxx = (*(tint_private_vars)).P.v.xzxx;
+ int4 xzxy = (*(tint_private_vars)).P.v.xzxy;
+ int4 xzxz = (*(tint_private_vars)).P.v.xzxz;
+ int4 xzyx = (*(tint_private_vars)).P.v.xzyx;
+ int4 xzyy = (*(tint_private_vars)).P.v.xzyy;
+ int4 xzyz = (*(tint_private_vars)).P.v.xzyz;
+ int4 xzzx = (*(tint_private_vars)).P.v.xzzx;
+ int4 xzzy = (*(tint_private_vars)).P.v.xzzy;
+ int4 xzzz = (*(tint_private_vars)).P.v.xzzz;
+ int4 yxxx = (*(tint_private_vars)).P.v.yxxx;
+ int4 yxxy = (*(tint_private_vars)).P.v.yxxy;
+ int4 yxxz = (*(tint_private_vars)).P.v.yxxz;
+ int4 yxyx = (*(tint_private_vars)).P.v.yxyx;
+ int4 yxyy = (*(tint_private_vars)).P.v.yxyy;
+ int4 yxyz = (*(tint_private_vars)).P.v.yxyz;
+ int4 yxzx = (*(tint_private_vars)).P.v.yxzx;
+ int4 yxzy = (*(tint_private_vars)).P.v.yxzy;
+ int4 yxzz = (*(tint_private_vars)).P.v.yxzz;
+ int4 yyxx = (*(tint_private_vars)).P.v.yyxx;
+ int4 yyxy = (*(tint_private_vars)).P.v.yyxy;
+ int4 yyxz = (*(tint_private_vars)).P.v.yyxz;
+ int4 yyyx = (*(tint_private_vars)).P.v.yyyx;
+ int4 yyyy = (*(tint_private_vars)).P.v.yyyy;
+ int4 yyyz = (*(tint_private_vars)).P.v.yyyz;
+ int4 yyzx = (*(tint_private_vars)).P.v.yyzx;
+ int4 yyzy = (*(tint_private_vars)).P.v.yyzy;
+ int4 yyzz = (*(tint_private_vars)).P.v.yyzz;
+ int4 yzxx = (*(tint_private_vars)).P.v.yzxx;
+ int4 yzxy = (*(tint_private_vars)).P.v.yzxy;
+ int4 yzxz = (*(tint_private_vars)).P.v.yzxz;
+ int4 yzyx = (*(tint_private_vars)).P.v.yzyx;
+ int4 yzyy = (*(tint_private_vars)).P.v.yzyy;
+ int4 yzyz = (*(tint_private_vars)).P.v.yzyz;
+ int4 yzzx = (*(tint_private_vars)).P.v.yzzx;
+ int4 yzzy = (*(tint_private_vars)).P.v.yzzy;
+ int4 yzzz = (*(tint_private_vars)).P.v.yzzz;
+ int4 zxxx = (*(tint_private_vars)).P.v.zxxx;
+ int4 zxxy = (*(tint_private_vars)).P.v.zxxy;
+ int4 zxxz = (*(tint_private_vars)).P.v.zxxz;
+ int4 zxyx = (*(tint_private_vars)).P.v.zxyx;
+ int4 zxyy = (*(tint_private_vars)).P.v.zxyy;
+ int4 zxyz = (*(tint_private_vars)).P.v.zxyz;
+ int4 zxzx = (*(tint_private_vars)).P.v.zxzx;
+ int4 zxzy = (*(tint_private_vars)).P.v.zxzy;
+ int4 zxzz = (*(tint_private_vars)).P.v.zxzz;
+ int4 zyxx = (*(tint_private_vars)).P.v.zyxx;
+ int4 zyxy = (*(tint_private_vars)).P.v.zyxy;
+ int4 zyxz = (*(tint_private_vars)).P.v.zyxz;
+ int4 zyyx = (*(tint_private_vars)).P.v.zyyx;
+ int4 zyyy = (*(tint_private_vars)).P.v.zyyy;
+ int4 zyyz = (*(tint_private_vars)).P.v.zyyz;
+ int4 zyzx = (*(tint_private_vars)).P.v.zyzx;
+ int4 zyzy = (*(tint_private_vars)).P.v.zyzy;
+ int4 zyzz = (*(tint_private_vars)).P.v.zyzz;
+ int4 zzxx = (*(tint_private_vars)).P.v.zzxx;
+ int4 zzxy = (*(tint_private_vars)).P.v.zzxy;
+ int4 zzxz = (*(tint_private_vars)).P.v.zzxz;
+ int4 zzyx = (*(tint_private_vars)).P.v.zzyx;
+ int4 zzyy = (*(tint_private_vars)).P.v.zzyy;
+ int4 zzyz = (*(tint_private_vars)).P.v.zzyz;
+ int4 zzzx = (*(tint_private_vars)).P.v.zzzx;
+ int4 zzzy = (*(tint_private_vars)).P.v.zzzy;
+ int4 zzzz = (*(tint_private_vars)).P.v.zzzz;
}
diff --git a/test/tint/expressions/swizzle/read/vec3/u32.wgsl.expected.msl b/test/tint/expressions/swizzle/read/vec3/u32.wgsl.expected.msl
index e926493..e099478 100644
--- a/test/tint/expressions/swizzle/read/vec3/u32.wgsl.expected.msl
+++ b/test/tint/expressions/swizzle/read/vec3/u32.wgsl.expected.msl
@@ -5,128 +5,131 @@
uint3 v;
};
-void f() {
- thread S tint_symbol = {};
- uint3 v = tint_symbol.v;
- uint x = tint_symbol.v[0];
- uint y = tint_symbol.v[1];
- uint z = tint_symbol.v[2];
- uint2 xx = tint_symbol.v.xx;
- uint2 xy = tint_symbol.v.xy;
- uint2 xz = tint_symbol.v.xz;
- uint2 yx = tint_symbol.v.yx;
- uint2 yy = tint_symbol.v.yy;
- uint2 yz = tint_symbol.v.yz;
- uint2 zx = tint_symbol.v.zx;
- uint2 zy = tint_symbol.v.zy;
- uint2 zz = tint_symbol.v.zz;
- uint3 xxx = tint_symbol.v.xxx;
- uint3 xxy = tint_symbol.v.xxy;
- uint3 xxz = tint_symbol.v.xxz;
- uint3 xyx = tint_symbol.v.xyx;
- uint3 xyy = tint_symbol.v.xyy;
- uint3 xyz = tint_symbol.v.xyz;
- uint3 xzx = tint_symbol.v.xzx;
- uint3 xzy = tint_symbol.v.xzy;
- uint3 xzz = tint_symbol.v.xzz;
- uint3 yxx = tint_symbol.v.yxx;
- uint3 yxy = tint_symbol.v.yxy;
- uint3 yxz = tint_symbol.v.yxz;
- uint3 yyx = tint_symbol.v.yyx;
- uint3 yyy = tint_symbol.v.yyy;
- uint3 yyz = tint_symbol.v.yyz;
- uint3 yzx = tint_symbol.v.yzx;
- uint3 yzy = tint_symbol.v.yzy;
- uint3 yzz = tint_symbol.v.yzz;
- uint3 zxx = tint_symbol.v.zxx;
- uint3 zxy = tint_symbol.v.zxy;
- uint3 zxz = tint_symbol.v.zxz;
- uint3 zyx = tint_symbol.v.zyx;
- uint3 zyy = tint_symbol.v.zyy;
- uint3 zyz = tint_symbol.v.zyz;
- uint3 zzx = tint_symbol.v.zzx;
- uint3 zzy = tint_symbol.v.zzy;
- uint3 zzz = tint_symbol.v.zzz;
- uint4 xxxx = tint_symbol.v.xxxx;
- uint4 xxxy = tint_symbol.v.xxxy;
- uint4 xxxz = tint_symbol.v.xxxz;
- uint4 xxyx = tint_symbol.v.xxyx;
- uint4 xxyy = tint_symbol.v.xxyy;
- uint4 xxyz = tint_symbol.v.xxyz;
- uint4 xxzx = tint_symbol.v.xxzx;
- uint4 xxzy = tint_symbol.v.xxzy;
- uint4 xxzz = tint_symbol.v.xxzz;
- uint4 xyxx = tint_symbol.v.xyxx;
- uint4 xyxy = tint_symbol.v.xyxy;
- uint4 xyxz = tint_symbol.v.xyxz;
- uint4 xyyx = tint_symbol.v.xyyx;
- uint4 xyyy = tint_symbol.v.xyyy;
- uint4 xyyz = tint_symbol.v.xyyz;
- uint4 xyzx = tint_symbol.v.xyzx;
- uint4 xyzy = tint_symbol.v.xyzy;
- uint4 xyzz = tint_symbol.v.xyzz;
- uint4 xzxx = tint_symbol.v.xzxx;
- uint4 xzxy = tint_symbol.v.xzxy;
- uint4 xzxz = tint_symbol.v.xzxz;
- uint4 xzyx = tint_symbol.v.xzyx;
- uint4 xzyy = tint_symbol.v.xzyy;
- uint4 xzyz = tint_symbol.v.xzyz;
- uint4 xzzx = tint_symbol.v.xzzx;
- uint4 xzzy = tint_symbol.v.xzzy;
- uint4 xzzz = tint_symbol.v.xzzz;
- uint4 yxxx = tint_symbol.v.yxxx;
- uint4 yxxy = tint_symbol.v.yxxy;
- uint4 yxxz = tint_symbol.v.yxxz;
- uint4 yxyx = tint_symbol.v.yxyx;
- uint4 yxyy = tint_symbol.v.yxyy;
- uint4 yxyz = tint_symbol.v.yxyz;
- uint4 yxzx = tint_symbol.v.yxzx;
- uint4 yxzy = tint_symbol.v.yxzy;
- uint4 yxzz = tint_symbol.v.yxzz;
- uint4 yyxx = tint_symbol.v.yyxx;
- uint4 yyxy = tint_symbol.v.yyxy;
- uint4 yyxz = tint_symbol.v.yyxz;
- uint4 yyyx = tint_symbol.v.yyyx;
- uint4 yyyy = tint_symbol.v.yyyy;
- uint4 yyyz = tint_symbol.v.yyyz;
- uint4 yyzx = tint_symbol.v.yyzx;
- uint4 yyzy = tint_symbol.v.yyzy;
- uint4 yyzz = tint_symbol.v.yyzz;
- uint4 yzxx = tint_symbol.v.yzxx;
- uint4 yzxy = tint_symbol.v.yzxy;
- uint4 yzxz = tint_symbol.v.yzxz;
- uint4 yzyx = tint_symbol.v.yzyx;
- uint4 yzyy = tint_symbol.v.yzyy;
- uint4 yzyz = tint_symbol.v.yzyz;
- uint4 yzzx = tint_symbol.v.yzzx;
- uint4 yzzy = tint_symbol.v.yzzy;
- uint4 yzzz = tint_symbol.v.yzzz;
- uint4 zxxx = tint_symbol.v.zxxx;
- uint4 zxxy = tint_symbol.v.zxxy;
- uint4 zxxz = tint_symbol.v.zxxz;
- uint4 zxyx = tint_symbol.v.zxyx;
- uint4 zxyy = tint_symbol.v.zxyy;
- uint4 zxyz = tint_symbol.v.zxyz;
- uint4 zxzx = tint_symbol.v.zxzx;
- uint4 zxzy = tint_symbol.v.zxzy;
- uint4 zxzz = tint_symbol.v.zxzz;
- uint4 zyxx = tint_symbol.v.zyxx;
- uint4 zyxy = tint_symbol.v.zyxy;
- uint4 zyxz = tint_symbol.v.zyxz;
- uint4 zyyx = tint_symbol.v.zyyx;
- uint4 zyyy = tint_symbol.v.zyyy;
- uint4 zyyz = tint_symbol.v.zyyz;
- uint4 zyzx = tint_symbol.v.zyzx;
- uint4 zyzy = tint_symbol.v.zyzy;
- uint4 zyzz = tint_symbol.v.zyzz;
- uint4 zzxx = tint_symbol.v.zzxx;
- uint4 zzxy = tint_symbol.v.zzxy;
- uint4 zzxz = tint_symbol.v.zzxz;
- uint4 zzyx = tint_symbol.v.zzyx;
- uint4 zzyy = tint_symbol.v.zzyy;
- uint4 zzyz = tint_symbol.v.zzyz;
- uint4 zzzx = tint_symbol.v.zzzx;
- uint4 zzzy = tint_symbol.v.zzzy;
- uint4 zzzz = tint_symbol.v.zzzz;
+struct tint_private_vars_struct {
+ S P;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint3 v = (*(tint_private_vars)).P.v;
+ uint x = (*(tint_private_vars)).P.v[0];
+ uint y = (*(tint_private_vars)).P.v[1];
+ uint z = (*(tint_private_vars)).P.v[2];
+ uint2 xx = (*(tint_private_vars)).P.v.xx;
+ uint2 xy = (*(tint_private_vars)).P.v.xy;
+ uint2 xz = (*(tint_private_vars)).P.v.xz;
+ uint2 yx = (*(tint_private_vars)).P.v.yx;
+ uint2 yy = (*(tint_private_vars)).P.v.yy;
+ uint2 yz = (*(tint_private_vars)).P.v.yz;
+ uint2 zx = (*(tint_private_vars)).P.v.zx;
+ uint2 zy = (*(tint_private_vars)).P.v.zy;
+ uint2 zz = (*(tint_private_vars)).P.v.zz;
+ uint3 xxx = (*(tint_private_vars)).P.v.xxx;
+ uint3 xxy = (*(tint_private_vars)).P.v.xxy;
+ uint3 xxz = (*(tint_private_vars)).P.v.xxz;
+ uint3 xyx = (*(tint_private_vars)).P.v.xyx;
+ uint3 xyy = (*(tint_private_vars)).P.v.xyy;
+ uint3 xyz = (*(tint_private_vars)).P.v.xyz;
+ uint3 xzx = (*(tint_private_vars)).P.v.xzx;
+ uint3 xzy = (*(tint_private_vars)).P.v.xzy;
+ uint3 xzz = (*(tint_private_vars)).P.v.xzz;
+ uint3 yxx = (*(tint_private_vars)).P.v.yxx;
+ uint3 yxy = (*(tint_private_vars)).P.v.yxy;
+ uint3 yxz = (*(tint_private_vars)).P.v.yxz;
+ uint3 yyx = (*(tint_private_vars)).P.v.yyx;
+ uint3 yyy = (*(tint_private_vars)).P.v.yyy;
+ uint3 yyz = (*(tint_private_vars)).P.v.yyz;
+ uint3 yzx = (*(tint_private_vars)).P.v.yzx;
+ uint3 yzy = (*(tint_private_vars)).P.v.yzy;
+ uint3 yzz = (*(tint_private_vars)).P.v.yzz;
+ uint3 zxx = (*(tint_private_vars)).P.v.zxx;
+ uint3 zxy = (*(tint_private_vars)).P.v.zxy;
+ uint3 zxz = (*(tint_private_vars)).P.v.zxz;
+ uint3 zyx = (*(tint_private_vars)).P.v.zyx;
+ uint3 zyy = (*(tint_private_vars)).P.v.zyy;
+ uint3 zyz = (*(tint_private_vars)).P.v.zyz;
+ uint3 zzx = (*(tint_private_vars)).P.v.zzx;
+ uint3 zzy = (*(tint_private_vars)).P.v.zzy;
+ uint3 zzz = (*(tint_private_vars)).P.v.zzz;
+ uint4 xxxx = (*(tint_private_vars)).P.v.xxxx;
+ uint4 xxxy = (*(tint_private_vars)).P.v.xxxy;
+ uint4 xxxz = (*(tint_private_vars)).P.v.xxxz;
+ uint4 xxyx = (*(tint_private_vars)).P.v.xxyx;
+ uint4 xxyy = (*(tint_private_vars)).P.v.xxyy;
+ uint4 xxyz = (*(tint_private_vars)).P.v.xxyz;
+ uint4 xxzx = (*(tint_private_vars)).P.v.xxzx;
+ uint4 xxzy = (*(tint_private_vars)).P.v.xxzy;
+ uint4 xxzz = (*(tint_private_vars)).P.v.xxzz;
+ uint4 xyxx = (*(tint_private_vars)).P.v.xyxx;
+ uint4 xyxy = (*(tint_private_vars)).P.v.xyxy;
+ uint4 xyxz = (*(tint_private_vars)).P.v.xyxz;
+ uint4 xyyx = (*(tint_private_vars)).P.v.xyyx;
+ uint4 xyyy = (*(tint_private_vars)).P.v.xyyy;
+ uint4 xyyz = (*(tint_private_vars)).P.v.xyyz;
+ uint4 xyzx = (*(tint_private_vars)).P.v.xyzx;
+ uint4 xyzy = (*(tint_private_vars)).P.v.xyzy;
+ uint4 xyzz = (*(tint_private_vars)).P.v.xyzz;
+ uint4 xzxx = (*(tint_private_vars)).P.v.xzxx;
+ uint4 xzxy = (*(tint_private_vars)).P.v.xzxy;
+ uint4 xzxz = (*(tint_private_vars)).P.v.xzxz;
+ uint4 xzyx = (*(tint_private_vars)).P.v.xzyx;
+ uint4 xzyy = (*(tint_private_vars)).P.v.xzyy;
+ uint4 xzyz = (*(tint_private_vars)).P.v.xzyz;
+ uint4 xzzx = (*(tint_private_vars)).P.v.xzzx;
+ uint4 xzzy = (*(tint_private_vars)).P.v.xzzy;
+ uint4 xzzz = (*(tint_private_vars)).P.v.xzzz;
+ uint4 yxxx = (*(tint_private_vars)).P.v.yxxx;
+ uint4 yxxy = (*(tint_private_vars)).P.v.yxxy;
+ uint4 yxxz = (*(tint_private_vars)).P.v.yxxz;
+ uint4 yxyx = (*(tint_private_vars)).P.v.yxyx;
+ uint4 yxyy = (*(tint_private_vars)).P.v.yxyy;
+ uint4 yxyz = (*(tint_private_vars)).P.v.yxyz;
+ uint4 yxzx = (*(tint_private_vars)).P.v.yxzx;
+ uint4 yxzy = (*(tint_private_vars)).P.v.yxzy;
+ uint4 yxzz = (*(tint_private_vars)).P.v.yxzz;
+ uint4 yyxx = (*(tint_private_vars)).P.v.yyxx;
+ uint4 yyxy = (*(tint_private_vars)).P.v.yyxy;
+ uint4 yyxz = (*(tint_private_vars)).P.v.yyxz;
+ uint4 yyyx = (*(tint_private_vars)).P.v.yyyx;
+ uint4 yyyy = (*(tint_private_vars)).P.v.yyyy;
+ uint4 yyyz = (*(tint_private_vars)).P.v.yyyz;
+ uint4 yyzx = (*(tint_private_vars)).P.v.yyzx;
+ uint4 yyzy = (*(tint_private_vars)).P.v.yyzy;
+ uint4 yyzz = (*(tint_private_vars)).P.v.yyzz;
+ uint4 yzxx = (*(tint_private_vars)).P.v.yzxx;
+ uint4 yzxy = (*(tint_private_vars)).P.v.yzxy;
+ uint4 yzxz = (*(tint_private_vars)).P.v.yzxz;
+ uint4 yzyx = (*(tint_private_vars)).P.v.yzyx;
+ uint4 yzyy = (*(tint_private_vars)).P.v.yzyy;
+ uint4 yzyz = (*(tint_private_vars)).P.v.yzyz;
+ uint4 yzzx = (*(tint_private_vars)).P.v.yzzx;
+ uint4 yzzy = (*(tint_private_vars)).P.v.yzzy;
+ uint4 yzzz = (*(tint_private_vars)).P.v.yzzz;
+ uint4 zxxx = (*(tint_private_vars)).P.v.zxxx;
+ uint4 zxxy = (*(tint_private_vars)).P.v.zxxy;
+ uint4 zxxz = (*(tint_private_vars)).P.v.zxxz;
+ uint4 zxyx = (*(tint_private_vars)).P.v.zxyx;
+ uint4 zxyy = (*(tint_private_vars)).P.v.zxyy;
+ uint4 zxyz = (*(tint_private_vars)).P.v.zxyz;
+ uint4 zxzx = (*(tint_private_vars)).P.v.zxzx;
+ uint4 zxzy = (*(tint_private_vars)).P.v.zxzy;
+ uint4 zxzz = (*(tint_private_vars)).P.v.zxzz;
+ uint4 zyxx = (*(tint_private_vars)).P.v.zyxx;
+ uint4 zyxy = (*(tint_private_vars)).P.v.zyxy;
+ uint4 zyxz = (*(tint_private_vars)).P.v.zyxz;
+ uint4 zyyx = (*(tint_private_vars)).P.v.zyyx;
+ uint4 zyyy = (*(tint_private_vars)).P.v.zyyy;
+ uint4 zyyz = (*(tint_private_vars)).P.v.zyyz;
+ uint4 zyzx = (*(tint_private_vars)).P.v.zyzx;
+ uint4 zyzy = (*(tint_private_vars)).P.v.zyzy;
+ uint4 zyzz = (*(tint_private_vars)).P.v.zyzz;
+ uint4 zzxx = (*(tint_private_vars)).P.v.zzxx;
+ uint4 zzxy = (*(tint_private_vars)).P.v.zzxy;
+ uint4 zzxz = (*(tint_private_vars)).P.v.zzxz;
+ uint4 zzyx = (*(tint_private_vars)).P.v.zzyx;
+ uint4 zzyy = (*(tint_private_vars)).P.v.zzyy;
+ uint4 zzyz = (*(tint_private_vars)).P.v.zzyz;
+ uint4 zzzx = (*(tint_private_vars)).P.v.zzzx;
+ uint4 zzzy = (*(tint_private_vars)).P.v.zzzy;
+ uint4 zzzz = (*(tint_private_vars)).P.v.zzzz;
}
diff --git a/test/tint/expressions/swizzle/write/vec3/f16.wgsl.expected.msl b/test/tint/expressions/swizzle/write/vec3/f16.wgsl.expected.msl
index 87ad75d..b792a3a 100644
--- a/test/tint/expressions/swizzle/write/vec3/f16.wgsl.expected.msl
+++ b/test/tint/expressions/swizzle/write/vec3/f16.wgsl.expected.msl
@@ -5,11 +5,14 @@
half3 v;
};
-void f() {
- thread S tint_symbol = {};
- tint_symbol.v = half3(1.0h, 2.0h, 3.0h);
- tint_symbol.v[0] = 1.0h;
- tint_symbol.v[1] = 2.0h;
- tint_symbol.v[2] = 3.0h;
+struct tint_private_vars_struct {
+ S P;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).P.v = half3(1.0h, 2.0h, 3.0h);
+ (*(tint_private_vars)).P.v[0] = 1.0h;
+ (*(tint_private_vars)).P.v[1] = 2.0h;
+ (*(tint_private_vars)).P.v[2] = 3.0h;
}
diff --git a/test/tint/expressions/swizzle/write/vec3/f32.wgsl.expected.msl b/test/tint/expressions/swizzle/write/vec3/f32.wgsl.expected.msl
index 7122f54..1868a06 100644
--- a/test/tint/expressions/swizzle/write/vec3/f32.wgsl.expected.msl
+++ b/test/tint/expressions/swizzle/write/vec3/f32.wgsl.expected.msl
@@ -5,11 +5,14 @@
float3 v;
};
-void f() {
- thread S tint_symbol = {};
- tint_symbol.v = float3(1.0f, 2.0f, 3.0f);
- tint_symbol.v[0] = 1.0f;
- tint_symbol.v[1] = 2.0f;
- tint_symbol.v[2] = 3.0f;
+struct tint_private_vars_struct {
+ S P;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).P.v = float3(1.0f, 2.0f, 3.0f);
+ (*(tint_private_vars)).P.v[0] = 1.0f;
+ (*(tint_private_vars)).P.v[1] = 2.0f;
+ (*(tint_private_vars)).P.v[2] = 3.0f;
}
diff --git a/test/tint/expressions/swizzle/write/vec3/i32.wgsl.expected.msl b/test/tint/expressions/swizzle/write/vec3/i32.wgsl.expected.msl
index 1e4aee1..c1d0b5b 100644
--- a/test/tint/expressions/swizzle/write/vec3/i32.wgsl.expected.msl
+++ b/test/tint/expressions/swizzle/write/vec3/i32.wgsl.expected.msl
@@ -5,11 +5,14 @@
int3 v;
};
-void f() {
- thread S tint_symbol = {};
- tint_symbol.v = int3(1, 2, 3);
- tint_symbol.v[0] = 1;
- tint_symbol.v[1] = 2;
- tint_symbol.v[2] = 3;
+struct tint_private_vars_struct {
+ S P;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).P.v = int3(1, 2, 3);
+ (*(tint_private_vars)).P.v[0] = 1;
+ (*(tint_private_vars)).P.v[1] = 2;
+ (*(tint_private_vars)).P.v[2] = 3;
}
diff --git a/test/tint/expressions/swizzle/write/vec3/u32.wgsl.expected.msl b/test/tint/expressions/swizzle/write/vec3/u32.wgsl.expected.msl
index 5b5f769..16866f9 100644
--- a/test/tint/expressions/swizzle/write/vec3/u32.wgsl.expected.msl
+++ b/test/tint/expressions/swizzle/write/vec3/u32.wgsl.expected.msl
@@ -5,11 +5,14 @@
uint3 v;
};
-void f() {
- thread S tint_symbol = {};
- tint_symbol.v = uint3(1u, 2u, 3u);
- tint_symbol.v[0] = 1u;
- tint_symbol.v[1] = 2u;
- tint_symbol.v[2] = 3u;
+struct tint_private_vars_struct {
+ S P;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).P.v = uint3(1u, 2u, 3u);
+ (*(tint_private_vars)).P.v[0] = 1u;
+ (*(tint_private_vars)).P.v[1] = 2u;
+ (*(tint_private_vars)).P.v[2] = 3u;
}
diff --git a/test/tint/expressions/type_conv/mat2x2/function/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x2/function/f16-f32.wgsl.expected.msl
index 90a846e..8a8da46 100644
--- a/test/tint/expressions/type_conv/mat2x2/function/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x2/function/f16-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half2x2 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = (tint_symbol_1 + 1.0h);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half2x2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0h);
return half2x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h));
}
-void f() {
- half2x2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2x2 const tint_symbol = m(tint_private_vars);
float2x2 v = float2x2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat2x2/function/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x2/function/f32-f16.wgsl.expected.msl
index f9159fb..0b8467b 100644
--- a/test/tint/expressions/type_conv/mat2x2/function/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x2/function/f32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float2x2 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = (tint_symbol_1 + 1.0f);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float2x2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0f);
return float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f));
}
-void f() {
- float2x2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2x2 const tint_symbol = m(tint_private_vars);
half2x2 v = half2x2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat2x2/literal/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x2/literal/f16-f32.wgsl.expected.msl
index 466ceaa..bf0adb1 100644
--- a/test/tint/expressions/type_conv/mat2x2/literal/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x2/literal/f16-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat2x2/literal/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x2/literal/f32-f16.wgsl.expected.msl
index 466ceaa..c281e2d 100644
--- a/test/tint/expressions/type_conv/mat2x2/literal/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x2/literal/f32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat2x2/var/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x2/var/f16-f32.wgsl.expected.msl
index d27e57f..2f07134 100644
--- a/test/tint/expressions/type_conv/mat2x2/var/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x2/var/f16-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half2x2 tint_symbol = half2x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h));
- float2x2 v = float2x2(tint_symbol);
+struct tint_private_vars_struct {
+ half2x2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2x2 v = float2x2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat2x2/var/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x2/var/f32-f16.wgsl.expected.msl
index c7519dc..9c1e1b3 100644
--- a/test/tint/expressions/type_conv/mat2x2/var/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x2/var/f32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float2x2 tint_symbol = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f));
- half2x2 v = half2x2(tint_symbol);
+struct tint_private_vars_struct {
+ float2x2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2x2 v = half2x2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat2x3/function/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x3/function/f16-f32.wgsl.expected.msl
index 25500b4d..7deafd4 100644
--- a/test/tint/expressions/type_conv/mat2x3/function/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x3/function/f16-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half2x3 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = (tint_symbol_1 + 1.0h);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half2x3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0h);
return half2x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h));
}
-void f() {
- half2x3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2x3 const tint_symbol = m(tint_private_vars);
float2x3 v = float2x3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat2x3/function/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x3/function/f32-f16.wgsl.expected.msl
index ffb559c..8980403 100644
--- a/test/tint/expressions/type_conv/mat2x3/function/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x3/function/f32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float2x3 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = (tint_symbol_1 + 1.0f);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float2x3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0f);
return float2x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f));
}
-void f() {
- float2x3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2x3 const tint_symbol = m(tint_private_vars);
half2x3 v = half2x3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat2x3/literal/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x3/literal/f16-f32.wgsl.expected.msl
index 466ceaa..2b35f8b 100644
--- a/test/tint/expressions/type_conv/mat2x3/literal/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x3/literal/f16-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat2x3/literal/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x3/literal/f32-f16.wgsl.expected.msl
index 466ceaa..7b62235 100644
--- a/test/tint/expressions/type_conv/mat2x3/literal/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x3/literal/f32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat2x3/var/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x3/var/f16-f32.wgsl.expected.msl
index a263c8d..ebbfc4a 100644
--- a/test/tint/expressions/type_conv/mat2x3/var/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x3/var/f16-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half2x3 tint_symbol = half2x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h));
- float2x3 v = float2x3(tint_symbol);
+struct tint_private_vars_struct {
+ half2x3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2x3 v = float2x3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat2x3/var/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x3/var/f32-f16.wgsl.expected.msl
index 10585b8..31ba61b 100644
--- a/test/tint/expressions/type_conv/mat2x3/var/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x3/var/f32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float2x3 tint_symbol = float2x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f));
- half2x3 v = half2x3(tint_symbol);
+struct tint_private_vars_struct {
+ float2x3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2x3 v = half2x3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat2x4/function/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x4/function/f16-f32.wgsl.expected.msl
index f3c5d0f..472232a 100644
--- a/test/tint/expressions/type_conv/mat2x4/function/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x4/function/f16-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half2x4 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = (tint_symbol_1 + 1.0h);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half2x4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0h);
return half2x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h));
}
-void f() {
- half2x4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2x4 const tint_symbol = m(tint_private_vars);
float2x4 v = float2x4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat2x4/function/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x4/function/f32-f16.wgsl.expected.msl
index 1dd1032..1b49f60 100644
--- a/test/tint/expressions/type_conv/mat2x4/function/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x4/function/f32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float2x4 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = (tint_symbol_1 + 1.0f);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float2x4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0f);
return float2x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f));
}
-void f() {
- float2x4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2x4 const tint_symbol = m(tint_private_vars);
half2x4 v = half2x4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat2x4/literal/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x4/literal/f16-f32.wgsl.expected.msl
index 466ceaa..57d08cd 100644
--- a/test/tint/expressions/type_conv/mat2x4/literal/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x4/literal/f16-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat2x4/literal/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x4/literal/f32-f16.wgsl.expected.msl
index 466ceaa..4720101 100644
--- a/test/tint/expressions/type_conv/mat2x4/literal/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x4/literal/f32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat2x4/var/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x4/var/f16-f32.wgsl.expected.msl
index c124957..8fed593 100644
--- a/test/tint/expressions/type_conv/mat2x4/var/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x4/var/f16-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half2x4 tint_symbol = half2x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h));
- float2x4 v = float2x4(tint_symbol);
+struct tint_private_vars_struct {
+ half2x4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2x4 v = float2x4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat2x4/var/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat2x4/var/f32-f16.wgsl.expected.msl
index 4573766..71eac19 100644
--- a/test/tint/expressions/type_conv/mat2x4/var/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat2x4/var/f32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float2x4 tint_symbol = float2x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f));
- half2x4 v = half2x4(tint_symbol);
+struct tint_private_vars_struct {
+ float2x4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2x4 v = half2x4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat3x2/function/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x2/function/f16-f32.wgsl.expected.msl
index 6a7d753..8e2cf79 100644
--- a/test/tint/expressions/type_conv/mat3x2/function/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x2/function/f16-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half3x2 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = (tint_symbol_1 + 1.0h);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half3x2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0h);
return half3x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h), half2(5.0h, 6.0h));
}
-void f() {
- half3x2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3x2 const tint_symbol = m(tint_private_vars);
float3x2 v = float3x2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat3x2/function/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x2/function/f32-f16.wgsl.expected.msl
index 2ad53ed..6cc4613 100644
--- a/test/tint/expressions/type_conv/mat3x2/function/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x2/function/f32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float3x2 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = (tint_symbol_1 + 1.0f);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float3x2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0f);
return float3x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f));
}
-void f() {
- float3x2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3x2 const tint_symbol = m(tint_private_vars);
half3x2 v = half3x2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat3x2/literal/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x2/literal/f16-f32.wgsl.expected.msl
index 466ceaa..5c010eb 100644
--- a/test/tint/expressions/type_conv/mat3x2/literal/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x2/literal/f16-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat3x2/literal/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x2/literal/f32-f16.wgsl.expected.msl
index 466ceaa..261fca4 100644
--- a/test/tint/expressions/type_conv/mat3x2/literal/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x2/literal/f32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat3x2/var/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x2/var/f16-f32.wgsl.expected.msl
index 16aa3f7..dd854f9 100644
--- a/test/tint/expressions/type_conv/mat3x2/var/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x2/var/f16-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half3x2 tint_symbol = half3x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h), half2(5.0h, 6.0h));
- float3x2 v = float3x2(tint_symbol);
+struct tint_private_vars_struct {
+ half3x2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3x2 v = float3x2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat3x2/var/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x2/var/f32-f16.wgsl.expected.msl
index 1376800..16f1bec 100644
--- a/test/tint/expressions/type_conv/mat3x2/var/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x2/var/f32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float3x2 tint_symbol = float3x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f));
- half3x2 v = half3x2(tint_symbol);
+struct tint_private_vars_struct {
+ float3x2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3x2 v = half3x2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat3x3/function/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x3/function/f16-f32.wgsl.expected.msl
index 8428cb4..4bcc737 100644
--- a/test/tint/expressions/type_conv/mat3x3/function/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x3/function/f16-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half3x3 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = (tint_symbol_1 + 1.0h);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half3x3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0h);
return half3x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h), half3(7.0h, 8.0h, 9.0h));
}
-void f() {
- half3x3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3x3 const tint_symbol = m(tint_private_vars);
float3x3 v = float3x3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat3x3/function/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x3/function/f32-f16.wgsl.expected.msl
index e0a6c0c..a71e57e 100644
--- a/test/tint/expressions/type_conv/mat3x3/function/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x3/function/f32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float3x3 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = (tint_symbol_1 + 1.0f);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float3x3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0f);
return float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));
}
-void f() {
- float3x3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3x3 const tint_symbol = m(tint_private_vars);
half3x3 v = half3x3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat3x3/literal/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x3/literal/f16-f32.wgsl.expected.msl
index 466ceaa..000bdf2 100644
--- a/test/tint/expressions/type_conv/mat3x3/literal/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x3/literal/f16-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat3x3/literal/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x3/literal/f32-f16.wgsl.expected.msl
index 466ceaa..ddc4151 100644
--- a/test/tint/expressions/type_conv/mat3x3/literal/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x3/literal/f32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat3x3/var/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x3/var/f16-f32.wgsl.expected.msl
index dce7f33..848b635 100644
--- a/test/tint/expressions/type_conv/mat3x3/var/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x3/var/f16-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half3x3 tint_symbol = half3x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h), half3(7.0h, 8.0h, 9.0h));
- float3x3 v = float3x3(tint_symbol);
+struct tint_private_vars_struct {
+ half3x3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3x3 v = float3x3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat3x3/var/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x3/var/f32-f16.wgsl.expected.msl
index 1b4315b..29c2bcd 100644
--- a/test/tint/expressions/type_conv/mat3x3/var/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x3/var/f32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float3x3 tint_symbol = float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));
- half3x3 v = half3x3(tint_symbol);
+struct tint_private_vars_struct {
+ float3x3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3x3 v = half3x3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat3x4/function/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x4/function/f16-f32.wgsl.expected.msl
index 9112e8b..f10e9db 100644
--- a/test/tint/expressions/type_conv/mat3x4/function/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x4/function/f16-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half3x4 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = (tint_symbol_1 + 1.0h);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half3x4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0h);
return half3x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h), half4(9.0h, 10.0h, 11.0h, 12.0h));
}
-void f() {
- half3x4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3x4 const tint_symbol = m(tint_private_vars);
float3x4 v = float3x4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat3x4/function/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x4/function/f32-f16.wgsl.expected.msl
index fb93df0..72dbdd3 100644
--- a/test/tint/expressions/type_conv/mat3x4/function/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x4/function/f32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float3x4 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = (tint_symbol_1 + 1.0f);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float3x4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0f);
return float3x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f), float4(9.0f, 10.0f, 11.0f, 12.0f));
}
-void f() {
- float3x4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3x4 const tint_symbol = m(tint_private_vars);
half3x4 v = half3x4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat3x4/literal/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x4/literal/f16-f32.wgsl.expected.msl
index 466ceaa..80df88a 100644
--- a/test/tint/expressions/type_conv/mat3x4/literal/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x4/literal/f16-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat3x4/literal/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x4/literal/f32-f16.wgsl.expected.msl
index 466ceaa..bb9538a 100644
--- a/test/tint/expressions/type_conv/mat3x4/literal/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x4/literal/f32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat3x4/var/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x4/var/f16-f32.wgsl.expected.msl
index 633908b..59d801e 100644
--- a/test/tint/expressions/type_conv/mat3x4/var/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x4/var/f16-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half3x4 tint_symbol = half3x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h), half4(9.0h, 10.0h, 11.0h, 12.0h));
- float3x4 v = float3x4(tint_symbol);
+struct tint_private_vars_struct {
+ half3x4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3x4 v = float3x4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat3x4/var/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat3x4/var/f32-f16.wgsl.expected.msl
index be9dd55..6096d07 100644
--- a/test/tint/expressions/type_conv/mat3x4/var/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat3x4/var/f32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float3x4 tint_symbol = float3x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f), float4(9.0f, 10.0f, 11.0f, 12.0f));
- half3x4 v = half3x4(tint_symbol);
+struct tint_private_vars_struct {
+ float3x4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3x4 v = half3x4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat4x2/function/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x2/function/f16-f32.wgsl.expected.msl
index 099f286..70e9e23 100644
--- a/test/tint/expressions/type_conv/mat4x2/function/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x2/function/f16-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half4x2 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = (tint_symbol_1 + 1.0h);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half4x2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0h);
return half4x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h), half2(5.0h, 6.0h), half2(7.0h, 8.0h));
}
-void f() {
- half4x2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4x2 const tint_symbol = m(tint_private_vars);
float4x2 v = float4x2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat4x2/function/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x2/function/f32-f16.wgsl.expected.msl
index 742a271..68fe80c 100644
--- a/test/tint/expressions/type_conv/mat4x2/function/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x2/function/f32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float4x2 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = (tint_symbol_1 + 1.0f);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float4x2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0f);
return float4x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f), float2(7.0f, 8.0f));
}
-void f() {
- float4x2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4x2 const tint_symbol = m(tint_private_vars);
half4x2 v = half4x2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat4x2/literal/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x2/literal/f16-f32.wgsl.expected.msl
index 466ceaa..b625b71 100644
--- a/test/tint/expressions/type_conv/mat4x2/literal/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x2/literal/f16-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat4x2/literal/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x2/literal/f32-f16.wgsl.expected.msl
index 466ceaa..a17ab30 100644
--- a/test/tint/expressions/type_conv/mat4x2/literal/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x2/literal/f32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat4x2/var/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x2/var/f16-f32.wgsl.expected.msl
index ff77b1c..42305b1 100644
--- a/test/tint/expressions/type_conv/mat4x2/var/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x2/var/f16-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half4x2 tint_symbol = half4x2(half2(1.0h, 2.0h), half2(3.0h, 4.0h), half2(5.0h, 6.0h), half2(7.0h, 8.0h));
- float4x2 v = float4x2(tint_symbol);
+struct tint_private_vars_struct {
+ half4x2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4x2 v = float4x2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat4x2/var/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x2/var/f32-f16.wgsl.expected.msl
index 556cab7..af6bdc9 100644
--- a/test/tint/expressions/type_conv/mat4x2/var/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x2/var/f32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float4x2 tint_symbol = float4x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f), float2(7.0f, 8.0f));
- half4x2 v = half4x2(tint_symbol);
+struct tint_private_vars_struct {
+ float4x2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4x2 v = half4x2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat4x3/function/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x3/function/f16-f32.wgsl.expected.msl
index 4af3c85..c09190a 100644
--- a/test/tint/expressions/type_conv/mat4x3/function/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x3/function/f16-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half4x3 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = (tint_symbol_1 + 1.0h);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half4x3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0h);
return half4x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h), half3(7.0h, 8.0h, 9.0h), half3(10.0h, 11.0h, 12.0h));
}
-void f() {
- half4x3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4x3 const tint_symbol = m(tint_private_vars);
float4x3 v = float4x3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat4x3/function/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x3/function/f32-f16.wgsl.expected.msl
index 3d3dc95..49ef01e 100644
--- a/test/tint/expressions/type_conv/mat4x3/function/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x3/function/f32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float4x3 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = (tint_symbol_1 + 1.0f);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float4x3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0f);
return float4x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f), float3(10.0f, 11.0f, 12.0f));
}
-void f() {
- float4x3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4x3 const tint_symbol = m(tint_private_vars);
half4x3 v = half4x3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat4x3/literal/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x3/literal/f16-f32.wgsl.expected.msl
index 466ceaa..9fc73e1 100644
--- a/test/tint/expressions/type_conv/mat4x3/literal/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x3/literal/f16-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat4x3/literal/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x3/literal/f32-f16.wgsl.expected.msl
index 466ceaa..8ad181f 100644
--- a/test/tint/expressions/type_conv/mat4x3/literal/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x3/literal/f32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat4x3/var/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x3/var/f16-f32.wgsl.expected.msl
index 75503fb..4132d79 100644
--- a/test/tint/expressions/type_conv/mat4x3/var/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x3/var/f16-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half4x3 tint_symbol = half4x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h), half3(7.0h, 8.0h, 9.0h), half3(10.0h, 11.0h, 12.0h));
- float4x3 v = float4x3(tint_symbol);
+struct tint_private_vars_struct {
+ half4x3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4x3 v = float4x3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat4x3/var/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x3/var/f32-f16.wgsl.expected.msl
index 1ba9e77..3a3e5c9 100644
--- a/test/tint/expressions/type_conv/mat4x3/var/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x3/var/f32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float4x3 tint_symbol = float4x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f), float3(10.0f, 11.0f, 12.0f));
- half4x3 v = half4x3(tint_symbol);
+struct tint_private_vars_struct {
+ float4x3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4x3 v = half4x3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat4x4/function/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x4/function/f16-f32.wgsl.expected.msl
index 49e7311..c6c3b7d 100644
--- a/test/tint/expressions/type_conv/mat4x4/function/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x4/function/f16-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half4x4 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = (tint_symbol_1 + 1.0h);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half4x4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0h);
return half4x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h), half4(9.0h, 10.0h, 11.0h, 12.0h), half4(13.0h, 14.0h, 15.0h, 16.0h));
}
-void f() {
- half4x4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4x4 const tint_symbol = m(tint_private_vars);
float4x4 v = float4x4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat4x4/function/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x4/function/f32-f16.wgsl.expected.msl
index 7a32b55..80f5652 100644
--- a/test/tint/expressions/type_conv/mat4x4/function/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x4/function/f32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float4x4 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = (tint_symbol_1 + 1.0f);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float4x4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = ((*(tint_private_vars)).t + 1.0f);
return float4x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f), float4(9.0f, 10.0f, 11.0f, 12.0f), float4(13.0f, 14.0f, 15.0f, 16.0f));
}
-void f() {
- float4x4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4x4 const tint_symbol = m(tint_private_vars);
half4x4 v = half4x4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/mat4x4/literal/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x4/literal/f16-f32.wgsl.expected.msl
index 466ceaa..995f4f2 100644
--- a/test/tint/expressions/type_conv/mat4x4/literal/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x4/literal/f16-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat4x4/literal/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x4/literal/f32-f16.wgsl.expected.msl
index 466ceaa..c148161 100644
--- a/test/tint/expressions/type_conv/mat4x4/literal/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x4/literal/f32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/mat4x4/var/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x4/var/f16-f32.wgsl.expected.msl
index 49daf03..2fd6ca2 100644
--- a/test/tint/expressions/type_conv/mat4x4/var/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x4/var/f16-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half4x4 tint_symbol = half4x4(half4(1.0h, 2.0h, 3.0h, 4.0h), half4(5.0h, 6.0h, 7.0h, 8.0h), half4(9.0h, 10.0h, 11.0h, 12.0h), half4(13.0h, 14.0h, 15.0h, 16.0h));
- float4x4 v = float4x4(tint_symbol);
+struct tint_private_vars_struct {
+ half4x4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4x4 v = float4x4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/mat4x4/var/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/mat4x4/var/f32-f16.wgsl.expected.msl
index f9fcc86..67c793b 100644
--- a/test/tint/expressions/type_conv/mat4x4/var/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/mat4x4/var/f32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float4x4 tint_symbol = float4x4(float4(1.0f, 2.0f, 3.0f, 4.0f), float4(5.0f, 6.0f, 7.0f, 8.0f), float4(9.0f, 10.0f, 11.0f, 12.0f), float4(13.0f, 14.0f, 15.0f, 16.0f));
- half4x4 v = half4x4(tint_symbol);
+struct tint_private_vars_struct {
+ float4x4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4x4 v = half4x4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/bool-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/bool-f16.wgsl.expected.msl
index 13e2076..f8adf7d 100644
--- a/test/tint/expressions/type_conv/scalar/function/bool-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/bool-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool((*(tint_private_vars)).t);
}
-void f() {
- bool const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool const tint_symbol = m(tint_private_vars);
half v = half(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/bool-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/bool-f32.wgsl.expected.msl
index c6b5797..3e5574a 100644
--- a/test/tint/expressions/type_conv/scalar/function/bool-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/bool-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool((*(tint_private_vars)).t);
}
-void f() {
- bool const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool const tint_symbol = m(tint_private_vars);
float v = float(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/bool-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/bool-i32.wgsl.expected.msl
index 7c99561..7efe663 100644
--- a/test/tint/expressions/type_conv/scalar/function/bool-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/bool-i32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool((*(tint_private_vars)).t);
}
-void f() {
- bool const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool const tint_symbol = m(tint_private_vars);
int v = int(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/bool-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/bool-u32.wgsl.expected.msl
index 4a602ec..4592e1d 100644
--- a/test/tint/expressions/type_conv/scalar/function/bool-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/bool-u32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool((*(tint_private_vars)).t);
}
-void f() {
- bool const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool const tint_symbol = m(tint_private_vars);
uint v = uint(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/f16-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/f16-bool.wgsl.expected.msl
index 4d00356..08eaec1 100644
--- a/test/tint/expressions/type_conv/scalar/function/f16-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f16-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half((*(tint_private_vars)).t);
}
-void f() {
- half const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half const tint_symbol = m(tint_private_vars);
bool v = bool(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/f16-f32.wgsl.expected.msl
index 18a11d6..d95efeb 100644
--- a/test/tint/expressions/type_conv/scalar/function/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f16-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half((*(tint_private_vars)).t);
}
-void f() {
- half const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half const tint_symbol = m(tint_private_vars);
float v = float(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/f16-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/f16-i32.wgsl.expected.msl
index 44bc84b..a99a492 100644
--- a/test/tint/expressions/type_conv/scalar/function/f16-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f16-i32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half((*(tint_private_vars)).t);
}
-void f() {
- half const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half const tint_symbol = m(tint_private_vars);
int v = int(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/f16-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/f16-u32.wgsl.expected.msl
index 5d8e34b..40191ab 100644
--- a/test/tint/expressions/type_conv/scalar/function/f16-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f16-u32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half((*(tint_private_vars)).t);
}
-void f() {
- half const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half const tint_symbol = m(tint_private_vars);
uint v = uint(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/f32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/f32-bool.wgsl.expected.msl
index 3a2a4b5..6f4ba1f 100644
--- a/test/tint/expressions/type_conv/scalar/function/f32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f32-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float(tint_symbol_1);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float((*(tint_private_vars)).t);
}
-void f() {
- float const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float const tint_symbol = m(tint_private_vars);
bool v = bool(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/f32-f16.wgsl.expected.msl
index a65e586..90ce00b 100644
--- a/test/tint/expressions/type_conv/scalar/function/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float(tint_symbol_1);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float((*(tint_private_vars)).t);
}
-void f() {
- float const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float const tint_symbol = m(tint_private_vars);
half v = half(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/f32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/f32-i32.wgsl.expected.msl
index fe4bcc0..d9e37b1 100644
--- a/test/tint/expressions/type_conv/scalar/function/f32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f32-i32.wgsl.expected.msl
@@ -1,18 +1,21 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float t;
+};
+
int tint_ftoi(float v) {
return select(2147483647, select(int(v), (-2147483647 - 1), (v < -2147483648.0f)), (v < 2147483520.0f));
}
-float m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float(tint_symbol_1);
+float m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float((*(tint_private_vars)).t);
}
-void f() {
- float const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float const tint_symbol = m(tint_private_vars);
int v = tint_ftoi(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/f32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/f32-u32.wgsl.expected.msl
index a6a6b55..f99b9c9 100644
--- a/test/tint/expressions/type_conv/scalar/function/f32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/f32-u32.wgsl.expected.msl
@@ -1,18 +1,21 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float t;
+};
+
uint tint_ftou(float v) {
return select(4294967295u, select(uint(v), 0u, (v < 0.0f)), (v < 4294967040.0f));
}
-float m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float(tint_symbol_1);
+float m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float((*(tint_private_vars)).t);
}
-void f() {
- float const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float const tint_symbol = m(tint_private_vars);
uint v = tint_ftou(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/i32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/i32-bool.wgsl.expected.msl
index cf82994..96f9e32 100644
--- a/test/tint/expressions/type_conv/scalar/function/i32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/i32-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int((*(tint_private_vars)).t);
}
-void f() {
- int const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int const tint_symbol = m(tint_private_vars);
bool v = bool(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/i32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/i32-f16.wgsl.expected.msl
index cfccce0..58b0431 100644
--- a/test/tint/expressions/type_conv/scalar/function/i32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/i32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int((*(tint_private_vars)).t);
}
-void f() {
- int const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int const tint_symbol = m(tint_private_vars);
half v = half(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/i32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/i32-f32.wgsl.expected.msl
index a2b48e0..f8b151e 100644
--- a/test/tint/expressions/type_conv/scalar/function/i32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/i32-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int((*(tint_private_vars)).t);
}
-void f() {
- int const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int const tint_symbol = m(tint_private_vars);
float v = float(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/i32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/i32-u32.wgsl.expected.msl
index f295700..8d21d45 100644
--- a/test/tint/expressions/type_conv/scalar/function/i32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/i32-u32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int((*(tint_private_vars)).t);
}
-void f() {
- int const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int const tint_symbol = m(tint_private_vars);
uint v = uint(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/u32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/u32-bool.wgsl.expected.msl
index 46cd474..428f2a1 100644
--- a/test/tint/expressions/type_conv/scalar/function/u32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/u32-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint((*(tint_private_vars)).t);
}
-void f() {
- uint const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint const tint_symbol = m(tint_private_vars);
bool v = bool(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/u32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/u32-f16.wgsl.expected.msl
index d609ec8..6302517 100644
--- a/test/tint/expressions/type_conv/scalar/function/u32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/u32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint((*(tint_private_vars)).t);
}
-void f() {
- uint const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint const tint_symbol = m(tint_private_vars);
half v = half(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/u32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/u32-f32.wgsl.expected.msl
index 90b2f09..dc2024f 100644
--- a/test/tint/expressions/type_conv/scalar/function/u32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/u32-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint((*(tint_private_vars)).t);
}
-void f() {
- uint const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint const tint_symbol = m(tint_private_vars);
float v = float(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/function/u32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/function/u32-i32.wgsl.expected.msl
index 48e8bcd..6b73fd5 100644
--- a/test/tint/expressions/type_conv/scalar/function/u32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/function/u32-i32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint((*(tint_private_vars)).t);
}
-void f() {
- uint const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint const tint_symbol = m(tint_private_vars);
int v = int(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/scalar/literal/bool-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/bool-f16.wgsl.expected.msl
index 466ceaa..ab0a10f 100644
--- a/test/tint/expressions/type_conv/scalar/literal/bool-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/bool-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/bool-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/bool-f32.wgsl.expected.msl
index 466ceaa..527c64c 100644
--- a/test/tint/expressions/type_conv/scalar/literal/bool-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/bool-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/bool-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/bool-i32.wgsl.expected.msl
index 466ceaa..1d12087 100644
--- a/test/tint/expressions/type_conv/scalar/literal/bool-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/bool-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/bool-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/bool-u32.wgsl.expected.msl
index 466ceaa..05f1fec 100644
--- a/test/tint/expressions/type_conv/scalar/literal/bool-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/bool-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/f16-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/f16-bool.wgsl.expected.msl
index 466ceaa..78c0f7d 100644
--- a/test/tint/expressions/type_conv/scalar/literal/f16-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/f16-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/f16-f32.wgsl.expected.msl
index 466ceaa..527c64c 100644
--- a/test/tint/expressions/type_conv/scalar/literal/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/f16-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/f16-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/f16-i32.wgsl.expected.msl
index 466ceaa..1d12087 100644
--- a/test/tint/expressions/type_conv/scalar/literal/f16-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/f16-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/f16-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/f16-u32.wgsl.expected.msl
index 466ceaa..05f1fec 100644
--- a/test/tint/expressions/type_conv/scalar/literal/f16-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/f16-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/f32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/f32-bool.wgsl.expected.msl
index 466ceaa..78c0f7d 100644
--- a/test/tint/expressions/type_conv/scalar/literal/f32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/f32-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/f32-f16.wgsl.expected.msl
index 466ceaa..ab0a10f 100644
--- a/test/tint/expressions/type_conv/scalar/literal/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/f32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/f32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/f32-i32.wgsl.expected.msl
index 466ceaa..1d12087 100644
--- a/test/tint/expressions/type_conv/scalar/literal/f32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/f32-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/f32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/f32-u32.wgsl.expected.msl
index 466ceaa..05f1fec 100644
--- a/test/tint/expressions/type_conv/scalar/literal/f32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/f32-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/i32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/i32-bool.wgsl.expected.msl
index 466ceaa..78c0f7d 100644
--- a/test/tint/expressions/type_conv/scalar/literal/i32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/i32-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/i32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/i32-f16.wgsl.expected.msl
index 466ceaa..ab0a10f 100644
--- a/test/tint/expressions/type_conv/scalar/literal/i32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/i32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/i32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/i32-f32.wgsl.expected.msl
index 466ceaa..527c64c 100644
--- a/test/tint/expressions/type_conv/scalar/literal/i32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/i32-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/i32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/i32-u32.wgsl.expected.msl
index 466ceaa..05f1fec 100644
--- a/test/tint/expressions/type_conv/scalar/literal/i32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/i32-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/u32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/u32-bool.wgsl.expected.msl
index 466ceaa..78c0f7d 100644
--- a/test/tint/expressions/type_conv/scalar/literal/u32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/u32-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/u32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/u32-f16.wgsl.expected.msl
index 466ceaa..ab0a10f 100644
--- a/test/tint/expressions/type_conv/scalar/literal/u32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/u32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/u32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/u32-f32.wgsl.expected.msl
index 466ceaa..527c64c 100644
--- a/test/tint/expressions/type_conv/scalar/literal/u32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/u32-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/literal/u32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/literal/u32-i32.wgsl.expected.msl
index 466ceaa..1d12087 100644
--- a/test/tint/expressions/type_conv/scalar/literal/u32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/literal/u32-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int u;
+};
+
diff --git a/test/tint/expressions/type_conv/scalar/var/bool-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/bool-f16.wgsl.expected.msl
index 6eee947..63dd49b 100644
--- a/test/tint/expressions/type_conv/scalar/var/bool-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/bool-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool tint_symbol = true;
- half const v = half(tint_symbol);
+struct tint_private_vars_struct {
+ bool u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half const v = half((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/bool-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/bool-f32.wgsl.expected.msl
index ce17ffc..ff3751f 100644
--- a/test/tint/expressions/type_conv/scalar/var/bool-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/bool-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool tint_symbol = true;
- float const v = float(tint_symbol);
+struct tint_private_vars_struct {
+ bool u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float const v = float((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/bool-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/bool-i32.wgsl.expected.msl
index fd91404..c13a77e 100644
--- a/test/tint/expressions/type_conv/scalar/var/bool-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/bool-i32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool tint_symbol = true;
- int const v = int(tint_symbol);
+struct tint_private_vars_struct {
+ bool u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int const v = int((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/bool-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/bool-u32.wgsl.expected.msl
index 6848120..93b0b35 100644
--- a/test/tint/expressions/type_conv/scalar/var/bool-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/bool-u32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool tint_symbol = true;
- uint const v = uint(tint_symbol);
+struct tint_private_vars_struct {
+ bool u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint const v = uint((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/f16-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/f16-bool.wgsl.expected.msl
index 880b1c6..aceab0a 100644
--- a/test/tint/expressions/type_conv/scalar/var/f16-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f16-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half tint_symbol = 1.0h;
- bool const v = bool(tint_symbol);
+struct tint_private_vars_struct {
+ half u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool const v = bool((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/f16-f32.wgsl.expected.msl
index 1b283ad..799649e 100644
--- a/test/tint/expressions/type_conv/scalar/var/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f16-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half tint_symbol = 1.0h;
- float const v = float(tint_symbol);
+struct tint_private_vars_struct {
+ half u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float const v = float((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/f16-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/f16-i32.wgsl.expected.msl
index 52d4f2d..e5b766e 100644
--- a/test/tint/expressions/type_conv/scalar/var/f16-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f16-i32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half tint_symbol = 1.0h;
- int const v = int(tint_symbol);
+struct tint_private_vars_struct {
+ half u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int const v = int((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/f16-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/f16-u32.wgsl.expected.msl
index c8d0827..b7e333a 100644
--- a/test/tint/expressions/type_conv/scalar/var/f16-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f16-u32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half tint_symbol = 1.0h;
- uint const v = uint(tint_symbol);
+struct tint_private_vars_struct {
+ half u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint const v = uint((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/f32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/f32-bool.wgsl.expected.msl
index 9c7f704..56f9662 100644
--- a/test/tint/expressions/type_conv/scalar/var/f32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f32-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float tint_symbol = 1.0f;
- bool const v = bool(tint_symbol);
+struct tint_private_vars_struct {
+ float u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool const v = bool((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/f32-f16.wgsl.expected.msl
index 0889335..57dab55 100644
--- a/test/tint/expressions/type_conv/scalar/var/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float tint_symbol = 1.0f;
- half const v = half(tint_symbol);
+struct tint_private_vars_struct {
+ float u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half const v = half((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/f32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/f32-i32.wgsl.expected.msl
index 8da1016..487685b 100644
--- a/test/tint/expressions/type_conv/scalar/var/f32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f32-i32.wgsl.expected.msl
@@ -1,12 +1,15 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float u;
+};
+
int tint_ftoi(float v) {
return select(2147483647, select(int(v), (-2147483647 - 1), (v < -2147483648.0f)), (v < 2147483520.0f));
}
-void f() {
- thread float tint_symbol = 1.0f;
- int const v = tint_ftoi(tint_symbol);
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int const v = tint_ftoi((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/f32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/f32-u32.wgsl.expected.msl
index 1066099..c7b8e3d 100644
--- a/test/tint/expressions/type_conv/scalar/var/f32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/f32-u32.wgsl.expected.msl
@@ -1,12 +1,15 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float u;
+};
+
uint tint_ftou(float v) {
return select(4294967295u, select(uint(v), 0u, (v < 0.0f)), (v < 4294967040.0f));
}
-void f() {
- thread float tint_symbol = 1.0f;
- uint const v = tint_ftou(tint_symbol);
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint const v = tint_ftou((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/i32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/i32-bool.wgsl.expected.msl
index 49b25d1d..d549f00 100644
--- a/test/tint/expressions/type_conv/scalar/var/i32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/i32-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int tint_symbol = 1;
- bool const v = bool(tint_symbol);
+struct tint_private_vars_struct {
+ int u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool const v = bool((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/i32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/i32-f16.wgsl.expected.msl
index edce6bd..372a6bd 100644
--- a/test/tint/expressions/type_conv/scalar/var/i32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/i32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int tint_symbol = 1;
- half const v = half(tint_symbol);
+struct tint_private_vars_struct {
+ int u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half const v = half((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/i32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/i32-f32.wgsl.expected.msl
index b2a4096..b6243ef 100644
--- a/test/tint/expressions/type_conv/scalar/var/i32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/i32-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int tint_symbol = 1;
- float const v = float(tint_symbol);
+struct tint_private_vars_struct {
+ int u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float const v = float((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/i32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/i32-u32.wgsl.expected.msl
index 1a40f99..b9cdde7 100644
--- a/test/tint/expressions/type_conv/scalar/var/i32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/i32-u32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int tint_symbol = 1;
- uint const v = uint(tint_symbol);
+struct tint_private_vars_struct {
+ int u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint const v = uint((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/u32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/u32-bool.wgsl.expected.msl
index 55679d4..1d0fda1 100644
--- a/test/tint/expressions/type_conv/scalar/var/u32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/u32-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint tint_symbol = 1u;
- bool const v = bool(tint_symbol);
+struct tint_private_vars_struct {
+ uint u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool const v = bool((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/u32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/u32-f16.wgsl.expected.msl
index 5c3ef66..fd6c217 100644
--- a/test/tint/expressions/type_conv/scalar/var/u32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/u32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint tint_symbol = 1u;
- half const v = half(tint_symbol);
+struct tint_private_vars_struct {
+ uint u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half const v = half((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/u32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/u32-f32.wgsl.expected.msl
index 4b942e2..9ba0684 100644
--- a/test/tint/expressions/type_conv/scalar/var/u32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/u32-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint tint_symbol = 1u;
- float const v = float(tint_symbol);
+struct tint_private_vars_struct {
+ uint u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float const v = float((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/scalar/var/u32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/scalar/var/u32-i32.wgsl.expected.msl
index 27c9c43..6a431a2 100644
--- a/test/tint/expressions/type_conv/scalar/var/u32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/scalar/var/u32-i32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint tint_symbol = 1u;
- int const v = int(tint_symbol);
+struct tint_private_vars_struct {
+ uint u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int const v = int((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/bool-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/bool-f16.wgsl.expected.msl
index 6c42347..fc874e8 100644
--- a/test/tint/expressions/type_conv/vec2/function/bool-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/bool-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool2 m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool2(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool2((*(tint_private_vars)).t);
}
-void f() {
- bool2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool2 const tint_symbol = m(tint_private_vars);
half2 v = half2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/bool-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/bool-f32.wgsl.expected.msl
index eeb0bdb..3cf9b04 100644
--- a/test/tint/expressions/type_conv/vec2/function/bool-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/bool-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool2 m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool2(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool2((*(tint_private_vars)).t);
}
-void f() {
- bool2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool2 const tint_symbol = m(tint_private_vars);
float2 v = float2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/bool-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/bool-i32.wgsl.expected.msl
index 0b09693..11465fb 100644
--- a/test/tint/expressions/type_conv/vec2/function/bool-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/bool-i32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool2 m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool2(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool2((*(tint_private_vars)).t);
}
-void f() {
- bool2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool2 const tint_symbol = m(tint_private_vars);
int2 v = int2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/bool-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/bool-u32.wgsl.expected.msl
index 3e1872a..06db712 100644
--- a/test/tint/expressions/type_conv/vec2/function/bool-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/bool-u32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool2 m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool2(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool2((*(tint_private_vars)).t);
}
-void f() {
- bool2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool2 const tint_symbol = m(tint_private_vars);
uint2 v = uint2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/f16-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/f16-bool.wgsl.expected.msl
index 2004729..64e116f 100644
--- a/test/tint/expressions/type_conv/vec2/function/f16-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f16-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half2 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half2(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half2((*(tint_private_vars)).t);
}
-void f() {
- half2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2 const tint_symbol = m(tint_private_vars);
bool2 v = bool2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/f16-f32.wgsl.expected.msl
index e055110..b36f5e9 100644
--- a/test/tint/expressions/type_conv/vec2/function/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f16-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half2 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half2(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half2((*(tint_private_vars)).t);
}
-void f() {
- half2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2 const tint_symbol = m(tint_private_vars);
float2 v = float2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/f16-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/f16-i32.wgsl.expected.msl
index 33275d5..828c8a4 100644
--- a/test/tint/expressions/type_conv/vec2/function/f16-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f16-i32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half2 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half2(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half2((*(tint_private_vars)).t);
}
-void f() {
- half2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2 const tint_symbol = m(tint_private_vars);
int2 v = int2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/f16-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/f16-u32.wgsl.expected.msl
index 513e6c3..c3b8511 100644
--- a/test/tint/expressions/type_conv/vec2/function/f16-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f16-u32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half2 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half2(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half2((*(tint_private_vars)).t);
}
-void f() {
- half2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2 const tint_symbol = m(tint_private_vars);
uint2 v = uint2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/f32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/f32-bool.wgsl.expected.msl
index d4ec1a9..a9f06c2 100644
--- a/test/tint/expressions/type_conv/vec2/function/f32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f32-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float2 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float2(tint_symbol_1);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float2((*(tint_private_vars)).t);
}
-void f() {
- float2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2 const tint_symbol = m(tint_private_vars);
bool2 v = bool2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/f32-f16.wgsl.expected.msl
index 73cfab0..e8d5844 100644
--- a/test/tint/expressions/type_conv/vec2/function/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float2 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float2(tint_symbol_1);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float2((*(tint_private_vars)).t);
}
-void f() {
- float2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2 const tint_symbol = m(tint_private_vars);
half2 v = half2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/f32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/f32-i32.wgsl.expected.msl
index 0a7e0fc..e33bfc1 100644
--- a/test/tint/expressions/type_conv/vec2/function/f32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f32-i32.wgsl.expected.msl
@@ -1,18 +1,21 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float t;
+};
+
int2 tint_ftoi(float2 v) {
return select(int2(2147483647), select(int2(v), int2((-2147483647 - 1)), (v < float2(-2147483648.0f))), (v < float2(2147483520.0f)));
}
-float2 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float2(tint_symbol_1);
+float2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float2((*(tint_private_vars)).t);
}
-void f() {
- float2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2 const tint_symbol = m(tint_private_vars);
int2 v = tint_ftoi(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/f32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/f32-u32.wgsl.expected.msl
index cd029ff..01ed808 100644
--- a/test/tint/expressions/type_conv/vec2/function/f32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/f32-u32.wgsl.expected.msl
@@ -1,18 +1,21 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float t;
+};
+
uint2 tint_ftou(float2 v) {
return select(uint2(4294967295u), select(uint2(v), uint2(0u), (v < float2(0.0f))), (v < float2(4294967040.0f)));
}
-float2 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float2(tint_symbol_1);
+float2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float2((*(tint_private_vars)).t);
}
-void f() {
- float2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2 const tint_symbol = m(tint_private_vars);
uint2 v = tint_ftou(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/i32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/i32-bool.wgsl.expected.msl
index 1c14c71..b63ded5 100644
--- a/test/tint/expressions/type_conv/vec2/function/i32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/i32-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int2 m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int2(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int2((*(tint_private_vars)).t);
}
-void f() {
- int2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int2 const tint_symbol = m(tint_private_vars);
bool2 v = bool2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/i32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/i32-f16.wgsl.expected.msl
index 7b4fe5dd..fc7d6a5 100644
--- a/test/tint/expressions/type_conv/vec2/function/i32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/i32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int2 m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int2(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int2((*(tint_private_vars)).t);
}
-void f() {
- int2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int2 const tint_symbol = m(tint_private_vars);
half2 v = half2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/i32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/i32-f32.wgsl.expected.msl
index da1158d..7609550 100644
--- a/test/tint/expressions/type_conv/vec2/function/i32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/i32-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int2 m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int2(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int2((*(tint_private_vars)).t);
}
-void f() {
- int2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int2 const tint_symbol = m(tint_private_vars);
float2 v = float2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/i32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/i32-u32.wgsl.expected.msl
index 8fdd642..e94ee20 100644
--- a/test/tint/expressions/type_conv/vec2/function/i32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/i32-u32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int2 m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int2(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int2((*(tint_private_vars)).t);
}
-void f() {
- int2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int2 const tint_symbol = m(tint_private_vars);
uint2 v = uint2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/u32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/u32-bool.wgsl.expected.msl
index 7769587..16f0432 100644
--- a/test/tint/expressions/type_conv/vec2/function/u32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/u32-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint2 m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint2(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint2((*(tint_private_vars)).t);
}
-void f() {
- uint2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint2 const tint_symbol = m(tint_private_vars);
bool2 v = bool2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/u32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/u32-f16.wgsl.expected.msl
index 9084e89..c118ec6 100644
--- a/test/tint/expressions/type_conv/vec2/function/u32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/u32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint2 m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint2(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint2((*(tint_private_vars)).t);
}
-void f() {
- uint2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint2 const tint_symbol = m(tint_private_vars);
half2 v = half2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/u32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/u32-f32.wgsl.expected.msl
index aa82be3..2b1dc45 100644
--- a/test/tint/expressions/type_conv/vec2/function/u32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/u32-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint2 m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint2(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint2((*(tint_private_vars)).t);
}
-void f() {
- uint2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint2 const tint_symbol = m(tint_private_vars);
float2 v = float2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/function/u32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/function/u32-i32.wgsl.expected.msl
index e756c24..d9aa022 100644
--- a/test/tint/expressions/type_conv/vec2/function/u32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/function/u32-i32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint2 m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint2(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint2 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint2((*(tint_private_vars)).t);
}
-void f() {
- uint2 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint2 const tint_symbol = m(tint_private_vars);
int2 v = int2(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec2/literal/bool-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/bool-f16.wgsl.expected.msl
index 466ceaa..c821345 100644
--- a/test/tint/expressions/type_conv/vec2/literal/bool-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/bool-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/bool-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/bool-f32.wgsl.expected.msl
index 466ceaa..d1e4770 100644
--- a/test/tint/expressions/type_conv/vec2/literal/bool-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/bool-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/bool-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/bool-i32.wgsl.expected.msl
index 466ceaa..94fe4fe 100644
--- a/test/tint/expressions/type_conv/vec2/literal/bool-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/bool-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/bool-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/bool-u32.wgsl.expected.msl
index 466ceaa..35ee17b 100644
--- a/test/tint/expressions/type_conv/vec2/literal/bool-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/bool-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/f16-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/f16-bool.wgsl.expected.msl
index 466ceaa..f5e7dd3 100644
--- a/test/tint/expressions/type_conv/vec2/literal/f16-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/f16-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/f16-f32.wgsl.expected.msl
index 466ceaa..d1e4770 100644
--- a/test/tint/expressions/type_conv/vec2/literal/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/f16-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/f16-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/f16-i32.wgsl.expected.msl
index 466ceaa..94fe4fe 100644
--- a/test/tint/expressions/type_conv/vec2/literal/f16-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/f16-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/f16-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/f16-u32.wgsl.expected.msl
index 466ceaa..35ee17b 100644
--- a/test/tint/expressions/type_conv/vec2/literal/f16-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/f16-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/f32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/f32-bool.wgsl.expected.msl
index 466ceaa..f5e7dd3 100644
--- a/test/tint/expressions/type_conv/vec2/literal/f32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/f32-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/f32-f16.wgsl.expected.msl
index 466ceaa..c821345 100644
--- a/test/tint/expressions/type_conv/vec2/literal/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/f32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/f32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/f32-i32.wgsl.expected.msl
index 466ceaa..94fe4fe 100644
--- a/test/tint/expressions/type_conv/vec2/literal/f32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/f32-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/f32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/f32-u32.wgsl.expected.msl
index 466ceaa..35ee17b 100644
--- a/test/tint/expressions/type_conv/vec2/literal/f32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/f32-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/i32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/i32-bool.wgsl.expected.msl
index 466ceaa..f5e7dd3 100644
--- a/test/tint/expressions/type_conv/vec2/literal/i32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/i32-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/i32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/i32-f16.wgsl.expected.msl
index 466ceaa..c821345 100644
--- a/test/tint/expressions/type_conv/vec2/literal/i32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/i32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/i32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/i32-f32.wgsl.expected.msl
index 466ceaa..d1e4770 100644
--- a/test/tint/expressions/type_conv/vec2/literal/i32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/i32-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/i32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/i32-u32.wgsl.expected.msl
index 466ceaa..35ee17b 100644
--- a/test/tint/expressions/type_conv/vec2/literal/i32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/i32-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/u32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/u32-bool.wgsl.expected.msl
index 466ceaa..f5e7dd3 100644
--- a/test/tint/expressions/type_conv/vec2/literal/u32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/u32-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/u32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/u32-f16.wgsl.expected.msl
index 466ceaa..c821345 100644
--- a/test/tint/expressions/type_conv/vec2/literal/u32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/u32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/u32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/u32-f32.wgsl.expected.msl
index 466ceaa..d1e4770 100644
--- a/test/tint/expressions/type_conv/vec2/literal/u32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/u32-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/literal/u32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/literal/u32-i32.wgsl.expected.msl
index 466ceaa..94fe4fe 100644
--- a/test/tint/expressions/type_conv/vec2/literal/u32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/literal/u32-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int2 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec2/var/bool-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/bool-f16.wgsl.expected.msl
index 50b8a45..f291eeb 100644
--- a/test/tint/expressions/type_conv/vec2/var/bool-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/bool-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool2 tint_symbol = bool2(true);
- half2 const v = half2(tint_symbol);
+struct tint_private_vars_struct {
+ bool2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2 const v = half2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/bool-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/bool-f32.wgsl.expected.msl
index 5c9d60f..1fae680 100644
--- a/test/tint/expressions/type_conv/vec2/var/bool-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/bool-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool2 tint_symbol = bool2(true);
- float2 const v = float2(tint_symbol);
+struct tint_private_vars_struct {
+ bool2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2 const v = float2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/bool-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/bool-i32.wgsl.expected.msl
index 991f2e2..c855442 100644
--- a/test/tint/expressions/type_conv/vec2/var/bool-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/bool-i32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool2 tint_symbol = bool2(true);
- int2 const v = int2(tint_symbol);
+struct tint_private_vars_struct {
+ bool2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int2 const v = int2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/bool-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/bool-u32.wgsl.expected.msl
index 9f059ba..f245de0 100644
--- a/test/tint/expressions/type_conv/vec2/var/bool-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/bool-u32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool2 tint_symbol = bool2(true);
- uint2 const v = uint2(tint_symbol);
+struct tint_private_vars_struct {
+ bool2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint2 const v = uint2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/f16-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/f16-bool.wgsl.expected.msl
index 037cd2a..221c448 100644
--- a/test/tint/expressions/type_conv/vec2/var/f16-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f16-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half2 tint_symbol = half2(1.0h);
- bool2 const v = bool2(tint_symbol);
+struct tint_private_vars_struct {
+ half2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool2 const v = bool2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/f16-f32.wgsl.expected.msl
index 05fbb7b..84edd7b 100644
--- a/test/tint/expressions/type_conv/vec2/var/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f16-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half2 tint_symbol = half2(1.0h);
- float2 const v = float2(tint_symbol);
+struct tint_private_vars_struct {
+ half2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2 const v = float2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/f16-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/f16-i32.wgsl.expected.msl
index 29983d2..e631481 100644
--- a/test/tint/expressions/type_conv/vec2/var/f16-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f16-i32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half2 tint_symbol = half2(1.0h);
- int2 const v = int2(tint_symbol);
+struct tint_private_vars_struct {
+ half2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int2 const v = int2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/f16-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/f16-u32.wgsl.expected.msl
index a1fa18b..8205a36 100644
--- a/test/tint/expressions/type_conv/vec2/var/f16-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f16-u32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half2 tint_symbol = half2(1.0h);
- uint2 const v = uint2(tint_symbol);
+struct tint_private_vars_struct {
+ half2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint2 const v = uint2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/f32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/f32-bool.wgsl.expected.msl
index 3d5f21b..1382eca 100644
--- a/test/tint/expressions/type_conv/vec2/var/f32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f32-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float2 tint_symbol = float2(1.0f);
- bool2 const v = bool2(tint_symbol);
+struct tint_private_vars_struct {
+ float2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool2 const v = bool2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/f32-f16.wgsl.expected.msl
index d2b64ff..24b6342 100644
--- a/test/tint/expressions/type_conv/vec2/var/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float2 tint_symbol = float2(1.0f);
- half2 const v = half2(tint_symbol);
+struct tint_private_vars_struct {
+ float2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2 const v = half2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/f32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/f32-i32.wgsl.expected.msl
index 4475d07..0b65c82 100644
--- a/test/tint/expressions/type_conv/vec2/var/f32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f32-i32.wgsl.expected.msl
@@ -1,12 +1,15 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2 u;
+};
+
int2 tint_ftoi(float2 v) {
return select(int2(2147483647), select(int2(v), int2((-2147483647 - 1)), (v < float2(-2147483648.0f))), (v < float2(2147483520.0f)));
}
-void f() {
- thread float2 tint_symbol = float2(1.0f);
- int2 const v = tint_ftoi(tint_symbol);
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int2 const v = tint_ftoi((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/f32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/f32-u32.wgsl.expected.msl
index 86a4038..dc1cf0f 100644
--- a/test/tint/expressions/type_conv/vec2/var/f32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/f32-u32.wgsl.expected.msl
@@ -1,12 +1,15 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2 u;
+};
+
uint2 tint_ftou(float2 v) {
return select(uint2(4294967295u), select(uint2(v), uint2(0u), (v < float2(0.0f))), (v < float2(4294967040.0f)));
}
-void f() {
- thread float2 tint_symbol = float2(1.0f);
- uint2 const v = tint_ftou(tint_symbol);
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint2 const v = tint_ftou((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/i32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/i32-bool.wgsl.expected.msl
index c5ca441..ad05fce 100644
--- a/test/tint/expressions/type_conv/vec2/var/i32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/i32-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int2 tint_symbol = int2(1);
- bool2 const v = bool2(tint_symbol);
+struct tint_private_vars_struct {
+ int2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool2 const v = bool2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/i32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/i32-f16.wgsl.expected.msl
index 04719bc..451b032 100644
--- a/test/tint/expressions/type_conv/vec2/var/i32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/i32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int2 tint_symbol = int2(1);
- half2 const v = half2(tint_symbol);
+struct tint_private_vars_struct {
+ int2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2 const v = half2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/i32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/i32-f32.wgsl.expected.msl
index 8a2b0e0..d75729e 100644
--- a/test/tint/expressions/type_conv/vec2/var/i32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/i32-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int2 tint_symbol = int2(1);
- float2 const v = float2(tint_symbol);
+struct tint_private_vars_struct {
+ int2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2 const v = float2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/i32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/i32-u32.wgsl.expected.msl
index 5d396c1..d9a90e5 100644
--- a/test/tint/expressions/type_conv/vec2/var/i32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/i32-u32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int2 tint_symbol = int2(1);
- uint2 const v = uint2(tint_symbol);
+struct tint_private_vars_struct {
+ int2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint2 const v = uint2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/u32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/u32-bool.wgsl.expected.msl
index 50cd6d8..1159c919 100644
--- a/test/tint/expressions/type_conv/vec2/var/u32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/u32-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint2 tint_symbol = uint2(1u);
- bool2 const v = bool2(tint_symbol);
+struct tint_private_vars_struct {
+ uint2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool2 const v = bool2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/u32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/u32-f16.wgsl.expected.msl
index 9caedc8..319f8b4 100644
--- a/test/tint/expressions/type_conv/vec2/var/u32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/u32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint2 tint_symbol = uint2(1u);
- half2 const v = half2(tint_symbol);
+struct tint_private_vars_struct {
+ uint2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2 const v = half2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/u32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/u32-f32.wgsl.expected.msl
index 17e895b..61d06b8 100644
--- a/test/tint/expressions/type_conv/vec2/var/u32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/u32-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint2 tint_symbol = uint2(1u);
- float2 const v = float2(tint_symbol);
+struct tint_private_vars_struct {
+ uint2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2 const v = float2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec2/var/u32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec2/var/u32-i32.wgsl.expected.msl
index f5357b7..2db80cd 100644
--- a/test/tint/expressions/type_conv/vec2/var/u32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec2/var/u32-i32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint2 tint_symbol = uint2(1u);
- int2 const v = int2(tint_symbol);
+struct tint_private_vars_struct {
+ uint2 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int2 const v = int2((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/bool-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/bool-f16.wgsl.expected.msl
index 395f628..020bf09 100644
--- a/test/tint/expressions/type_conv/vec3/function/bool-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/bool-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool3 m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool3(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool3((*(tint_private_vars)).t);
}
-void f() {
- bool3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool3 const tint_symbol = m(tint_private_vars);
half3 v = half3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/bool-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/bool-f32.wgsl.expected.msl
index 62f5fd8..f25f8b4 100644
--- a/test/tint/expressions/type_conv/vec3/function/bool-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/bool-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool3 m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool3(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool3((*(tint_private_vars)).t);
}
-void f() {
- bool3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool3 const tint_symbol = m(tint_private_vars);
float3 v = float3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/bool-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/bool-i32.wgsl.expected.msl
index 09909de..a1ced99 100644
--- a/test/tint/expressions/type_conv/vec3/function/bool-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/bool-i32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool3 m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool3(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool3((*(tint_private_vars)).t);
}
-void f() {
- bool3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool3 const tint_symbol = m(tint_private_vars);
int3 v = int3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/bool-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/bool-u32.wgsl.expected.msl
index 5bbce2f..c1d21d0 100644
--- a/test/tint/expressions/type_conv/vec3/function/bool-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/bool-u32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool3 m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool3(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool3((*(tint_private_vars)).t);
}
-void f() {
- bool3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool3 const tint_symbol = m(tint_private_vars);
uint3 v = uint3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/f16-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/f16-bool.wgsl.expected.msl
index da20e42..170fe5f 100644
--- a/test/tint/expressions/type_conv/vec3/function/f16-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f16-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half3 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half3(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half3((*(tint_private_vars)).t);
}
-void f() {
- half3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3 const tint_symbol = m(tint_private_vars);
bool3 v = bool3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/f16-f32.wgsl.expected.msl
index 5dabf99..6cb6edb 100644
--- a/test/tint/expressions/type_conv/vec3/function/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f16-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half3 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half3(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half3((*(tint_private_vars)).t);
}
-void f() {
- half3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3 const tint_symbol = m(tint_private_vars);
float3 v = float3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/f16-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/f16-i32.wgsl.expected.msl
index c4314ec..6b1cbe4 100644
--- a/test/tint/expressions/type_conv/vec3/function/f16-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f16-i32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half3 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half3(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half3((*(tint_private_vars)).t);
}
-void f() {
- half3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3 const tint_symbol = m(tint_private_vars);
int3 v = int3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/f16-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/f16-u32.wgsl.expected.msl
index 5922e4a..e1efb91 100644
--- a/test/tint/expressions/type_conv/vec3/function/f16-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f16-u32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half3 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half3(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half3((*(tint_private_vars)).t);
}
-void f() {
- half3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3 const tint_symbol = m(tint_private_vars);
uint3 v = uint3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/f32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/f32-bool.wgsl.expected.msl
index d12e499..1cf0740 100644
--- a/test/tint/expressions/type_conv/vec3/function/f32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f32-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float3 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float3(tint_symbol_1);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float3((*(tint_private_vars)).t);
}
-void f() {
- float3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3 const tint_symbol = m(tint_private_vars);
bool3 v = bool3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/f32-f16.wgsl.expected.msl
index 3e39af3..f449802 100644
--- a/test/tint/expressions/type_conv/vec3/function/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float3 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float3(tint_symbol_1);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float3((*(tint_private_vars)).t);
}
-void f() {
- float3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3 const tint_symbol = m(tint_private_vars);
half3 v = half3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/f32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/f32-i32.wgsl.expected.msl
index 17b35db..345e554 100644
--- a/test/tint/expressions/type_conv/vec3/function/f32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f32-i32.wgsl.expected.msl
@@ -1,18 +1,21 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float t;
+};
+
int3 tint_ftoi(float3 v) {
return select(int3(2147483647), select(int3(v), int3((-2147483647 - 1)), (v < float3(-2147483648.0f))), (v < float3(2147483520.0f)));
}
-float3 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float3(tint_symbol_1);
+float3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float3((*(tint_private_vars)).t);
}
-void f() {
- float3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3 const tint_symbol = m(tint_private_vars);
int3 v = tint_ftoi(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/f32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/f32-u32.wgsl.expected.msl
index f5e5a53..fc37190 100644
--- a/test/tint/expressions/type_conv/vec3/function/f32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/f32-u32.wgsl.expected.msl
@@ -1,18 +1,21 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float t;
+};
+
uint3 tint_ftou(float3 v) {
return select(uint3(4294967295u), select(uint3(v), uint3(0u), (v < float3(0.0f))), (v < float3(4294967040.0f)));
}
-float3 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float3(tint_symbol_1);
+float3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float3((*(tint_private_vars)).t);
}
-void f() {
- float3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3 const tint_symbol = m(tint_private_vars);
uint3 v = tint_ftou(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/i32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/i32-bool.wgsl.expected.msl
index 2f3ed22..1b7cf6f 100644
--- a/test/tint/expressions/type_conv/vec3/function/i32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/i32-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int3 m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int3(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int3((*(tint_private_vars)).t);
}
-void f() {
- int3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int3 const tint_symbol = m(tint_private_vars);
bool3 v = bool3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/i32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/i32-f16.wgsl.expected.msl
index 4ae6a3f..070fee8 100644
--- a/test/tint/expressions/type_conv/vec3/function/i32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/i32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int3 m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int3(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int3((*(tint_private_vars)).t);
}
-void f() {
- int3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int3 const tint_symbol = m(tint_private_vars);
half3 v = half3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/i32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/i32-f32.wgsl.expected.msl
index 3c0bdd9..a758f87 100644
--- a/test/tint/expressions/type_conv/vec3/function/i32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/i32-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int3 m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int3(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int3((*(tint_private_vars)).t);
}
-void f() {
- int3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int3 const tint_symbol = m(tint_private_vars);
float3 v = float3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/i32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/i32-u32.wgsl.expected.msl
index cf18af6..72ba097 100644
--- a/test/tint/expressions/type_conv/vec3/function/i32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/i32-u32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int3 m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int3(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int3((*(tint_private_vars)).t);
}
-void f() {
- int3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int3 const tint_symbol = m(tint_private_vars);
uint3 v = uint3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/u32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/u32-bool.wgsl.expected.msl
index 41a8184..a68a703 100644
--- a/test/tint/expressions/type_conv/vec3/function/u32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/u32-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint3 m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint3(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint3((*(tint_private_vars)).t);
}
-void f() {
- uint3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint3 const tint_symbol = m(tint_private_vars);
bool3 v = bool3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/u32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/u32-f16.wgsl.expected.msl
index f48f91e..aa74044 100644
--- a/test/tint/expressions/type_conv/vec3/function/u32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/u32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint3 m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint3(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint3((*(tint_private_vars)).t);
}
-void f() {
- uint3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint3 const tint_symbol = m(tint_private_vars);
half3 v = half3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/u32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/u32-f32.wgsl.expected.msl
index 33b31ab..f67422d 100644
--- a/test/tint/expressions/type_conv/vec3/function/u32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/u32-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint3 m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint3(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint3((*(tint_private_vars)).t);
}
-void f() {
- uint3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint3 const tint_symbol = m(tint_private_vars);
float3 v = float3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/function/u32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/function/u32-i32.wgsl.expected.msl
index 13a2070..a48f41c 100644
--- a/test/tint/expressions/type_conv/vec3/function/u32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/function/u32-i32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint3 m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint3(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint3 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint3((*(tint_private_vars)).t);
}
-void f() {
- uint3 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint3 const tint_symbol = m(tint_private_vars);
int3 v = int3(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec3/literal/bool-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/bool-f16.wgsl.expected.msl
index 466ceaa..c4a75c5 100644
--- a/test/tint/expressions/type_conv/vec3/literal/bool-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/bool-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/bool-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/bool-f32.wgsl.expected.msl
index 466ceaa..3c10853 100644
--- a/test/tint/expressions/type_conv/vec3/literal/bool-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/bool-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/bool-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/bool-i32.wgsl.expected.msl
index 466ceaa..16f636c 100644
--- a/test/tint/expressions/type_conv/vec3/literal/bool-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/bool-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/bool-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/bool-u32.wgsl.expected.msl
index 466ceaa..b718a23 100644
--- a/test/tint/expressions/type_conv/vec3/literal/bool-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/bool-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/f16-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/f16-bool.wgsl.expected.msl
index 466ceaa..bd5fbf6 100644
--- a/test/tint/expressions/type_conv/vec3/literal/f16-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/f16-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/f16-f32.wgsl.expected.msl
index 466ceaa..3c10853 100644
--- a/test/tint/expressions/type_conv/vec3/literal/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/f16-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/f16-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/f16-i32.wgsl.expected.msl
index 466ceaa..16f636c 100644
--- a/test/tint/expressions/type_conv/vec3/literal/f16-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/f16-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/f16-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/f16-u32.wgsl.expected.msl
index 466ceaa..b718a23 100644
--- a/test/tint/expressions/type_conv/vec3/literal/f16-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/f16-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/f32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/f32-bool.wgsl.expected.msl
index 466ceaa..bd5fbf6 100644
--- a/test/tint/expressions/type_conv/vec3/literal/f32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/f32-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/f32-f16.wgsl.expected.msl
index 466ceaa..c4a75c5 100644
--- a/test/tint/expressions/type_conv/vec3/literal/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/f32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/f32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/f32-i32.wgsl.expected.msl
index 466ceaa..16f636c 100644
--- a/test/tint/expressions/type_conv/vec3/literal/f32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/f32-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/f32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/f32-u32.wgsl.expected.msl
index 466ceaa..b718a23 100644
--- a/test/tint/expressions/type_conv/vec3/literal/f32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/f32-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/i32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/i32-bool.wgsl.expected.msl
index 466ceaa..bd5fbf6 100644
--- a/test/tint/expressions/type_conv/vec3/literal/i32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/i32-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/i32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/i32-f16.wgsl.expected.msl
index 466ceaa..c4a75c5 100644
--- a/test/tint/expressions/type_conv/vec3/literal/i32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/i32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/i32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/i32-f32.wgsl.expected.msl
index 466ceaa..3c10853 100644
--- a/test/tint/expressions/type_conv/vec3/literal/i32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/i32-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/i32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/i32-u32.wgsl.expected.msl
index 466ceaa..b718a23 100644
--- a/test/tint/expressions/type_conv/vec3/literal/i32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/i32-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/u32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/u32-bool.wgsl.expected.msl
index 466ceaa..bd5fbf6 100644
--- a/test/tint/expressions/type_conv/vec3/literal/u32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/u32-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/u32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/u32-f16.wgsl.expected.msl
index 466ceaa..c4a75c5 100644
--- a/test/tint/expressions/type_conv/vec3/literal/u32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/u32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/u32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/u32-f32.wgsl.expected.msl
index 466ceaa..3c10853 100644
--- a/test/tint/expressions/type_conv/vec3/literal/u32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/u32-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/literal/u32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/literal/u32-i32.wgsl.expected.msl
index 466ceaa..16f636c 100644
--- a/test/tint/expressions/type_conv/vec3/literal/u32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/literal/u32-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int3 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec3/var/bool-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/bool-f16.wgsl.expected.msl
index ca02857..73102e5 100644
--- a/test/tint/expressions/type_conv/vec3/var/bool-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/bool-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool3 tint_symbol = bool3(true);
- half3 const v = half3(tint_symbol);
+struct tint_private_vars_struct {
+ bool3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3 const v = half3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/bool-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/bool-f32.wgsl.expected.msl
index c21cd03..21f6c61 100644
--- a/test/tint/expressions/type_conv/vec3/var/bool-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/bool-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool3 tint_symbol = bool3(true);
- float3 const v = float3(tint_symbol);
+struct tint_private_vars_struct {
+ bool3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3 const v = float3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/bool-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/bool-i32.wgsl.expected.msl
index 145181c..04cd586 100644
--- a/test/tint/expressions/type_conv/vec3/var/bool-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/bool-i32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool3 tint_symbol = bool3(true);
- int3 const v = int3(tint_symbol);
+struct tint_private_vars_struct {
+ bool3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int3 const v = int3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/bool-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/bool-u32.wgsl.expected.msl
index c277b52..cb5afa2 100644
--- a/test/tint/expressions/type_conv/vec3/var/bool-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/bool-u32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool3 tint_symbol = bool3(true);
- uint3 const v = uint3(tint_symbol);
+struct tint_private_vars_struct {
+ bool3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint3 const v = uint3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/f16-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/f16-bool.wgsl.expected.msl
index 53fa36a..b77e0e1 100644
--- a/test/tint/expressions/type_conv/vec3/var/f16-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f16-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half3 tint_symbol = half3(1.0h);
- bool3 const v = bool3(tint_symbol);
+struct tint_private_vars_struct {
+ half3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool3 const v = bool3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/f16-f32.wgsl.expected.msl
index 020ca0a..51e8463 100644
--- a/test/tint/expressions/type_conv/vec3/var/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f16-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half3 tint_symbol = half3(1.0h);
- float3 const v = float3(tint_symbol);
+struct tint_private_vars_struct {
+ half3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3 const v = float3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/f16-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/f16-i32.wgsl.expected.msl
index 197a3ce..0c1fe29 100644
--- a/test/tint/expressions/type_conv/vec3/var/f16-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f16-i32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half3 tint_symbol = half3(1.0h);
- int3 const v = int3(tint_symbol);
+struct tint_private_vars_struct {
+ half3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int3 const v = int3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/f16-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/f16-u32.wgsl.expected.msl
index d299b78..f7691df 100644
--- a/test/tint/expressions/type_conv/vec3/var/f16-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f16-u32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half3 tint_symbol = half3(1.0h);
- uint3 const v = uint3(tint_symbol);
+struct tint_private_vars_struct {
+ half3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint3 const v = uint3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/f32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/f32-bool.wgsl.expected.msl
index 3d33f82..20fd309 100644
--- a/test/tint/expressions/type_conv/vec3/var/f32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f32-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float3 tint_symbol = float3(1.0f);
- bool3 const v = bool3(tint_symbol);
+struct tint_private_vars_struct {
+ float3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool3 const v = bool3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/f32-f16.wgsl.expected.msl
index f79e5ac..adddf81 100644
--- a/test/tint/expressions/type_conv/vec3/var/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float3 tint_symbol = float3(1.0f);
- half3 const v = half3(tint_symbol);
+struct tint_private_vars_struct {
+ float3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3 const v = half3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/f32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/f32-i32.wgsl.expected.msl
index 1a4621f..217ec91 100644
--- a/test/tint/expressions/type_conv/vec3/var/f32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f32-i32.wgsl.expected.msl
@@ -1,12 +1,15 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3 u;
+};
+
int3 tint_ftoi(float3 v) {
return select(int3(2147483647), select(int3(v), int3((-2147483647 - 1)), (v < float3(-2147483648.0f))), (v < float3(2147483520.0f)));
}
-void f() {
- thread float3 tint_symbol = float3(1.0f);
- int3 const v = tint_ftoi(tint_symbol);
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int3 const v = tint_ftoi((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/f32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/f32-u32.wgsl.expected.msl
index bf292cb..df43faf 100644
--- a/test/tint/expressions/type_conv/vec3/var/f32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/f32-u32.wgsl.expected.msl
@@ -1,12 +1,15 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3 u;
+};
+
uint3 tint_ftou(float3 v) {
return select(uint3(4294967295u), select(uint3(v), uint3(0u), (v < float3(0.0f))), (v < float3(4294967040.0f)));
}
-void f() {
- thread float3 tint_symbol = float3(1.0f);
- uint3 const v = tint_ftou(tint_symbol);
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint3 const v = tint_ftou((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/i32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/i32-bool.wgsl.expected.msl
index d173df6..b99917d 100644
--- a/test/tint/expressions/type_conv/vec3/var/i32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/i32-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int3 tint_symbol = int3(1);
- bool3 const v = bool3(tint_symbol);
+struct tint_private_vars_struct {
+ int3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool3 const v = bool3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/i32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/i32-f16.wgsl.expected.msl
index 0dd85c1..8a3151a 100644
--- a/test/tint/expressions/type_conv/vec3/var/i32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/i32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int3 tint_symbol = int3(1);
- half3 const v = half3(tint_symbol);
+struct tint_private_vars_struct {
+ int3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3 const v = half3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/i32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/i32-f32.wgsl.expected.msl
index d00b316..66d471a 100644
--- a/test/tint/expressions/type_conv/vec3/var/i32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/i32-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int3 tint_symbol = int3(1);
- float3 const v = float3(tint_symbol);
+struct tint_private_vars_struct {
+ int3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3 const v = float3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/i32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/i32-u32.wgsl.expected.msl
index 4b1d15a..200939a 100644
--- a/test/tint/expressions/type_conv/vec3/var/i32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/i32-u32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int3 tint_symbol = int3(1);
- uint3 const v = uint3(tint_symbol);
+struct tint_private_vars_struct {
+ int3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint3 const v = uint3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/u32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/u32-bool.wgsl.expected.msl
index 9ed8565..5ef46b5 100644
--- a/test/tint/expressions/type_conv/vec3/var/u32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/u32-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint3 tint_symbol = uint3(1u);
- bool3 const v = bool3(tint_symbol);
+struct tint_private_vars_struct {
+ uint3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool3 const v = bool3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/u32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/u32-f16.wgsl.expected.msl
index d03edd8..338df17 100644
--- a/test/tint/expressions/type_conv/vec3/var/u32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/u32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint3 tint_symbol = uint3(1u);
- half3 const v = half3(tint_symbol);
+struct tint_private_vars_struct {
+ uint3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3 const v = half3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/u32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/u32-f32.wgsl.expected.msl
index 462c81a..b94298d 100644
--- a/test/tint/expressions/type_conv/vec3/var/u32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/u32-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint3 tint_symbol = uint3(1u);
- float3 const v = float3(tint_symbol);
+struct tint_private_vars_struct {
+ uint3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3 const v = float3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec3/var/u32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec3/var/u32-i32.wgsl.expected.msl
index 7e8031a..1de4c2f 100644
--- a/test/tint/expressions/type_conv/vec3/var/u32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec3/var/u32-i32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint3 tint_symbol = uint3(1u);
- int3 const v = int3(tint_symbol);
+struct tint_private_vars_struct {
+ uint3 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int3 const v = int3((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/bool-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/bool-f16.wgsl.expected.msl
index 86e91cc..6835ee9 100644
--- a/test/tint/expressions/type_conv/vec4/function/bool-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/bool-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool4 m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool4(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool4((*(tint_private_vars)).t);
}
-void f() {
- bool4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool4 const tint_symbol = m(tint_private_vars);
half4 v = half4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/bool-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/bool-f32.wgsl.expected.msl
index 432aff7..0b8f379 100644
--- a/test/tint/expressions/type_conv/vec4/function/bool-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/bool-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool4 m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool4(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool4((*(tint_private_vars)).t);
}
-void f() {
- bool4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool4 const tint_symbol = m(tint_private_vars);
float4 v = float4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/bool-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/bool-i32.wgsl.expected.msl
index 015c285..a87ad0d 100644
--- a/test/tint/expressions/type_conv/vec4/function/bool-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/bool-i32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool4 m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool4(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool4((*(tint_private_vars)).t);
}
-void f() {
- bool4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool4 const tint_symbol = m(tint_private_vars);
int4 v = int4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/bool-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/bool-u32.wgsl.expected.msl
index 11bedfb..54782df 100644
--- a/test/tint/expressions/type_conv/vec4/function/bool-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/bool-u32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-bool4 m() {
- thread bool tint_symbol_1 = false;
- tint_symbol_1 = true;
- return bool4(tint_symbol_1);
+struct tint_private_vars_struct {
+ bool t;
+};
+
+bool4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = true;
+ return bool4((*(tint_private_vars)).t);
}
-void f() {
- bool4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool4 const tint_symbol = m(tint_private_vars);
uint4 v = uint4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/f16-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/f16-bool.wgsl.expected.msl
index 5273225..a8b964c 100644
--- a/test/tint/expressions/type_conv/vec4/function/f16-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f16-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half4 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half4(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half4((*(tint_private_vars)).t);
}
-void f() {
- half4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4 const tint_symbol = m(tint_private_vars);
bool4 v = bool4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/f16-f32.wgsl.expected.msl
index 30ca6fa..44725a3 100644
--- a/test/tint/expressions/type_conv/vec4/function/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f16-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half4 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half4(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half4((*(tint_private_vars)).t);
}
-void f() {
- half4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4 const tint_symbol = m(tint_private_vars);
float4 v = float4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/f16-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/f16-i32.wgsl.expected.msl
index c0f8605..9def0a6 100644
--- a/test/tint/expressions/type_conv/vec4/function/f16-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f16-i32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half4 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half4(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half4((*(tint_private_vars)).t);
}
-void f() {
- half4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4 const tint_symbol = m(tint_private_vars);
int4 v = int4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/f16-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/f16-u32.wgsl.expected.msl
index cf49e39..4cdd782 100644
--- a/test/tint/expressions/type_conv/vec4/function/f16-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f16-u32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-half4 m() {
- thread half tint_symbol_1 = 0.0h;
- tint_symbol_1 = 1.0h;
- return half4(tint_symbol_1);
+struct tint_private_vars_struct {
+ half t;
+};
+
+half4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0h;
+ return half4((*(tint_private_vars)).t);
}
-void f() {
- half4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4 const tint_symbol = m(tint_private_vars);
uint4 v = uint4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/f32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/f32-bool.wgsl.expected.msl
index 469620b..92b581c 100644
--- a/test/tint/expressions/type_conv/vec4/function/f32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f32-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float4 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float4(tint_symbol_1);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float4((*(tint_private_vars)).t);
}
-void f() {
- float4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4 const tint_symbol = m(tint_private_vars);
bool4 v = bool4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/f32-f16.wgsl.expected.msl
index 98a23c77..e31deb3 100644
--- a/test/tint/expressions/type_conv/vec4/function/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-float4 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float4(tint_symbol_1);
+struct tint_private_vars_struct {
+ float t;
+};
+
+float4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float4((*(tint_private_vars)).t);
}
-void f() {
- float4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4 const tint_symbol = m(tint_private_vars);
half4 v = half4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/f32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/f32-i32.wgsl.expected.msl
index 1f04e5e..850c881 100644
--- a/test/tint/expressions/type_conv/vec4/function/f32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f32-i32.wgsl.expected.msl
@@ -1,18 +1,21 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float t;
+};
+
int4 tint_ftoi(float4 v) {
return select(int4(2147483647), select(int4(v), int4((-2147483647 - 1)), (v < float4(-2147483648.0f))), (v < float4(2147483520.0f)));
}
-float4 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float4(tint_symbol_1);
+float4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float4((*(tint_private_vars)).t);
}
-void f() {
- float4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4 const tint_symbol = m(tint_private_vars);
int4 v = tint_ftoi(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/f32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/f32-u32.wgsl.expected.msl
index e0cad92..f51511f 100644
--- a/test/tint/expressions/type_conv/vec4/function/f32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/f32-u32.wgsl.expected.msl
@@ -1,18 +1,21 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float t;
+};
+
uint4 tint_ftou(float4 v) {
return select(uint4(4294967295u), select(uint4(v), uint4(0u), (v < float4(0.0f))), (v < float4(4294967040.0f)));
}
-float4 m() {
- thread float tint_symbol_1 = 0.0f;
- tint_symbol_1 = 1.0f;
- return float4(tint_symbol_1);
+float4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1.0f;
+ return float4((*(tint_private_vars)).t);
}
-void f() {
- float4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4 const tint_symbol = m(tint_private_vars);
uint4 v = tint_ftou(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/i32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/i32-bool.wgsl.expected.msl
index 059bb99..58ad9bc 100644
--- a/test/tint/expressions/type_conv/vec4/function/i32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/i32-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int4 m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int4(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int4((*(tint_private_vars)).t);
}
-void f() {
- int4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int4 const tint_symbol = m(tint_private_vars);
bool4 v = bool4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/i32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/i32-f16.wgsl.expected.msl
index c501b92..b04029f 100644
--- a/test/tint/expressions/type_conv/vec4/function/i32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/i32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int4 m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int4(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int4((*(tint_private_vars)).t);
}
-void f() {
- int4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int4 const tint_symbol = m(tint_private_vars);
half4 v = half4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/i32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/i32-f32.wgsl.expected.msl
index dba6670..74341b7 100644
--- a/test/tint/expressions/type_conv/vec4/function/i32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/i32-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int4 m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int4(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int4((*(tint_private_vars)).t);
}
-void f() {
- int4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int4 const tint_symbol = m(tint_private_vars);
float4 v = float4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/i32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/i32-u32.wgsl.expected.msl
index b9fd25d..f9377c6 100644
--- a/test/tint/expressions/type_conv/vec4/function/i32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/i32-u32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-int4 m() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 1;
- return int4(tint_symbol_1);
+struct tint_private_vars_struct {
+ int t;
+};
+
+int4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1;
+ return int4((*(tint_private_vars)).t);
}
-void f() {
- int4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int4 const tint_symbol = m(tint_private_vars);
uint4 v = uint4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/u32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/u32-bool.wgsl.expected.msl
index 978a48d..24163cb 100644
--- a/test/tint/expressions/type_conv/vec4/function/u32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/u32-bool.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint4 m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint4(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint4((*(tint_private_vars)).t);
}
-void f() {
- uint4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint4 const tint_symbol = m(tint_private_vars);
bool4 v = bool4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/u32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/u32-f16.wgsl.expected.msl
index 693069d..b9d347e 100644
--- a/test/tint/expressions/type_conv/vec4/function/u32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/u32-f16.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint4 m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint4(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint4((*(tint_private_vars)).t);
}
-void f() {
- uint4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint4 const tint_symbol = m(tint_private_vars);
half4 v = half4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/u32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/u32-f32.wgsl.expected.msl
index 1d10727..0be0063 100644
--- a/test/tint/expressions/type_conv/vec4/function/u32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/u32-f32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint4 m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint4(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint4((*(tint_private_vars)).t);
}
-void f() {
- uint4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint4 const tint_symbol = m(tint_private_vars);
float4 v = float4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/function/u32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/function/u32-i32.wgsl.expected.msl
index 3d01461..ba2afc9 100644
--- a/test/tint/expressions/type_conv/vec4/function/u32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/function/u32-i32.wgsl.expected.msl
@@ -1,14 +1,17 @@
#include <metal_stdlib>
using namespace metal;
-uint4 m() {
- thread uint tint_symbol_1 = 0u;
- tint_symbol_1 = 1u;
- return uint4(tint_symbol_1);
+struct tint_private_vars_struct {
+ uint t;
+};
+
+uint4 m(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).t = 1u;
+ return uint4((*(tint_private_vars)).t);
}
-void f() {
- uint4 const tint_symbol = m();
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint4 const tint_symbol = m(tint_private_vars);
int4 v = int4(tint_symbol);
}
diff --git a/test/tint/expressions/type_conv/vec4/literal/bool-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/bool-f16.wgsl.expected.msl
index 466ceaa..d3163da 100644
--- a/test/tint/expressions/type_conv/vec4/literal/bool-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/bool-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/bool-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/bool-f32.wgsl.expected.msl
index 466ceaa..1384746 100644
--- a/test/tint/expressions/type_conv/vec4/literal/bool-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/bool-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/bool-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/bool-i32.wgsl.expected.msl
index 466ceaa..504a2c4 100644
--- a/test/tint/expressions/type_conv/vec4/literal/bool-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/bool-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/bool-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/bool-u32.wgsl.expected.msl
index 466ceaa..5c5cfc5 100644
--- a/test/tint/expressions/type_conv/vec4/literal/bool-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/bool-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/f16-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/f16-bool.wgsl.expected.msl
index 466ceaa..13cccc1 100644
--- a/test/tint/expressions/type_conv/vec4/literal/f16-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/f16-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/f16-f32.wgsl.expected.msl
index 466ceaa..1384746 100644
--- a/test/tint/expressions/type_conv/vec4/literal/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/f16-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/f16-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/f16-i32.wgsl.expected.msl
index 466ceaa..504a2c4 100644
--- a/test/tint/expressions/type_conv/vec4/literal/f16-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/f16-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/f16-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/f16-u32.wgsl.expected.msl
index 466ceaa..5c5cfc5 100644
--- a/test/tint/expressions/type_conv/vec4/literal/f16-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/f16-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/f32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/f32-bool.wgsl.expected.msl
index 466ceaa..13cccc1 100644
--- a/test/tint/expressions/type_conv/vec4/literal/f32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/f32-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/f32-f16.wgsl.expected.msl
index 466ceaa..d3163da 100644
--- a/test/tint/expressions/type_conv/vec4/literal/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/f32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/f32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/f32-i32.wgsl.expected.msl
index 466ceaa..504a2c4 100644
--- a/test/tint/expressions/type_conv/vec4/literal/f32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/f32-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/f32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/f32-u32.wgsl.expected.msl
index 466ceaa..5c5cfc5 100644
--- a/test/tint/expressions/type_conv/vec4/literal/f32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/f32-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/i32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/i32-bool.wgsl.expected.msl
index 466ceaa..13cccc1 100644
--- a/test/tint/expressions/type_conv/vec4/literal/i32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/i32-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/i32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/i32-f16.wgsl.expected.msl
index 466ceaa..d3163da 100644
--- a/test/tint/expressions/type_conv/vec4/literal/i32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/i32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/i32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/i32-f32.wgsl.expected.msl
index 466ceaa..1384746 100644
--- a/test/tint/expressions/type_conv/vec4/literal/i32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/i32-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/i32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/i32-u32.wgsl.expected.msl
index 466ceaa..5c5cfc5 100644
--- a/test/tint/expressions/type_conv/vec4/literal/i32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/i32-u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/u32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/u32-bool.wgsl.expected.msl
index 466ceaa..13cccc1 100644
--- a/test/tint/expressions/type_conv/vec4/literal/u32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/u32-bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/u32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/u32-f16.wgsl.expected.msl
index 466ceaa..d3163da 100644
--- a/test/tint/expressions/type_conv/vec4/literal/u32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/u32-f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/u32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/u32-f32.wgsl.expected.msl
index 466ceaa..1384746 100644
--- a/test/tint/expressions/type_conv/vec4/literal/u32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/u32-f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/literal/u32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/literal/u32-i32.wgsl.expected.msl
index 466ceaa..504a2c4 100644
--- a/test/tint/expressions/type_conv/vec4/literal/u32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/literal/u32-i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int4 u;
+};
+
diff --git a/test/tint/expressions/type_conv/vec4/var/bool-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/bool-f16.wgsl.expected.msl
index 9b7a3f9..cc44530 100644
--- a/test/tint/expressions/type_conv/vec4/var/bool-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/bool-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool4 tint_symbol = bool4(true);
- half4 const v = half4(tint_symbol);
+struct tint_private_vars_struct {
+ bool4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4 const v = half4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/bool-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/bool-f32.wgsl.expected.msl
index a8141a0..6b51ff5 100644
--- a/test/tint/expressions/type_conv/vec4/var/bool-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/bool-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool4 tint_symbol = bool4(true);
- float4 const v = float4(tint_symbol);
+struct tint_private_vars_struct {
+ bool4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4 const v = float4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/bool-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/bool-i32.wgsl.expected.msl
index 3cbb3bd..82ece55 100644
--- a/test/tint/expressions/type_conv/vec4/var/bool-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/bool-i32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool4 tint_symbol = bool4(true);
- int4 const v = int4(tint_symbol);
+struct tint_private_vars_struct {
+ bool4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int4 const v = int4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/bool-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/bool-u32.wgsl.expected.msl
index 027dc8b..bc849f1 100644
--- a/test/tint/expressions/type_conv/vec4/var/bool-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/bool-u32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread bool4 tint_symbol = bool4(true);
- uint4 const v = uint4(tint_symbol);
+struct tint_private_vars_struct {
+ bool4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint4 const v = uint4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/f16-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/f16-bool.wgsl.expected.msl
index 2f42908..e8fe94a 100644
--- a/test/tint/expressions/type_conv/vec4/var/f16-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f16-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half4 tint_symbol = half4(1.0h);
- bool4 const v = bool4(tint_symbol);
+struct tint_private_vars_struct {
+ half4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool4 const v = bool4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/f16-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/f16-f32.wgsl.expected.msl
index f3b5e74..66fb84e 100644
--- a/test/tint/expressions/type_conv/vec4/var/f16-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f16-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half4 tint_symbol = half4(1.0h);
- float4 const v = float4(tint_symbol);
+struct tint_private_vars_struct {
+ half4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4 const v = float4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/f16-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/f16-i32.wgsl.expected.msl
index cf6ae1d..62d4b00 100644
--- a/test/tint/expressions/type_conv/vec4/var/f16-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f16-i32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half4 tint_symbol = half4(1.0h);
- int4 const v = int4(tint_symbol);
+struct tint_private_vars_struct {
+ half4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int4 const v = int4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/f16-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/f16-u32.wgsl.expected.msl
index 829e365..9fca44c 100644
--- a/test/tint/expressions/type_conv/vec4/var/f16-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f16-u32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread half4 tint_symbol = half4(1.0h);
- uint4 const v = uint4(tint_symbol);
+struct tint_private_vars_struct {
+ half4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint4 const v = uint4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/f32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/f32-bool.wgsl.expected.msl
index a394670..bb1e1bd 100644
--- a/test/tint/expressions/type_conv/vec4/var/f32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f32-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float4 tint_symbol = float4(1.0f);
- bool4 const v = bool4(tint_symbol);
+struct tint_private_vars_struct {
+ float4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool4 const v = bool4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/f32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/f32-f16.wgsl.expected.msl
index fddac9c..2a2f1aa 100644
--- a/test/tint/expressions/type_conv/vec4/var/f32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread float4 tint_symbol = float4(1.0f);
- half4 const v = half4(tint_symbol);
+struct tint_private_vars_struct {
+ float4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4 const v = half4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/f32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/f32-i32.wgsl.expected.msl
index f9824a4..e0ef880 100644
--- a/test/tint/expressions/type_conv/vec4/var/f32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f32-i32.wgsl.expected.msl
@@ -1,12 +1,15 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 u;
+};
+
int4 tint_ftoi(float4 v) {
return select(int4(2147483647), select(int4(v), int4((-2147483647 - 1)), (v < float4(-2147483648.0f))), (v < float4(2147483520.0f)));
}
-void f() {
- thread float4 tint_symbol = float4(1.0f);
- int4 const v = tint_ftoi(tint_symbol);
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int4 const v = tint_ftoi((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/f32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/f32-u32.wgsl.expected.msl
index 8586cef..3097856 100644
--- a/test/tint/expressions/type_conv/vec4/var/f32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/f32-u32.wgsl.expected.msl
@@ -1,12 +1,15 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 u;
+};
+
uint4 tint_ftou(float4 v) {
return select(uint4(4294967295u), select(uint4(v), uint4(0u), (v < float4(0.0f))), (v < float4(4294967040.0f)));
}
-void f() {
- thread float4 tint_symbol = float4(1.0f);
- uint4 const v = tint_ftou(tint_symbol);
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint4 const v = tint_ftou((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/i32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/i32-bool.wgsl.expected.msl
index 30c90bc..18b1f89 100644
--- a/test/tint/expressions/type_conv/vec4/var/i32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/i32-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int4 tint_symbol = int4(1);
- bool4 const v = bool4(tint_symbol);
+struct tint_private_vars_struct {
+ int4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool4 const v = bool4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/i32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/i32-f16.wgsl.expected.msl
index 88675aa..87ea031 100644
--- a/test/tint/expressions/type_conv/vec4/var/i32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/i32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int4 tint_symbol = int4(1);
- half4 const v = half4(tint_symbol);
+struct tint_private_vars_struct {
+ int4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4 const v = half4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/i32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/i32-f32.wgsl.expected.msl
index ccbcd16..42a6dd8 100644
--- a/test/tint/expressions/type_conv/vec4/var/i32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/i32-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int4 tint_symbol = int4(1);
- float4 const v = float4(tint_symbol);
+struct tint_private_vars_struct {
+ int4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4 const v = float4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/i32-u32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/i32-u32.wgsl.expected.msl
index 3836150..00c64b4 100644
--- a/test/tint/expressions/type_conv/vec4/var/i32-u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/i32-u32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int4 tint_symbol = int4(1);
- uint4 const v = uint4(tint_symbol);
+struct tint_private_vars_struct {
+ int4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ uint4 const v = uint4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/u32-bool.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/u32-bool.wgsl.expected.msl
index 7ae3843..5227146 100644
--- a/test/tint/expressions/type_conv/vec4/var/u32-bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/u32-bool.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint4 tint_symbol = uint4(1u);
- bool4 const v = bool4(tint_symbol);
+struct tint_private_vars_struct {
+ uint4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ bool4 const v = bool4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/u32-f16.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/u32-f16.wgsl.expected.msl
index 1590b32..b349ee3 100644
--- a/test/tint/expressions/type_conv/vec4/var/u32-f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/u32-f16.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint4 tint_symbol = uint4(1u);
- half4 const v = half4(tint_symbol);
+struct tint_private_vars_struct {
+ uint4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4 const v = half4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/u32-f32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/u32-f32.wgsl.expected.msl
index 6a2d33e..7b2ae2b 100644
--- a/test/tint/expressions/type_conv/vec4/var/u32-f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/u32-f32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint4 tint_symbol = uint4(1u);
- float4 const v = float4(tint_symbol);
+struct tint_private_vars_struct {
+ uint4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4 const v = float4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_conv/vec4/var/u32-i32.wgsl.expected.msl b/test/tint/expressions/type_conv/vec4/var/u32-i32.wgsl.expected.msl
index 48c5733..67a3394 100644
--- a/test/tint/expressions/type_conv/vec4/var/u32-i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_conv/vec4/var/u32-i32.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread uint4 tint_symbol = uint4(1u);
- int4 const v = int4(tint_symbol);
+struct tint_private_vars_struct {
+ uint4 u;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int4 const v = int4((*(tint_private_vars)).u);
}
diff --git a/test/tint/expressions/type_ctor/array/explicit/abstract.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/explicit/abstract.wgsl.expected.msl
index 948a0e3..21cea11 100644
--- a/test/tint/expressions/type_ctor/array/explicit/abstract.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/abstract.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<float, 2> tint_symbol = tint_array<float, 2>{1.0f, 2.0f};
- tint_array<float, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<float, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<float, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/explicit/array/abstract.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/explicit/array/abstract.wgsl.expected.msl
index 78574d3..1ed086b 100644
--- a/test/tint/expressions/type_ctor/array/explicit/array/abstract.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/array/abstract.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<tint_array<float, 2>, 2> tint_symbol = tint_array<tint_array<float, 2>, 2>{tint_array<float, 2>{1.0f, 2.0f}, tint_array<float, 2>{3.0f, 4.0f}};
- tint_array<tint_array<float, 2>, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<tint_array<float, 2>, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<tint_array<float, 2>, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/explicit/array/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/explicit/array/f32.wgsl.expected.msl
index 78574d3..1ed086b 100644
--- a/test/tint/expressions/type_ctor/array/explicit/array/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/array/f32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<tint_array<float, 2>, 2> tint_symbol = tint_array<tint_array<float, 2>, 2>{tint_array<float, 2>{1.0f, 2.0f}, tint_array<float, 2>{3.0f, 4.0f}};
- tint_array<tint_array<float, 2>, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<tint_array<float, 2>, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<tint_array<float, 2>, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/explicit/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/explicit/f32.wgsl.expected.msl
index 948a0e3..21cea11 100644
--- a/test/tint/expressions/type_ctor/array/explicit/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/f32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<float, 2> tint_symbol = tint_array<float, 2>{1.0f, 2.0f};
- tint_array<float, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<float, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<float, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/explicit/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/explicit/i32.wgsl.expected.msl
index b25f389..e0a3c9b 100644
--- a/test/tint/expressions/type_ctor/array/explicit/i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/i32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<int, 2> tint_symbol = tint_array<int, 2>{1, 2};
- tint_array<int, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<int, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<int, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/explicit/mat2x2/abstract.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/explicit/mat2x2/abstract.wgsl.expected.msl
index fc7a396..217837d 100644
--- a/test/tint/expressions/type_ctor/array/explicit/mat2x2/abstract.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/mat2x2/abstract.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<float2x2, 2> tint_symbol = tint_array<float2x2, 2>{float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)), float2x2(float2(5.0f, 6.0f), float2(7.0f, 8.0f))};
- tint_array<float2x2, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<float2x2, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<float2x2, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/explicit/mat2x2/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/explicit/mat2x2/f32.wgsl.expected.msl
index fc7a396..217837d 100644
--- a/test/tint/expressions/type_ctor/array/explicit/mat2x2/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/mat2x2/f32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<float2x2, 2> tint_symbol = tint_array<float2x2, 2>{float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)), float2x2(float2(5.0f, 6.0f), float2(7.0f, 8.0f))};
- tint_array<float2x2, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<float2x2, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<float2x2, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/explicit/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/explicit/u32.wgsl.expected.msl
index ae65b6a..5b98962 100644
--- a/test/tint/expressions/type_ctor/array/explicit/u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/u32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<uint, 2> tint_symbol = tint_array<uint, 2>{1u, 2u};
- tint_array<uint, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<uint, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<uint, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/explicit/vec2/abstract.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/explicit/vec2/abstract.wgsl.expected.msl
index 6965cc2..869902f 100644
--- a/test/tint/expressions/type_ctor/array/explicit/vec2/abstract.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/vec2/abstract.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<float2, 2> tint_symbol = tint_array<float2, 2>{float2(1.0f), float2(2.0f)};
- tint_array<float2, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<float2, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<float2, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/explicit/vec2/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/explicit/vec2/f32.wgsl.expected.msl
index 6965cc2..869902f 100644
--- a/test/tint/expressions/type_ctor/array/explicit/vec2/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/vec2/f32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<float2, 2> tint_symbol = tint_array<float2, 2>{float2(1.0f), float2(2.0f)};
- tint_array<float2, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<float2, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<float2, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/explicit/vec2/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/explicit/vec2/i32.wgsl.expected.msl
index d6e6202..6b7e104 100644
--- a/test/tint/expressions/type_ctor/array/explicit/vec2/i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/vec2/i32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<int2, 2> tint_symbol = tint_array<int2, 2>{int2(1), int2(2)};
- tint_array<int2, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<int2, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<int2, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/explicit/vec2/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/explicit/vec2/u32.wgsl.expected.msl
index 53c875d0..93e5466 100644
--- a/test/tint/expressions/type_ctor/array/explicit/vec2/u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/explicit/vec2/u32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<uint2, 2> tint_symbol = tint_array<uint2, 2>{uint2(1u), uint2(2u)};
- tint_array<uint2, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<uint2, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<uint2, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/inferred/abstract.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/inferred/abstract.wgsl.expected.msl
index b25f389..e0a3c9b 100644
--- a/test/tint/expressions/type_ctor/array/inferred/abstract.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/abstract.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<int, 2> tint_symbol = tint_array<int, 2>{1, 2};
- tint_array<int, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<int, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<int, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/inferred/array/abstract.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/inferred/array/abstract.wgsl.expected.msl
index 1782585..0733628 100644
--- a/test/tint/expressions/type_ctor/array/inferred/array/abstract.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/array/abstract.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<tint_array<int, 2>, 2> tint_symbol = tint_array<tint_array<int, 2>, 2>{tint_array<int, 2>{1, 2}, tint_array<int, 2>{3, 4}};
- tint_array<tint_array<int, 2>, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<tint_array<int, 2>, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<tint_array<int, 2>, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/inferred/array/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/inferred/array/f32.wgsl.expected.msl
index 78574d3..1ed086b 100644
--- a/test/tint/expressions/type_ctor/array/inferred/array/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/array/f32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<tint_array<float, 2>, 2> tint_symbol = tint_array<tint_array<float, 2>, 2>{tint_array<float, 2>{1.0f, 2.0f}, tint_array<float, 2>{3.0f, 4.0f}};
- tint_array<tint_array<float, 2>, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<tint_array<float, 2>, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<tint_array<float, 2>, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/inferred/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/inferred/f32.wgsl.expected.msl
index 948a0e3..21cea11 100644
--- a/test/tint/expressions/type_ctor/array/inferred/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/f32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<float, 2> tint_symbol = tint_array<float, 2>{1.0f, 2.0f};
- tint_array<float, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<float, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<float, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/inferred/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/inferred/i32.wgsl.expected.msl
index b25f389..e0a3c9b 100644
--- a/test/tint/expressions/type_ctor/array/inferred/i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/i32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<int, 2> tint_symbol = tint_array<int, 2>{1, 2};
- tint_array<int, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<int, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<int, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/inferred/mat2x2/abstract.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/inferred/mat2x2/abstract.wgsl.expected.msl
index fc7a396..217837d 100644
--- a/test/tint/expressions/type_ctor/array/inferred/mat2x2/abstract.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/mat2x2/abstract.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<float2x2, 2> tint_symbol = tint_array<float2x2, 2>{float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)), float2x2(float2(5.0f, 6.0f), float2(7.0f, 8.0f))};
- tint_array<float2x2, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<float2x2, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<float2x2, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/inferred/mat2x2/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/inferred/mat2x2/f32.wgsl.expected.msl
index fc7a396..217837d 100644
--- a/test/tint/expressions/type_ctor/array/inferred/mat2x2/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/mat2x2/f32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<float2x2, 2> tint_symbol = tint_array<float2x2, 2>{float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)), float2x2(float2(5.0f, 6.0f), float2(7.0f, 8.0f))};
- tint_array<float2x2, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<float2x2, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<float2x2, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/inferred/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/inferred/u32.wgsl.expected.msl
index ae65b6a..5b98962 100644
--- a/test/tint/expressions/type_ctor/array/inferred/u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/u32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<uint, 2> tint_symbol = tint_array<uint, 2>{1u, 2u};
- tint_array<uint, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<uint, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<uint, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/inferred/vec2/abstract.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/inferred/vec2/abstract.wgsl.expected.msl
index 6965cc2..869902f 100644
--- a/test/tint/expressions/type_ctor/array/inferred/vec2/abstract.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/vec2/abstract.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<float2, 2> tint_symbol = tint_array<float2, 2>{float2(1.0f), float2(2.0f)};
- tint_array<float2, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<float2, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<float2, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/inferred/vec2/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/inferred/vec2/f32.wgsl.expected.msl
index 6965cc2..869902f 100644
--- a/test/tint/expressions/type_ctor/array/inferred/vec2/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/vec2/f32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<float2, 2> tint_symbol = tint_array<float2, 2>{float2(1.0f), float2(2.0f)};
- tint_array<float2, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<float2, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<float2, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/inferred/vec2/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/inferred/vec2/i32.wgsl.expected.msl
index d6e6202..6b7e104 100644
--- a/test/tint/expressions/type_ctor/array/inferred/vec2/i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/vec2/i32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<int2, 2> tint_symbol = tint_array<int2, 2>{int2(1), int2(2)};
- tint_array<int2, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<int2, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<int2, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/array/inferred/vec2/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/array/inferred/vec2/u32.wgsl.expected.msl
index 53c875d0..93e5466 100644
--- a/test/tint/expressions/type_ctor/array/inferred/vec2/u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/array/inferred/vec2/u32.wgsl.expected.msl
@@ -14,8 +14,11 @@
T elements[N];
};
-void f() {
- thread tint_array<uint2, 2> tint_symbol = tint_array<uint2, 2>{uint2(1u), uint2(2u)};
- tint_array<uint2, 2> v = tint_symbol;
+struct tint_private_vars_struct {
+ tint_array<uint2, 2> arr;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ tint_array<uint2, 2> v = (*(tint_private_vars)).arr;
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f16.wgsl.expected.msl
index e4fadc8..83d200f 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half2x2 f() {
- thread half2x2 tint_symbol = half2x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h));
- half2x2 const m_1 = half2x2(tint_symbol);
+struct tint_private_vars_struct {
+ half2x2 m;
+};
+
+half2x2 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2x2 const m_1 = half2x2((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.msl
index dcbe1b0..c317697 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float2x2 f() {
- thread float2x2 tint_symbol = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f));
- float2x2 const m_1 = float2x2(tint_symbol);
+struct tint_private_vars_struct {
+ float2x2 m;
+};
+
+float2x2 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2x2 const m_1 = float2x2((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f16.wgsl.expected.msl
index 466ceaa..37b7060 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.msl
index 466ceaa..c97a144 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f16.wgsl.expected.msl
index 466ceaa..37b7060 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.msl
index 466ceaa..c97a144 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f16.wgsl.expected.msl
index e4fadc8..83d200f 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half2x2 f() {
- thread half2x2 tint_symbol = half2x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h));
- half2x2 const m_1 = half2x2(tint_symbol);
+struct tint_private_vars_struct {
+ half2x2 m;
+};
+
+half2x2 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2x2 const m_1 = half2x2((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.msl
index dcbe1b0..c317697 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float2x2 f() {
- thread float2x2 tint_symbol = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f));
- float2x2 const m_1 = float2x2(tint_symbol);
+struct tint_private_vars_struct {
+ float2x2 m;
+};
+
+float2x2 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2x2 const m_1 = float2x2((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.msl
index 466ceaa..c97a144 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f16.wgsl.expected.msl
index 466ceaa..37b7060 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.msl
index 466ceaa..c97a144 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.msl
index 466ceaa..c97a144 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f16.wgsl.expected.msl
index 466ceaa..37b7060 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.msl
index 466ceaa..c97a144 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x2/zero/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/zero/f16.wgsl.expected.msl
index 466ceaa..37b7060 100644
--- a/test/tint/expressions/type_ctor/mat2x2/zero/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/zero/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.msl
index 466ceaa..c97a144 100644
--- a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.msl
index 30f8cc7..afa405d 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half2x3 f() {
- thread half2x3 tint_symbol = half2x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h));
- half2x3 const m_1 = half2x3(tint_symbol);
+struct tint_private_vars_struct {
+ half2x3 m;
+};
+
+half2x3 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2x3 const m_1 = half2x3((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.msl
index 03b6fd7..0c95534 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float2x3 f() {
- thread float2x3 tint_symbol = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f));
- float2x3 const m_1 = float2x3(tint_symbol);
+struct tint_private_vars_struct {
+ float2x3 m;
+};
+
+float2x3 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2x3 const m_1 = float2x3((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.msl
index 466ceaa..12a2c58 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.msl
index 466ceaa..f0ad3c1 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.msl
index 466ceaa..12a2c58 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.msl
index 466ceaa..f0ad3c1 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.msl
index 30f8cc7..afa405d 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half2x3 f() {
- thread half2x3 tint_symbol = half2x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h));
- half2x3 const m_1 = half2x3(tint_symbol);
+struct tint_private_vars_struct {
+ half2x3 m;
+};
+
+half2x3 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2x3 const m_1 = half2x3((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.msl
index 03b6fd7..0c95534 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float2x3 f() {
- thread float2x3 tint_symbol = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f));
- float2x3 const m_1 = float2x3(tint_symbol);
+struct tint_private_vars_struct {
+ float2x3 m;
+};
+
+float2x3 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2x3 const m_1 = float2x3((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.msl
index 466ceaa..f0ad3c1 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.msl
index 466ceaa..12a2c58 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.msl
index 466ceaa..f0ad3c1 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.msl
index 466ceaa..f0ad3c1 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.msl
index 466ceaa..12a2c58 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.msl
index 466ceaa..f0ad3c1 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.msl
index 466ceaa..12a2c58 100644
--- a/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.msl
index 466ceaa..f0ad3c1 100644
--- a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f16.wgsl.expected.msl
index ce986af..3bc8b99 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half2x4 f() {
- thread half2x4 tint_symbol = half2x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h));
- half2x4 const m_1 = half2x4(tint_symbol);
+struct tint_private_vars_struct {
+ half2x4 m;
+};
+
+half2x4 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2x4 const m_1 = half2x4((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.msl
index 63b4e2a..8d39f84 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float2x4 f() {
- thread float2x4 tint_symbol = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f));
- float2x4 const m_1 = float2x4(tint_symbol);
+struct tint_private_vars_struct {
+ float2x4 m;
+};
+
+float2x4 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2x4 const m_1 = float2x4((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f16.wgsl.expected.msl
index 466ceaa..88fa42b 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.msl
index 466ceaa..299bd66 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f16.wgsl.expected.msl
index 466ceaa..88fa42b 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.msl
index 466ceaa..299bd66 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f16.wgsl.expected.msl
index ce986af..3bc8b99 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half2x4 f() {
- thread half2x4 tint_symbol = half2x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h));
- half2x4 const m_1 = half2x4(tint_symbol);
+struct tint_private_vars_struct {
+ half2x4 m;
+};
+
+half2x4 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half2x4 const m_1 = half2x4((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.msl
index 63b4e2a..8d39f84 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float2x4 f() {
- thread float2x4 tint_symbol = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f));
- float2x4 const m_1 = float2x4(tint_symbol);
+struct tint_private_vars_struct {
+ float2x4 m;
+};
+
+float2x4 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float2x4 const m_1 = float2x4((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.msl
index 466ceaa..299bd66 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f16.wgsl.expected.msl
index 466ceaa..88fa42b 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.msl
index 466ceaa..299bd66 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.msl
index 466ceaa..299bd66 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f16.wgsl.expected.msl
index 466ceaa..88fa42b 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.msl
index 466ceaa..299bd66 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x4/zero/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/zero/f16.wgsl.expected.msl
index 466ceaa..88fa42b 100644
--- a/test/tint/expressions/type_ctor/mat2x4/zero/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/zero/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.msl
index 466ceaa..299bd66 100644
--- a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f16.wgsl.expected.msl
index f9d4d85..f2d3fbe 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half3x2 f() {
- thread half3x2 tint_symbol = half3x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h));
- half3x2 const m_1 = half3x2(tint_symbol);
+struct tint_private_vars_struct {
+ half3x2 m;
+};
+
+half3x2 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3x2 const m_1 = half3x2((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.msl
index 41fb71e..7c81698 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float3x2 f() {
- thread float3x2 tint_symbol = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f));
- float3x2 const m_1 = float3x2(tint_symbol);
+struct tint_private_vars_struct {
+ float3x2 m;
+};
+
+float3x2 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3x2 const m_1 = float3x2((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f16.wgsl.expected.msl
index 466ceaa..90a5391 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.msl
index 466ceaa..c62ec48 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f16.wgsl.expected.msl
index 466ceaa..90a5391 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.msl
index 466ceaa..c62ec48 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f16.wgsl.expected.msl
index f9d4d85..f2d3fbe 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half3x2 f() {
- thread half3x2 tint_symbol = half3x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h));
- half3x2 const m_1 = half3x2(tint_symbol);
+struct tint_private_vars_struct {
+ half3x2 m;
+};
+
+half3x2 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3x2 const m_1 = half3x2((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.msl
index 41fb71e..7c81698 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float3x2 f() {
- thread float3x2 tint_symbol = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f));
- float3x2 const m_1 = float3x2(tint_symbol);
+struct tint_private_vars_struct {
+ float3x2 m;
+};
+
+float3x2 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3x2 const m_1 = float3x2((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.msl
index 466ceaa..c62ec48 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f16.wgsl.expected.msl
index 466ceaa..90a5391 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.msl
index 466ceaa..c62ec48 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.msl
index 466ceaa..c62ec48 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f16.wgsl.expected.msl
index 466ceaa..90a5391 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.msl
index 466ceaa..c62ec48 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x2/zero/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/zero/f16.wgsl.expected.msl
index 466ceaa..90a5391 100644
--- a/test/tint/expressions/type_ctor/mat3x2/zero/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/zero/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.msl
index 466ceaa..c62ec48 100644
--- a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.msl
index 0e09b51..79dab0a 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half3x3 f() {
- thread half3x3 tint_symbol = half3x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h));
- half3x3 const m_1 = half3x3(tint_symbol);
+struct tint_private_vars_struct {
+ half3x3 m;
+};
+
+half3x3 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3x3 const m_1 = half3x3((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.msl
index d19a026..301de24 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float3x3 f() {
- thread float3x3 tint_symbol = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f));
- float3x3 const m_1 = float3x3(tint_symbol);
+struct tint_private_vars_struct {
+ float3x3 m;
+};
+
+float3x3 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3x3 const m_1 = float3x3((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.msl
index 466ceaa..f72a892 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.msl
index 466ceaa..98767cf 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.msl
index 466ceaa..f72a892 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.msl
index 466ceaa..98767cf 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.msl
index 0e09b51..79dab0a 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half3x3 f() {
- thread half3x3 tint_symbol = half3x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h));
- half3x3 const m_1 = half3x3(tint_symbol);
+struct tint_private_vars_struct {
+ half3x3 m;
+};
+
+half3x3 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3x3 const m_1 = half3x3((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.msl
index d19a026..301de24 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float3x3 f() {
- thread float3x3 tint_symbol = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f));
- float3x3 const m_1 = float3x3(tint_symbol);
+struct tint_private_vars_struct {
+ float3x3 m;
+};
+
+float3x3 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3x3 const m_1 = float3x3((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.msl
index 466ceaa..98767cf 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.msl
index 466ceaa..f72a892 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.msl
index 466ceaa..98767cf 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.msl
index 466ceaa..98767cf 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.msl
index 466ceaa..f72a892 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.msl
index 466ceaa..98767cf 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.msl
index 466ceaa..f72a892 100644
--- a/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.msl
index 466ceaa..98767cf 100644
--- a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f16.wgsl.expected.msl
index 28109d3..1018d4c 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half3x4 f() {
- thread half3x4 tint_symbol = half3x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h));
- half3x4 const m_1 = half3x4(tint_symbol);
+struct tint_private_vars_struct {
+ half3x4 m;
+};
+
+half3x4 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3x4 const m_1 = half3x4((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.msl
index 9295b89..948eb5d 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float3x4 f() {
- thread float3x4 tint_symbol = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f));
- float3x4 const m_1 = float3x4(tint_symbol);
+struct tint_private_vars_struct {
+ float3x4 m;
+};
+
+float3x4 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3x4 const m_1 = float3x4((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f16.wgsl.expected.msl
index 466ceaa..20a3a5f 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.msl
index 466ceaa..6d3618a 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f16.wgsl.expected.msl
index 466ceaa..20a3a5f 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.msl
index 466ceaa..6d3618a 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f16.wgsl.expected.msl
index 28109d3..1018d4c 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half3x4 f() {
- thread half3x4 tint_symbol = half3x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h));
- half3x4 const m_1 = half3x4(tint_symbol);
+struct tint_private_vars_struct {
+ half3x4 m;
+};
+
+half3x4 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half3x4 const m_1 = half3x4((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.msl
index 9295b89..948eb5d 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float3x4 f() {
- thread float3x4 tint_symbol = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f));
- float3x4 const m_1 = float3x4(tint_symbol);
+struct tint_private_vars_struct {
+ float3x4 m;
+};
+
+float3x4 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float3x4 const m_1 = float3x4((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.msl
index 466ceaa..6d3618a 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f16.wgsl.expected.msl
index 466ceaa..20a3a5f 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.msl
index 466ceaa..6d3618a 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.msl
index 466ceaa..6d3618a 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f16.wgsl.expected.msl
index 466ceaa..20a3a5f 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.msl
index 466ceaa..6d3618a 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x4/zero/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/zero/f16.wgsl.expected.msl
index 466ceaa..20a3a5f 100644
--- a/test/tint/expressions/type_ctor/mat3x4/zero/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/zero/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.msl
index 466ceaa..6d3618a 100644
--- a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f16.wgsl.expected.msl
index 35da177..20d0ed7 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half4x2 f() {
- thread half4x2 tint_symbol = half4x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h), half2(6.0h, 7.0h));
- half4x2 const m_1 = half4x2(tint_symbol);
+struct tint_private_vars_struct {
+ half4x2 m;
+};
+
+half4x2 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4x2 const m_1 = half4x2((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.msl
index 2114895..c229c26 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float4x2 f() {
- thread float4x2 tint_symbol = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f));
- float4x2 const m_1 = float4x2(tint_symbol);
+struct tint_private_vars_struct {
+ float4x2 m;
+};
+
+float4x2 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4x2 const m_1 = float4x2((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f16.wgsl.expected.msl
index 466ceaa..d6410a1 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.msl
index 466ceaa..3553bff 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f16.wgsl.expected.msl
index 466ceaa..d6410a1 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.msl
index 466ceaa..3553bff 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f16.wgsl.expected.msl
index 35da177..20d0ed7 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half4x2 f() {
- thread half4x2 tint_symbol = half4x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h), half2(4.0h, 5.0h), half2(6.0h, 7.0h));
- half4x2 const m_1 = half4x2(tint_symbol);
+struct tint_private_vars_struct {
+ half4x2 m;
+};
+
+half4x2 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4x2 const m_1 = half4x2((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.msl
index 2114895..c229c26 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float4x2 f() {
- thread float4x2 tint_symbol = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f));
- float4x2 const m_1 = float4x2(tint_symbol);
+struct tint_private_vars_struct {
+ float4x2 m;
+};
+
+float4x2 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4x2 const m_1 = float4x2((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.msl
index 466ceaa..3553bff 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f16.wgsl.expected.msl
index 466ceaa..d6410a1 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.msl
index 466ceaa..3553bff 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.msl
index 466ceaa..3553bff 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f16.wgsl.expected.msl
index 466ceaa..d6410a1 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.msl
index 466ceaa..3553bff 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x2/zero/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/zero/f16.wgsl.expected.msl
index 466ceaa..d6410a1 100644
--- a/test/tint/expressions/type_ctor/mat4x2/zero/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/zero/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.msl
index 466ceaa..3553bff 100644
--- a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x2 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.msl
index 21bccca..5374a3b 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half4x3 f() {
- thread half4x3 tint_symbol = half4x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h), half3(9.0h, 10.0h, 11.0h));
- half4x3 const m_1 = half4x3(tint_symbol);
+struct tint_private_vars_struct {
+ half4x3 m;
+};
+
+half4x3 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4x3 const m_1 = half4x3((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.msl
index 7327219..9c054fd 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float4x3 f() {
- thread float4x3 tint_symbol = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f));
- float4x3 const m_1 = float4x3(tint_symbol);
+struct tint_private_vars_struct {
+ float4x3 m;
+};
+
+float4x3 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4x3 const m_1 = float4x3((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.msl
index 466ceaa..7c59d76 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.msl
index 466ceaa..7438c62 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.msl
index 466ceaa..7c59d76 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.msl
index 466ceaa..7438c62 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.msl
index 21bccca..5374a3b 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half4x3 f() {
- thread half4x3 tint_symbol = half4x3(half3(0.0h, 1.0h, 2.0h), half3(3.0h, 4.0h, 5.0h), half3(6.0h, 7.0h, 8.0h), half3(9.0h, 10.0h, 11.0h));
- half4x3 const m_1 = half4x3(tint_symbol);
+struct tint_private_vars_struct {
+ half4x3 m;
+};
+
+half4x3 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4x3 const m_1 = half4x3((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.msl
index 7327219..9c054fd 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float4x3 f() {
- thread float4x3 tint_symbol = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f));
- float4x3 const m_1 = float4x3(tint_symbol);
+struct tint_private_vars_struct {
+ float4x3 m;
+};
+
+float4x3 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4x3 const m_1 = float4x3((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.msl
index 466ceaa..7438c62 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.msl
index 466ceaa..7c59d76 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.msl
index 466ceaa..7438c62 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.msl
index 466ceaa..7438c62 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.msl
index 466ceaa..7c59d76 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.msl
index 466ceaa..7438c62 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.msl
index 466ceaa..7c59d76 100644
--- a/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.msl
index 466ceaa..7438c62 100644
--- a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x3 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f16.wgsl.expected.msl
index 178ef59..3271b7c 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half4x4 f() {
- thread half4x4 tint_symbol = half4x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h), half4(12.0h, 13.0h, 14.0h, 15.0h));
- half4x4 const m_1 = half4x4(tint_symbol);
+struct tint_private_vars_struct {
+ half4x4 m;
+};
+
+half4x4 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4x4 const m_1 = half4x4((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.msl
index 71f0986..538ae08 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float4x4 f() {
- thread float4x4 tint_symbol = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f));
- float4x4 const m_1 = float4x4(tint_symbol);
+struct tint_private_vars_struct {
+ float4x4 m;
+};
+
+float4x4 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4x4 const m_1 = float4x4((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f16.wgsl.expected.msl
index 466ceaa..b9a8b98 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.msl
index 466ceaa..ee88253 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f16.wgsl.expected.msl
index 466ceaa..b9a8b98 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.msl
index 466ceaa..ee88253 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f16.wgsl.expected.msl
index 178ef59..3271b7c 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f16.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-half4x4 f() {
- thread half4x4 tint_symbol = half4x4(half4(0.0h, 1.0h, 2.0h, 3.0h), half4(4.0h, 5.0h, 6.0h, 7.0h), half4(8.0h, 9.0h, 10.0h, 11.0h), half4(12.0h, 13.0h, 14.0h, 15.0h));
- half4x4 const m_1 = half4x4(tint_symbol);
+struct tint_private_vars_struct {
+ half4x4 m;
+};
+
+half4x4 f(thread tint_private_vars_struct* const tint_private_vars) {
+ half4x4 const m_1 = half4x4((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.msl
index 71f0986..538ae08 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.msl
@@ -1,9 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-float4x4 f() {
- thread float4x4 tint_symbol = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f));
- float4x4 const m_1 = float4x4(tint_symbol);
+struct tint_private_vars_struct {
+ float4x4 m;
+};
+
+float4x4 f(thread tint_private_vars_struct* const tint_private_vars) {
+ float4x4 const m_1 = float4x4((*(tint_private_vars)).m);
return m_1;
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.msl
index 466ceaa..ee88253 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f16.wgsl.expected.msl
index 466ceaa..b9a8b98 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.msl
index 466ceaa..ee88253 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.msl
index 466ceaa..ee88253 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f16.wgsl.expected.msl
index 466ceaa..b9a8b98 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.msl
index 466ceaa..ee88253 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x4/zero/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/zero/f16.wgsl.expected.msl
index 466ceaa..b9a8b98 100644
--- a/test/tint/expressions/type_ctor/mat4x4/zero/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/zero/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.msl
index 466ceaa..ee88253 100644
--- a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4x4 m;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.msl
index 466ceaa..c067f40 100644
--- a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool2 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec2/explicit/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/explicit/f16.wgsl.expected.msl
index 466ceaa..73b9143 100644
--- a/test/tint/expressions/type_ctor/vec2/explicit/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec2/explicit/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.msl
index 466ceaa..28c008f 100644
--- a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.msl
index 466ceaa..41ad1aa 100644
--- a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int2 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.msl
index 466ceaa..498881f 100644
--- a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint2 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.msl
index 466ceaa..28c008f 100644
--- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.msl
index 466ceaa..41ad1aa 100644
--- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int2 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.msl
index 466ceaa..c067f40 100644
--- a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool2 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec2/inferred/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/inferred/f16.wgsl.expected.msl
index 466ceaa..73b9143 100644
--- a/test/tint/expressions/type_ctor/vec2/inferred/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec2/inferred/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half2 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.msl
index 466ceaa..28c008f 100644
--- a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.msl
index 466ceaa..41ad1aa 100644
--- a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int2 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.msl
index 466ceaa..498881f 100644
--- a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint2 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.msl
index 466ceaa..fa7091f 100644
--- a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool3 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec3/explicit/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/explicit/f16.wgsl.expected.msl
index 466ceaa..51886b6 100644
--- a/test/tint/expressions/type_ctor/vec3/explicit/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec3/explicit/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.msl
index 466ceaa..9488f71 100644
--- a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.msl
index 466ceaa..1bc8458 100644
--- a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int3 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.msl
index 466ceaa..427da62 100644
--- a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint3 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.msl
index 466ceaa..9488f71 100644
--- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.msl
index 466ceaa..1bc8458 100644
--- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int3 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.msl
index 466ceaa..fa7091f 100644
--- a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool3 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec3/inferred/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/inferred/f16.wgsl.expected.msl
index 466ceaa..51886b6 100644
--- a/test/tint/expressions/type_ctor/vec3/inferred/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec3/inferred/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half3 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.msl
index 466ceaa..9488f71 100644
--- a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float3 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.msl
index 466ceaa..1bc8458 100644
--- a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int3 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.msl
index 466ceaa..427da62 100644
--- a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint3 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.msl
index 466ceaa..1c9eebb 100644
--- a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool4 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec4/explicit/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/explicit/f16.wgsl.expected.msl
index 466ceaa..25ae88b 100644
--- a/test/tint/expressions/type_ctor/vec4/explicit/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec4/explicit/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.msl
index 466ceaa..dc5fc0b 100644
--- a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.msl
index 466ceaa..babf0f8 100644
--- a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int4 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.msl
index 466ceaa..3e1f10b 100644
--- a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint4 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.msl
index 466ceaa..dc5fc0b 100644
--- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.msl
index 466ceaa..babf0f8 100644
--- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int4 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.msl
index 466ceaa..1c9eebb 100644
--- a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool4 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec4/inferred/f16.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/inferred/f16.wgsl.expected.msl
index 466ceaa..25ae88b 100644
--- a/test/tint/expressions/type_ctor/vec4/inferred/f16.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec4/inferred/f16.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ half4 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.msl
index 466ceaa..dc5fc0b 100644
--- a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.msl
index 466ceaa..babf0f8 100644
--- a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int4 v;
+};
+
diff --git a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.msl
index 466ceaa..3e1f10b 100644
--- a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.msl
+++ b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.msl
@@ -1,3 +1,7 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ uint4 v;
+};
+
diff --git a/test/tint/identifiers/underscore/double/var.wgsl.expected.msl b/test/tint/identifiers/underscore/double/var.wgsl.expected.msl
index 6d12124..03047e4 100644
--- a/test/tint/identifiers/underscore/double/var.wgsl.expected.msl
+++ b/test/tint/identifiers/underscore/double/var.wgsl.expected.msl
@@ -1,10 +1,13 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int tint_symbol = 1;
- thread int tint_symbol_1 = 2;
- int b = tint_symbol;
- int b__ = tint_symbol_1;
+struct tint_private_vars_struct {
+ int a;
+ int a__;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int b = (*(tint_private_vars)).a;
+ int b__ = (*(tint_private_vars)).a__;
}
diff --git a/test/tint/identifiers/underscore/prefix/lower/var.wgsl.expected.msl b/test/tint/identifiers/underscore/prefix/lower/var.wgsl.expected.msl
index d700a2a..e4dc3d9 100644
--- a/test/tint/identifiers/underscore/prefix/lower/var.wgsl.expected.msl
+++ b/test/tint/identifiers/underscore/prefix/lower/var.wgsl.expected.msl
@@ -1,10 +1,13 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int tint_symbol = 1;
- thread int tint_symbol_1 = 2;
- int b = tint_symbol;
- int _b = tint_symbol_1;
+struct tint_private_vars_struct {
+ int a;
+ int _a;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int b = (*(tint_private_vars)).a;
+ int _b = (*(tint_private_vars))._a;
}
diff --git a/test/tint/identifiers/underscore/prefix/upper/var.wgsl.expected.msl b/test/tint/identifiers/underscore/prefix/upper/var.wgsl.expected.msl
index da05cb2..424118a 100644
--- a/test/tint/identifiers/underscore/prefix/upper/var.wgsl.expected.msl
+++ b/test/tint/identifiers/underscore/prefix/upper/var.wgsl.expected.msl
@@ -1,10 +1,13 @@
#include <metal_stdlib>
using namespace metal;
-void f() {
- thread int tint_symbol = 1;
- thread int tint_symbol_1 = 2;
- int B = tint_symbol;
- int _B = tint_symbol_1;
+struct tint_private_vars_struct {
+ int A;
+ int _A;
+};
+
+void f(thread tint_private_vars_struct* const tint_private_vars) {
+ int B = (*(tint_private_vars)).A;
+ int _B = (*(tint_private_vars))._A;
}
diff --git a/test/tint/out_of_order_decls/array/alias.wgsl.expected.msl b/test/tint/out_of_order_decls/array/alias.wgsl.expected.msl
index 3baeea6..9c86d1b 100644
--- a/test/tint/out_of_order_decls/array/alias.wgsl.expected.msl
+++ b/test/tint/out_of_order_decls/array/alias.wgsl.expected.msl
@@ -14,9 +14,13 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ tint_array<int, 4> A;
+};
+
fragment void f() {
- thread tint_array<int, 4> tint_symbol = {};
- tint_symbol[0] = 1;
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.A[0] = 1;
return;
}
diff --git a/test/tint/out_of_order_decls/array/struct.wgsl.expected.msl b/test/tint/out_of_order_decls/array/struct.wgsl.expected.msl
index 19160b5..89dd743 100644
--- a/test/tint/out_of_order_decls/array/struct.wgsl.expected.msl
+++ b/test/tint/out_of_order_decls/array/struct.wgsl.expected.msl
@@ -18,10 +18,14 @@
int m;
};
+struct tint_private_vars_struct {
+ tint_array<S, 4> A;
+};
+
fragment void f() {
- thread tint_array<S, 4> tint_symbol_1 = {};
+ thread tint_private_vars_struct tint_private_vars = {};
S const tint_symbol = S{.m=1};
- tint_symbol_1[0] = tint_symbol;
+ tint_private_vars.A[0] = tint_symbol;
return;
}
diff --git a/test/tint/out_of_order_decls/func/var.wgsl.expected.msl b/test/tint/out_of_order_decls/func/var.wgsl.expected.msl
index 832e2eb..4ba3f02 100644
--- a/test/tint/out_of_order_decls/func/var.wgsl.expected.msl
+++ b/test/tint/out_of_order_decls/func/var.wgsl.expected.msl
@@ -1,9 +1,14 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int a;
+};
+
fragment void f() {
- thread int tint_symbol = 1;
- int const b = tint_symbol;
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.a = 1;
+ int const b = tint_private_vars.a;
return;
}
diff --git a/test/tint/ptr_ref/load/global/i32.spvasm.expected.msl b/test/tint/ptr_ref/load/global/i32.spvasm.expected.msl
index 7e3e102..b50a51a 100644
--- a/test/tint/ptr_ref/load/global/i32.spvasm.expected.msl
+++ b/test/tint/ptr_ref/load/global/i32.spvasm.expected.msl
@@ -1,15 +1,20 @@
#include <metal_stdlib>
using namespace metal;
-void main_1() {
- thread int tint_symbol_1 = 0;
- int const x_9 = tint_symbol_1;
+struct tint_private_vars_struct {
+ int I;
+};
+
+void main_1(thread tint_private_vars_struct* const tint_private_vars) {
+ int const x_9 = (*(tint_private_vars)).I;
int const x_11 = as_type<int>((as_type<uint>(x_9) + as_type<uint>(1)));
return;
}
kernel void tint_symbol() {
- main_1();
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.I = 0;
+ main_1(&(tint_private_vars));
return;
}
diff --git a/test/tint/ptr_ref/load/global/i32.wgsl.expected.msl b/test/tint/ptr_ref/load/global/i32.wgsl.expected.msl
index 9aa2253..101fada 100644
--- a/test/tint/ptr_ref/load/global/i32.wgsl.expected.msl
+++ b/test/tint/ptr_ref/load/global/i32.wgsl.expected.msl
@@ -1,9 +1,13 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int I;
+};
+
kernel void tint_symbol() {
- thread int tint_symbol_1 = 0;
- int const i = tint_symbol_1;
+ thread tint_private_vars_struct tint_private_vars = {};
+ int const i = tint_private_vars.I;
int const u = as_type<int>((as_type<uint>(i) + as_type<uint>(1)));
return;
}
diff --git a/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.msl b/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.msl
index 211485e..1f820c4 100644
--- a/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.msl
+++ b/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.msl
@@ -5,16 +5,20 @@
int i;
};
-void main_1() {
- thread S tint_symbol_1 = {};
+struct tint_private_vars_struct {
+ S V;
+};
+
+void main_1(thread tint_private_vars_struct* const tint_private_vars) {
int i = 0;
- int const x_15 = tint_symbol_1.i;
+ int const x_15 = (*(tint_private_vars)).V.i;
i = x_15;
return;
}
kernel void tint_symbol() {
- main_1();
+ thread tint_private_vars_struct tint_private_vars = {};
+ main_1(&(tint_private_vars));
return;
}
diff --git a/test/tint/ptr_ref/load/global/struct_field.wgsl.expected.msl b/test/tint/ptr_ref/load/global/struct_field.wgsl.expected.msl
index 857a03e..4536b7a 100644
--- a/test/tint/ptr_ref/load/global/struct_field.wgsl.expected.msl
+++ b/test/tint/ptr_ref/load/global/struct_field.wgsl.expected.msl
@@ -5,9 +5,13 @@
int i;
};
+struct tint_private_vars_struct {
+ S V;
+};
+
kernel void tint_symbol() {
- thread S tint_symbol_1 = {};
- int const i = tint_symbol_1.i;
+ thread tint_private_vars_struct tint_private_vars = {};
+ int const i = tint_private_vars.V.i;
return;
}
diff --git a/test/tint/ptr_ref/load/local/ptr_private.wgsl.expected.msl b/test/tint/ptr_ref/load/local/ptr_private.wgsl.expected.msl
index 1b95dbc..0b8fded 100644
--- a/test/tint/ptr_ref/load/local/ptr_private.wgsl.expected.msl
+++ b/test/tint/ptr_ref/load/local/ptr_private.wgsl.expected.msl
@@ -1,9 +1,14 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int i;
+};
+
kernel void tint_symbol() {
- thread int tint_symbol_1 = 123;
- int const u = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.i = 123;
+ int const u = as_type<int>((as_type<uint>(tint_private_vars.i) + as_type<uint>(1)));
return;
}
diff --git a/test/tint/ptr_ref/load/param/private/array_in_struct.wgsl.expected.msl b/test/tint/ptr_ref/load/param/private/array_in_struct.wgsl.expected.msl
index 86e77bc..8c49ab7 100644
--- a/test/tint/ptr_ref/load/param/private/array_in_struct.wgsl.expected.msl
+++ b/test/tint/ptr_ref/load/param/private/array_in_struct.wgsl.expected.msl
@@ -18,13 +18,17 @@
tint_array<int, 4> arr;
};
+struct tint_private_vars_struct {
+ str P;
+};
+
tint_array<int, 4> func(thread tint_array<int, 4>* const pointer) {
return *(pointer);
}
kernel void tint_symbol() {
- thread str tint_symbol_1 = {};
- tint_array<int, 4> const r = func(&(tint_symbol_1.arr));
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_array<int, 4> const r = func(&(tint_private_vars.P.arr));
return;
}
diff --git a/test/tint/ptr_ref/load/param/private/i32.wgsl.expected.msl b/test/tint/ptr_ref/load/param/private/i32.wgsl.expected.msl
index 7fa4197..52fc36e 100644
--- a/test/tint/ptr_ref/load/param/private/i32.wgsl.expected.msl
+++ b/test/tint/ptr_ref/load/param/private/i32.wgsl.expected.msl
@@ -1,13 +1,17 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int P;
+};
+
int func(thread int* const pointer) {
return *(pointer);
}
kernel void tint_symbol() {
- thread int tint_symbol_1 = 0;
- int const r = func(&(tint_symbol_1));
+ thread tint_private_vars_struct tint_private_vars = {};
+ int const r = func(&(tint_private_vars.P));
return;
}
diff --git a/test/tint/ptr_ref/load/param/private/i32_in_struct.wgsl.expected.msl b/test/tint/ptr_ref/load/param/private/i32_in_struct.wgsl.expected.msl
index 8ab2385..831e614 100644
--- a/test/tint/ptr_ref/load/param/private/i32_in_struct.wgsl.expected.msl
+++ b/test/tint/ptr_ref/load/param/private/i32_in_struct.wgsl.expected.msl
@@ -5,13 +5,17 @@
int i;
};
+struct tint_private_vars_struct {
+ str P;
+};
+
int func(thread int* const pointer) {
return *(pointer);
}
kernel void tint_symbol() {
- thread str tint_symbol_1 = {};
- int const r = func(&(tint_symbol_1.i));
+ thread tint_private_vars_struct tint_private_vars = {};
+ int const r = func(&(tint_private_vars.P.i));
return;
}
diff --git a/test/tint/ptr_ref/load/param/private/struct_in_array.wgsl.expected.msl b/test/tint/ptr_ref/load/param/private/struct_in_array.wgsl.expected.msl
index e3794a9..b3c9f59 100644
--- a/test/tint/ptr_ref/load/param/private/struct_in_array.wgsl.expected.msl
+++ b/test/tint/ptr_ref/load/param/private/struct_in_array.wgsl.expected.msl
@@ -18,13 +18,17 @@
int i;
};
+struct tint_private_vars_struct {
+ tint_array<str, 4> P;
+};
+
str func(thread str* const pointer) {
return *(pointer);
}
kernel void tint_symbol() {
- thread tint_array<str, 4> tint_symbol_1 = {};
- str const r = func(&(tint_symbol_1[2]));
+ thread tint_private_vars_struct tint_private_vars = {};
+ str const r = func(&(tint_private_vars.P[2]));
return;
}
diff --git a/test/tint/ptr_ref/load/param/private/vec2_f32_in_mat2x2.wgsl.expected.msl b/test/tint/ptr_ref/load/param/private/vec2_f32_in_mat2x2.wgsl.expected.msl
index 27b7a26..a8e4484 100644
--- a/test/tint/ptr_ref/load/param/private/vec2_f32_in_mat2x2.wgsl.expected.msl
+++ b/test/tint/ptr_ref/load/param/private/vec2_f32_in_mat2x2.wgsl.expected.msl
@@ -1,13 +1,17 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x2 P;
+};
+
float2 func(thread float2* const pointer) {
return *(pointer);
}
kernel void tint_symbol() {
- thread float2x2 tint_symbol_1 = float2x2(0.0f);
- float2 const r = func(&(tint_symbol_1[1]));
+ thread tint_private_vars_struct tint_private_vars = {};
+ float2 const r = func(&(tint_private_vars.P[1]));
return;
}
diff --git a/test/tint/ptr_ref/load/param/private/vec4_f32.wgsl.expected.msl b/test/tint/ptr_ref/load/param/private/vec4_f32.wgsl.expected.msl
index 5b17645..b0e65d9 100644
--- a/test/tint/ptr_ref/load/param/private/vec4_f32.wgsl.expected.msl
+++ b/test/tint/ptr_ref/load/param/private/vec4_f32.wgsl.expected.msl
@@ -1,13 +1,17 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 P;
+};
+
float4 func(thread float4* const pointer) {
return *(pointer);
}
kernel void tint_symbol() {
- thread float4 tint_symbol_1 = 0.0f;
- float4 const r = func(&(tint_symbol_1));
+ thread tint_private_vars_struct tint_private_vars = {};
+ float4 const r = func(&(tint_private_vars.P));
return;
}
diff --git a/test/tint/ptr_ref/load/param/private/vec4_f32_in_mat2x4.wgsl.expected.msl b/test/tint/ptr_ref/load/param/private/vec4_f32_in_mat2x4.wgsl.expected.msl
index f2112e8..4e7885f 100644
--- a/test/tint/ptr_ref/load/param/private/vec4_f32_in_mat2x4.wgsl.expected.msl
+++ b/test/tint/ptr_ref/load/param/private/vec4_f32_in_mat2x4.wgsl.expected.msl
@@ -1,13 +1,17 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 P;
+};
+
float4 func(thread float4* const pointer) {
return *(pointer);
}
kernel void tint_symbol() {
- thread float2x4 tint_symbol_1 = float2x4(0.0f);
- float4 const r = func(&(tint_symbol_1[1]));
+ thread tint_private_vars_struct tint_private_vars = {};
+ float4 const r = func(&(tint_private_vars.P[1]));
return;
}
diff --git a/test/tint/ptr_ref/load/param/private/vec4_f32_in_struct.wgsl.expected.msl b/test/tint/ptr_ref/load/param/private/vec4_f32_in_struct.wgsl.expected.msl
index 256f2a4..3fdab82 100644
--- a/test/tint/ptr_ref/load/param/private/vec4_f32_in_struct.wgsl.expected.msl
+++ b/test/tint/ptr_ref/load/param/private/vec4_f32_in_struct.wgsl.expected.msl
@@ -5,13 +5,17 @@
float4 i;
};
+struct tint_private_vars_struct {
+ str P;
+};
+
float4 func(thread float4* const pointer) {
return *(pointer);
}
kernel void tint_symbol() {
- thread str tint_symbol_1 = {};
- float4 const r = func(&(tint_symbol_1.i));
+ thread tint_private_vars_struct tint_private_vars = {};
+ float4 const r = func(&(tint_private_vars.P.i));
return;
}
diff --git a/test/tint/ptr_ref/store/global/i32.spvasm.expected.msl b/test/tint/ptr_ref/store/global/i32.spvasm.expected.msl
index 5325510..98bae1a 100644
--- a/test/tint/ptr_ref/store/global/i32.spvasm.expected.msl
+++ b/test/tint/ptr_ref/store/global/i32.spvasm.expected.msl
@@ -1,15 +1,20 @@
#include <metal_stdlib>
using namespace metal;
-void main_1() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 123;
- tint_symbol_1 = 123;
+struct tint_private_vars_struct {
+ int I;
+};
+
+void main_1(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).I = 123;
+ (*(tint_private_vars)).I = 123;
return;
}
kernel void tint_symbol() {
- main_1();
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.I = 0;
+ main_1(&(tint_private_vars));
return;
}
diff --git a/test/tint/ptr_ref/store/global/i32.wgsl.expected.msl b/test/tint/ptr_ref/store/global/i32.wgsl.expected.msl
index 7c4f8ee..9725b54 100644
--- a/test/tint/ptr_ref/store/global/i32.wgsl.expected.msl
+++ b/test/tint/ptr_ref/store/global/i32.wgsl.expected.msl
@@ -1,10 +1,14 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int I;
+};
+
kernel void tint_symbol() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = 123;
- tint_symbol_1 = 123;
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.I = 123;
+ tint_private_vars.I = 123;
return;
}
diff --git a/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.msl b/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.msl
index 08486b5..2a1f4cd 100644
--- a/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.msl
+++ b/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.msl
@@ -5,14 +5,18 @@
int i;
};
-void main_1() {
- thread S tint_symbol_1 = {};
- tint_symbol_1.i = 5;
+struct tint_private_vars_struct {
+ S V;
+};
+
+void main_1(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).V.i = 5;
return;
}
kernel void tint_symbol() {
- main_1();
+ thread tint_private_vars_struct tint_private_vars = {};
+ main_1(&(tint_private_vars));
return;
}
diff --git a/test/tint/ptr_ref/store/param/private/array_in_struct.wgsl.expected.msl b/test/tint/ptr_ref/store/param/private/array_in_struct.wgsl.expected.msl
index fbc443b..97c88bb 100644
--- a/test/tint/ptr_ref/store/param/private/array_in_struct.wgsl.expected.msl
+++ b/test/tint/ptr_ref/store/param/private/array_in_struct.wgsl.expected.msl
@@ -18,14 +18,18 @@
tint_array<int, 4> arr;
};
+struct tint_private_vars_struct {
+ str P;
+};
+
void func(thread tint_array<int, 4>* const pointer) {
tint_array<int, 4> const tint_symbol_1 = tint_array<int, 4>{};
*(pointer) = tint_symbol_1;
}
kernel void tint_symbol() {
- thread str tint_symbol_2 = {};
- func(&(tint_symbol_2.arr));
+ thread tint_private_vars_struct tint_private_vars = {};
+ func(&(tint_private_vars.P.arr));
return;
}
diff --git a/test/tint/ptr_ref/store/param/private/i32.wgsl.expected.msl b/test/tint/ptr_ref/store/param/private/i32.wgsl.expected.msl
index ead132a..595bb42 100644
--- a/test/tint/ptr_ref/store/param/private/i32.wgsl.expected.msl
+++ b/test/tint/ptr_ref/store/param/private/i32.wgsl.expected.msl
@@ -1,13 +1,17 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int P;
+};
+
void func(thread int* const pointer) {
*(pointer) = 42;
}
kernel void tint_symbol() {
- thread int tint_symbol_1 = 0;
- func(&(tint_symbol_1));
+ thread tint_private_vars_struct tint_private_vars = {};
+ func(&(tint_private_vars.P));
return;
}
diff --git a/test/tint/ptr_ref/store/param/private/i32_in_struct.wgsl.expected.msl b/test/tint/ptr_ref/store/param/private/i32_in_struct.wgsl.expected.msl
index bcc4591..afde805 100644
--- a/test/tint/ptr_ref/store/param/private/i32_in_struct.wgsl.expected.msl
+++ b/test/tint/ptr_ref/store/param/private/i32_in_struct.wgsl.expected.msl
@@ -5,13 +5,17 @@
int i;
};
+struct tint_private_vars_struct {
+ str P;
+};
+
void func(thread int* const pointer) {
*(pointer) = 42;
}
kernel void tint_symbol() {
- thread str tint_symbol_1 = {};
- func(&(tint_symbol_1.i));
+ thread tint_private_vars_struct tint_private_vars = {};
+ func(&(tint_private_vars.P.i));
return;
}
diff --git a/test/tint/ptr_ref/store/param/private/struct_in_array.wgsl.expected.msl b/test/tint/ptr_ref/store/param/private/struct_in_array.wgsl.expected.msl
index d0f273b..5a30299 100644
--- a/test/tint/ptr_ref/store/param/private/struct_in_array.wgsl.expected.msl
+++ b/test/tint/ptr_ref/store/param/private/struct_in_array.wgsl.expected.msl
@@ -18,14 +18,18 @@
int i;
};
+struct tint_private_vars_struct {
+ tint_array<str, 4> P;
+};
+
void func(thread str* const pointer) {
str const tint_symbol_1 = str{};
*(pointer) = tint_symbol_1;
}
kernel void tint_symbol() {
- thread tint_array<str, 4> tint_symbol_2 = {};
- func(&(tint_symbol_2[2]));
+ thread tint_private_vars_struct tint_private_vars = {};
+ func(&(tint_private_vars.P[2]));
return;
}
diff --git a/test/tint/ptr_ref/store/param/private/vec2_f32_in_mat2x2.wgsl.expected.msl b/test/tint/ptr_ref/store/param/private/vec2_f32_in_mat2x2.wgsl.expected.msl
index 5ba30955..0c171d2 100644
--- a/test/tint/ptr_ref/store/param/private/vec2_f32_in_mat2x2.wgsl.expected.msl
+++ b/test/tint/ptr_ref/store/param/private/vec2_f32_in_mat2x2.wgsl.expected.msl
@@ -1,13 +1,17 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x2 P;
+};
+
void func(thread float2* const pointer) {
*(pointer) = float2(0.0f);
}
kernel void tint_symbol() {
- thread float2x2 tint_symbol_1 = float2x2(0.0f);
- func(&(tint_symbol_1[1]));
+ thread tint_private_vars_struct tint_private_vars = {};
+ func(&(tint_private_vars.P[1]));
return;
}
diff --git a/test/tint/ptr_ref/store/param/private/vec4_f32.wgsl.expected.msl b/test/tint/ptr_ref/store/param/private/vec4_f32.wgsl.expected.msl
index 1f3faf7..0fd7c46 100644
--- a/test/tint/ptr_ref/store/param/private/vec4_f32.wgsl.expected.msl
+++ b/test/tint/ptr_ref/store/param/private/vec4_f32.wgsl.expected.msl
@@ -1,13 +1,17 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float4 P;
+};
+
void func(thread float4* const pointer) {
*(pointer) = float4(0.0f);
}
kernel void tint_symbol() {
- thread float4 tint_symbol_1 = 0.0f;
- func(&(tint_symbol_1));
+ thread tint_private_vars_struct tint_private_vars = {};
+ func(&(tint_private_vars.P));
return;
}
diff --git a/test/tint/ptr_ref/store/param/private/vec4_f32_in_mat2x4.wgsl.expected.msl b/test/tint/ptr_ref/store/param/private/vec4_f32_in_mat2x4.wgsl.expected.msl
index cbc5a43..8a0bce7 100644
--- a/test/tint/ptr_ref/store/param/private/vec4_f32_in_mat2x4.wgsl.expected.msl
+++ b/test/tint/ptr_ref/store/param/private/vec4_f32_in_mat2x4.wgsl.expected.msl
@@ -1,13 +1,17 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x4 P;
+};
+
void func(thread float4* const pointer) {
*(pointer) = float4(0.0f);
}
kernel void tint_symbol() {
- thread float2x4 tint_symbol_1 = float2x4(0.0f);
- func(&(tint_symbol_1[1]));
+ thread tint_private_vars_struct tint_private_vars = {};
+ func(&(tint_private_vars.P[1]));
return;
}
diff --git a/test/tint/ptr_ref/store/param/private/vec4_f32_in_struct.wgsl.expected.msl b/test/tint/ptr_ref/store/param/private/vec4_f32_in_struct.wgsl.expected.msl
index 3185a65..f6f9502 100644
--- a/test/tint/ptr_ref/store/param/private/vec4_f32_in_struct.wgsl.expected.msl
+++ b/test/tint/ptr_ref/store/param/private/vec4_f32_in_struct.wgsl.expected.msl
@@ -5,13 +5,17 @@
float4 i;
};
+struct tint_private_vars_struct {
+ str P;
+};
+
void func(thread float4* const pointer) {
*(pointer) = float4(0.0f);
}
kernel void tint_symbol() {
- thread str tint_symbol_1 = {};
- func(&(tint_symbol_1.i));
+ thread tint_private_vars_struct tint_private_vars = {};
+ func(&(tint_private_vars.P.i));
return;
}
diff --git a/test/tint/samples/simple_vertex.spvasm.expected.msl b/test/tint/samples/simple_vertex.spvasm.expected.msl
index 27cb3a4..4119df0 100644
--- a/test/tint/samples/simple_vertex.spvasm.expected.msl
+++ b/test/tint/samples/simple_vertex.spvasm.expected.msl
@@ -1,8 +1,12 @@
#include <metal_stdlib>
using namespace metal;
-void main_1(thread float4* const tint_symbol_3) {
- *(tint_symbol_3) = float4(0.0f);
+struct tint_private_vars_struct {
+ float4 gl_Position;
+};
+
+void main_1(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).gl_Position = float4(0.0f);
return;
}
@@ -14,15 +18,15 @@
float4 gl_Position [[position]];
};
-main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
- main_1(tint_symbol_4);
- main_out const tint_symbol_2 = {.gl_Position=*(tint_symbol_4)};
+main_out tint_symbol_inner(thread tint_private_vars_struct* const tint_private_vars) {
+ main_1(tint_private_vars);
+ main_out const tint_symbol_2 = {.gl_Position=(*(tint_private_vars)).gl_Position};
return tint_symbol_2;
}
vertex tint_symbol_1 tint_symbol() {
- thread float4 tint_symbol_5 = 0.0f;
- main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
+ thread tint_private_vars_struct tint_private_vars = {};
+ main_out const inner_result = tint_symbol_inner(&(tint_private_vars));
tint_symbol_1 wrapper_result = {};
wrapper_result.gl_Position = inner_result.gl_Position;
return wrapper_result;
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.msl
index 4cd6b66..c5637a4 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.msl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.msl
@@ -14,6 +14,10 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ uint nextIndex;
+};
+
struct Uniforms {
/* 0x0000 */ uint i;
/* 0x0004 */ uint j;
@@ -31,17 +35,17 @@
tint_array<S1, 8> a1;
};
-uint getNextIndex() {
- thread uint tint_symbol_2 = 0u;
- tint_symbol_2 = (tint_symbol_2 + 1u);
- return tint_symbol_2;
+uint getNextIndex(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).nextIndex = ((*(tint_private_vars)).nextIndex + 1u);
+ return (*(tint_private_vars)).nextIndex;
}
-kernel void tint_symbol(const constant Uniforms* tint_symbol_3 [[buffer(0)]]) {
+kernel void tint_symbol(const constant Uniforms* tint_symbol_2 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
InnerS v = {};
OuterS s = {};
- uint const tint_symbol_1 = getNextIndex();
- s.a1[tint_symbol_1].a2[(*(tint_symbol_3)).j] = v;
+ uint const tint_symbol_1 = getNextIndex(&(tint_private_vars));
+ s.a1[tint_symbol_1].a2[(*(tint_symbol_2)).j] = v;
return;
}
diff --git a/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.msl b/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.msl
index 3c7c47a..c7c4bd6 100644
--- a/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.msl
+++ b/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.msl
@@ -14,25 +14,29 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ int counter;
+};
+
struct S {
tint_array<int4, 4> a;
};
-int foo(thread int* const tint_symbol_4) {
- *(tint_symbol_4) = as_type<int>((as_type<uint>(*(tint_symbol_4)) + as_type<uint>(1)));
- return *(tint_symbol_4);
+int foo(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(1)));
+ return (*(tint_private_vars)).counter;
}
-int bar(thread int* const tint_symbol_5) {
- *(tint_symbol_5) = as_type<int>((as_type<uint>(*(tint_symbol_5)) + as_type<uint>(2)));
- return *(tint_symbol_5);
+int bar(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).counter = as_type<int>((as_type<uint>((*(tint_private_vars)).counter) + as_type<uint>(2)));
+ return (*(tint_private_vars)).counter;
}
-void tint_symbol(thread int* const tint_symbol_6) {
+void tint_symbol(thread tint_private_vars_struct* const tint_private_vars) {
S x = S{};
- int const tint_symbol_3 = foo(tint_symbol_6);
+ int const tint_symbol_3 = foo(tint_private_vars);
int const tint_symbol_1_save = tint_symbol_3;
- int const tint_symbol_2 = bar(tint_symbol_6);
+ int const tint_symbol_2 = bar(tint_private_vars);
x.a[tint_symbol_1_save][tint_symbol_2] = as_type<int>((as_type<uint>(x.a[tint_symbol_1_save][tint_symbol_2]) + as_type<uint>(5)));
}
diff --git a/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.msl b/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.msl
index 36a30d4..47a5e29 100644
--- a/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.msl
+++ b/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.msl
@@ -1,6 +1,11 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int a;
+ float b;
+};
+
int tint_div(int lhs, int rhs) {
return (lhs / select(rhs, 1, bool((rhs == 0) | bool((lhs == (-2147483647 - 1)) & (rhs == -1)))));
}
@@ -14,16 +19,14 @@
}
}
-void foo(int maybe_zero) {
- thread int tint_symbol = 0;
- thread float tint_symbol_1 = 0.0f;
- tint_symbol = tint_div(tint_symbol, 0);
- tint_symbol = tint_mod(tint_symbol, 0);
- tint_symbol = tint_div(tint_symbol, maybe_zero);
- tint_symbol = tint_mod(tint_symbol, maybe_zero);
- tint_symbol_1 = (tint_symbol_1 / 0.0f);
- tint_symbol_1 = fmod(tint_symbol_1, 0.0f);
- tint_symbol_1 = (tint_symbol_1 / float(maybe_zero));
- tint_symbol_1 = fmod(tint_symbol_1, float(maybe_zero));
+void foo(int maybe_zero, thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).a = tint_div((*(tint_private_vars)).a, 0);
+ (*(tint_private_vars)).a = tint_mod((*(tint_private_vars)).a, 0);
+ (*(tint_private_vars)).a = tint_div((*(tint_private_vars)).a, maybe_zero);
+ (*(tint_private_vars)).a = tint_mod((*(tint_private_vars)).a, maybe_zero);
+ (*(tint_private_vars)).b = ((*(tint_private_vars)).b / 0.0f);
+ (*(tint_private_vars)).b = fmod((*(tint_private_vars)).b, 0.0f);
+ (*(tint_private_vars)).b = ((*(tint_private_vars)).b / float(maybe_zero));
+ (*(tint_private_vars)).b = fmod((*(tint_private_vars)).b, float(maybe_zero));
}
diff --git a/test/tint/statements/compound_assign/for_loop.wgsl.expected.msl b/test/tint/statements/compound_assign/for_loop.wgsl.expected.msl
index daed750..cd34a12 100644
--- a/test/tint/statements/compound_assign/for_loop.wgsl.expected.msl
+++ b/test/tint/statements/compound_assign/for_loop.wgsl.expected.msl
@@ -14,42 +14,46 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ uint i;
+};
+
struct S {
int a;
float4 b;
float2x2 c;
};
-int idx1(thread uint* const tint_symbol_5) {
- *(tint_symbol_5) = (*(tint_symbol_5) + 1u);
+int idx1(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).i = ((*(tint_private_vars)).i + 1u);
return 1;
}
-int idx2(thread uint* const tint_symbol_6) {
- *(tint_symbol_6) = (*(tint_symbol_6) + 2u);
+int idx2(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).i = ((*(tint_private_vars)).i + 2u);
return 1;
}
-int idx3(thread uint* const tint_symbol_7) {
- *(tint_symbol_7) = (*(tint_symbol_7) + 3u);
+int idx3(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).i = ((*(tint_private_vars)).i + 3u);
return 1;
}
-void foo(thread uint* const tint_symbol_8) {
+void foo(thread tint_private_vars_struct* const tint_private_vars) {
tint_array<float, 4> a = tint_array<float, 4>{};
{
- int const tint_symbol_2 = idx1(tint_symbol_8);
+ int const tint_symbol_2 = idx1(tint_private_vars);
int const tint_symbol_save = tint_symbol_2;
a[tint_symbol_save] = (a[tint_symbol_save] * 2.0f);
while (true) {
- int const tint_symbol_3 = idx2(tint_symbol_8);
+ int const tint_symbol_3 = idx2(tint_private_vars);
if (!((a[tint_symbol_3] < 10.0f))) {
break;
}
{
}
{
- int const tint_symbol_4 = idx3(tint_symbol_8);
+ int const tint_symbol_4 = idx3(tint_private_vars);
int const tint_symbol_1_save = tint_symbol_4;
a[tint_symbol_1_save] = (a[tint_symbol_1_save] + 1.0f);
}
diff --git a/test/tint/statements/compound_assign/private.wgsl.expected.msl b/test/tint/statements/compound_assign/private.wgsl.expected.msl
index f573620..dc43a37 100644
--- a/test/tint/statements/compound_assign/private.wgsl.expected.msl
+++ b/test/tint/statements/compound_assign/private.wgsl.expected.msl
@@ -1,16 +1,19 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int a;
+ float4 b;
+ float2x2 c;
+};
+
int tint_div(int lhs, int rhs) {
return (lhs / select(rhs, 1, bool((rhs == 0) | bool((lhs == (-2147483647 - 1)) & (rhs == -1)))));
}
-void foo() {
- thread int tint_symbol = 0;
- thread float4 tint_symbol_1 = 0.0f;
- thread float2x2 tint_symbol_2 = float2x2(0.0f);
- tint_symbol = tint_div(tint_symbol, 2);
- tint_symbol_1 = (tint_symbol_1 * float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
- tint_symbol_2 = (tint_symbol_2 * 2.0f);
+void foo(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).a = tint_div((*(tint_private_vars)).a, 2);
+ (*(tint_private_vars)).b = ((*(tint_private_vars)).b * float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
+ (*(tint_private_vars)).c = ((*(tint_private_vars)).c * 2.0f);
}
diff --git a/test/tint/statements/decrement/complex.wgsl.expected.msl b/test/tint/statements/decrement/complex.wgsl.expected.msl
index c3930ad..6bb4088 100644
--- a/test/tint/statements/decrement/complex.wgsl.expected.msl
+++ b/test/tint/statements/decrement/complex.wgsl.expected.msl
@@ -14,61 +14,65 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ uint v;
+};
+
struct S {
/* 0x0000 */ tint_array<int4, 4> a;
};
-int idx1(thread uint* const tint_symbol_10) {
- *(tint_symbol_10) = (*(tint_symbol_10) - 1u);
+int idx1(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).v = ((*(tint_private_vars)).v - 1u);
return 1;
}
-int idx2(thread uint* const tint_symbol_11) {
- *(tint_symbol_11) = (*(tint_symbol_11) - 1u);
+int idx2(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).v = ((*(tint_private_vars)).v - 1u);
return 2;
}
-int idx3(thread uint* const tint_symbol_12) {
- *(tint_symbol_12) = (*(tint_symbol_12) - 1u);
+int idx3(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).v = ((*(tint_private_vars)).v - 1u);
return 3;
}
-int idx4(thread uint* const tint_symbol_13) {
- *(tint_symbol_13) = (*(tint_symbol_13) - 1u);
+int idx4(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).v = ((*(tint_private_vars)).v - 1u);
return 4;
}
-int idx5(thread uint* const tint_symbol_14) {
- *(tint_symbol_14) = (*(tint_symbol_14) - 1u);
+int idx5(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).v = ((*(tint_private_vars)).v - 1u);
return 0;
}
-int idx6(thread uint* const tint_symbol_15) {
- *(tint_symbol_15) = (*(tint_symbol_15) - 1u);
+int idx6(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).v = ((*(tint_private_vars)).v - 1u);
return 2;
}
-void tint_symbol_1(thread uint* const tint_symbol_16, device tint_array<S, 1>* const tint_symbol_17) {
+void tint_symbol_1(thread tint_private_vars_struct* const tint_private_vars, device tint_array<S, 1>* const tint_symbol_10) {
{
- int const tint_symbol_6 = idx1(tint_symbol_16);
- int const tint_symbol_7 = idx2(tint_symbol_16);
+ int const tint_symbol_6 = idx1(tint_private_vars);
+ int const tint_symbol_7 = idx2(tint_private_vars);
int const tint_symbol_2_save = tint_symbol_6;
int const tint_symbol_2_save_1 = tint_symbol_7;
- int const tint_symbol_3 = idx3(tint_symbol_16);
- (*(tint_symbol_17))[tint_symbol_2_save].a[tint_symbol_2_save_1][tint_symbol_3] = as_type<int>((as_type<uint>((*(tint_symbol_17))[tint_symbol_2_save].a[tint_symbol_2_save_1][tint_symbol_3]) - as_type<uint>(1)));
+ int const tint_symbol_3 = idx3(tint_private_vars);
+ (*(tint_symbol_10))[tint_symbol_2_save].a[tint_symbol_2_save_1][tint_symbol_3] = as_type<int>((as_type<uint>((*(tint_symbol_10))[tint_symbol_2_save].a[tint_symbol_2_save_1][tint_symbol_3]) - as_type<uint>(1)));
while (true) {
- if (!((*(tint_symbol_16) < 10u))) {
+ if (!(((*(tint_private_vars)).v < 10u))) {
break;
}
{
}
{
- int const tint_symbol_8 = idx4(tint_symbol_16);
- int const tint_symbol_9 = idx5(tint_symbol_16);
+ int const tint_symbol_8 = idx4(tint_private_vars);
+ int const tint_symbol_9 = idx5(tint_private_vars);
int const tint_symbol_4_save = tint_symbol_8;
int const tint_symbol_4_save_1 = tint_symbol_9;
- int const tint_symbol_5 = idx6(tint_symbol_16);
- (*(tint_symbol_17))[tint_symbol_4_save].a[tint_symbol_4_save_1][tint_symbol_5] = as_type<int>((as_type<uint>((*(tint_symbol_17))[tint_symbol_4_save].a[tint_symbol_4_save_1][tint_symbol_5]) - as_type<uint>(1)));
+ int const tint_symbol_5 = idx6(tint_private_vars);
+ (*(tint_symbol_10))[tint_symbol_4_save].a[tint_symbol_4_save_1][tint_symbol_5] = as_type<int>((as_type<uint>((*(tint_symbol_10))[tint_symbol_4_save].a[tint_symbol_4_save_1][tint_symbol_5]) - as_type<uint>(1)));
}
}
}
diff --git a/test/tint/statements/decrement/private.wgsl.expected.msl b/test/tint/statements/decrement/private.wgsl.expected.msl
index 2c42333..1ca42a2 100644
--- a/test/tint/statements/decrement/private.wgsl.expected.msl
+++ b/test/tint/statements/decrement/private.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void tint_symbol() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) - as_type<uint>(1)));
+struct tint_private_vars_struct {
+ int i;
+};
+
+void tint_symbol(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).i = as_type<int>((as_type<uint>((*(tint_private_vars)).i) - as_type<uint>(1)));
}
diff --git a/test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.msl b/test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.msl
index cfdeaaf..db17a1d 100644
--- a/test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.msl
+++ b/test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.msl
@@ -12,6 +12,10 @@
return {old_value, exchanged};
}
+struct tint_private_vars_struct {
+ bool tint_discarded;
+};
+
struct tint_symbol_2 {
int old_value;
bool exchanged;
@@ -21,12 +25,12 @@
int value [[color(0)]];
};
-int foo_inner(thread bool* const tint_symbol_4, device atomic_int* const tint_symbol_5) {
- *(tint_symbol_4) = true;
+int foo_inner(thread tint_private_vars_struct* const tint_private_vars, device atomic_int* const tint_symbol_4) {
+ (*(tint_private_vars)).tint_discarded = true;
int x = 0;
tint_symbol_2 tint_symbol_1 = {};
- if (!(*(tint_symbol_4))) {
- atomic_compare_exchange_resulti32 const tint_symbol_3 = atomicCompareExchangeWeak_1(tint_symbol_5, 0, 1);
+ if (!((*(tint_private_vars)).tint_discarded)) {
+ atomic_compare_exchange_resulti32 const tint_symbol_3 = atomicCompareExchangeWeak_1(tint_symbol_4, 0, 1);
tint_symbol_1.old_value = tint_symbol_3.old_value;
tint_symbol_1.exchanged = tint_symbol_3.exchanged;
}
@@ -37,12 +41,13 @@
return x;
}
-fragment tint_symbol foo(device atomic_int* tint_symbol_7 [[buffer(0)]]) {
- thread bool tint_symbol_6 = false;
- int const inner_result = foo_inner(&(tint_symbol_6), tint_symbol_7);
+fragment tint_symbol foo(device atomic_int* tint_symbol_5 [[buffer(0)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.tint_discarded = false;
+ int const inner_result = foo_inner(&(tint_private_vars), tint_symbol_5);
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
- if (tint_symbol_6) {
+ if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return wrapper_result;
diff --git a/test/tint/statements/discard/atomic_in_for_loop_continuing.wgsl.expected.msl b/test/tint/statements/discard/atomic_in_for_loop_continuing.wgsl.expected.msl
index 73ffeac..36b7539 100644
--- a/test/tint/statements/discard/atomic_in_for_loop_continuing.wgsl.expected.msl
+++ b/test/tint/statements/discard/atomic_in_for_loop_continuing.wgsl.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool tint_discarded;
+};
+
int tint_ftoi(float v) {
return select(2147483647, select(int(v), (-2147483647 - 1), (v < -2147483648.0f)), (v < 2147483520.0f));
}
@@ -14,11 +18,11 @@
int value [[color(0)]];
};
-int foo_inner(float in, float2 coord, thread bool* const tint_symbol_4, texture2d<float, access::sample> tint_symbol_5, sampler tint_symbol_6, device atomic_int* const tint_symbol_7) {
+int foo_inner(float in, float2 coord, thread tint_private_vars_struct* const tint_private_vars, texture2d<float, access::sample> tint_symbol_4, sampler tint_symbol_5, device atomic_int* const tint_symbol_6) {
if ((in == 0.0f)) {
- *(tint_symbol_4) = true;
+ (*(tint_private_vars)).tint_discarded = true;
}
- int result = tint_ftoi(tint_symbol_5.sample(tint_symbol_6, coord)[0]);
+ int result = tint_ftoi(tint_symbol_4.sample(tint_symbol_5, coord)[0]);
{
int i = 0;
while (true) {
@@ -30,8 +34,8 @@
}
{
int tint_symbol_3 = 0;
- if (!(*(tint_symbol_4))) {
- tint_symbol_3 = atomic_fetch_add_explicit(tint_symbol_7, 1, memory_order_relaxed);
+ if (!((*(tint_private_vars)).tint_discarded)) {
+ tint_symbol_3 = atomic_fetch_add_explicit(tint_symbol_6, 1, memory_order_relaxed);
}
i = tint_symbol_3;
}
@@ -40,12 +44,13 @@
return result;
}
-fragment tint_symbol_2 foo(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]], device atomic_int* tint_symbol_11 [[buffer(0)]], tint_symbol_1 tint_symbol [[stage_in]]) {
- thread bool tint_symbol_8 = false;
- int const inner_result = foo_inner(tint_symbol.in, tint_symbol.coord, &(tint_symbol_8), tint_symbol_9, tint_symbol_10, tint_symbol_11);
+fragment tint_symbol_2 foo(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]], device atomic_int* tint_symbol_9 [[buffer(0)]], tint_symbol_1 tint_symbol [[stage_in]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.tint_discarded = false;
+ int const inner_result = foo_inner(tint_symbol.in, tint_symbol.coord, &(tint_private_vars), tint_symbol_7, tint_symbol_8, tint_symbol_9);
tint_symbol_2 wrapper_result = {};
wrapper_result.value = inner_result;
- if (tint_symbol_8) {
+ if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return wrapper_result;
diff --git a/test/tint/statements/discard/helper_functions.wgsl.expected.msl b/test/tint/statements/discard/helper_functions.wgsl.expected.msl
index 57e769e..5fe7b84 100644
--- a/test/tint/statements/discard/helper_functions.wgsl.expected.msl
+++ b/test/tint/statements/discard/helper_functions.wgsl.expected.msl
@@ -1,23 +1,28 @@
#include <metal_stdlib>
using namespace metal;
-void foo(device int* const tint_symbol_1, thread bool* const tint_symbol_2) {
+struct tint_private_vars_struct {
+ bool tint_discarded;
+};
+
+void foo(thread tint_private_vars_struct* const tint_private_vars, device int* const tint_symbol_1) {
if ((*(tint_symbol_1) < 0)) {
- *(tint_symbol_2) = true;
+ (*(tint_private_vars)).tint_discarded = true;
}
}
-void bar(thread bool* const tint_symbol_3, device float* const tint_symbol_4) {
- if (!(*(tint_symbol_3))) {
- *(tint_symbol_4) = dfdx(1.0f);
+void bar(thread tint_private_vars_struct* const tint_private_vars, device float* const tint_symbol_2) {
+ if (!((*(tint_private_vars)).tint_discarded)) {
+ *(tint_symbol_2) = dfdx(1.0f);
}
}
-fragment void tint_symbol(device int* tint_symbol_5 [[buffer(0)]], device float* tint_symbol_7 [[buffer(1)]]) {
- thread bool tint_symbol_6 = false;
- foo(tint_symbol_5, &(tint_symbol_6));
- bar(&(tint_symbol_6), tint_symbol_7);
- if (tint_symbol_6) {
+fragment void tint_symbol(device int* tint_symbol_3 [[buffer(0)]], device float* tint_symbol_4 [[buffer(1)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.tint_discarded = false;
+ foo(&(tint_private_vars), tint_symbol_3);
+ bar(&(tint_private_vars), tint_symbol_4);
+ if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return;
diff --git a/test/tint/statements/discard/multiple_returns.wgsl.expected.msl b/test/tint/statements/discard/multiple_returns.wgsl.expected.msl
index 751016e..7bbefc8 100644
--- a/test/tint/statements/discard/multiple_returns.wgsl.expected.msl
+++ b/test/tint/statements/discard/multiple_returns.wgsl.expected.msl
@@ -1,22 +1,27 @@
#include <metal_stdlib>
using namespace metal;
-fragment void tint_symbol(device int* tint_symbol_1 [[buffer(0)]], device float* tint_symbol_3 [[buffer(1)]]) {
- thread bool tint_symbol_2 = false;
+struct tint_private_vars_struct {
+ bool tint_discarded;
+};
+
+fragment void tint_symbol(device int* tint_symbol_1 [[buffer(0)]], device float* tint_symbol_2 [[buffer(1)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.tint_discarded = false;
if ((*(tint_symbol_1) < 0)) {
- tint_symbol_2 = true;
+ tint_private_vars.tint_discarded = true;
}
- if (!(tint_symbol_2)) {
- *(tint_symbol_3) = dfdx(1.0f);
+ if (!(tint_private_vars.tint_discarded)) {
+ *(tint_symbol_2) = dfdx(1.0f);
}
- if ((*(tint_symbol_3) < 0.0f)) {
+ if ((*(tint_symbol_2) < 0.0f)) {
int i = 0;
while (true) {
- if ((*(tint_symbol_3) > float(i))) {
- if (!(tint_symbol_2)) {
- *(tint_symbol_3) = float(i);
+ if ((*(tint_symbol_2) > float(i))) {
+ if (!(tint_private_vars.tint_discarded)) {
+ *(tint_symbol_2) = float(i);
}
- if (tint_symbol_2) {
+ if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return;
@@ -26,12 +31,12 @@
if ((i == 5)) { break; }
}
}
- if (tint_symbol_2) {
+ if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return;
}
- if (tint_symbol_2) {
+ if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return;
diff --git a/test/tint/statements/discard/nested_return.wgsl.expected.msl b/test/tint/statements/discard/nested_return.wgsl.expected.msl
index eac069d..18a8700 100644
--- a/test/tint/statements/discard/nested_return.wgsl.expected.msl
+++ b/test/tint/statements/discard/nested_return.wgsl.expected.msl
@@ -1,14 +1,19 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool tint_discarded;
+};
+
fragment void tint_symbol(device int* tint_symbol_1 [[buffer(0)]]) {
- thread bool tint_symbol_2 = false;
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.tint_discarded = false;
if ((*(tint_symbol_1) < 0)) {
- tint_symbol_2 = true;
+ tint_private_vars.tint_discarded = true;
}
{
{
- if (tint_symbol_2) {
+ if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return;
diff --git a/test/tint/statements/discard/non_uniform.wgsl.expected.msl b/test/tint/statements/discard/non_uniform.wgsl.expected.msl
index 2ada21d..d069100 100644
--- a/test/tint/statements/discard/non_uniform.wgsl.expected.msl
+++ b/test/tint/statements/discard/non_uniform.wgsl.expected.msl
@@ -1,15 +1,20 @@
#include <metal_stdlib>
using namespace metal;
-fragment void tint_symbol(device int* tint_symbol_1 [[buffer(0)]], device float* tint_symbol_3 [[buffer(1)]]) {
- thread bool tint_symbol_2 = false;
+struct tint_private_vars_struct {
+ bool tint_discarded;
+};
+
+fragment void tint_symbol(device int* tint_symbol_1 [[buffer(0)]], device float* tint_symbol_2 [[buffer(1)]]) {
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.tint_discarded = false;
if ((*(tint_symbol_1) < 0)) {
- tint_symbol_2 = true;
+ tint_private_vars.tint_discarded = true;
}
- if (!(tint_symbol_2)) {
- *(tint_symbol_3) = dfdx(1.0f);
+ if (!(tint_private_vars.tint_discarded)) {
+ *(tint_symbol_2) = dfdx(1.0f);
}
- if (tint_symbol_2) {
+ if (tint_private_vars.tint_discarded) {
discard_fragment();
}
return;
diff --git a/test/tint/statements/increment/complex.wgsl.expected.msl b/test/tint/statements/increment/complex.wgsl.expected.msl
index 950b033..ab1347f 100644
--- a/test/tint/statements/increment/complex.wgsl.expected.msl
+++ b/test/tint/statements/increment/complex.wgsl.expected.msl
@@ -14,61 +14,65 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ uint v;
+};
+
struct S {
/* 0x0000 */ tint_array<int4, 4> a;
};
-int idx1(thread uint* const tint_symbol_10) {
- *(tint_symbol_10) = (*(tint_symbol_10) + 1u);
+int idx1(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).v = ((*(tint_private_vars)).v + 1u);
return 1;
}
-int idx2(thread uint* const tint_symbol_11) {
- *(tint_symbol_11) = (*(tint_symbol_11) + 1u);
+int idx2(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).v = ((*(tint_private_vars)).v + 1u);
return 2;
}
-int idx3(thread uint* const tint_symbol_12) {
- *(tint_symbol_12) = (*(tint_symbol_12) + 1u);
+int idx3(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).v = ((*(tint_private_vars)).v + 1u);
return 3;
}
-int idx4(thread uint* const tint_symbol_13) {
- *(tint_symbol_13) = (*(tint_symbol_13) + 1u);
+int idx4(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).v = ((*(tint_private_vars)).v + 1u);
return 4;
}
-int idx5(thread uint* const tint_symbol_14) {
- *(tint_symbol_14) = (*(tint_symbol_14) + 1u);
+int idx5(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).v = ((*(tint_private_vars)).v + 1u);
return 0;
}
-int idx6(thread uint* const tint_symbol_15) {
- *(tint_symbol_15) = (*(tint_symbol_15) + 1u);
+int idx6(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).v = ((*(tint_private_vars)).v + 1u);
return 2;
}
-void tint_symbol_1(thread uint* const tint_symbol_16, device tint_array<S, 1>* const tint_symbol_17) {
+void tint_symbol_1(thread tint_private_vars_struct* const tint_private_vars, device tint_array<S, 1>* const tint_symbol_10) {
{
- int const tint_symbol_6 = idx1(tint_symbol_16);
- int const tint_symbol_7 = idx2(tint_symbol_16);
+ int const tint_symbol_6 = idx1(tint_private_vars);
+ int const tint_symbol_7 = idx2(tint_private_vars);
int const tint_symbol_2_save = tint_symbol_6;
int const tint_symbol_2_save_1 = tint_symbol_7;
- int const tint_symbol_3 = idx3(tint_symbol_16);
- (*(tint_symbol_17))[tint_symbol_2_save].a[tint_symbol_2_save_1][tint_symbol_3] = as_type<int>((as_type<uint>((*(tint_symbol_17))[tint_symbol_2_save].a[tint_symbol_2_save_1][tint_symbol_3]) + as_type<uint>(1)));
+ int const tint_symbol_3 = idx3(tint_private_vars);
+ (*(tint_symbol_10))[tint_symbol_2_save].a[tint_symbol_2_save_1][tint_symbol_3] = as_type<int>((as_type<uint>((*(tint_symbol_10))[tint_symbol_2_save].a[tint_symbol_2_save_1][tint_symbol_3]) + as_type<uint>(1)));
while (true) {
- if (!((*(tint_symbol_16) < 10u))) {
+ if (!(((*(tint_private_vars)).v < 10u))) {
break;
}
{
}
{
- int const tint_symbol_8 = idx4(tint_symbol_16);
- int const tint_symbol_9 = idx5(tint_symbol_16);
+ int const tint_symbol_8 = idx4(tint_private_vars);
+ int const tint_symbol_9 = idx5(tint_private_vars);
int const tint_symbol_4_save = tint_symbol_8;
int const tint_symbol_4_save_1 = tint_symbol_9;
- int const tint_symbol_5 = idx6(tint_symbol_16);
- (*(tint_symbol_17))[tint_symbol_4_save].a[tint_symbol_4_save_1][tint_symbol_5] = as_type<int>((as_type<uint>((*(tint_symbol_17))[tint_symbol_4_save].a[tint_symbol_4_save_1][tint_symbol_5]) + as_type<uint>(1)));
+ int const tint_symbol_5 = idx6(tint_private_vars);
+ (*(tint_symbol_10))[tint_symbol_4_save].a[tint_symbol_4_save_1][tint_symbol_5] = as_type<int>((as_type<uint>((*(tint_symbol_10))[tint_symbol_4_save].a[tint_symbol_4_save_1][tint_symbol_5]) + as_type<uint>(1)));
}
}
}
diff --git a/test/tint/statements/increment/private.wgsl.expected.msl b/test/tint/statements/increment/private.wgsl.expected.msl
index 019bc09..ee2dbfe 100644
--- a/test/tint/statements/increment/private.wgsl.expected.msl
+++ b/test/tint/statements/increment/private.wgsl.expected.msl
@@ -1,8 +1,11 @@
#include <metal_stdlib>
using namespace metal;
-void tint_symbol() {
- thread int tint_symbol_1 = 0;
- tint_symbol_1 = as_type<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(1)));
+struct tint_private_vars_struct {
+ int i;
+};
+
+void tint_symbol(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).i = as_type<int>((as_type<uint>((*(tint_private_vars)).i) + as_type<uint>(1)));
}
diff --git a/test/tint/types/module_scope_var.wgsl.expected.msl b/test/tint/types/module_scope_var.wgsl.expected.msl
index fbdf1db..413aa06 100644
--- a/test/tint/types/module_scope_var.wgsl.expected.msl
+++ b/test/tint/types/module_scope_var.wgsl.expected.msl
@@ -18,29 +18,33 @@
float a;
};
+struct tint_private_vars_struct {
+ bool bool_var;
+ int i32_var;
+ uint u32_var;
+ float f32_var;
+ int2 v2i32_var;
+ uint3 v3u32_var;
+ float4 v4f32_var;
+ float2x3 m2x3_var;
+ tint_array<float, 4> arr_var;
+ S struct_var;
+};
+
kernel void tint_symbol() {
- thread bool tint_symbol_3 = false;
- thread int tint_symbol_4 = 0;
- thread uint tint_symbol_5 = 0u;
- thread float tint_symbol_6 = 0.0f;
- thread int2 tint_symbol_7 = 0;
- thread uint3 tint_symbol_8 = 0u;
- thread float4 tint_symbol_9 = 0.0f;
- thread float2x3 tint_symbol_10 = float2x3(0.0f);
- thread tint_array<float, 4> tint_symbol_11 = {};
- thread S tint_symbol_12 = {};
- tint_symbol_3 = false;
- tint_symbol_4 = 0;
- tint_symbol_5 = 0u;
- tint_symbol_6 = 0.0f;
- tint_symbol_7 = int2(0);
- tint_symbol_8 = uint3(0u);
- tint_symbol_9 = float4(0.0f);
- tint_symbol_10 = float2x3(float3(0.0f), float3(0.0f));
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.bool_var = false;
+ tint_private_vars.i32_var = 0;
+ tint_private_vars.u32_var = 0u;
+ tint_private_vars.f32_var = 0.0f;
+ tint_private_vars.v2i32_var = int2(0);
+ tint_private_vars.v3u32_var = uint3(0u);
+ tint_private_vars.v4f32_var = float4(0.0f);
+ tint_private_vars.m2x3_var = float2x3(float3(0.0f), float3(0.0f));
tint_array<float, 4> const tint_symbol_1 = tint_array<float, 4>{};
- tint_symbol_11 = tint_symbol_1;
+ tint_private_vars.arr_var = tint_symbol_1;
S const tint_symbol_2 = S{};
- tint_symbol_12 = tint_symbol_2;
+ tint_private_vars.struct_var = tint_symbol_2;
return;
}
diff --git a/test/tint/types/module_scope_var_conversions.wgsl.expected.msl b/test/tint/types/module_scope_var_conversions.wgsl.expected.msl
index 012737e..7f65608 100644
--- a/test/tint/types/module_scope_var_conversions.wgsl.expected.msl
+++ b/test/tint/types/module_scope_var_conversions.wgsl.expected.msl
@@ -1,47 +1,71 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ bool bool_var1;
+ bool bool_var2;
+ bool bool_var3;
+ int i32_var1;
+ int i32_var2;
+ int i32_var3;
+ uint u32_var1;
+ uint u32_var2;
+ uint u32_var3;
+ bool3 v3bool_var1;
+ bool3 v3bool_var2;
+ bool3 v3bool_var3;
+ int3 v3i32_var1;
+ int3 v3i32_var2;
+ int3 v3i32_var3;
+ uint3 v3u32_var1;
+ uint3 v3u32_var2;
+ uint3 v3u32_var3;
+ bool3 v3bool_var4;
+ bool4 v4bool_var5;
+};
+
kernel void tint_symbol() {
- thread bool tint_symbol_1 = true;
- thread bool tint_symbol_2 = true;
- thread bool tint_symbol_3 = true;
- thread int tint_symbol_4 = 1;
- thread int tint_symbol_5 = 1;
- thread int tint_symbol_6 = 1;
- thread uint tint_symbol_7 = 1u;
- thread uint tint_symbol_8 = 1u;
- thread uint tint_symbol_9 = 1u;
- thread bool3 tint_symbol_10 = bool3(true);
- thread bool3 tint_symbol_11 = bool3(true);
- thread bool3 tint_symbol_12 = bool3(true);
- thread bool3 tint_symbol_13 = bool3(true);
- thread bool4 tint_symbol_14 = bool4(true, false, true, false);
- thread int3 tint_symbol_15 = int3(1);
- thread int3 tint_symbol_16 = int3(1);
- thread int3 tint_symbol_17 = int3(1);
- thread uint3 tint_symbol_18 = uint3(1u);
- thread uint3 tint_symbol_19 = uint3(1u);
- thread uint3 tint_symbol_20 = uint3(1u);
- tint_symbol_1 = false;
- tint_symbol_2 = false;
- tint_symbol_3 = false;
- tint_symbol_4 = 0;
- tint_symbol_5 = 0;
- tint_symbol_6 = 0;
- tint_symbol_7 = 0u;
- tint_symbol_8 = 0u;
- tint_symbol_9 = 0u;
- tint_symbol_10 = bool3(false);
- tint_symbol_11 = bool3(false);
- tint_symbol_12 = bool3(false);
- tint_symbol_13 = bool3(false);
- tint_symbol_14 = bool4(false);
- tint_symbol_15 = int3(0);
- tint_symbol_16 = int3(0);
- tint_symbol_17 = int3(0);
- tint_symbol_18 = uint3(0u);
- tint_symbol_19 = uint3(0u);
- tint_symbol_20 = uint3(0u);
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.bool_var1 = true;
+ tint_private_vars.bool_var2 = true;
+ tint_private_vars.bool_var3 = true;
+ tint_private_vars.i32_var1 = 1;
+ tint_private_vars.i32_var2 = 1;
+ tint_private_vars.i32_var3 = 1;
+ tint_private_vars.u32_var1 = 1u;
+ tint_private_vars.u32_var2 = 1u;
+ tint_private_vars.u32_var3 = 1u;
+ tint_private_vars.v3bool_var1 = bool3(true);
+ tint_private_vars.v3bool_var2 = bool3(true);
+ tint_private_vars.v3bool_var3 = bool3(true);
+ tint_private_vars.v3i32_var1 = int3(1);
+ tint_private_vars.v3i32_var2 = int3(1);
+ tint_private_vars.v3i32_var3 = int3(1);
+ tint_private_vars.v3u32_var1 = uint3(1u);
+ tint_private_vars.v3u32_var2 = uint3(1u);
+ tint_private_vars.v3u32_var3 = uint3(1u);
+ tint_private_vars.v3bool_var4 = bool3(true);
+ tint_private_vars.v4bool_var5 = bool4(true, false, true, false);
+ tint_private_vars.bool_var1 = false;
+ tint_private_vars.bool_var2 = false;
+ tint_private_vars.bool_var3 = false;
+ tint_private_vars.i32_var1 = 0;
+ tint_private_vars.i32_var2 = 0;
+ tint_private_vars.i32_var3 = 0;
+ tint_private_vars.u32_var1 = 0u;
+ tint_private_vars.u32_var2 = 0u;
+ tint_private_vars.u32_var3 = 0u;
+ tint_private_vars.v3bool_var1 = bool3(false);
+ tint_private_vars.v3bool_var2 = bool3(false);
+ tint_private_vars.v3bool_var3 = bool3(false);
+ tint_private_vars.v3bool_var4 = bool3(false);
+ tint_private_vars.v4bool_var5 = bool4(false);
+ tint_private_vars.v3i32_var1 = int3(0);
+ tint_private_vars.v3i32_var2 = int3(0);
+ tint_private_vars.v3i32_var3 = int3(0);
+ tint_private_vars.v3u32_var1 = uint3(0u);
+ tint_private_vars.v3u32_var2 = uint3(0u);
+ tint_private_vars.v3u32_var3 = uint3(0u);
return;
}
diff --git a/test/tint/types/module_scope_var_initializers.wgsl.expected.msl b/test/tint/types/module_scope_var_initializers.wgsl.expected.msl
index f21fcf3..71b2857 100644
--- a/test/tint/types/module_scope_var_initializers.wgsl.expected.msl
+++ b/test/tint/types/module_scope_var_initializers.wgsl.expected.msl
@@ -18,29 +18,43 @@
float a;
};
+struct tint_private_vars_struct {
+ bool bool_var;
+ int i32_var;
+ uint u32_var;
+ float f32_var;
+ int2 v2i32_var;
+ uint3 v3u32_var;
+ float4 v4f32_var;
+ float2x3 m2x3_var;
+ tint_array<float, 4> arr_var;
+ S struct_var;
+};
+
kernel void tint_symbol() {
- thread bool tint_symbol_3 = false;
- thread int tint_symbol_4 = 0;
- thread uint tint_symbol_5 = 0u;
- thread float tint_symbol_6 = 0.0f;
- thread int2 tint_symbol_7 = int2(0);
- thread uint3 tint_symbol_8 = uint3(0u);
- thread float4 tint_symbol_9 = float4(0.0f);
- thread float2x3 tint_symbol_10 = float2x3(float3(0.0f), float3(0.0f));
- thread tint_array<float, 4> tint_symbol_11 = tint_array<float, 4>{};
- thread S tint_symbol_12 = S{};
- tint_symbol_3 = false;
- tint_symbol_4 = 0;
- tint_symbol_5 = 0u;
- tint_symbol_6 = 0.0f;
- tint_symbol_7 = int2(0);
- tint_symbol_8 = uint3(0u);
- tint_symbol_9 = float4(0.0f);
- tint_symbol_10 = float2x3(float3(0.0f), float3(0.0f));
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.bool_var = false;
+ tint_private_vars.i32_var = 0;
+ tint_private_vars.u32_var = 0u;
+ tint_private_vars.f32_var = 0.0f;
+ tint_private_vars.v2i32_var = int2(0);
+ tint_private_vars.v3u32_var = uint3(0u);
+ tint_private_vars.v4f32_var = float4(0.0f);
+ tint_private_vars.m2x3_var = float2x3(float3(0.0f), float3(0.0f));
+ tint_private_vars.arr_var = tint_array<float, 4>{};
+ tint_private_vars.struct_var = S{};
+ tint_private_vars.bool_var = false;
+ tint_private_vars.i32_var = 0;
+ tint_private_vars.u32_var = 0u;
+ tint_private_vars.f32_var = 0.0f;
+ tint_private_vars.v2i32_var = int2(0);
+ tint_private_vars.v3u32_var = uint3(0u);
+ tint_private_vars.v4f32_var = float4(0.0f);
+ tint_private_vars.m2x3_var = float2x3(float3(0.0f), float3(0.0f));
tint_array<float, 4> const tint_symbol_1 = tint_array<float, 4>{};
- tint_symbol_11 = tint_symbol_1;
+ tint_private_vars.arr_var = tint_symbol_1;
S const tint_symbol_2 = S{};
- tint_symbol_12 = tint_symbol_2;
+ tint_private_vars.struct_var = tint_symbol_2;
return;
}
diff --git a/test/tint/var/inferred/global.wgsl.expected.msl b/test/tint/var/inferred/global.wgsl.expected.msl
index 7213119..df36244 100644
--- a/test/tint/var/inferred/global.wgsl.expected.msl
+++ b/test/tint/var/inferred/global.wgsl.expected.msl
@@ -18,39 +18,59 @@
float f1;
};
+struct tint_private_vars_struct {
+ int v1;
+ uint v2;
+ float v3;
+ int3 v4;
+ uint3 v5;
+ float3 v6;
+ MyStruct v7;
+ tint_array<float, 10> v8;
+ int v9;
+ uint v10;
+ float v11;
+ MyStruct v12;
+ MyStruct v13;
+ tint_array<float, 10> v14;
+ int3 v15;
+ float3 v16;
+};
+
kernel void f() {
- thread int tint_symbol = 1;
- thread uint tint_symbol_1 = 1u;
- thread float tint_symbol_2 = 1.0f;
- thread int3 tint_symbol_3 = int3(1);
- thread uint3 tint_symbol_4 = uint3(1u, 2u, 3u);
- thread float3 tint_symbol_5 = float3(1.0f, 2.0f, 3.0f);
- thread MyStruct tint_symbol_6 = MyStruct{.f1=1.0f};
- thread tint_array<float, 10> tint_symbol_7 = tint_array<float, 10>{};
- thread int tint_symbol_8 = 0;
- thread uint tint_symbol_9 = 0u;
- thread float tint_symbol_10 = 0.0f;
- thread MyStruct tint_symbol_11 = MyStruct{};
- thread MyStruct tint_symbol_12 = MyStruct{};
- thread tint_array<float, 10> tint_symbol_13 = tint_array<float, 10>{};
- thread int3 tint_symbol_14 = int3(1, 2, 3);
- thread float3 tint_symbol_15 = float3(1.0f, 2.0f, 3.0f);
- int const l1 = tint_symbol;
- uint const l2 = tint_symbol_1;
- float const l3 = tint_symbol_2;
- int3 const l4 = tint_symbol_3;
- uint3 const l5 = tint_symbol_4;
- float3 const l6 = tint_symbol_5;
- MyStruct const l7 = tint_symbol_6;
- tint_array<float, 10> const l8 = tint_symbol_7;
- int const l9 = tint_symbol_8;
- uint const l10 = tint_symbol_9;
- float const l11 = tint_symbol_10;
- MyStruct const l12 = tint_symbol_11;
- MyStruct const l13 = tint_symbol_12;
- tint_array<float, 10> const l14 = tint_symbol_13;
- int3 const l15 = tint_symbol_14;
- float3 const l16 = tint_symbol_15;
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.v1 = 1;
+ tint_private_vars.v2 = 1u;
+ tint_private_vars.v3 = 1.0f;
+ tint_private_vars.v4 = int3(1);
+ tint_private_vars.v5 = uint3(1u, 2u, 3u);
+ tint_private_vars.v6 = float3(1.0f, 2.0f, 3.0f);
+ tint_private_vars.v7 = MyStruct{.f1=1.0f};
+ tint_private_vars.v8 = tint_array<float, 10>{};
+ tint_private_vars.v9 = 0;
+ tint_private_vars.v10 = 0u;
+ tint_private_vars.v11 = 0.0f;
+ tint_private_vars.v12 = MyStruct{};
+ tint_private_vars.v13 = MyStruct{};
+ tint_private_vars.v14 = tint_array<float, 10>{};
+ tint_private_vars.v15 = int3(1, 2, 3);
+ tint_private_vars.v16 = float3(1.0f, 2.0f, 3.0f);
+ int const l1 = tint_private_vars.v1;
+ uint const l2 = tint_private_vars.v2;
+ float const l3 = tint_private_vars.v3;
+ int3 const l4 = tint_private_vars.v4;
+ uint3 const l5 = tint_private_vars.v5;
+ float3 const l6 = tint_private_vars.v6;
+ MyStruct const l7 = tint_private_vars.v7;
+ tint_array<float, 10> const l8 = tint_private_vars.v8;
+ int const l9 = tint_private_vars.v9;
+ uint const l10 = tint_private_vars.v10;
+ float const l11 = tint_private_vars.v11;
+ MyStruct const l12 = tint_private_vars.v12;
+ MyStruct const l13 = tint_private_vars.v13;
+ tint_array<float, 10> const l14 = tint_private_vars.v14;
+ int3 const l15 = tint_private_vars.v15;
+ float3 const l16 = tint_private_vars.v16;
return;
}
diff --git a/test/tint/var/initialization/private/array/array_i32.wgsl.expected.msl b/test/tint/var/initialization/private/array/array_i32.wgsl.expected.msl
index 33ba833..7ac53d8 100644
--- a/test/tint/var/initialization/private/array/array_i32.wgsl.expected.msl
+++ b/test/tint/var/initialization/private/array/array_i32.wgsl.expected.msl
@@ -14,11 +14,16 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ tint_array<tint_array<int, 3>, 2> zero;
+ tint_array<tint_array<int, 3>, 2> init;
+};
+
kernel void tint_symbol() {
- thread tint_array<tint_array<int, 3>, 2> tint_symbol_1 = {};
- thread tint_array<tint_array<int, 3>, 2> tint_symbol_2 = tint_array<tint_array<int, 3>, 2>{tint_array<int, 3>{1, 2, 3}, tint_array<int, 3>{4, 5, 6}};
- tint_array<tint_array<int, 3>, 2> v0 = tint_symbol_1;
- tint_array<tint_array<int, 3>, 2> v1 = tint_symbol_2;
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.init = tint_array<tint_array<int, 3>, 2>{tint_array<int, 3>{1, 2, 3}, tint_array<int, 3>{4, 5, 6}};
+ tint_array<tint_array<int, 3>, 2> v0 = tint_private_vars.zero;
+ tint_array<tint_array<int, 3>, 2> v1 = tint_private_vars.init;
return;
}
diff --git a/test/tint/var/initialization/private/array/i32.wgsl.expected.msl b/test/tint/var/initialization/private/array/i32.wgsl.expected.msl
index 60dac04..77e713c 100644
--- a/test/tint/var/initialization/private/array/i32.wgsl.expected.msl
+++ b/test/tint/var/initialization/private/array/i32.wgsl.expected.msl
@@ -14,11 +14,16 @@
T elements[N];
};
+struct tint_private_vars_struct {
+ tint_array<int, 3> zero;
+ tint_array<int, 3> init;
+};
+
kernel void tint_symbol() {
- thread tint_array<int, 3> tint_symbol_1 = {};
- thread tint_array<int, 3> tint_symbol_2 = tint_array<int, 3>{1, 2, 3};
- tint_array<int, 3> v0 = tint_symbol_1;
- tint_array<int, 3> v1 = tint_symbol_2;
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.init = tint_array<int, 3>{1, 2, 3};
+ tint_array<int, 3> v0 = tint_private_vars.zero;
+ tint_array<int, 3> v1 = tint_private_vars.init;
return;
}
diff --git a/test/tint/var/initialization/private/matrix.wgsl.expected.msl b/test/tint/var/initialization/private/matrix.wgsl.expected.msl
index 09c45a0..0bfef77 100644
--- a/test/tint/var/initialization/private/matrix.wgsl.expected.msl
+++ b/test/tint/var/initialization/private/matrix.wgsl.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ float2x3 v;
+};
+
kernel void tint_symbol() {
return;
}
diff --git a/test/tint/var/initialization/private/scalar.wgsl.expected.msl b/test/tint/var/initialization/private/scalar.wgsl.expected.msl
index 09c45a0..fd57a42 100644
--- a/test/tint/var/initialization/private/scalar.wgsl.expected.msl
+++ b/test/tint/var/initialization/private/scalar.wgsl.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int v;
+};
+
kernel void tint_symbol() {
return;
}
diff --git a/test/tint/var/initialization/private/struct.wgsl.expected.msl b/test/tint/var/initialization/private/struct.wgsl.expected.msl
index 5534eee..d5b00c7 100644
--- a/test/tint/var/initialization/private/struct.wgsl.expected.msl
+++ b/test/tint/var/initialization/private/struct.wgsl.expected.msl
@@ -6,6 +6,10 @@
float b;
};
+struct tint_private_vars_struct {
+ S v;
+};
+
kernel void tint_symbol() {
return;
}
diff --git a/test/tint/var/initialization/private/vector.wgsl.expected.msl b/test/tint/var/initialization/private/vector.wgsl.expected.msl
index 09c45a0..cab5132 100644
--- a/test/tint/var/initialization/private/vector.wgsl.expected.msl
+++ b/test/tint/var/initialization/private/vector.wgsl.expected.msl
@@ -1,6 +1,10 @@
#include <metal_stdlib>
using namespace metal;
+struct tint_private_vars_struct {
+ int3 v;
+};
+
kernel void tint_symbol() {
return;
}
diff --git a/test/tint/var/uses/private.wgsl.expected.msl b/test/tint/var/uses/private.wgsl.expected.msl
index d5f572f..a83b2a7 100644
--- a/test/tint/var/uses/private.wgsl.expected.msl
+++ b/test/tint/var/uses/private.wgsl.expected.msl
@@ -1,47 +1,52 @@
#include <metal_stdlib>
using namespace metal;
-void uses_a(thread int* const tint_symbol) {
- *(tint_symbol) = as_type<int>((as_type<uint>(*(tint_symbol)) + as_type<uint>(1)));
+struct tint_private_vars_struct {
+ int a;
+ int b;
+ int c;
+};
+
+void uses_a(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).a = as_type<int>((as_type<uint>((*(tint_private_vars)).a) + as_type<uint>(1)));
}
-void uses_b(thread int* const tint_symbol_1) {
- *(tint_symbol_1) = as_type<int>((as_type<uint>(*(tint_symbol_1)) * as_type<uint>(2)));
+void uses_b(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).b = as_type<int>((as_type<uint>((*(tint_private_vars)).b) * as_type<uint>(2)));
}
-void uses_a_and_b(thread int* const tint_symbol_2, thread int* const tint_symbol_3) {
- *(tint_symbol_2) = *(tint_symbol_3);
+void uses_a_and_b(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).b = (*(tint_private_vars)).a;
}
void no_uses() {
}
-void outer(thread int* const tint_symbol_4, thread int* const tint_symbol_5) {
- *(tint_symbol_4) = 0;
- uses_a(tint_symbol_4);
- uses_a_and_b(tint_symbol_5, tint_symbol_4);
- uses_b(tint_symbol_5);
+void outer(thread tint_private_vars_struct* const tint_private_vars) {
+ (*(tint_private_vars)).a = 0;
+ uses_a(tint_private_vars);
+ uses_a_and_b(tint_private_vars);
+ uses_b(tint_private_vars);
no_uses();
}
kernel void main1() {
- thread int tint_symbol_6 = 0;
- tint_symbol_6 = 42;
- uses_a(&(tint_symbol_6));
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.a = 42;
+ uses_a(&(tint_private_vars));
return;
}
kernel void main2() {
- thread int tint_symbol_7 = 0;
- tint_symbol_7 = 7;
- uses_b(&(tint_symbol_7));
+ thread tint_private_vars_struct tint_private_vars = {};
+ tint_private_vars.b = 7;
+ uses_b(&(tint_private_vars));
return;
}
kernel void main3() {
- thread int tint_symbol_8 = 0;
- thread int tint_symbol_9 = 0;
- outer(&(tint_symbol_8), &(tint_symbol_9));
+ thread tint_private_vars_struct tint_private_vars = {};
+ outer(&(tint_private_vars));
no_uses();
return;
}