tint/transform: Inline HLSL uniform / storage buffers
Change the DecomposeMemoryAccess to behave more like the DirectVariableAccess transform, in that it'll inline the access of buffer variable into the load / store helper functions, instead of passing the array down.
This avoids large array copies observed with FXC, which can have *severe* performance costs.
Fixed: tint:1819
Change-Id: I52eb3f908813f72ab9da446743e24a2637158309
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121460
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: James Price <jrprice@google.com>
diff --git a/src/tint/transform/decompose_memory_access.cc b/src/tint/transform/decompose_memory_access.cc
index b3c2292..28ecebd 100644
--- a/src/tint/transform/decompose_memory_access.cc
+++ b/src/tint/transform/decompose_memory_access.cc
@@ -108,33 +108,29 @@
/// LoadStoreKey is the unordered map key to a load or store intrinsic.
struct LoadStoreKey {
- builtin::AddressSpace const address_space; // buffer address space
- builtin::Access const access; // buffer access
- type::Type const* buf_ty = nullptr; // buffer type
- type::Type const* el_ty = nullptr; // element type
+ type::Type const* el_ty = nullptr; // element type
+ Symbol const buffer; // buffer name
bool operator==(const LoadStoreKey& rhs) const {
- return address_space == rhs.address_space && access == rhs.access && buf_ty == rhs.buf_ty &&
- el_ty == rhs.el_ty;
+ return el_ty == rhs.el_ty && buffer == rhs.buffer;
}
struct Hasher {
inline std::size_t operator()(const LoadStoreKey& u) const {
- return utils::Hash(u.address_space, u.access, u.buf_ty, u.el_ty);
+ return utils::Hash(u.el_ty, u.buffer);
}
};
};
/// AtomicKey is the unordered map key to an atomic intrinsic.
struct AtomicKey {
- builtin::Access const access; // buffer access
- type::Type const* buf_ty = nullptr; // buffer type
- type::Type const* el_ty = nullptr; // element type
- sem::BuiltinType const op; // atomic op
+ type::Type const* el_ty = nullptr; // element type
+ sem::BuiltinType const op; // atomic op
+ Symbol const buffer; // buffer name
bool operator==(const AtomicKey& rhs) const {
- return access == rhs.access && buf_ty == rhs.buf_ty && el_ty == rhs.el_ty && op == rhs.op;
+ return el_ty == rhs.el_ty && op == rhs.op && buffer == rhs.buffer;
}
struct Hasher {
inline std::size_t operator()(const AtomicKey& u) const {
- return utils::Hash(u.access, u.buf_ty, u.el_ty, u.op);
+ return utils::Hash(u.el_ty, u.op, u.buffer);
}
};
};
@@ -219,39 +215,41 @@
return false;
}
-/// @returns a DecomposeMemoryAccess::Intrinsic attribute that can be applied
-/// to a stub function to load the type `ty`.
+/// @returns a DecomposeMemoryAccess::Intrinsic attribute that can be applied to a stub function to
+/// load the type @p ty from the uniform or storage buffer with name @p buffer.
DecomposeMemoryAccess::Intrinsic* IntrinsicLoadFor(ProgramBuilder* builder,
+ const type::Type* ty,
builtin::AddressSpace address_space,
- const type::Type* ty) {
+ const Symbol& buffer) {
DecomposeMemoryAccess::Intrinsic::DataType type;
if (!IntrinsicDataTypeFor(ty, type)) {
return nullptr;
}
return builder->ASTNodes().Create<DecomposeMemoryAccess::Intrinsic>(
- builder->ID(), builder->AllocateNodeID(), DecomposeMemoryAccess::Intrinsic::Op::kLoad,
- address_space, type);
+ builder->ID(), builder->AllocateNodeID(), DecomposeMemoryAccess::Intrinsic::Op::kLoad, type,
+ address_space, buffer);
}
-/// @returns a DecomposeMemoryAccess::Intrinsic attribute that can be applied
-/// to a stub function to store the type `ty`.
+/// @returns a DecomposeMemoryAccess::Intrinsic attribute that can be applied to a stub function to
+/// store the type @p ty to the storage buffer with name @p buffer.
DecomposeMemoryAccess::Intrinsic* IntrinsicStoreFor(ProgramBuilder* builder,
- builtin::AddressSpace address_space,
- const type::Type* ty) {
+ const type::Type* ty,
+ const Symbol& buffer) {
DecomposeMemoryAccess::Intrinsic::DataType type;
if (!IntrinsicDataTypeFor(ty, type)) {
return nullptr;
}
return builder->ASTNodes().Create<DecomposeMemoryAccess::Intrinsic>(
builder->ID(), builder->AllocateNodeID(), DecomposeMemoryAccess::Intrinsic::Op::kStore,
- address_space, type);
+ type, builtin::AddressSpace::kStorage, buffer);
}
-/// @returns a DecomposeMemoryAccess::Intrinsic attribute that can be applied
-/// to a stub function for the atomic op and the type `ty`.
+/// @returns a DecomposeMemoryAccess::Intrinsic attribute that can be applied to a stub function for
+/// the atomic op and the type @p ty.
DecomposeMemoryAccess::Intrinsic* IntrinsicAtomicFor(ProgramBuilder* builder,
sem::BuiltinType ity,
- const type::Type* ty) {
+ const type::Type* ty,
+ const Symbol& buffer) {
auto op = DecomposeMemoryAccess::Intrinsic::Op::kAtomicLoad;
switch (ity) {
case sem::BuiltinType::kAtomicLoad:
@@ -299,15 +297,16 @@
return nullptr;
}
return builder->ASTNodes().Create<DecomposeMemoryAccess::Intrinsic>(
- builder->ID(), builder->AllocateNodeID(), op, builtin::AddressSpace::kStorage, type);
+ builder->ID(), builder->AllocateNodeID(), op, type, builtin::AddressSpace::kStorage,
+ buffer);
}
/// BufferAccess describes a single storage or uniform buffer access
struct BufferAccess {
- sem::ValueExpression const* var = nullptr; // Storage buffer variable
- Offset const* offset = nullptr; // The byte offset on var
- type::Type const* type = nullptr; // The type of the access
- operator bool() const { return var; } // Returns true if valid
+ sem::GlobalVariable const* var = nullptr; // Storage or uniform buffer variable
+ Offset const* offset = nullptr; // The byte offset on var
+ type::Type const* type = nullptr; // The type of the access
+ operator bool() const { return var; } // Returns true if valid
};
/// Store describes a single storage or uniform buffer write
@@ -452,238 +451,194 @@
return access;
}
- /// LoadFunc() returns a symbol to an intrinsic function that loads an element of type `el_ty`
- /// from a storage or uniform buffer of type `buf_ty`.
+ /// LoadFunc() returns a symbol to an intrinsic function that loads an element of type @p el_ty
+ /// from a storage or uniform buffer with name @p buffer.
/// The emitted function has the signature:
- /// `fn load(buf : ptr<SC, buf_ty, A>, offset : u32) -> el_ty`
- /// @param buf_ty the storage or uniform buffer type
+ /// `fn load(offset : u32) -> el_ty`
/// @param el_ty the storage or uniform buffer element type
- /// @param var_user the variable user
+ /// @param address_space either kUniform or kStorage
+ /// @param buffer the symbol of the storage or uniform buffer variable, owned by the target
+ /// ProgramBuilder.
/// @return the name of the function that performs the load
- Symbol LoadFunc(const type::Type* buf_ty,
- const type::Type* el_ty,
- const sem::VariableUser* var_user) {
- auto address_space = var_user->Variable()->AddressSpace();
- auto access = var_user->Variable()->Access();
- if (address_space != builtin::AddressSpace::kStorage) {
- access = builtin::Access::kUndefined;
- }
- return utils::GetOrCreate(
- load_funcs, LoadStoreKey{address_space, access, buf_ty, el_ty}, [&] {
- utils::Vector params{
- b.Param("buffer",
- b.ty.pointer(CreateASTTypeFor(ctx, buf_ty), address_space, access),
- utils::Vector{b.Disable(ast::DisabledValidation::kFunctionParameter)}),
- b.Param("offset", b.ty.u32()),
- };
+ Symbol LoadFunc(const type::Type* el_ty,
+ builtin::AddressSpace address_space,
+ const Symbol& buffer) {
+ return utils::GetOrCreate(load_funcs, LoadStoreKey{el_ty, buffer}, [&] {
+ utils::Vector params{b.Param("offset", b.ty.u32())};
- auto name = b.Sym();
+ auto name = b.Symbols().New(ctx.dst->Symbols().NameFor(buffer) + "_load");
- if (auto* intrinsic = IntrinsicLoadFor(ctx.dst, address_space, el_ty)) {
- auto el_ast_ty = CreateASTTypeFor(ctx, el_ty);
- b.Func(name, params, el_ast_ty, nullptr,
- utils::Vector{
- intrinsic,
- b.Disable(ast::DisabledValidation::kFunctionHasNoBody),
- });
- } else if (auto* arr_ty = el_ty->As<type::Array>()) {
- // fn load_func(buffer : buf_ty, offset : u32) -> array<T, N> {
- // var arr : array<T, N>;
- // for (var i = 0u; i < array_count; i = i + 1) {
- // arr[i] = el_load_func(buffer, offset + i * array_stride)
- // }
- // return arr;
- // }
- auto load = LoadFunc(buf_ty, arr_ty->ElemType()->UnwrapRef(), var_user);
- auto* arr = b.Var(b.Symbols().New("arr"), CreateASTTypeFor(ctx, arr_ty));
- auto* i = b.Var(b.Symbols().New("i"), b.Expr(0_u));
- auto* for_init = b.Decl(i);
- auto arr_cnt = arr_ty->ConstantCount();
- if (TINT_UNLIKELY(!arr_cnt)) {
- // Non-constant counts should not be possible:
- // * Override-expression counts can only be applied to workgroup arrays, and
- // this method only handles storage and uniform.
- // * Runtime-sized arrays are not loadable.
- TINT_ICE(Transform, b.Diagnostics())
- << "unexpected non-constant array count";
- arr_cnt = 1;
+ if (auto* intrinsic = IntrinsicLoadFor(ctx.dst, el_ty, address_space, buffer)) {
+ auto el_ast_ty = CreateASTTypeFor(ctx, el_ty);
+ b.Func(name, params, el_ast_ty, nullptr,
+ utils::Vector{
+ intrinsic,
+ b.Disable(ast::DisabledValidation::kFunctionHasNoBody),
+ });
+ } else if (auto* arr_ty = el_ty->As<type::Array>()) {
+ // fn load_func(buffer : buf_ty, offset : u32) -> array<T, N> {
+ // var arr : array<T, N>;
+ // for (var i = 0u; i < array_count; i = i + 1) {
+ // arr[i] = el_load_func(buffer, offset + i * array_stride)
+ // }
+ // return arr;
+ // }
+ auto load = LoadFunc(arr_ty->ElemType()->UnwrapRef(), address_space, buffer);
+ auto* arr = b.Var(b.Symbols().New("arr"), CreateASTTypeFor(ctx, arr_ty));
+ auto* i = b.Var(b.Symbols().New("i"), b.Expr(0_u));
+ auto* for_init = b.Decl(i);
+ auto arr_cnt = arr_ty->ConstantCount();
+ if (TINT_UNLIKELY(!arr_cnt)) {
+ // Non-constant counts should not be possible:
+ // * Override-expression counts can only be applied to workgroup arrays, and
+ // this method only handles storage and uniform.
+ // * Runtime-sized arrays are not loadable.
+ TINT_ICE(Transform, b.Diagnostics()) << "unexpected non-constant array count";
+ arr_cnt = 1;
+ }
+ auto* for_cond = b.create<ast::BinaryExpression>(
+ ast::BinaryOp::kLessThan, b.Expr(i), b.Expr(u32(arr_cnt.value())));
+ auto* for_cont = b.Assign(i, b.Add(i, 1_u));
+ auto* arr_el = b.IndexAccessor(arr, i);
+ auto* el_offset = b.Add(b.Expr("offset"), b.Mul(i, u32(arr_ty->Stride())));
+ auto* el_val = b.Call(load, el_offset);
+ auto* for_loop =
+ b.For(for_init, for_cond, for_cont, b.Block(b.Assign(arr_el, el_val)));
+
+ b.Func(name, params, CreateASTTypeFor(ctx, arr_ty),
+ utils::Vector{
+ b.Decl(arr),
+ for_loop,
+ b.Return(arr),
+ });
+ } else {
+ utils::Vector<const ast::Expression*, 8> values;
+ if (auto* mat_ty = el_ty->As<type::Matrix>()) {
+ auto* vec_ty = mat_ty->ColumnType();
+ Symbol load = LoadFunc(vec_ty, address_space, buffer);
+ for (uint32_t i = 0; i < mat_ty->columns(); i++) {
+ auto* offset = b.Add("offset", u32(i * mat_ty->ColumnStride()));
+ values.Push(b.Call(load, offset));
}
- auto* for_cond = b.create<ast::BinaryExpression>(
- ast::BinaryOp::kLessThan, b.Expr(i), b.Expr(u32(arr_cnt.value())));
- auto* for_cont = b.Assign(i, b.Add(i, 1_u));
- auto* arr_el = b.IndexAccessor(arr, i);
- auto* el_offset = b.Add(b.Expr("offset"), b.Mul(i, u32(arr_ty->Stride())));
- auto* el_val = b.Call(load, "buffer", el_offset);
- auto* for_loop =
- b.For(for_init, for_cond, for_cont, b.Block(b.Assign(arr_el, el_val)));
+ } else if (auto* str = el_ty->As<sem::Struct>()) {
+ for (auto* member : str->Members()) {
+ auto* offset = b.Add("offset", u32(member->Offset()));
+ Symbol load = LoadFunc(member->Type()->UnwrapRef(), address_space, buffer);
+ values.Push(b.Call(load, offset));
+ }
+ }
+ b.Func(name, params, CreateASTTypeFor(ctx, el_ty),
+ utils::Vector{
+ b.Return(b.Call(CreateASTTypeFor(ctx, el_ty), values)),
+ });
+ }
+ return name;
+ });
+ }
- b.Func(name, params, CreateASTTypeFor(ctx, arr_ty),
- utils::Vector{
- b.Decl(arr),
- for_loop,
- b.Return(arr),
- });
- } else {
- utils::Vector<const ast::Expression*, 8> values;
- if (auto* mat_ty = el_ty->As<type::Matrix>()) {
+ /// StoreFunc() returns a symbol to an intrinsic function that stores an element of type @p
+ /// el_ty to the storage buffer @p buffer. The function has the signature:
+ /// `fn store(offset : u32, value : el_ty)`
+ /// @param el_ty the storage buffer element type
+ /// @param buffer the symbol of the storage buffer variable, owned by the target ProgramBuilder.
+ /// @return the name of the function that performs the store
+ Symbol StoreFunc(const type::Type* el_ty, const Symbol& buffer) {
+ return utils::GetOrCreate(store_funcs, LoadStoreKey{el_ty, buffer}, [&] {
+ utils::Vector params{
+ b.Param("offset", b.ty.u32()),
+ b.Param("value", CreateASTTypeFor(ctx, el_ty)),
+ };
+
+ auto name = b.Symbols().New(ctx.dst->Symbols().NameFor(buffer) + "_store");
+
+ if (auto* intrinsic = IntrinsicStoreFor(ctx.dst, el_ty, buffer)) {
+ b.Func(name, params, b.ty.void_(), nullptr,
+ utils::Vector{
+ intrinsic,
+ b.Disable(ast::DisabledValidation::kFunctionHasNoBody),
+ });
+ } else {
+ auto body = Switch<utils::Vector<const ast::Statement*, 8>>(
+ el_ty, //
+ [&](const type::Array* arr_ty) {
+ // fn store_func(buffer : buf_ty, offset : u32, value : el_ty) {
+ // var array = value; // No dynamic indexing on constant arrays
+ // for (var i = 0u; i < array_count; i = i + 1) {
+ // arr[i] = el_store_func(buffer, offset + i * array_stride,
+ // value[i])
+ // }
+ // return arr;
+ // }
+ auto* array = b.Var(b.Symbols().New("array"), b.Expr("value"));
+ auto store = StoreFunc(arr_ty->ElemType()->UnwrapRef(), buffer);
+ auto* i = b.Var(b.Symbols().New("i"), b.Expr(0_u));
+ auto* for_init = b.Decl(i);
+ auto arr_cnt = arr_ty->ConstantCount();
+ if (TINT_UNLIKELY(!arr_cnt)) {
+ // Non-constant counts should not be possible:
+ // * Override-expression counts can only be applied to workgroup
+ // arrays, and this method only handles storage and uniform.
+ // * Runtime-sized arrays are not storable.
+ TINT_ICE(Transform, b.Diagnostics())
+ << "unexpected non-constant array count";
+ arr_cnt = 1;
+ }
+ auto* for_cond = b.create<ast::BinaryExpression>(
+ ast::BinaryOp::kLessThan, b.Expr(i), b.Expr(u32(arr_cnt.value())));
+ auto* for_cont = b.Assign(i, b.Add(i, 1_u));
+ auto* arr_el = b.IndexAccessor(array, i);
+ auto* el_offset = b.Add(b.Expr("offset"), b.Mul(i, u32(arr_ty->Stride())));
+ auto* store_stmt = b.CallStmt(b.Call(store, el_offset, arr_el));
+ auto* for_loop = b.For(for_init, for_cond, for_cont, b.Block(store_stmt));
+
+ return utils::Vector{b.Decl(array), for_loop};
+ },
+ [&](const type::Matrix* mat_ty) {
auto* vec_ty = mat_ty->ColumnType();
- Symbol load = LoadFunc(buf_ty, vec_ty, var_user);
+ Symbol store = StoreFunc(vec_ty, buffer);
+ utils::Vector<const ast::Statement*, 4> stmts;
for (uint32_t i = 0; i < mat_ty->columns(); i++) {
auto* offset = b.Add("offset", u32(i * mat_ty->ColumnStride()));
- values.Push(b.Call(load, "buffer", offset));
+ auto* element = b.IndexAccessor("value", u32(i));
+ auto* call = b.Call(store, offset, element);
+ stmts.Push(b.CallStmt(call));
}
- } else if (auto* str = el_ty->As<sem::Struct>()) {
+ return stmts;
+ },
+ [&](const sem::Struct* str) {
+ utils::Vector<const ast::Statement*, 8> stmts;
for (auto* member : str->Members()) {
auto* offset = b.Add("offset", u32(member->Offset()));
- Symbol load = LoadFunc(buf_ty, member->Type()->UnwrapRef(), var_user);
- values.Push(b.Call(load, "buffer", offset));
+ auto* element = b.MemberAccessor("value", ctx.Clone(member->Name()));
+ Symbol store = StoreFunc(member->Type()->UnwrapRef(), buffer);
+ auto* call = b.Call(store, offset, element);
+ stmts.Push(b.CallStmt(call));
}
- }
- b.Func(name, params, CreateASTTypeFor(ctx, el_ty),
- utils::Vector{
- b.Return(b.Call(CreateASTTypeFor(ctx, el_ty), values)),
- });
- }
- return name;
- });
+ return stmts;
+ });
+
+ b.Func(name, params, b.ty.void_(), body);
+ }
+
+ return name;
+ });
}
- /// StoreFunc() returns a symbol to an intrinsic function that stores an
- /// element of type `el_ty` to a storage buffer of type `buf_ty`.
- /// The function has the signature:
- /// `fn store(buf : ptr<SC, buf_ty, A>, offset : u32, value : el_ty)`
- /// @param buf_ty the storage buffer type
- /// @param el_ty the storage buffer element type
- /// @param var_user the variable user
- /// @return the name of the function that performs the store
- Symbol StoreFunc(const type::Type* buf_ty,
- const type::Type* el_ty,
- const sem::VariableUser* var_user) {
- auto address_space = var_user->Variable()->AddressSpace();
- auto access = var_user->Variable()->Access();
- if (address_space != builtin::AddressSpace::kStorage) {
- access = builtin::Access::kUndefined;
- }
- return utils::GetOrCreate(
- store_funcs, LoadStoreKey{address_space, access, buf_ty, el_ty}, [&] {
- utils::Vector params{
- b.Param("buffer",
- b.ty.pointer(CreateASTTypeFor(ctx, buf_ty), address_space, access),
- utils::Vector{b.Disable(ast::DisabledValidation::kFunctionParameter)}),
- b.Param("offset", b.ty.u32()),
- b.Param("value", CreateASTTypeFor(ctx, el_ty)),
- };
-
- auto name = b.Sym();
-
- if (auto* intrinsic = IntrinsicStoreFor(ctx.dst, address_space, el_ty)) {
- b.Func(name, params, b.ty.void_(), nullptr,
- utils::Vector{
- intrinsic,
- b.Disable(ast::DisabledValidation::kFunctionHasNoBody),
- });
- } else {
- auto body = Switch<utils::Vector<const ast::Statement*, 8>>(
- el_ty, //
- [&](const type::Array* arr_ty) {
- // fn store_func(buffer : buf_ty, offset : u32, value : el_ty) {
- // var array = value; // No dynamic indexing on constant arrays
- // for (var i = 0u; i < array_count; i = i + 1) {
- // arr[i] = el_store_func(buffer, offset + i * array_stride,
- // value[i])
- // }
- // return arr;
- // }
- auto* array = b.Var(b.Symbols().New("array"), b.Expr("value"));
- auto store =
- StoreFunc(buf_ty, arr_ty->ElemType()->UnwrapRef(), var_user);
- auto* i = b.Var(b.Symbols().New("i"), b.Expr(0_u));
- auto* for_init = b.Decl(i);
- auto arr_cnt = arr_ty->ConstantCount();
- if (TINT_UNLIKELY(!arr_cnt)) {
- // Non-constant counts should not be possible:
- // * Override-expression counts can only be applied to workgroup
- // arrays, and this method only handles storage and uniform.
- // * Runtime-sized arrays are not storable.
- TINT_ICE(Transform, b.Diagnostics())
- << "unexpected non-constant array count";
- arr_cnt = 1;
- }
- auto* for_cond = b.create<ast::BinaryExpression>(
- ast::BinaryOp::kLessThan, b.Expr(i), b.Expr(u32(arr_cnt.value())));
- auto* for_cont = b.Assign(i, b.Add(i, 1_u));
- auto* arr_el = b.IndexAccessor(array, i);
- auto* el_offset =
- b.Add(b.Expr("offset"), b.Mul(i, u32(arr_ty->Stride())));
- auto* store_stmt =
- b.CallStmt(b.Call(store, "buffer", el_offset, arr_el));
- auto* for_loop =
- b.For(for_init, for_cond, for_cont, b.Block(store_stmt));
-
- return utils::Vector{b.Decl(array), for_loop};
- },
- [&](const type::Matrix* mat_ty) {
- auto* vec_ty = mat_ty->ColumnType();
- Symbol store = StoreFunc(buf_ty, vec_ty, var_user);
- utils::Vector<const ast::Statement*, 4> stmts;
- for (uint32_t i = 0; i < mat_ty->columns(); i++) {
- auto* offset = b.Add("offset", u32(i * mat_ty->ColumnStride()));
- auto* element = b.IndexAccessor("value", u32(i));
- auto* call = b.Call(store, "buffer", offset, element);
- stmts.Push(b.CallStmt(call));
- }
- return stmts;
- },
- [&](const sem::Struct* str) {
- utils::Vector<const ast::Statement*, 8> stmts;
- for (auto* member : str->Members()) {
- auto* offset = b.Add("offset", u32(member->Offset()));
- auto* element =
- b.MemberAccessor("value", ctx.Clone(member->Name()));
- Symbol store =
- StoreFunc(buf_ty, member->Type()->UnwrapRef(), var_user);
- auto* call = b.Call(store, "buffer", offset, element);
- stmts.Push(b.CallStmt(call));
- }
- return stmts;
- });
-
- b.Func(name, params, b.ty.void_(), body);
- }
-
- return name;
- });
- }
-
- /// AtomicFunc() returns a symbol to an intrinsic function that performs an
- /// atomic operation from a storage buffer of type `buf_ty`. The function has
- /// the signature:
- // `fn atomic_op(buf : ptr<storage, buf_ty, A>, offset : u32, ...) -> T`
- /// @param buf_ty the storage buffer type
+ /// AtomicFunc() returns a symbol to an intrinsic function that performs an atomic operation on
+ /// the storage buffer @p buffer. The function has the signature:
+ // `fn atomic_op(offset : u32, ...) -> T`
/// @param el_ty the storage buffer element type
/// @param intrinsic the atomic intrinsic
- /// @param var_user the variable user
+ /// @param buffer the symbol of the storage buffer variable, owned by the target ProgramBuilder.
/// @return the name of the function that performs the load
- Symbol AtomicFunc(const type::Type* buf_ty,
- const type::Type* el_ty,
+ Symbol AtomicFunc(const type::Type* el_ty,
const sem::Builtin* intrinsic,
- const sem::VariableUser* var_user) {
+ const Symbol& buffer) {
auto op = intrinsic->Type();
- auto address_space = var_user->Variable()->AddressSpace();
- auto access = var_user->Variable()->Access();
- if (address_space != builtin::AddressSpace::kStorage) {
- access = builtin::Access::kUndefined;
- }
- return utils::GetOrCreate(atomic_funcs, AtomicKey{access, buf_ty, el_ty, op}, [&] {
+ return utils::GetOrCreate(atomic_funcs, AtomicKey{el_ty, op, buffer}, [&] {
// The first parameter to all WGSL atomics is the expression to the
// atomic. This is replaced with two parameters: the buffer and offset.
- utils::Vector params{
- b.Param("buffer",
- b.ty.pointer(CreateASTTypeFor(ctx, buf_ty), builtin::AddressSpace::kStorage,
- access),
- utils::Vector{b.Disable(ast::DisabledValidation::kFunctionParameter)}),
- b.Param("offset", b.ty.u32()),
- };
+ utils::Vector params{b.Param("offset", b.ty.u32())};
// Other parameters are copied as-is:
for (size_t i = 1; i < intrinsic->Parameters().Length(); i++) {
@@ -692,7 +647,7 @@
params.Push(b.Param("param_" + std::to_string(i), ty));
}
- auto* atomic = IntrinsicAtomicFor(ctx.dst, op, el_ty);
+ auto* atomic = IntrinsicAtomicFor(ctx.dst, op, el_ty, buffer);
if (TINT_UNLIKELY(!atomic)) {
TINT_ICE(Transform, b.Diagnostics())
<< "IntrinsicAtomicFor() returned nullptr for op " << op << " and type "
@@ -720,7 +675,7 @@
ret_ty = CreateASTTypeFor(ctx, intrinsic->ReturnType());
}
- auto name = b.Symbols().New(std::string{"tint_"} + intrinsic->str());
+ auto name = b.Symbols().New(ctx.dst->Symbols().NameFor(buffer) + intrinsic->str());
b.Func(name, std::move(params), ret_ty, nullptr,
utils::Vector{
atomic,
@@ -734,9 +689,10 @@
DecomposeMemoryAccess::Intrinsic::Intrinsic(ProgramID pid,
ast::NodeID nid,
Op o,
- builtin::AddressSpace sc,
- DataType ty)
- : Base(pid, nid), op(o), address_space(sc), type(ty) {}
+ DataType ty,
+ builtin::AddressSpace as,
+ const Symbol& buf)
+ : Base(pid, nid), op(o), type(ty), address_space(as), buffer(buf) {}
DecomposeMemoryAccess::Intrinsic::~Intrinsic() = default;
std::string DecomposeMemoryAccess::Intrinsic::InternalName() const {
std::stringstream ss;
@@ -837,8 +793,9 @@
const DecomposeMemoryAccess::Intrinsic* DecomposeMemoryAccess::Intrinsic::Clone(
CloneContext* ctx) const {
+ auto buf = ctx->Clone(buffer);
return ctx->dst->ASTNodes().Create<DecomposeMemoryAccess::Intrinsic>(
- ctx->dst->ID(), ctx->dst->AllocateNodeID(), op, address_space, type);
+ ctx->dst->ID(), ctx->dst->AllocateNodeID(), op, type, address_space, buf);
}
bool DecomposeMemoryAccess::Intrinsic::IsAtomic() const {
@@ -872,15 +829,17 @@
if (auto* ident = node->As<ast::IdentifierExpression>()) {
// X
if (auto* sem_ident = sem.GetVal(ident)) {
- if (auto* var = sem_ident->UnwrapLoad()->As<sem::VariableUser>()) {
- if (var->Variable()->AddressSpace() == builtin::AddressSpace::kStorage ||
- var->Variable()->AddressSpace() == builtin::AddressSpace::kUniform) {
- // Variable to a storage or uniform buffer
- state.AddAccess(ident, {
- var,
- state.ToOffset(0u),
- var->Type()->UnwrapRef(),
- });
+ if (auto* user = sem_ident->UnwrapLoad()->As<sem::VariableUser>()) {
+ if (auto* global = user->Variable()->As<sem::GlobalVariable>()) {
+ if (global->AddressSpace() == builtin::AddressSpace::kStorage ||
+ global->AddressSpace() == builtin::AddressSpace::kUniform) {
+ // Variable to a storage or uniform buffer
+ state.AddAccess(ident, {
+ global,
+ state.ToOffset(0u),
+ global->Type()->UnwrapRef(),
+ });
+ }
}
}
}
@@ -983,15 +942,12 @@
if (auto access = state.TakeAccess(call_expr->args[0])) {
// atomic___(X)
ctx.Replace(call_expr, [=, &ctx, &state] {
- auto* buf = access.var->Declaration();
auto* offset = access.offset->Build(ctx);
- auto* buf_ty = access.var->Type()->UnwrapRef();
auto* el_ty = access.type->UnwrapRef()->As<type::Atomic>()->Type();
- Symbol func = state.AtomicFunc(buf_ty, el_ty, builtin,
- access.var->As<sem::VariableUser>());
+ auto buffer = ctx.Clone(access.var->Declaration()->name->symbol);
+ Symbol func = state.AtomicFunc(el_ty, builtin, buffer);
- utils::Vector<const ast::Expression*, 8> args{
- ctx.dst->AddressOf(ctx.Clone(buf)), offset};
+ utils::Vector<const ast::Expression*, 8> args{offset};
for (size_t i = 1; i < call_expr->args.Length(); i++) {
auto* arg = call_expr->args[i];
args.Push(ctx.Clone(arg));
@@ -1014,26 +970,23 @@
}
BufferAccess access = access_it->second;
ctx.Replace(expr, [=, &ctx, &state] {
- auto* buf = ctx.dst->AddressOf(ctx.CloneWithoutTransform(access.var->Declaration()));
auto* offset = access.offset->Build(ctx);
- auto* buf_ty = access.var->Type()->UnwrapRef();
auto* el_ty = access.type->UnwrapRef();
- Symbol func = state.LoadFunc(buf_ty, el_ty, access.var->As<sem::VariableUser>());
- return ctx.dst->Call(func, buf, offset);
+ auto buffer = ctx.Clone(access.var->Declaration()->name->symbol);
+ Symbol func = state.LoadFunc(el_ty, access.var->AddressSpace(), buffer);
+ return ctx.dst->Call(func, offset);
});
}
// And replace all storage and uniform buffer assignments with stores
for (auto store : state.stores) {
ctx.Replace(store.assignment, [=, &ctx, &state] {
- auto* buf =
- ctx.dst->AddressOf(ctx.CloneWithoutTransform((store.target.var->Declaration())));
auto* offset = store.target.offset->Build(ctx);
- auto* buf_ty = store.target.var->Type()->UnwrapRef();
auto* el_ty = store.target.type->UnwrapRef();
auto* value = store.assignment->rhs;
- Symbol func = state.StoreFunc(buf_ty, el_ty, store.target.var->As<sem::VariableUser>());
- auto* call = ctx.dst->Call(func, buf, offset, ctx.Clone(value));
+ auto buffer = ctx.Clone(store.target.var->Declaration()->name->symbol);
+ Symbol func = state.StoreFunc(el_ty, buffer);
+ auto* call = ctx.dst->Call(func, offset, ctx.Clone(value));
return ctx.dst->CallStmt(call);
});
}
diff --git a/src/tint/transform/decompose_memory_access.h b/src/tint/transform/decompose_memory_access.h
index b251ed8..e34cd63 100644
--- a/src/tint/transform/decompose_memory_access.h
+++ b/src/tint/transform/decompose_memory_access.h
@@ -27,13 +27,12 @@
namespace tint::transform {
-/// DecomposeMemoryAccess is a transform used to replace storage and uniform
-/// buffer accesses with a combination of load, store or atomic functions on
-/// primitive types.
+/// DecomposeMemoryAccess is a transform used to replace storage and uniform buffer accesses with a
+/// combination of load, store or atomic functions on primitive types.
class DecomposeMemoryAccess final : public Castable<DecomposeMemoryAccess, Transform> {
public:
- /// Intrinsic is an InternalAttribute that's used to decorate a stub function
- /// so that the HLSL transforms this into calls to
+ /// Intrinsic is an InternalAttribute that's used to decorate a stub function so that the HLSL
+ /// transforms this into calls to
/// `[RW]ByteAddressBuffer.Load[N]()` or `[RW]ByteAddressBuffer.Store[N]()`,
/// with a possible cast.
class Intrinsic final : public Castable<Intrinsic, ast::InternalAttribute> {
@@ -79,9 +78,15 @@
/// @param pid the identifier of the program that owns this node
/// @param nid the unique node identifier
/// @param o the op of the intrinsic
- /// @param sc the address space of the buffer
- /// @param ty the data type of the intrinsic
- Intrinsic(ProgramID pid, ast::NodeID nid, Op o, builtin::AddressSpace sc, DataType ty);
+ /// @param type the data type of the intrinsic
+ /// @param address_space the address space of the buffer
+ /// @param buffer the storage or uniform buffer name
+ Intrinsic(ProgramID pid,
+ ast::NodeID nid,
+ Op o,
+ DataType type,
+ builtin::AddressSpace address_space,
+ const Symbol& buffer);
/// Destructor
~Intrinsic() override;
@@ -100,11 +105,14 @@
/// The op of the intrinsic
const Op op;
- /// The address space of the buffer this intrinsic operates on
- builtin::AddressSpace const address_space;
-
/// The type of the intrinsic
const DataType type;
+
+ /// The address space of the buffer this intrinsic operates on
+ const builtin::AddressSpace address_space;
+
+ /// The buffer name
+ const Symbol buffer;
};
/// Constructor
diff --git a/src/tint/transform/decompose_memory_access_test.cc b/src/tint/transform/decompose_memory_access_test.cc
index 0122004..95ec9de 100644
--- a/src/tint/transform/decompose_memory_access_test.cc
+++ b/src/tint/transform/decompose_memory_access_test.cc
@@ -180,179 +180,179 @@
@group(0) @binding(0) var<storage, read_write> sb : SB;
@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> f32
+fn sb_load(offset : u32) -> f32
@internal(intrinsic_load_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> i32
+fn sb_load_1(offset : u32) -> i32
@internal(intrinsic_load_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_2(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> u32
+fn sb_load_2(offset : u32) -> u32
@internal(intrinsic_load_storage_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_3(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> f16
+fn sb_load_3(offset : u32) -> f16
@internal(intrinsic_load_storage_vec2_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_4(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<f32>
+fn sb_load_4(offset : u32) -> vec2<f32>
@internal(intrinsic_load_storage_vec2_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_5(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<i32>
+fn sb_load_5(offset : u32) -> vec2<i32>
@internal(intrinsic_load_storage_vec2_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_6(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<u32>
+fn sb_load_6(offset : u32) -> vec2<u32>
@internal(intrinsic_load_storage_vec2_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_7(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<f16>
+fn sb_load_7(offset : u32) -> vec2<f16>
@internal(intrinsic_load_storage_vec3_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_8(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<f32>
+fn sb_load_8(offset : u32) -> vec3<f32>
@internal(intrinsic_load_storage_vec3_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_9(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<i32>
+fn sb_load_9(offset : u32) -> vec3<i32>
@internal(intrinsic_load_storage_vec3_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_10(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<u32>
+fn sb_load_10(offset : u32) -> vec3<u32>
@internal(intrinsic_load_storage_vec3_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_11(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<f16>
+fn sb_load_11(offset : u32) -> vec3<f16>
@internal(intrinsic_load_storage_vec4_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_12(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<f32>
+fn sb_load_12(offset : u32) -> vec4<f32>
@internal(intrinsic_load_storage_vec4_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_13(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<i32>
+fn sb_load_13(offset : u32) -> vec4<i32>
@internal(intrinsic_load_storage_vec4_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_14(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<u32>
+fn sb_load_14(offset : u32) -> vec4<u32>
@internal(intrinsic_load_storage_vec4_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_15(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<f16>
+fn sb_load_15(offset : u32) -> vec4<f16>
-fn tint_symbol_16(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x2<f32> {
- return mat2x2<f32>(tint_symbol_4(buffer, (offset + 0u)), tint_symbol_4(buffer, (offset + 8u)));
+fn sb_load_16(offset : u32) -> mat2x2<f32> {
+ return mat2x2<f32>(sb_load_4((offset + 0u)), sb_load_4((offset + 8u)));
}
-fn tint_symbol_17(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x3<f32> {
- return mat2x3<f32>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)));
+fn sb_load_17(offset : u32) -> mat2x3<f32> {
+ return mat2x3<f32>(sb_load_8((offset + 0u)), sb_load_8((offset + 16u)));
}
-fn tint_symbol_18(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x4<f32> {
- return mat2x4<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u)));
+fn sb_load_18(offset : u32) -> mat2x4<f32> {
+ return mat2x4<f32>(sb_load_12((offset + 0u)), sb_load_12((offset + 16u)));
}
-fn tint_symbol_19(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x2<f32> {
- return mat3x2<f32>(tint_symbol_4(buffer, (offset + 0u)), tint_symbol_4(buffer, (offset + 8u)), tint_symbol_4(buffer, (offset + 16u)));
+fn sb_load_19(offset : u32) -> mat3x2<f32> {
+ return mat3x2<f32>(sb_load_4((offset + 0u)), sb_load_4((offset + 8u)), sb_load_4((offset + 16u)));
}
-fn tint_symbol_20(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x3<f32> {
- return mat3x3<f32>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 32u)));
+fn sb_load_20(offset : u32) -> mat3x3<f32> {
+ return mat3x3<f32>(sb_load_8((offset + 0u)), sb_load_8((offset + 16u)), sb_load_8((offset + 32u)));
}
-fn tint_symbol_21(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x4<f32> {
- return mat3x4<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u)), tint_symbol_12(buffer, (offset + 32u)));
+fn sb_load_21(offset : u32) -> mat3x4<f32> {
+ return mat3x4<f32>(sb_load_12((offset + 0u)), sb_load_12((offset + 16u)), sb_load_12((offset + 32u)));
}
-fn tint_symbol_22(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x2<f32> {
- return mat4x2<f32>(tint_symbol_4(buffer, (offset + 0u)), tint_symbol_4(buffer, (offset + 8u)), tint_symbol_4(buffer, (offset + 16u)), tint_symbol_4(buffer, (offset + 24u)));
+fn sb_load_22(offset : u32) -> mat4x2<f32> {
+ return mat4x2<f32>(sb_load_4((offset + 0u)), sb_load_4((offset + 8u)), sb_load_4((offset + 16u)), sb_load_4((offset + 24u)));
}
-fn tint_symbol_23(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x3<f32> {
- return mat4x3<f32>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 32u)), tint_symbol_8(buffer, (offset + 48u)));
+fn sb_load_23(offset : u32) -> mat4x3<f32> {
+ return mat4x3<f32>(sb_load_8((offset + 0u)), sb_load_8((offset + 16u)), sb_load_8((offset + 32u)), sb_load_8((offset + 48u)));
}
-fn tint_symbol_24(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x4<f32> {
- return mat4x4<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u)), tint_symbol_12(buffer, (offset + 32u)), tint_symbol_12(buffer, (offset + 48u)));
+fn sb_load_24(offset : u32) -> mat4x4<f32> {
+ return mat4x4<f32>(sb_load_12((offset + 0u)), sb_load_12((offset + 16u)), sb_load_12((offset + 32u)), sb_load_12((offset + 48u)));
}
-fn tint_symbol_25(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x2<f16> {
- return mat2x2<f16>(tint_symbol_7(buffer, (offset + 0u)), tint_symbol_7(buffer, (offset + 4u)));
+fn sb_load_25(offset : u32) -> mat2x2<f16> {
+ return mat2x2<f16>(sb_load_7((offset + 0u)), sb_load_7((offset + 4u)));
}
-fn tint_symbol_26(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x3<f16> {
- return mat2x3<f16>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 8u)));
+fn sb_load_26(offset : u32) -> mat2x3<f16> {
+ return mat2x3<f16>(sb_load_11((offset + 0u)), sb_load_11((offset + 8u)));
}
-fn tint_symbol_27(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x4<f16> {
- return mat2x4<f16>(tint_symbol_15(buffer, (offset + 0u)), tint_symbol_15(buffer, (offset + 8u)));
+fn sb_load_27(offset : u32) -> mat2x4<f16> {
+ return mat2x4<f16>(sb_load_15((offset + 0u)), sb_load_15((offset + 8u)));
}
-fn tint_symbol_28(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x2<f16> {
- return mat3x2<f16>(tint_symbol_7(buffer, (offset + 0u)), tint_symbol_7(buffer, (offset + 4u)), tint_symbol_7(buffer, (offset + 8u)));
+fn sb_load_28(offset : u32) -> mat3x2<f16> {
+ return mat3x2<f16>(sb_load_7((offset + 0u)), sb_load_7((offset + 4u)), sb_load_7((offset + 8u)));
}
-fn tint_symbol_29(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x3<f16> {
- return mat3x3<f16>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 8u)), tint_symbol_11(buffer, (offset + 16u)));
+fn sb_load_29(offset : u32) -> mat3x3<f16> {
+ return mat3x3<f16>(sb_load_11((offset + 0u)), sb_load_11((offset + 8u)), sb_load_11((offset + 16u)));
}
-fn tint_symbol_30(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x4<f16> {
- return mat3x4<f16>(tint_symbol_15(buffer, (offset + 0u)), tint_symbol_15(buffer, (offset + 8u)), tint_symbol_15(buffer, (offset + 16u)));
+fn sb_load_30(offset : u32) -> mat3x4<f16> {
+ return mat3x4<f16>(sb_load_15((offset + 0u)), sb_load_15((offset + 8u)), sb_load_15((offset + 16u)));
}
-fn tint_symbol_31(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x2<f16> {
- return mat4x2<f16>(tint_symbol_7(buffer, (offset + 0u)), tint_symbol_7(buffer, (offset + 4u)), tint_symbol_7(buffer, (offset + 8u)), tint_symbol_7(buffer, (offset + 12u)));
+fn sb_load_31(offset : u32) -> mat4x2<f16> {
+ return mat4x2<f16>(sb_load_7((offset + 0u)), sb_load_7((offset + 4u)), sb_load_7((offset + 8u)), sb_load_7((offset + 12u)));
}
-fn tint_symbol_32(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x3<f16> {
- return mat4x3<f16>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 8u)), tint_symbol_11(buffer, (offset + 16u)), tint_symbol_11(buffer, (offset + 24u)));
+fn sb_load_32(offset : u32) -> mat4x3<f16> {
+ return mat4x3<f16>(sb_load_11((offset + 0u)), sb_load_11((offset + 8u)), sb_load_11((offset + 16u)), sb_load_11((offset + 24u)));
}
-fn tint_symbol_33(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x4<f16> {
- return mat4x4<f16>(tint_symbol_15(buffer, (offset + 0u)), tint_symbol_15(buffer, (offset + 8u)), tint_symbol_15(buffer, (offset + 16u)), tint_symbol_15(buffer, (offset + 24u)));
+fn sb_load_33(offset : u32) -> mat4x4<f16> {
+ return mat4x4<f16>(sb_load_15((offset + 0u)), sb_load_15((offset + 8u)), sb_load_15((offset + 16u)), sb_load_15((offset + 24u)));
}
-fn tint_symbol_34(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> array<vec3<f32>, 2u> {
+fn sb_load_34(offset : u32) -> array<vec3<f32>, 2u> {
var arr : array<vec3<f32>, 2u>;
for(var i = 0u; (i < 2u); i = (i + 1u)) {
- arr[i] = tint_symbol_8(buffer, (offset + (i * 16u)));
+ arr[i] = sb_load_8((offset + (i * 16u)));
}
return arr;
}
-fn tint_symbol_35(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> array<vec3<f16>, 2u> {
+fn sb_load_35(offset : u32) -> array<vec3<f16>, 2u> {
var arr_1 : array<vec3<f16>, 2u>;
for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_11(buffer, (offset + (i_1 * 8u)));
+ arr_1[i_1] = sb_load_11((offset + (i_1 * 8u)));
}
return arr_1;
}
@compute @workgroup_size(1)
fn main() {
- var scalar_f32 : f32 = tint_symbol(&(sb), 0u);
- var scalar_i32 : i32 = tint_symbol_1(&(sb), 4u);
- var scalar_u32 : u32 = tint_symbol_2(&(sb), 8u);
- var scalar_f16 : f16 = tint_symbol_3(&(sb), 12u);
- var vec2_f32 : vec2<f32> = tint_symbol_4(&(sb), 16u);
- var vec2_i32 : vec2<i32> = tint_symbol_5(&(sb), 24u);
- var vec2_u32 : vec2<u32> = tint_symbol_6(&(sb), 32u);
- var vec2_f16 : vec2<f16> = tint_symbol_7(&(sb), 40u);
- var vec3_f32 : vec3<f32> = tint_symbol_8(&(sb), 48u);
- var vec3_i32 : vec3<i32> = tint_symbol_9(&(sb), 64u);
- var vec3_u32 : vec3<u32> = tint_symbol_10(&(sb), 80u);
- var vec3_f16 : vec3<f16> = tint_symbol_11(&(sb), 96u);
- var vec4_f32 : vec4<f32> = tint_symbol_12(&(sb), 112u);
- var vec4_i32 : vec4<i32> = tint_symbol_13(&(sb), 128u);
- var vec4_u32 : vec4<u32> = tint_symbol_14(&(sb), 144u);
- var vec4_f16 : vec4<f16> = tint_symbol_15(&(sb), 160u);
- var mat2x2_f32 : mat2x2<f32> = tint_symbol_16(&(sb), 168u);
- var mat2x3_f32 : mat2x3<f32> = tint_symbol_17(&(sb), 192u);
- var mat2x4_f32 : mat2x4<f32> = tint_symbol_18(&(sb), 224u);
- var mat3x2_f32 : mat3x2<f32> = tint_symbol_19(&(sb), 256u);
- var mat3x3_f32 : mat3x3<f32> = tint_symbol_20(&(sb), 288u);
- var mat3x4_f32 : mat3x4<f32> = tint_symbol_21(&(sb), 336u);
- var mat4x2_f32 : mat4x2<f32> = tint_symbol_22(&(sb), 384u);
- var mat4x3_f32 : mat4x3<f32> = tint_symbol_23(&(sb), 416u);
- var mat4x4_f32 : mat4x4<f32> = tint_symbol_24(&(sb), 480u);
- var mat2x2_f16 : mat2x2<f16> = tint_symbol_25(&(sb), 544u);
- var mat2x3_f16 : mat2x3<f16> = tint_symbol_26(&(sb), 552u);
- var mat2x4_f16 : mat2x4<f16> = tint_symbol_27(&(sb), 568u);
- var mat3x2_f16 : mat3x2<f16> = tint_symbol_28(&(sb), 584u);
- var mat3x3_f16 : mat3x3<f16> = tint_symbol_29(&(sb), 600u);
- var mat3x4_f16 : mat3x4<f16> = tint_symbol_30(&(sb), 624u);
- var mat4x2_f16 : mat4x2<f16> = tint_symbol_31(&(sb), 648u);
- var mat4x3_f16 : mat4x3<f16> = tint_symbol_32(&(sb), 664u);
- var mat4x4_f16 : mat4x4<f16> = tint_symbol_33(&(sb), 696u);
- var arr2_vec3_f32 : array<vec3<f32>, 2> = tint_symbol_34(&(sb), 736u);
- var arr2_vec3_f16 : array<vec3<f16>, 2> = tint_symbol_35(&(sb), 768u);
+ var scalar_f32 : f32 = sb_load(0u);
+ var scalar_i32 : i32 = sb_load_1(4u);
+ var scalar_u32 : u32 = sb_load_2(8u);
+ var scalar_f16 : f16 = sb_load_3(12u);
+ var vec2_f32 : vec2<f32> = sb_load_4(16u);
+ var vec2_i32 : vec2<i32> = sb_load_5(24u);
+ var vec2_u32 : vec2<u32> = sb_load_6(32u);
+ var vec2_f16 : vec2<f16> = sb_load_7(40u);
+ var vec3_f32 : vec3<f32> = sb_load_8(48u);
+ var vec3_i32 : vec3<i32> = sb_load_9(64u);
+ var vec3_u32 : vec3<u32> = sb_load_10(80u);
+ var vec3_f16 : vec3<f16> = sb_load_11(96u);
+ var vec4_f32 : vec4<f32> = sb_load_12(112u);
+ var vec4_i32 : vec4<i32> = sb_load_13(128u);
+ var vec4_u32 : vec4<u32> = sb_load_14(144u);
+ var vec4_f16 : vec4<f16> = sb_load_15(160u);
+ var mat2x2_f32 : mat2x2<f32> = sb_load_16(168u);
+ var mat2x3_f32 : mat2x3<f32> = sb_load_17(192u);
+ var mat2x4_f32 : mat2x4<f32> = sb_load_18(224u);
+ var mat3x2_f32 : mat3x2<f32> = sb_load_19(256u);
+ var mat3x3_f32 : mat3x3<f32> = sb_load_20(288u);
+ var mat3x4_f32 : mat3x4<f32> = sb_load_21(336u);
+ var mat4x2_f32 : mat4x2<f32> = sb_load_22(384u);
+ var mat4x3_f32 : mat4x3<f32> = sb_load_23(416u);
+ var mat4x4_f32 : mat4x4<f32> = sb_load_24(480u);
+ var mat2x2_f16 : mat2x2<f16> = sb_load_25(544u);
+ var mat2x3_f16 : mat2x3<f16> = sb_load_26(552u);
+ var mat2x4_f16 : mat2x4<f16> = sb_load_27(568u);
+ var mat3x2_f16 : mat3x2<f16> = sb_load_28(584u);
+ var mat3x3_f16 : mat3x3<f16> = sb_load_29(600u);
+ var mat3x4_f16 : mat3x4<f16> = sb_load_30(624u);
+ var mat4x2_f16 : mat4x2<f16> = sb_load_31(648u);
+ var mat4x3_f16 : mat4x3<f16> = sb_load_32(664u);
+ var mat4x4_f16 : mat4x4<f16> = sb_load_33(696u);
+ var arr2_vec3_f32 : array<vec3<f32>, 2> = sb_load_34(736u);
+ var arr2_vec3_f16 : array<vec3<f16>, 2> = sb_load_35(768u);
}
)";
@@ -451,179 +451,179 @@
enable f16;
@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> f32
+fn sb_load(offset : u32) -> f32
@internal(intrinsic_load_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> i32
+fn sb_load_1(offset : u32) -> i32
@internal(intrinsic_load_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_2(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> u32
+fn sb_load_2(offset : u32) -> u32
@internal(intrinsic_load_storage_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_3(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> f16
+fn sb_load_3(offset : u32) -> f16
@internal(intrinsic_load_storage_vec2_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_4(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<f32>
+fn sb_load_4(offset : u32) -> vec2<f32>
@internal(intrinsic_load_storage_vec2_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_5(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<i32>
+fn sb_load_5(offset : u32) -> vec2<i32>
@internal(intrinsic_load_storage_vec2_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_6(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<u32>
+fn sb_load_6(offset : u32) -> vec2<u32>
@internal(intrinsic_load_storage_vec2_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_7(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<f16>
+fn sb_load_7(offset : u32) -> vec2<f16>
@internal(intrinsic_load_storage_vec3_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_8(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<f32>
+fn sb_load_8(offset : u32) -> vec3<f32>
@internal(intrinsic_load_storage_vec3_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_9(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<i32>
+fn sb_load_9(offset : u32) -> vec3<i32>
@internal(intrinsic_load_storage_vec3_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_10(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<u32>
+fn sb_load_10(offset : u32) -> vec3<u32>
@internal(intrinsic_load_storage_vec3_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_11(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<f16>
+fn sb_load_11(offset : u32) -> vec3<f16>
@internal(intrinsic_load_storage_vec4_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_12(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<f32>
+fn sb_load_12(offset : u32) -> vec4<f32>
@internal(intrinsic_load_storage_vec4_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_13(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<i32>
+fn sb_load_13(offset : u32) -> vec4<i32>
@internal(intrinsic_load_storage_vec4_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_14(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<u32>
+fn sb_load_14(offset : u32) -> vec4<u32>
@internal(intrinsic_load_storage_vec4_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_15(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<f16>
+fn sb_load_15(offset : u32) -> vec4<f16>
-fn tint_symbol_16(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x2<f32> {
- return mat2x2<f32>(tint_symbol_4(buffer, (offset + 0u)), tint_symbol_4(buffer, (offset + 8u)));
+fn sb_load_16(offset : u32) -> mat2x2<f32> {
+ return mat2x2<f32>(sb_load_4((offset + 0u)), sb_load_4((offset + 8u)));
}
-fn tint_symbol_17(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x3<f32> {
- return mat2x3<f32>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)));
+fn sb_load_17(offset : u32) -> mat2x3<f32> {
+ return mat2x3<f32>(sb_load_8((offset + 0u)), sb_load_8((offset + 16u)));
}
-fn tint_symbol_18(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x4<f32> {
- return mat2x4<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u)));
+fn sb_load_18(offset : u32) -> mat2x4<f32> {
+ return mat2x4<f32>(sb_load_12((offset + 0u)), sb_load_12((offset + 16u)));
}
-fn tint_symbol_19(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x2<f32> {
- return mat3x2<f32>(tint_symbol_4(buffer, (offset + 0u)), tint_symbol_4(buffer, (offset + 8u)), tint_symbol_4(buffer, (offset + 16u)));
+fn sb_load_19(offset : u32) -> mat3x2<f32> {
+ return mat3x2<f32>(sb_load_4((offset + 0u)), sb_load_4((offset + 8u)), sb_load_4((offset + 16u)));
}
-fn tint_symbol_20(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x3<f32> {
- return mat3x3<f32>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 32u)));
+fn sb_load_20(offset : u32) -> mat3x3<f32> {
+ return mat3x3<f32>(sb_load_8((offset + 0u)), sb_load_8((offset + 16u)), sb_load_8((offset + 32u)));
}
-fn tint_symbol_21(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x4<f32> {
- return mat3x4<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u)), tint_symbol_12(buffer, (offset + 32u)));
+fn sb_load_21(offset : u32) -> mat3x4<f32> {
+ return mat3x4<f32>(sb_load_12((offset + 0u)), sb_load_12((offset + 16u)), sb_load_12((offset + 32u)));
}
-fn tint_symbol_22(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x2<f32> {
- return mat4x2<f32>(tint_symbol_4(buffer, (offset + 0u)), tint_symbol_4(buffer, (offset + 8u)), tint_symbol_4(buffer, (offset + 16u)), tint_symbol_4(buffer, (offset + 24u)));
+fn sb_load_22(offset : u32) -> mat4x2<f32> {
+ return mat4x2<f32>(sb_load_4((offset + 0u)), sb_load_4((offset + 8u)), sb_load_4((offset + 16u)), sb_load_4((offset + 24u)));
}
-fn tint_symbol_23(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x3<f32> {
- return mat4x3<f32>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 32u)), tint_symbol_8(buffer, (offset + 48u)));
+fn sb_load_23(offset : u32) -> mat4x3<f32> {
+ return mat4x3<f32>(sb_load_8((offset + 0u)), sb_load_8((offset + 16u)), sb_load_8((offset + 32u)), sb_load_8((offset + 48u)));
}
-fn tint_symbol_24(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x4<f32> {
- return mat4x4<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u)), tint_symbol_12(buffer, (offset + 32u)), tint_symbol_12(buffer, (offset + 48u)));
+fn sb_load_24(offset : u32) -> mat4x4<f32> {
+ return mat4x4<f32>(sb_load_12((offset + 0u)), sb_load_12((offset + 16u)), sb_load_12((offset + 32u)), sb_load_12((offset + 48u)));
}
-fn tint_symbol_25(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x2<f16> {
- return mat2x2<f16>(tint_symbol_7(buffer, (offset + 0u)), tint_symbol_7(buffer, (offset + 4u)));
+fn sb_load_25(offset : u32) -> mat2x2<f16> {
+ return mat2x2<f16>(sb_load_7((offset + 0u)), sb_load_7((offset + 4u)));
}
-fn tint_symbol_26(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x3<f16> {
- return mat2x3<f16>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 8u)));
+fn sb_load_26(offset : u32) -> mat2x3<f16> {
+ return mat2x3<f16>(sb_load_11((offset + 0u)), sb_load_11((offset + 8u)));
}
-fn tint_symbol_27(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x4<f16> {
- return mat2x4<f16>(tint_symbol_15(buffer, (offset + 0u)), tint_symbol_15(buffer, (offset + 8u)));
+fn sb_load_27(offset : u32) -> mat2x4<f16> {
+ return mat2x4<f16>(sb_load_15((offset + 0u)), sb_load_15((offset + 8u)));
}
-fn tint_symbol_28(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x2<f16> {
- return mat3x2<f16>(tint_symbol_7(buffer, (offset + 0u)), tint_symbol_7(buffer, (offset + 4u)), tint_symbol_7(buffer, (offset + 8u)));
+fn sb_load_28(offset : u32) -> mat3x2<f16> {
+ return mat3x2<f16>(sb_load_7((offset + 0u)), sb_load_7((offset + 4u)), sb_load_7((offset + 8u)));
}
-fn tint_symbol_29(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x3<f16> {
- return mat3x3<f16>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 8u)), tint_symbol_11(buffer, (offset + 16u)));
+fn sb_load_29(offset : u32) -> mat3x3<f16> {
+ return mat3x3<f16>(sb_load_11((offset + 0u)), sb_load_11((offset + 8u)), sb_load_11((offset + 16u)));
}
-fn tint_symbol_30(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x4<f16> {
- return mat3x4<f16>(tint_symbol_15(buffer, (offset + 0u)), tint_symbol_15(buffer, (offset + 8u)), tint_symbol_15(buffer, (offset + 16u)));
+fn sb_load_30(offset : u32) -> mat3x4<f16> {
+ return mat3x4<f16>(sb_load_15((offset + 0u)), sb_load_15((offset + 8u)), sb_load_15((offset + 16u)));
}
-fn tint_symbol_31(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x2<f16> {
- return mat4x2<f16>(tint_symbol_7(buffer, (offset + 0u)), tint_symbol_7(buffer, (offset + 4u)), tint_symbol_7(buffer, (offset + 8u)), tint_symbol_7(buffer, (offset + 12u)));
+fn sb_load_31(offset : u32) -> mat4x2<f16> {
+ return mat4x2<f16>(sb_load_7((offset + 0u)), sb_load_7((offset + 4u)), sb_load_7((offset + 8u)), sb_load_7((offset + 12u)));
}
-fn tint_symbol_32(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x3<f16> {
- return mat4x3<f16>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 8u)), tint_symbol_11(buffer, (offset + 16u)), tint_symbol_11(buffer, (offset + 24u)));
+fn sb_load_32(offset : u32) -> mat4x3<f16> {
+ return mat4x3<f16>(sb_load_11((offset + 0u)), sb_load_11((offset + 8u)), sb_load_11((offset + 16u)), sb_load_11((offset + 24u)));
}
-fn tint_symbol_33(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x4<f16> {
- return mat4x4<f16>(tint_symbol_15(buffer, (offset + 0u)), tint_symbol_15(buffer, (offset + 8u)), tint_symbol_15(buffer, (offset + 16u)), tint_symbol_15(buffer, (offset + 24u)));
+fn sb_load_33(offset : u32) -> mat4x4<f16> {
+ return mat4x4<f16>(sb_load_15((offset + 0u)), sb_load_15((offset + 8u)), sb_load_15((offset + 16u)), sb_load_15((offset + 24u)));
}
-fn tint_symbol_34(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> array<vec3<f32>, 2u> {
+fn sb_load_34(offset : u32) -> array<vec3<f32>, 2u> {
var arr : array<vec3<f32>, 2u>;
for(var i = 0u; (i < 2u); i = (i + 1u)) {
- arr[i] = tint_symbol_8(buffer, (offset + (i * 16u)));
+ arr[i] = sb_load_8((offset + (i * 16u)));
}
return arr;
}
-fn tint_symbol_35(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> array<vec3<f16>, 2u> {
+fn sb_load_35(offset : u32) -> array<vec3<f16>, 2u> {
var arr_1 : array<vec3<f16>, 2u>;
for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_11(buffer, (offset + (i_1 * 8u)));
+ arr_1[i_1] = sb_load_11((offset + (i_1 * 8u)));
}
return arr_1;
}
@compute @workgroup_size(1)
fn main() {
- var scalar_f32 : f32 = tint_symbol(&(sb), 0u);
- var scalar_i32 : i32 = tint_symbol_1(&(sb), 4u);
- var scalar_u32 : u32 = tint_symbol_2(&(sb), 8u);
- var scalar_f16 : f16 = tint_symbol_3(&(sb), 12u);
- var vec2_f32 : vec2<f32> = tint_symbol_4(&(sb), 16u);
- var vec2_i32 : vec2<i32> = tint_symbol_5(&(sb), 24u);
- var vec2_u32 : vec2<u32> = tint_symbol_6(&(sb), 32u);
- var vec2_f16 : vec2<f16> = tint_symbol_7(&(sb), 40u);
- var vec3_f32 : vec3<f32> = tint_symbol_8(&(sb), 48u);
- var vec3_i32 : vec3<i32> = tint_symbol_9(&(sb), 64u);
- var vec3_u32 : vec3<u32> = tint_symbol_10(&(sb), 80u);
- var vec3_f16 : vec3<f16> = tint_symbol_11(&(sb), 96u);
- var vec4_f32 : vec4<f32> = tint_symbol_12(&(sb), 112u);
- var vec4_i32 : vec4<i32> = tint_symbol_13(&(sb), 128u);
- var vec4_u32 : vec4<u32> = tint_symbol_14(&(sb), 144u);
- var vec4_f16 : vec4<f16> = tint_symbol_15(&(sb), 160u);
- var mat2x2_f32 : mat2x2<f32> = tint_symbol_16(&(sb), 168u);
- var mat2x3_f32 : mat2x3<f32> = tint_symbol_17(&(sb), 192u);
- var mat2x4_f32 : mat2x4<f32> = tint_symbol_18(&(sb), 224u);
- var mat3x2_f32 : mat3x2<f32> = tint_symbol_19(&(sb), 256u);
- var mat3x3_f32 : mat3x3<f32> = tint_symbol_20(&(sb), 288u);
- var mat3x4_f32 : mat3x4<f32> = tint_symbol_21(&(sb), 336u);
- var mat4x2_f32 : mat4x2<f32> = tint_symbol_22(&(sb), 384u);
- var mat4x3_f32 : mat4x3<f32> = tint_symbol_23(&(sb), 416u);
- var mat4x4_f32 : mat4x4<f32> = tint_symbol_24(&(sb), 480u);
- var mat2x2_f16 : mat2x2<f16> = tint_symbol_25(&(sb), 544u);
- var mat2x3_f16 : mat2x3<f16> = tint_symbol_26(&(sb), 552u);
- var mat2x4_f16 : mat2x4<f16> = tint_symbol_27(&(sb), 568u);
- var mat3x2_f16 : mat3x2<f16> = tint_symbol_28(&(sb), 584u);
- var mat3x3_f16 : mat3x3<f16> = tint_symbol_29(&(sb), 600u);
- var mat3x4_f16 : mat3x4<f16> = tint_symbol_30(&(sb), 624u);
- var mat4x2_f16 : mat4x2<f16> = tint_symbol_31(&(sb), 648u);
- var mat4x3_f16 : mat4x3<f16> = tint_symbol_32(&(sb), 664u);
- var mat4x4_f16 : mat4x4<f16> = tint_symbol_33(&(sb), 696u);
- var arr2_vec3_f32 : array<vec3<f32>, 2> = tint_symbol_34(&(sb), 736u);
- var arr2_vec3_f16 : array<vec3<f16>, 2> = tint_symbol_35(&(sb), 768u);
+ var scalar_f32 : f32 = sb_load(0u);
+ var scalar_i32 : i32 = sb_load_1(4u);
+ var scalar_u32 : u32 = sb_load_2(8u);
+ var scalar_f16 : f16 = sb_load_3(12u);
+ var vec2_f32 : vec2<f32> = sb_load_4(16u);
+ var vec2_i32 : vec2<i32> = sb_load_5(24u);
+ var vec2_u32 : vec2<u32> = sb_load_6(32u);
+ var vec2_f16 : vec2<f16> = sb_load_7(40u);
+ var vec3_f32 : vec3<f32> = sb_load_8(48u);
+ var vec3_i32 : vec3<i32> = sb_load_9(64u);
+ var vec3_u32 : vec3<u32> = sb_load_10(80u);
+ var vec3_f16 : vec3<f16> = sb_load_11(96u);
+ var vec4_f32 : vec4<f32> = sb_load_12(112u);
+ var vec4_i32 : vec4<i32> = sb_load_13(128u);
+ var vec4_u32 : vec4<u32> = sb_load_14(144u);
+ var vec4_f16 : vec4<f16> = sb_load_15(160u);
+ var mat2x2_f32 : mat2x2<f32> = sb_load_16(168u);
+ var mat2x3_f32 : mat2x3<f32> = sb_load_17(192u);
+ var mat2x4_f32 : mat2x4<f32> = sb_load_18(224u);
+ var mat3x2_f32 : mat3x2<f32> = sb_load_19(256u);
+ var mat3x3_f32 : mat3x3<f32> = sb_load_20(288u);
+ var mat3x4_f32 : mat3x4<f32> = sb_load_21(336u);
+ var mat4x2_f32 : mat4x2<f32> = sb_load_22(384u);
+ var mat4x3_f32 : mat4x3<f32> = sb_load_23(416u);
+ var mat4x4_f32 : mat4x4<f32> = sb_load_24(480u);
+ var mat2x2_f16 : mat2x2<f16> = sb_load_25(544u);
+ var mat2x3_f16 : mat2x3<f16> = sb_load_26(552u);
+ var mat2x4_f16 : mat2x4<f16> = sb_load_27(568u);
+ var mat3x2_f16 : mat3x2<f16> = sb_load_28(584u);
+ var mat3x3_f16 : mat3x3<f16> = sb_load_29(600u);
+ var mat3x4_f16 : mat3x4<f16> = sb_load_30(624u);
+ var mat4x2_f16 : mat4x2<f16> = sb_load_31(648u);
+ var mat4x3_f16 : mat4x3<f16> = sb_load_32(664u);
+ var mat4x4_f16 : mat4x4<f16> = sb_load_33(696u);
+ var arr2_vec3_f32 : array<vec3<f32>, 2> = sb_load_34(736u);
+ var arr2_vec3_f16 : array<vec3<f16>, 2> = sb_load_35(768u);
}
@group(0) @binding(0) var<storage, read_write> sb : SB;
@@ -804,179 +804,179 @@
@group(0) @binding(0) var<uniform> ub : UB;
@internal(intrinsic_load_uniform_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> f32
+fn ub_load(offset : u32) -> f32
@internal(intrinsic_load_uniform_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_1(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> i32
+fn ub_load_1(offset : u32) -> i32
@internal(intrinsic_load_uniform_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_2(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> u32
+fn ub_load_2(offset : u32) -> u32
@internal(intrinsic_load_uniform_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_3(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> f16
+fn ub_load_3(offset : u32) -> f16
@internal(intrinsic_load_uniform_vec2_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_4(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec2<f32>
+fn ub_load_4(offset : u32) -> vec2<f32>
@internal(intrinsic_load_uniform_vec2_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_5(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec2<i32>
+fn ub_load_5(offset : u32) -> vec2<i32>
@internal(intrinsic_load_uniform_vec2_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_6(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec2<u32>
+fn ub_load_6(offset : u32) -> vec2<u32>
@internal(intrinsic_load_uniform_vec2_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_7(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec2<f16>
+fn ub_load_7(offset : u32) -> vec2<f16>
@internal(intrinsic_load_uniform_vec3_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_8(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec3<f32>
+fn ub_load_8(offset : u32) -> vec3<f32>
@internal(intrinsic_load_uniform_vec3_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_9(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec3<i32>
+fn ub_load_9(offset : u32) -> vec3<i32>
@internal(intrinsic_load_uniform_vec3_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_10(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec3<u32>
+fn ub_load_10(offset : u32) -> vec3<u32>
@internal(intrinsic_load_uniform_vec3_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_11(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec3<f16>
+fn ub_load_11(offset : u32) -> vec3<f16>
@internal(intrinsic_load_uniform_vec4_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_12(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec4<f32>
+fn ub_load_12(offset : u32) -> vec4<f32>
@internal(intrinsic_load_uniform_vec4_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_13(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec4<i32>
+fn ub_load_13(offset : u32) -> vec4<i32>
@internal(intrinsic_load_uniform_vec4_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_14(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec4<u32>
+fn ub_load_14(offset : u32) -> vec4<u32>
@internal(intrinsic_load_uniform_vec4_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_15(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec4<f16>
+fn ub_load_15(offset : u32) -> vec4<f16>
-fn tint_symbol_16(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat2x2<f32> {
- return mat2x2<f32>(tint_symbol_4(buffer, (offset + 0u)), tint_symbol_4(buffer, (offset + 8u)));
+fn ub_load_16(offset : u32) -> mat2x2<f32> {
+ return mat2x2<f32>(ub_load_4((offset + 0u)), ub_load_4((offset + 8u)));
}
-fn tint_symbol_17(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat2x3<f32> {
- return mat2x3<f32>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)));
+fn ub_load_17(offset : u32) -> mat2x3<f32> {
+ return mat2x3<f32>(ub_load_8((offset + 0u)), ub_load_8((offset + 16u)));
}
-fn tint_symbol_18(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat2x4<f32> {
- return mat2x4<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u)));
+fn ub_load_18(offset : u32) -> mat2x4<f32> {
+ return mat2x4<f32>(ub_load_12((offset + 0u)), ub_load_12((offset + 16u)));
}
-fn tint_symbol_19(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat3x2<f32> {
- return mat3x2<f32>(tint_symbol_4(buffer, (offset + 0u)), tint_symbol_4(buffer, (offset + 8u)), tint_symbol_4(buffer, (offset + 16u)));
+fn ub_load_19(offset : u32) -> mat3x2<f32> {
+ return mat3x2<f32>(ub_load_4((offset + 0u)), ub_load_4((offset + 8u)), ub_load_4((offset + 16u)));
}
-fn tint_symbol_20(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat3x3<f32> {
- return mat3x3<f32>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 32u)));
+fn ub_load_20(offset : u32) -> mat3x3<f32> {
+ return mat3x3<f32>(ub_load_8((offset + 0u)), ub_load_8((offset + 16u)), ub_load_8((offset + 32u)));
}
-fn tint_symbol_21(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat3x4<f32> {
- return mat3x4<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u)), tint_symbol_12(buffer, (offset + 32u)));
+fn ub_load_21(offset : u32) -> mat3x4<f32> {
+ return mat3x4<f32>(ub_load_12((offset + 0u)), ub_load_12((offset + 16u)), ub_load_12((offset + 32u)));
}
-fn tint_symbol_22(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat4x2<f32> {
- return mat4x2<f32>(tint_symbol_4(buffer, (offset + 0u)), tint_symbol_4(buffer, (offset + 8u)), tint_symbol_4(buffer, (offset + 16u)), tint_symbol_4(buffer, (offset + 24u)));
+fn ub_load_22(offset : u32) -> mat4x2<f32> {
+ return mat4x2<f32>(ub_load_4((offset + 0u)), ub_load_4((offset + 8u)), ub_load_4((offset + 16u)), ub_load_4((offset + 24u)));
}
-fn tint_symbol_23(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat4x3<f32> {
- return mat4x3<f32>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 32u)), tint_symbol_8(buffer, (offset + 48u)));
+fn ub_load_23(offset : u32) -> mat4x3<f32> {
+ return mat4x3<f32>(ub_load_8((offset + 0u)), ub_load_8((offset + 16u)), ub_load_8((offset + 32u)), ub_load_8((offset + 48u)));
}
-fn tint_symbol_24(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat4x4<f32> {
- return mat4x4<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u)), tint_symbol_12(buffer, (offset + 32u)), tint_symbol_12(buffer, (offset + 48u)));
+fn ub_load_24(offset : u32) -> mat4x4<f32> {
+ return mat4x4<f32>(ub_load_12((offset + 0u)), ub_load_12((offset + 16u)), ub_load_12((offset + 32u)), ub_load_12((offset + 48u)));
}
-fn tint_symbol_25(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat2x2<f16> {
- return mat2x2<f16>(tint_symbol_7(buffer, (offset + 0u)), tint_symbol_7(buffer, (offset + 4u)));
+fn ub_load_25(offset : u32) -> mat2x2<f16> {
+ return mat2x2<f16>(ub_load_7((offset + 0u)), ub_load_7((offset + 4u)));
}
-fn tint_symbol_26(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat2x3<f16> {
- return mat2x3<f16>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 8u)));
+fn ub_load_26(offset : u32) -> mat2x3<f16> {
+ return mat2x3<f16>(ub_load_11((offset + 0u)), ub_load_11((offset + 8u)));
}
-fn tint_symbol_27(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat2x4<f16> {
- return mat2x4<f16>(tint_symbol_15(buffer, (offset + 0u)), tint_symbol_15(buffer, (offset + 8u)));
+fn ub_load_27(offset : u32) -> mat2x4<f16> {
+ return mat2x4<f16>(ub_load_15((offset + 0u)), ub_load_15((offset + 8u)));
}
-fn tint_symbol_28(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat3x2<f16> {
- return mat3x2<f16>(tint_symbol_7(buffer, (offset + 0u)), tint_symbol_7(buffer, (offset + 4u)), tint_symbol_7(buffer, (offset + 8u)));
+fn ub_load_28(offset : u32) -> mat3x2<f16> {
+ return mat3x2<f16>(ub_load_7((offset + 0u)), ub_load_7((offset + 4u)), ub_load_7((offset + 8u)));
}
-fn tint_symbol_29(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat3x3<f16> {
- return mat3x3<f16>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 8u)), tint_symbol_11(buffer, (offset + 16u)));
+fn ub_load_29(offset : u32) -> mat3x3<f16> {
+ return mat3x3<f16>(ub_load_11((offset + 0u)), ub_load_11((offset + 8u)), ub_load_11((offset + 16u)));
}
-fn tint_symbol_30(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat3x4<f16> {
- return mat3x4<f16>(tint_symbol_15(buffer, (offset + 0u)), tint_symbol_15(buffer, (offset + 8u)), tint_symbol_15(buffer, (offset + 16u)));
+fn ub_load_30(offset : u32) -> mat3x4<f16> {
+ return mat3x4<f16>(ub_load_15((offset + 0u)), ub_load_15((offset + 8u)), ub_load_15((offset + 16u)));
}
-fn tint_symbol_31(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat4x2<f16> {
- return mat4x2<f16>(tint_symbol_7(buffer, (offset + 0u)), tint_symbol_7(buffer, (offset + 4u)), tint_symbol_7(buffer, (offset + 8u)), tint_symbol_7(buffer, (offset + 12u)));
+fn ub_load_31(offset : u32) -> mat4x2<f16> {
+ return mat4x2<f16>(ub_load_7((offset + 0u)), ub_load_7((offset + 4u)), ub_load_7((offset + 8u)), ub_load_7((offset + 12u)));
}
-fn tint_symbol_32(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat4x3<f16> {
- return mat4x3<f16>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 8u)), tint_symbol_11(buffer, (offset + 16u)), tint_symbol_11(buffer, (offset + 24u)));
+fn ub_load_32(offset : u32) -> mat4x3<f16> {
+ return mat4x3<f16>(ub_load_11((offset + 0u)), ub_load_11((offset + 8u)), ub_load_11((offset + 16u)), ub_load_11((offset + 24u)));
}
-fn tint_symbol_33(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat4x4<f16> {
- return mat4x4<f16>(tint_symbol_15(buffer, (offset + 0u)), tint_symbol_15(buffer, (offset + 8u)), tint_symbol_15(buffer, (offset + 16u)), tint_symbol_15(buffer, (offset + 24u)));
+fn ub_load_33(offset : u32) -> mat4x4<f16> {
+ return mat4x4<f16>(ub_load_15((offset + 0u)), ub_load_15((offset + 8u)), ub_load_15((offset + 16u)), ub_load_15((offset + 24u)));
}
-fn tint_symbol_34(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> array<vec3<f32>, 2u> {
+fn ub_load_34(offset : u32) -> array<vec3<f32>, 2u> {
var arr : array<vec3<f32>, 2u>;
for(var i = 0u; (i < 2u); i = (i + 1u)) {
- arr[i] = tint_symbol_8(buffer, (offset + (i * 16u)));
+ arr[i] = ub_load_8((offset + (i * 16u)));
}
return arr;
}
-fn tint_symbol_35(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> array<mat4x2<f16>, 2u> {
+fn ub_load_35(offset : u32) -> array<mat4x2<f16>, 2u> {
var arr_1 : array<mat4x2<f16>, 2u>;
for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_31(buffer, (offset + (i_1 * 16u)));
+ arr_1[i_1] = ub_load_31((offset + (i_1 * 16u)));
}
return arr_1;
}
@compute @workgroup_size(1)
fn main() {
- var scalar_f32 : f32 = tint_symbol(&(ub), 0u);
- var scalar_i32 : i32 = tint_symbol_1(&(ub), 4u);
- var scalar_u32 : u32 = tint_symbol_2(&(ub), 8u);
- var scalar_f16 : f16 = tint_symbol_3(&(ub), 12u);
- var vec2_f32 : vec2<f32> = tint_symbol_4(&(ub), 16u);
- var vec2_i32 : vec2<i32> = tint_symbol_5(&(ub), 24u);
- var vec2_u32 : vec2<u32> = tint_symbol_6(&(ub), 32u);
- var vec2_f16 : vec2<f16> = tint_symbol_7(&(ub), 40u);
- var vec3_f32 : vec3<f32> = tint_symbol_8(&(ub), 48u);
- var vec3_i32 : vec3<i32> = tint_symbol_9(&(ub), 64u);
- var vec3_u32 : vec3<u32> = tint_symbol_10(&(ub), 80u);
- var vec3_f16 : vec3<f16> = tint_symbol_11(&(ub), 96u);
- var vec4_f32 : vec4<f32> = tint_symbol_12(&(ub), 112u);
- var vec4_i32 : vec4<i32> = tint_symbol_13(&(ub), 128u);
- var vec4_u32 : vec4<u32> = tint_symbol_14(&(ub), 144u);
- var vec4_f16 : vec4<f16> = tint_symbol_15(&(ub), 160u);
- var mat2x2_f32 : mat2x2<f32> = tint_symbol_16(&(ub), 168u);
- var mat2x3_f32 : mat2x3<f32> = tint_symbol_17(&(ub), 192u);
- var mat2x4_f32 : mat2x4<f32> = tint_symbol_18(&(ub), 224u);
- var mat3x2_f32 : mat3x2<f32> = tint_symbol_19(&(ub), 256u);
- var mat3x3_f32 : mat3x3<f32> = tint_symbol_20(&(ub), 288u);
- var mat3x4_f32 : mat3x4<f32> = tint_symbol_21(&(ub), 336u);
- var mat4x2_f32 : mat4x2<f32> = tint_symbol_22(&(ub), 384u);
- var mat4x3_f32 : mat4x3<f32> = tint_symbol_23(&(ub), 416u);
- var mat4x4_f32 : mat4x4<f32> = tint_symbol_24(&(ub), 480u);
- var mat2x2_f16 : mat2x2<f16> = tint_symbol_25(&(ub), 544u);
- var mat2x3_f16 : mat2x3<f16> = tint_symbol_26(&(ub), 552u);
- var mat2x4_f16 : mat2x4<f16> = tint_symbol_27(&(ub), 568u);
- var mat3x2_f16 : mat3x2<f16> = tint_symbol_28(&(ub), 584u);
- var mat3x3_f16 : mat3x3<f16> = tint_symbol_29(&(ub), 600u);
- var mat3x4_f16 : mat3x4<f16> = tint_symbol_30(&(ub), 624u);
- var mat4x2_f16 : mat4x2<f16> = tint_symbol_31(&(ub), 648u);
- var mat4x3_f16 : mat4x3<f16> = tint_symbol_32(&(ub), 664u);
- var mat4x4_f16 : mat4x4<f16> = tint_symbol_33(&(ub), 696u);
- var arr2_vec3_f32 : array<vec3<f32>, 2> = tint_symbol_34(&(ub), 736u);
- var arr2_mat4x2_f16 : array<mat4x2<f16>, 2> = tint_symbol_35(&(ub), 768u);
+ var scalar_f32 : f32 = ub_load(0u);
+ var scalar_i32 : i32 = ub_load_1(4u);
+ var scalar_u32 : u32 = ub_load_2(8u);
+ var scalar_f16 : f16 = ub_load_3(12u);
+ var vec2_f32 : vec2<f32> = ub_load_4(16u);
+ var vec2_i32 : vec2<i32> = ub_load_5(24u);
+ var vec2_u32 : vec2<u32> = ub_load_6(32u);
+ var vec2_f16 : vec2<f16> = ub_load_7(40u);
+ var vec3_f32 : vec3<f32> = ub_load_8(48u);
+ var vec3_i32 : vec3<i32> = ub_load_9(64u);
+ var vec3_u32 : vec3<u32> = ub_load_10(80u);
+ var vec3_f16 : vec3<f16> = ub_load_11(96u);
+ var vec4_f32 : vec4<f32> = ub_load_12(112u);
+ var vec4_i32 : vec4<i32> = ub_load_13(128u);
+ var vec4_u32 : vec4<u32> = ub_load_14(144u);
+ var vec4_f16 : vec4<f16> = ub_load_15(160u);
+ var mat2x2_f32 : mat2x2<f32> = ub_load_16(168u);
+ var mat2x3_f32 : mat2x3<f32> = ub_load_17(192u);
+ var mat2x4_f32 : mat2x4<f32> = ub_load_18(224u);
+ var mat3x2_f32 : mat3x2<f32> = ub_load_19(256u);
+ var mat3x3_f32 : mat3x3<f32> = ub_load_20(288u);
+ var mat3x4_f32 : mat3x4<f32> = ub_load_21(336u);
+ var mat4x2_f32 : mat4x2<f32> = ub_load_22(384u);
+ var mat4x3_f32 : mat4x3<f32> = ub_load_23(416u);
+ var mat4x4_f32 : mat4x4<f32> = ub_load_24(480u);
+ var mat2x2_f16 : mat2x2<f16> = ub_load_25(544u);
+ var mat2x3_f16 : mat2x3<f16> = ub_load_26(552u);
+ var mat2x4_f16 : mat2x4<f16> = ub_load_27(568u);
+ var mat3x2_f16 : mat3x2<f16> = ub_load_28(584u);
+ var mat3x3_f16 : mat3x3<f16> = ub_load_29(600u);
+ var mat3x4_f16 : mat3x4<f16> = ub_load_30(624u);
+ var mat4x2_f16 : mat4x2<f16> = ub_load_31(648u);
+ var mat4x3_f16 : mat4x3<f16> = ub_load_32(664u);
+ var mat4x4_f16 : mat4x4<f16> = ub_load_33(696u);
+ var arr2_vec3_f32 : array<vec3<f32>, 2> = ub_load_34(736u);
+ var arr2_mat4x2_f16 : array<mat4x2<f16>, 2> = ub_load_35(768u);
}
)";
@@ -1075,179 +1075,179 @@
enable f16;
@internal(intrinsic_load_uniform_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> f32
+fn ub_load(offset : u32) -> f32
@internal(intrinsic_load_uniform_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_1(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> i32
+fn ub_load_1(offset : u32) -> i32
@internal(intrinsic_load_uniform_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_2(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> u32
+fn ub_load_2(offset : u32) -> u32
@internal(intrinsic_load_uniform_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_3(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> f16
+fn ub_load_3(offset : u32) -> f16
@internal(intrinsic_load_uniform_vec2_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_4(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec2<f32>
+fn ub_load_4(offset : u32) -> vec2<f32>
@internal(intrinsic_load_uniform_vec2_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_5(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec2<i32>
+fn ub_load_5(offset : u32) -> vec2<i32>
@internal(intrinsic_load_uniform_vec2_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_6(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec2<u32>
+fn ub_load_6(offset : u32) -> vec2<u32>
@internal(intrinsic_load_uniform_vec2_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_7(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec2<f16>
+fn ub_load_7(offset : u32) -> vec2<f16>
@internal(intrinsic_load_uniform_vec3_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_8(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec3<f32>
+fn ub_load_8(offset : u32) -> vec3<f32>
@internal(intrinsic_load_uniform_vec3_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_9(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec3<i32>
+fn ub_load_9(offset : u32) -> vec3<i32>
@internal(intrinsic_load_uniform_vec3_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_10(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec3<u32>
+fn ub_load_10(offset : u32) -> vec3<u32>
@internal(intrinsic_load_uniform_vec3_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_11(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec3<f16>
+fn ub_load_11(offset : u32) -> vec3<f16>
@internal(intrinsic_load_uniform_vec4_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_12(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec4<f32>
+fn ub_load_12(offset : u32) -> vec4<f32>
@internal(intrinsic_load_uniform_vec4_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_13(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec4<i32>
+fn ub_load_13(offset : u32) -> vec4<i32>
@internal(intrinsic_load_uniform_vec4_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_14(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec4<u32>
+fn ub_load_14(offset : u32) -> vec4<u32>
@internal(intrinsic_load_uniform_vec4_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_15(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> vec4<f16>
+fn ub_load_15(offset : u32) -> vec4<f16>
-fn tint_symbol_16(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat2x2<f32> {
- return mat2x2<f32>(tint_symbol_4(buffer, (offset + 0u)), tint_symbol_4(buffer, (offset + 8u)));
+fn ub_load_16(offset : u32) -> mat2x2<f32> {
+ return mat2x2<f32>(ub_load_4((offset + 0u)), ub_load_4((offset + 8u)));
}
-fn tint_symbol_17(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat2x3<f32> {
- return mat2x3<f32>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)));
+fn ub_load_17(offset : u32) -> mat2x3<f32> {
+ return mat2x3<f32>(ub_load_8((offset + 0u)), ub_load_8((offset + 16u)));
}
-fn tint_symbol_18(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat2x4<f32> {
- return mat2x4<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u)));
+fn ub_load_18(offset : u32) -> mat2x4<f32> {
+ return mat2x4<f32>(ub_load_12((offset + 0u)), ub_load_12((offset + 16u)));
}
-fn tint_symbol_19(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat3x2<f32> {
- return mat3x2<f32>(tint_symbol_4(buffer, (offset + 0u)), tint_symbol_4(buffer, (offset + 8u)), tint_symbol_4(buffer, (offset + 16u)));
+fn ub_load_19(offset : u32) -> mat3x2<f32> {
+ return mat3x2<f32>(ub_load_4((offset + 0u)), ub_load_4((offset + 8u)), ub_load_4((offset + 16u)));
}
-fn tint_symbol_20(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat3x3<f32> {
- return mat3x3<f32>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 32u)));
+fn ub_load_20(offset : u32) -> mat3x3<f32> {
+ return mat3x3<f32>(ub_load_8((offset + 0u)), ub_load_8((offset + 16u)), ub_load_8((offset + 32u)));
}
-fn tint_symbol_21(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat3x4<f32> {
- return mat3x4<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u)), tint_symbol_12(buffer, (offset + 32u)));
+fn ub_load_21(offset : u32) -> mat3x4<f32> {
+ return mat3x4<f32>(ub_load_12((offset + 0u)), ub_load_12((offset + 16u)), ub_load_12((offset + 32u)));
}
-fn tint_symbol_22(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat4x2<f32> {
- return mat4x2<f32>(tint_symbol_4(buffer, (offset + 0u)), tint_symbol_4(buffer, (offset + 8u)), tint_symbol_4(buffer, (offset + 16u)), tint_symbol_4(buffer, (offset + 24u)));
+fn ub_load_22(offset : u32) -> mat4x2<f32> {
+ return mat4x2<f32>(ub_load_4((offset + 0u)), ub_load_4((offset + 8u)), ub_load_4((offset + 16u)), ub_load_4((offset + 24u)));
}
-fn tint_symbol_23(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat4x3<f32> {
- return mat4x3<f32>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 32u)), tint_symbol_8(buffer, (offset + 48u)));
+fn ub_load_23(offset : u32) -> mat4x3<f32> {
+ return mat4x3<f32>(ub_load_8((offset + 0u)), ub_load_8((offset + 16u)), ub_load_8((offset + 32u)), ub_load_8((offset + 48u)));
}
-fn tint_symbol_24(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat4x4<f32> {
- return mat4x4<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 16u)), tint_symbol_12(buffer, (offset + 32u)), tint_symbol_12(buffer, (offset + 48u)));
+fn ub_load_24(offset : u32) -> mat4x4<f32> {
+ return mat4x4<f32>(ub_load_12((offset + 0u)), ub_load_12((offset + 16u)), ub_load_12((offset + 32u)), ub_load_12((offset + 48u)));
}
-fn tint_symbol_25(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat2x2<f16> {
- return mat2x2<f16>(tint_symbol_7(buffer, (offset + 0u)), tint_symbol_7(buffer, (offset + 4u)));
+fn ub_load_25(offset : u32) -> mat2x2<f16> {
+ return mat2x2<f16>(ub_load_7((offset + 0u)), ub_load_7((offset + 4u)));
}
-fn tint_symbol_26(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat2x3<f16> {
- return mat2x3<f16>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 8u)));
+fn ub_load_26(offset : u32) -> mat2x3<f16> {
+ return mat2x3<f16>(ub_load_11((offset + 0u)), ub_load_11((offset + 8u)));
}
-fn tint_symbol_27(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat2x4<f16> {
- return mat2x4<f16>(tint_symbol_15(buffer, (offset + 0u)), tint_symbol_15(buffer, (offset + 8u)));
+fn ub_load_27(offset : u32) -> mat2x4<f16> {
+ return mat2x4<f16>(ub_load_15((offset + 0u)), ub_load_15((offset + 8u)));
}
-fn tint_symbol_28(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat3x2<f16> {
- return mat3x2<f16>(tint_symbol_7(buffer, (offset + 0u)), tint_symbol_7(buffer, (offset + 4u)), tint_symbol_7(buffer, (offset + 8u)));
+fn ub_load_28(offset : u32) -> mat3x2<f16> {
+ return mat3x2<f16>(ub_load_7((offset + 0u)), ub_load_7((offset + 4u)), ub_load_7((offset + 8u)));
}
-fn tint_symbol_29(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat3x3<f16> {
- return mat3x3<f16>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 8u)), tint_symbol_11(buffer, (offset + 16u)));
+fn ub_load_29(offset : u32) -> mat3x3<f16> {
+ return mat3x3<f16>(ub_load_11((offset + 0u)), ub_load_11((offset + 8u)), ub_load_11((offset + 16u)));
}
-fn tint_symbol_30(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat3x4<f16> {
- return mat3x4<f16>(tint_symbol_15(buffer, (offset + 0u)), tint_symbol_15(buffer, (offset + 8u)), tint_symbol_15(buffer, (offset + 16u)));
+fn ub_load_30(offset : u32) -> mat3x4<f16> {
+ return mat3x4<f16>(ub_load_15((offset + 0u)), ub_load_15((offset + 8u)), ub_load_15((offset + 16u)));
}
-fn tint_symbol_31(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat4x2<f16> {
- return mat4x2<f16>(tint_symbol_7(buffer, (offset + 0u)), tint_symbol_7(buffer, (offset + 4u)), tint_symbol_7(buffer, (offset + 8u)), tint_symbol_7(buffer, (offset + 12u)));
+fn ub_load_31(offset : u32) -> mat4x2<f16> {
+ return mat4x2<f16>(ub_load_7((offset + 0u)), ub_load_7((offset + 4u)), ub_load_7((offset + 8u)), ub_load_7((offset + 12u)));
}
-fn tint_symbol_32(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat4x3<f16> {
- return mat4x3<f16>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 8u)), tint_symbol_11(buffer, (offset + 16u)), tint_symbol_11(buffer, (offset + 24u)));
+fn ub_load_32(offset : u32) -> mat4x3<f16> {
+ return mat4x3<f16>(ub_load_11((offset + 0u)), ub_load_11((offset + 8u)), ub_load_11((offset + 16u)), ub_load_11((offset + 24u)));
}
-fn tint_symbol_33(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> mat4x4<f16> {
- return mat4x4<f16>(tint_symbol_15(buffer, (offset + 0u)), tint_symbol_15(buffer, (offset + 8u)), tint_symbol_15(buffer, (offset + 16u)), tint_symbol_15(buffer, (offset + 24u)));
+fn ub_load_33(offset : u32) -> mat4x4<f16> {
+ return mat4x4<f16>(ub_load_15((offset + 0u)), ub_load_15((offset + 8u)), ub_load_15((offset + 16u)), ub_load_15((offset + 24u)));
}
-fn tint_symbol_34(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> array<vec3<f32>, 2u> {
+fn ub_load_34(offset : u32) -> array<vec3<f32>, 2u> {
var arr : array<vec3<f32>, 2u>;
for(var i = 0u; (i < 2u); i = (i + 1u)) {
- arr[i] = tint_symbol_8(buffer, (offset + (i * 16u)));
+ arr[i] = ub_load_8((offset + (i * 16u)));
}
return arr;
}
-fn tint_symbol_35(@internal(disable_validation__function_parameter) buffer : ptr<uniform, UB>, offset : u32) -> array<mat4x2<f16>, 2u> {
+fn ub_load_35(offset : u32) -> array<mat4x2<f16>, 2u> {
var arr_1 : array<mat4x2<f16>, 2u>;
for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_31(buffer, (offset + (i_1 * 16u)));
+ arr_1[i_1] = ub_load_31((offset + (i_1 * 16u)));
}
return arr_1;
}
@compute @workgroup_size(1)
fn main() {
- var scalar_f32 : f32 = tint_symbol(&(ub), 0u);
- var scalar_i32 : i32 = tint_symbol_1(&(ub), 4u);
- var scalar_u32 : u32 = tint_symbol_2(&(ub), 8u);
- var scalar_f16 : f16 = tint_symbol_3(&(ub), 12u);
- var vec2_f32 : vec2<f32> = tint_symbol_4(&(ub), 16u);
- var vec2_i32 : vec2<i32> = tint_symbol_5(&(ub), 24u);
- var vec2_u32 : vec2<u32> = tint_symbol_6(&(ub), 32u);
- var vec2_f16 : vec2<f16> = tint_symbol_7(&(ub), 40u);
- var vec3_f32 : vec3<f32> = tint_symbol_8(&(ub), 48u);
- var vec3_i32 : vec3<i32> = tint_symbol_9(&(ub), 64u);
- var vec3_u32 : vec3<u32> = tint_symbol_10(&(ub), 80u);
- var vec3_f16 : vec3<f16> = tint_symbol_11(&(ub), 96u);
- var vec4_f32 : vec4<f32> = tint_symbol_12(&(ub), 112u);
- var vec4_i32 : vec4<i32> = tint_symbol_13(&(ub), 128u);
- var vec4_u32 : vec4<u32> = tint_symbol_14(&(ub), 144u);
- var vec4_f16 : vec4<f16> = tint_symbol_15(&(ub), 160u);
- var mat2x2_f32 : mat2x2<f32> = tint_symbol_16(&(ub), 168u);
- var mat2x3_f32 : mat2x3<f32> = tint_symbol_17(&(ub), 192u);
- var mat2x4_f32 : mat2x4<f32> = tint_symbol_18(&(ub), 224u);
- var mat3x2_f32 : mat3x2<f32> = tint_symbol_19(&(ub), 256u);
- var mat3x3_f32 : mat3x3<f32> = tint_symbol_20(&(ub), 288u);
- var mat3x4_f32 : mat3x4<f32> = tint_symbol_21(&(ub), 336u);
- var mat4x2_f32 : mat4x2<f32> = tint_symbol_22(&(ub), 384u);
- var mat4x3_f32 : mat4x3<f32> = tint_symbol_23(&(ub), 416u);
- var mat4x4_f32 : mat4x4<f32> = tint_symbol_24(&(ub), 480u);
- var mat2x2_f16 : mat2x2<f16> = tint_symbol_25(&(ub), 544u);
- var mat2x3_f16 : mat2x3<f16> = tint_symbol_26(&(ub), 552u);
- var mat2x4_f16 : mat2x4<f16> = tint_symbol_27(&(ub), 568u);
- var mat3x2_f16 : mat3x2<f16> = tint_symbol_28(&(ub), 584u);
- var mat3x3_f16 : mat3x3<f16> = tint_symbol_29(&(ub), 600u);
- var mat3x4_f16 : mat3x4<f16> = tint_symbol_30(&(ub), 624u);
- var mat4x2_f16 : mat4x2<f16> = tint_symbol_31(&(ub), 648u);
- var mat4x3_f16 : mat4x3<f16> = tint_symbol_32(&(ub), 664u);
- var mat4x4_f16 : mat4x4<f16> = tint_symbol_33(&(ub), 696u);
- var arr2_vec3_f32 : array<vec3<f32>, 2> = tint_symbol_34(&(ub), 736u);
- var arr2_mat4x2_f16 : array<mat4x2<f16>, 2> = tint_symbol_35(&(ub), 768u);
+ var scalar_f32 : f32 = ub_load(0u);
+ var scalar_i32 : i32 = ub_load_1(4u);
+ var scalar_u32 : u32 = ub_load_2(8u);
+ var scalar_f16 : f16 = ub_load_3(12u);
+ var vec2_f32 : vec2<f32> = ub_load_4(16u);
+ var vec2_i32 : vec2<i32> = ub_load_5(24u);
+ var vec2_u32 : vec2<u32> = ub_load_6(32u);
+ var vec2_f16 : vec2<f16> = ub_load_7(40u);
+ var vec3_f32 : vec3<f32> = ub_load_8(48u);
+ var vec3_i32 : vec3<i32> = ub_load_9(64u);
+ var vec3_u32 : vec3<u32> = ub_load_10(80u);
+ var vec3_f16 : vec3<f16> = ub_load_11(96u);
+ var vec4_f32 : vec4<f32> = ub_load_12(112u);
+ var vec4_i32 : vec4<i32> = ub_load_13(128u);
+ var vec4_u32 : vec4<u32> = ub_load_14(144u);
+ var vec4_f16 : vec4<f16> = ub_load_15(160u);
+ var mat2x2_f32 : mat2x2<f32> = ub_load_16(168u);
+ var mat2x3_f32 : mat2x3<f32> = ub_load_17(192u);
+ var mat2x4_f32 : mat2x4<f32> = ub_load_18(224u);
+ var mat3x2_f32 : mat3x2<f32> = ub_load_19(256u);
+ var mat3x3_f32 : mat3x3<f32> = ub_load_20(288u);
+ var mat3x4_f32 : mat3x4<f32> = ub_load_21(336u);
+ var mat4x2_f32 : mat4x2<f32> = ub_load_22(384u);
+ var mat4x3_f32 : mat4x3<f32> = ub_load_23(416u);
+ var mat4x4_f32 : mat4x4<f32> = ub_load_24(480u);
+ var mat2x2_f16 : mat2x2<f16> = ub_load_25(544u);
+ var mat2x3_f16 : mat2x3<f16> = ub_load_26(552u);
+ var mat2x4_f16 : mat2x4<f16> = ub_load_27(568u);
+ var mat3x2_f16 : mat3x2<f16> = ub_load_28(584u);
+ var mat3x3_f16 : mat3x3<f16> = ub_load_29(600u);
+ var mat3x4_f16 : mat3x4<f16> = ub_load_30(624u);
+ var mat4x2_f16 : mat4x2<f16> = ub_load_31(648u);
+ var mat4x3_f16 : mat4x3<f16> = ub_load_32(664u);
+ var mat4x4_f16 : mat4x4<f16> = ub_load_33(696u);
+ var arr2_vec3_f32 : array<vec3<f32>, 2> = ub_load_34(736u);
+ var arr2_mat4x2_f16 : array<mat4x2<f16>, 2> = ub_load_35(768u);
}
@group(0) @binding(0) var<uniform> ub : UB;
@@ -1428,213 +1428,213 @@
@group(0) @binding(0) var<storage, read_write> sb : SB;
@internal(intrinsic_store_storage_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : f32)
+fn sb_store(offset : u32, value : f32)
@internal(intrinsic_store_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : i32)
+fn sb_store_1(offset : u32, value : i32)
@internal(intrinsic_store_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_2(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : u32)
+fn sb_store_2(offset : u32, value : u32)
@internal(intrinsic_store_storage_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_3(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : f16)
+fn sb_store_3(offset : u32, value : f16)
@internal(intrinsic_store_storage_vec2_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_4(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<f32>)
+fn sb_store_4(offset : u32, value : vec2<f32>)
@internal(intrinsic_store_storage_vec2_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_5(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<i32>)
+fn sb_store_5(offset : u32, value : vec2<i32>)
@internal(intrinsic_store_storage_vec2_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_6(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<u32>)
+fn sb_store_6(offset : u32, value : vec2<u32>)
@internal(intrinsic_store_storage_vec2_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_7(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<f16>)
+fn sb_store_7(offset : u32, value : vec2<f16>)
@internal(intrinsic_store_storage_vec3_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_8(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<f32>)
+fn sb_store_8(offset : u32, value : vec3<f32>)
@internal(intrinsic_store_storage_vec3_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_9(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<i32>)
+fn sb_store_9(offset : u32, value : vec3<i32>)
@internal(intrinsic_store_storage_vec3_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_10(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<u32>)
+fn sb_store_10(offset : u32, value : vec3<u32>)
@internal(intrinsic_store_storage_vec3_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_11(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<f16>)
+fn sb_store_11(offset : u32, value : vec3<f16>)
@internal(intrinsic_store_storage_vec4_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_12(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<f32>)
+fn sb_store_12(offset : u32, value : vec4<f32>)
@internal(intrinsic_store_storage_vec4_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_13(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<i32>)
+fn sb_store_13(offset : u32, value : vec4<i32>)
@internal(intrinsic_store_storage_vec4_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_14(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<u32>)
+fn sb_store_14(offset : u32, value : vec4<u32>)
@internal(intrinsic_store_storage_vec4_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_15(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<f16>)
+fn sb_store_15(offset : u32, value : vec4<f16>)
-fn tint_symbol_16(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x2<f32>) {
- tint_symbol_4(buffer, (offset + 0u), value[0u]);
- tint_symbol_4(buffer, (offset + 8u), value[1u]);
+fn sb_store_16(offset : u32, value : mat2x2<f32>) {
+ sb_store_4((offset + 0u), value[0u]);
+ sb_store_4((offset + 8u), value[1u]);
}
-fn tint_symbol_17(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x3<f32>) {
- tint_symbol_8(buffer, (offset + 0u), value[0u]);
- tint_symbol_8(buffer, (offset + 16u), value[1u]);
+fn sb_store_17(offset : u32, value : mat2x3<f32>) {
+ sb_store_8((offset + 0u), value[0u]);
+ sb_store_8((offset + 16u), value[1u]);
}
-fn tint_symbol_18(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x4<f32>) {
- tint_symbol_12(buffer, (offset + 0u), value[0u]);
- tint_symbol_12(buffer, (offset + 16u), value[1u]);
+fn sb_store_18(offset : u32, value : mat2x4<f32>) {
+ sb_store_12((offset + 0u), value[0u]);
+ sb_store_12((offset + 16u), value[1u]);
}
-fn tint_symbol_19(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x2<f32>) {
- tint_symbol_4(buffer, (offset + 0u), value[0u]);
- tint_symbol_4(buffer, (offset + 8u), value[1u]);
- tint_symbol_4(buffer, (offset + 16u), value[2u]);
+fn sb_store_19(offset : u32, value : mat3x2<f32>) {
+ sb_store_4((offset + 0u), value[0u]);
+ sb_store_4((offset + 8u), value[1u]);
+ sb_store_4((offset + 16u), value[2u]);
}
-fn tint_symbol_20(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x3<f32>) {
- tint_symbol_8(buffer, (offset + 0u), value[0u]);
- tint_symbol_8(buffer, (offset + 16u), value[1u]);
- tint_symbol_8(buffer, (offset + 32u), value[2u]);
+fn sb_store_20(offset : u32, value : mat3x3<f32>) {
+ sb_store_8((offset + 0u), value[0u]);
+ sb_store_8((offset + 16u), value[1u]);
+ sb_store_8((offset + 32u), value[2u]);
}
-fn tint_symbol_21(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x4<f32>) {
- tint_symbol_12(buffer, (offset + 0u), value[0u]);
- tint_symbol_12(buffer, (offset + 16u), value[1u]);
- tint_symbol_12(buffer, (offset + 32u), value[2u]);
+fn sb_store_21(offset : u32, value : mat3x4<f32>) {
+ sb_store_12((offset + 0u), value[0u]);
+ sb_store_12((offset + 16u), value[1u]);
+ sb_store_12((offset + 32u), value[2u]);
}
-fn tint_symbol_22(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x2<f32>) {
- tint_symbol_4(buffer, (offset + 0u), value[0u]);
- tint_symbol_4(buffer, (offset + 8u), value[1u]);
- tint_symbol_4(buffer, (offset + 16u), value[2u]);
- tint_symbol_4(buffer, (offset + 24u), value[3u]);
+fn sb_store_22(offset : u32, value : mat4x2<f32>) {
+ sb_store_4((offset + 0u), value[0u]);
+ sb_store_4((offset + 8u), value[1u]);
+ sb_store_4((offset + 16u), value[2u]);
+ sb_store_4((offset + 24u), value[3u]);
}
-fn tint_symbol_23(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x3<f32>) {
- tint_symbol_8(buffer, (offset + 0u), value[0u]);
- tint_symbol_8(buffer, (offset + 16u), value[1u]);
- tint_symbol_8(buffer, (offset + 32u), value[2u]);
- tint_symbol_8(buffer, (offset + 48u), value[3u]);
+fn sb_store_23(offset : u32, value : mat4x3<f32>) {
+ sb_store_8((offset + 0u), value[0u]);
+ sb_store_8((offset + 16u), value[1u]);
+ sb_store_8((offset + 32u), value[2u]);
+ sb_store_8((offset + 48u), value[3u]);
}
-fn tint_symbol_24(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x4<f32>) {
- tint_symbol_12(buffer, (offset + 0u), value[0u]);
- tint_symbol_12(buffer, (offset + 16u), value[1u]);
- tint_symbol_12(buffer, (offset + 32u), value[2u]);
- tint_symbol_12(buffer, (offset + 48u), value[3u]);
+fn sb_store_24(offset : u32, value : mat4x4<f32>) {
+ sb_store_12((offset + 0u), value[0u]);
+ sb_store_12((offset + 16u), value[1u]);
+ sb_store_12((offset + 32u), value[2u]);
+ sb_store_12((offset + 48u), value[3u]);
}
-fn tint_symbol_25(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x2<f16>) {
- tint_symbol_7(buffer, (offset + 0u), value[0u]);
- tint_symbol_7(buffer, (offset + 4u), value[1u]);
+fn sb_store_25(offset : u32, value : mat2x2<f16>) {
+ sb_store_7((offset + 0u), value[0u]);
+ sb_store_7((offset + 4u), value[1u]);
}
-fn tint_symbol_26(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x3<f16>) {
- tint_symbol_11(buffer, (offset + 0u), value[0u]);
- tint_symbol_11(buffer, (offset + 8u), value[1u]);
+fn sb_store_26(offset : u32, value : mat2x3<f16>) {
+ sb_store_11((offset + 0u), value[0u]);
+ sb_store_11((offset + 8u), value[1u]);
}
-fn tint_symbol_27(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x4<f16>) {
- tint_symbol_15(buffer, (offset + 0u), value[0u]);
- tint_symbol_15(buffer, (offset + 8u), value[1u]);
+fn sb_store_27(offset : u32, value : mat2x4<f16>) {
+ sb_store_15((offset + 0u), value[0u]);
+ sb_store_15((offset + 8u), value[1u]);
}
-fn tint_symbol_28(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x2<f16>) {
- tint_symbol_7(buffer, (offset + 0u), value[0u]);
- tint_symbol_7(buffer, (offset + 4u), value[1u]);
- tint_symbol_7(buffer, (offset + 8u), value[2u]);
+fn sb_store_28(offset : u32, value : mat3x2<f16>) {
+ sb_store_7((offset + 0u), value[0u]);
+ sb_store_7((offset + 4u), value[1u]);
+ sb_store_7((offset + 8u), value[2u]);
}
-fn tint_symbol_29(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x3<f16>) {
- tint_symbol_11(buffer, (offset + 0u), value[0u]);
- tint_symbol_11(buffer, (offset + 8u), value[1u]);
- tint_symbol_11(buffer, (offset + 16u), value[2u]);
+fn sb_store_29(offset : u32, value : mat3x3<f16>) {
+ sb_store_11((offset + 0u), value[0u]);
+ sb_store_11((offset + 8u), value[1u]);
+ sb_store_11((offset + 16u), value[2u]);
}
-fn tint_symbol_30(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x4<f16>) {
- tint_symbol_15(buffer, (offset + 0u), value[0u]);
- tint_symbol_15(buffer, (offset + 8u), value[1u]);
- tint_symbol_15(buffer, (offset + 16u), value[2u]);
+fn sb_store_30(offset : u32, value : mat3x4<f16>) {
+ sb_store_15((offset + 0u), value[0u]);
+ sb_store_15((offset + 8u), value[1u]);
+ sb_store_15((offset + 16u), value[2u]);
}
-fn tint_symbol_31(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x2<f16>) {
- tint_symbol_7(buffer, (offset + 0u), value[0u]);
- tint_symbol_7(buffer, (offset + 4u), value[1u]);
- tint_symbol_7(buffer, (offset + 8u), value[2u]);
- tint_symbol_7(buffer, (offset + 12u), value[3u]);
+fn sb_store_31(offset : u32, value : mat4x2<f16>) {
+ sb_store_7((offset + 0u), value[0u]);
+ sb_store_7((offset + 4u), value[1u]);
+ sb_store_7((offset + 8u), value[2u]);
+ sb_store_7((offset + 12u), value[3u]);
}
-fn tint_symbol_32(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x3<f16>) {
- tint_symbol_11(buffer, (offset + 0u), value[0u]);
- tint_symbol_11(buffer, (offset + 8u), value[1u]);
- tint_symbol_11(buffer, (offset + 16u), value[2u]);
- tint_symbol_11(buffer, (offset + 24u), value[3u]);
+fn sb_store_32(offset : u32, value : mat4x3<f16>) {
+ sb_store_11((offset + 0u), value[0u]);
+ sb_store_11((offset + 8u), value[1u]);
+ sb_store_11((offset + 16u), value[2u]);
+ sb_store_11((offset + 24u), value[3u]);
}
-fn tint_symbol_33(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x4<f16>) {
- tint_symbol_15(buffer, (offset + 0u), value[0u]);
- tint_symbol_15(buffer, (offset + 8u), value[1u]);
- tint_symbol_15(buffer, (offset + 16u), value[2u]);
- tint_symbol_15(buffer, (offset + 24u), value[3u]);
+fn sb_store_33(offset : u32, value : mat4x4<f16>) {
+ sb_store_15((offset + 0u), value[0u]);
+ sb_store_15((offset + 8u), value[1u]);
+ sb_store_15((offset + 16u), value[2u]);
+ sb_store_15((offset + 24u), value[3u]);
}
-fn tint_symbol_34(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : array<vec3<f32>, 2u>) {
+fn sb_store_34(offset : u32, value : array<vec3<f32>, 2u>) {
var array_1 = value;
for(var i = 0u; (i < 2u); i = (i + 1u)) {
- tint_symbol_8(buffer, (offset + (i * 16u)), array_1[i]);
+ sb_store_8((offset + (i * 16u)), array_1[i]);
}
}
-fn tint_symbol_35(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : array<mat4x2<f16>, 2u>) {
+fn sb_store_35(offset : u32, value : array<mat4x2<f16>, 2u>) {
var array_2 = value;
for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- tint_symbol_31(buffer, (offset + (i_1 * 16u)), array_2[i_1]);
+ sb_store_31((offset + (i_1 * 16u)), array_2[i_1]);
}
}
@compute @workgroup_size(1)
fn main() {
- tint_symbol(&(sb), 0u, f32());
- tint_symbol_1(&(sb), 4u, i32());
- tint_symbol_2(&(sb), 8u, u32());
- tint_symbol_3(&(sb), 12u, f16());
- tint_symbol_4(&(sb), 16u, vec2<f32>());
- tint_symbol_5(&(sb), 24u, vec2<i32>());
- tint_symbol_6(&(sb), 32u, vec2<u32>());
- tint_symbol_7(&(sb), 40u, vec2<f16>());
- tint_symbol_8(&(sb), 48u, vec3<f32>());
- tint_symbol_9(&(sb), 64u, vec3<i32>());
- tint_symbol_10(&(sb), 80u, vec3<u32>());
- tint_symbol_11(&(sb), 96u, vec3<f16>());
- tint_symbol_12(&(sb), 112u, vec4<f32>());
- tint_symbol_13(&(sb), 128u, vec4<i32>());
- tint_symbol_14(&(sb), 144u, vec4<u32>());
- tint_symbol_15(&(sb), 160u, vec4<f16>());
- tint_symbol_16(&(sb), 168u, mat2x2<f32>());
- tint_symbol_17(&(sb), 192u, mat2x3<f32>());
- tint_symbol_18(&(sb), 224u, mat2x4<f32>());
- tint_symbol_19(&(sb), 256u, mat3x2<f32>());
- tint_symbol_20(&(sb), 288u, mat3x3<f32>());
- tint_symbol_21(&(sb), 336u, mat3x4<f32>());
- tint_symbol_22(&(sb), 384u, mat4x2<f32>());
- tint_symbol_23(&(sb), 416u, mat4x3<f32>());
- tint_symbol_24(&(sb), 480u, mat4x4<f32>());
- tint_symbol_25(&(sb), 544u, mat2x2<f16>());
- tint_symbol_26(&(sb), 552u, mat2x3<f16>());
- tint_symbol_27(&(sb), 568u, mat2x4<f16>());
- tint_symbol_28(&(sb), 584u, mat3x2<f16>());
- tint_symbol_29(&(sb), 600u, mat3x3<f16>());
- tint_symbol_30(&(sb), 624u, mat3x4<f16>());
- tint_symbol_31(&(sb), 648u, mat4x2<f16>());
- tint_symbol_32(&(sb), 664u, mat4x3<f16>());
- tint_symbol_33(&(sb), 696u, mat4x4<f16>());
- tint_symbol_34(&(sb), 736u, array<vec3<f32>, 2>());
- tint_symbol_35(&(sb), 768u, array<mat4x2<f16>, 2>());
+ sb_store(0u, f32());
+ sb_store_1(4u, i32());
+ sb_store_2(8u, u32());
+ sb_store_3(12u, f16());
+ sb_store_4(16u, vec2<f32>());
+ sb_store_5(24u, vec2<i32>());
+ sb_store_6(32u, vec2<u32>());
+ sb_store_7(40u, vec2<f16>());
+ sb_store_8(48u, vec3<f32>());
+ sb_store_9(64u, vec3<i32>());
+ sb_store_10(80u, vec3<u32>());
+ sb_store_11(96u, vec3<f16>());
+ sb_store_12(112u, vec4<f32>());
+ sb_store_13(128u, vec4<i32>());
+ sb_store_14(144u, vec4<u32>());
+ sb_store_15(160u, vec4<f16>());
+ sb_store_16(168u, mat2x2<f32>());
+ sb_store_17(192u, mat2x3<f32>());
+ sb_store_18(224u, mat2x4<f32>());
+ sb_store_19(256u, mat3x2<f32>());
+ sb_store_20(288u, mat3x3<f32>());
+ sb_store_21(336u, mat3x4<f32>());
+ sb_store_22(384u, mat4x2<f32>());
+ sb_store_23(416u, mat4x3<f32>());
+ sb_store_24(480u, mat4x4<f32>());
+ sb_store_25(544u, mat2x2<f16>());
+ sb_store_26(552u, mat2x3<f16>());
+ sb_store_27(568u, mat2x4<f16>());
+ sb_store_28(584u, mat3x2<f16>());
+ sb_store_29(600u, mat3x3<f16>());
+ sb_store_30(624u, mat3x4<f16>());
+ sb_store_31(648u, mat4x2<f16>());
+ sb_store_32(664u, mat4x3<f16>());
+ sb_store_33(696u, mat4x4<f16>());
+ sb_store_34(736u, array<vec3<f32>, 2>());
+ sb_store_35(768u, array<mat4x2<f16>, 2>());
}
)";
@@ -1733,213 +1733,213 @@
enable f16;
@internal(intrinsic_store_storage_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : f32)
+fn sb_store(offset : u32, value : f32)
@internal(intrinsic_store_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : i32)
+fn sb_store_1(offset : u32, value : i32)
@internal(intrinsic_store_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_2(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : u32)
+fn sb_store_2(offset : u32, value : u32)
@internal(intrinsic_store_storage_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_3(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : f16)
+fn sb_store_3(offset : u32, value : f16)
@internal(intrinsic_store_storage_vec2_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_4(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<f32>)
+fn sb_store_4(offset : u32, value : vec2<f32>)
@internal(intrinsic_store_storage_vec2_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_5(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<i32>)
+fn sb_store_5(offset : u32, value : vec2<i32>)
@internal(intrinsic_store_storage_vec2_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_6(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<u32>)
+fn sb_store_6(offset : u32, value : vec2<u32>)
@internal(intrinsic_store_storage_vec2_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_7(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<f16>)
+fn sb_store_7(offset : u32, value : vec2<f16>)
@internal(intrinsic_store_storage_vec3_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_8(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<f32>)
+fn sb_store_8(offset : u32, value : vec3<f32>)
@internal(intrinsic_store_storage_vec3_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_9(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<i32>)
+fn sb_store_9(offset : u32, value : vec3<i32>)
@internal(intrinsic_store_storage_vec3_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_10(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<u32>)
+fn sb_store_10(offset : u32, value : vec3<u32>)
@internal(intrinsic_store_storage_vec3_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_11(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<f16>)
+fn sb_store_11(offset : u32, value : vec3<f16>)
@internal(intrinsic_store_storage_vec4_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_12(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<f32>)
+fn sb_store_12(offset : u32, value : vec4<f32>)
@internal(intrinsic_store_storage_vec4_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_13(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<i32>)
+fn sb_store_13(offset : u32, value : vec4<i32>)
@internal(intrinsic_store_storage_vec4_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_14(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<u32>)
+fn sb_store_14(offset : u32, value : vec4<u32>)
@internal(intrinsic_store_storage_vec4_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_15(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<f16>)
+fn sb_store_15(offset : u32, value : vec4<f16>)
-fn tint_symbol_16(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x2<f32>) {
- tint_symbol_4(buffer, (offset + 0u), value[0u]);
- tint_symbol_4(buffer, (offset + 8u), value[1u]);
+fn sb_store_16(offset : u32, value : mat2x2<f32>) {
+ sb_store_4((offset + 0u), value[0u]);
+ sb_store_4((offset + 8u), value[1u]);
}
-fn tint_symbol_17(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x3<f32>) {
- tint_symbol_8(buffer, (offset + 0u), value[0u]);
- tint_symbol_8(buffer, (offset + 16u), value[1u]);
+fn sb_store_17(offset : u32, value : mat2x3<f32>) {
+ sb_store_8((offset + 0u), value[0u]);
+ sb_store_8((offset + 16u), value[1u]);
}
-fn tint_symbol_18(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x4<f32>) {
- tint_symbol_12(buffer, (offset + 0u), value[0u]);
- tint_symbol_12(buffer, (offset + 16u), value[1u]);
+fn sb_store_18(offset : u32, value : mat2x4<f32>) {
+ sb_store_12((offset + 0u), value[0u]);
+ sb_store_12((offset + 16u), value[1u]);
}
-fn tint_symbol_19(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x2<f32>) {
- tint_symbol_4(buffer, (offset + 0u), value[0u]);
- tint_symbol_4(buffer, (offset + 8u), value[1u]);
- tint_symbol_4(buffer, (offset + 16u), value[2u]);
+fn sb_store_19(offset : u32, value : mat3x2<f32>) {
+ sb_store_4((offset + 0u), value[0u]);
+ sb_store_4((offset + 8u), value[1u]);
+ sb_store_4((offset + 16u), value[2u]);
}
-fn tint_symbol_20(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x3<f32>) {
- tint_symbol_8(buffer, (offset + 0u), value[0u]);
- tint_symbol_8(buffer, (offset + 16u), value[1u]);
- tint_symbol_8(buffer, (offset + 32u), value[2u]);
+fn sb_store_20(offset : u32, value : mat3x3<f32>) {
+ sb_store_8((offset + 0u), value[0u]);
+ sb_store_8((offset + 16u), value[1u]);
+ sb_store_8((offset + 32u), value[2u]);
}
-fn tint_symbol_21(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x4<f32>) {
- tint_symbol_12(buffer, (offset + 0u), value[0u]);
- tint_symbol_12(buffer, (offset + 16u), value[1u]);
- tint_symbol_12(buffer, (offset + 32u), value[2u]);
+fn sb_store_21(offset : u32, value : mat3x4<f32>) {
+ sb_store_12((offset + 0u), value[0u]);
+ sb_store_12((offset + 16u), value[1u]);
+ sb_store_12((offset + 32u), value[2u]);
}
-fn tint_symbol_22(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x2<f32>) {
- tint_symbol_4(buffer, (offset + 0u), value[0u]);
- tint_symbol_4(buffer, (offset + 8u), value[1u]);
- tint_symbol_4(buffer, (offset + 16u), value[2u]);
- tint_symbol_4(buffer, (offset + 24u), value[3u]);
+fn sb_store_22(offset : u32, value : mat4x2<f32>) {
+ sb_store_4((offset + 0u), value[0u]);
+ sb_store_4((offset + 8u), value[1u]);
+ sb_store_4((offset + 16u), value[2u]);
+ sb_store_4((offset + 24u), value[3u]);
}
-fn tint_symbol_23(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x3<f32>) {
- tint_symbol_8(buffer, (offset + 0u), value[0u]);
- tint_symbol_8(buffer, (offset + 16u), value[1u]);
- tint_symbol_8(buffer, (offset + 32u), value[2u]);
- tint_symbol_8(buffer, (offset + 48u), value[3u]);
+fn sb_store_23(offset : u32, value : mat4x3<f32>) {
+ sb_store_8((offset + 0u), value[0u]);
+ sb_store_8((offset + 16u), value[1u]);
+ sb_store_8((offset + 32u), value[2u]);
+ sb_store_8((offset + 48u), value[3u]);
}
-fn tint_symbol_24(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x4<f32>) {
- tint_symbol_12(buffer, (offset + 0u), value[0u]);
- tint_symbol_12(buffer, (offset + 16u), value[1u]);
- tint_symbol_12(buffer, (offset + 32u), value[2u]);
- tint_symbol_12(buffer, (offset + 48u), value[3u]);
+fn sb_store_24(offset : u32, value : mat4x4<f32>) {
+ sb_store_12((offset + 0u), value[0u]);
+ sb_store_12((offset + 16u), value[1u]);
+ sb_store_12((offset + 32u), value[2u]);
+ sb_store_12((offset + 48u), value[3u]);
}
-fn tint_symbol_25(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x2<f16>) {
- tint_symbol_7(buffer, (offset + 0u), value[0u]);
- tint_symbol_7(buffer, (offset + 4u), value[1u]);
+fn sb_store_25(offset : u32, value : mat2x2<f16>) {
+ sb_store_7((offset + 0u), value[0u]);
+ sb_store_7((offset + 4u), value[1u]);
}
-fn tint_symbol_26(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x3<f16>) {
- tint_symbol_11(buffer, (offset + 0u), value[0u]);
- tint_symbol_11(buffer, (offset + 8u), value[1u]);
+fn sb_store_26(offset : u32, value : mat2x3<f16>) {
+ sb_store_11((offset + 0u), value[0u]);
+ sb_store_11((offset + 8u), value[1u]);
}
-fn tint_symbol_27(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x4<f16>) {
- tint_symbol_15(buffer, (offset + 0u), value[0u]);
- tint_symbol_15(buffer, (offset + 8u), value[1u]);
+fn sb_store_27(offset : u32, value : mat2x4<f16>) {
+ sb_store_15((offset + 0u), value[0u]);
+ sb_store_15((offset + 8u), value[1u]);
}
-fn tint_symbol_28(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x2<f16>) {
- tint_symbol_7(buffer, (offset + 0u), value[0u]);
- tint_symbol_7(buffer, (offset + 4u), value[1u]);
- tint_symbol_7(buffer, (offset + 8u), value[2u]);
+fn sb_store_28(offset : u32, value : mat3x2<f16>) {
+ sb_store_7((offset + 0u), value[0u]);
+ sb_store_7((offset + 4u), value[1u]);
+ sb_store_7((offset + 8u), value[2u]);
}
-fn tint_symbol_29(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x3<f16>) {
- tint_symbol_11(buffer, (offset + 0u), value[0u]);
- tint_symbol_11(buffer, (offset + 8u), value[1u]);
- tint_symbol_11(buffer, (offset + 16u), value[2u]);
+fn sb_store_29(offset : u32, value : mat3x3<f16>) {
+ sb_store_11((offset + 0u), value[0u]);
+ sb_store_11((offset + 8u), value[1u]);
+ sb_store_11((offset + 16u), value[2u]);
}
-fn tint_symbol_30(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x4<f16>) {
- tint_symbol_15(buffer, (offset + 0u), value[0u]);
- tint_symbol_15(buffer, (offset + 8u), value[1u]);
- tint_symbol_15(buffer, (offset + 16u), value[2u]);
+fn sb_store_30(offset : u32, value : mat3x4<f16>) {
+ sb_store_15((offset + 0u), value[0u]);
+ sb_store_15((offset + 8u), value[1u]);
+ sb_store_15((offset + 16u), value[2u]);
}
-fn tint_symbol_31(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x2<f16>) {
- tint_symbol_7(buffer, (offset + 0u), value[0u]);
- tint_symbol_7(buffer, (offset + 4u), value[1u]);
- tint_symbol_7(buffer, (offset + 8u), value[2u]);
- tint_symbol_7(buffer, (offset + 12u), value[3u]);
+fn sb_store_31(offset : u32, value : mat4x2<f16>) {
+ sb_store_7((offset + 0u), value[0u]);
+ sb_store_7((offset + 4u), value[1u]);
+ sb_store_7((offset + 8u), value[2u]);
+ sb_store_7((offset + 12u), value[3u]);
}
-fn tint_symbol_32(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x3<f16>) {
- tint_symbol_11(buffer, (offset + 0u), value[0u]);
- tint_symbol_11(buffer, (offset + 8u), value[1u]);
- tint_symbol_11(buffer, (offset + 16u), value[2u]);
- tint_symbol_11(buffer, (offset + 24u), value[3u]);
+fn sb_store_32(offset : u32, value : mat4x3<f16>) {
+ sb_store_11((offset + 0u), value[0u]);
+ sb_store_11((offset + 8u), value[1u]);
+ sb_store_11((offset + 16u), value[2u]);
+ sb_store_11((offset + 24u), value[3u]);
}
-fn tint_symbol_33(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x4<f16>) {
- tint_symbol_15(buffer, (offset + 0u), value[0u]);
- tint_symbol_15(buffer, (offset + 8u), value[1u]);
- tint_symbol_15(buffer, (offset + 16u), value[2u]);
- tint_symbol_15(buffer, (offset + 24u), value[3u]);
+fn sb_store_33(offset : u32, value : mat4x4<f16>) {
+ sb_store_15((offset + 0u), value[0u]);
+ sb_store_15((offset + 8u), value[1u]);
+ sb_store_15((offset + 16u), value[2u]);
+ sb_store_15((offset + 24u), value[3u]);
}
-fn tint_symbol_34(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : array<vec3<f32>, 2u>) {
+fn sb_store_34(offset : u32, value : array<vec3<f32>, 2u>) {
var array_1 = value;
for(var i = 0u; (i < 2u); i = (i + 1u)) {
- tint_symbol_8(buffer, (offset + (i * 16u)), array_1[i]);
+ sb_store_8((offset + (i * 16u)), array_1[i]);
}
}
-fn tint_symbol_35(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : array<mat4x2<f16>, 2u>) {
+fn sb_store_35(offset : u32, value : array<mat4x2<f16>, 2u>) {
var array_2 = value;
for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- tint_symbol_31(buffer, (offset + (i_1 * 16u)), array_2[i_1]);
+ sb_store_31((offset + (i_1 * 16u)), array_2[i_1]);
}
}
@compute @workgroup_size(1)
fn main() {
- tint_symbol(&(sb), 0u, f32());
- tint_symbol_1(&(sb), 4u, i32());
- tint_symbol_2(&(sb), 8u, u32());
- tint_symbol_3(&(sb), 12u, f16());
- tint_symbol_4(&(sb), 16u, vec2<f32>());
- tint_symbol_5(&(sb), 24u, vec2<i32>());
- tint_symbol_6(&(sb), 32u, vec2<u32>());
- tint_symbol_7(&(sb), 40u, vec2<f16>());
- tint_symbol_8(&(sb), 48u, vec3<f32>());
- tint_symbol_9(&(sb), 64u, vec3<i32>());
- tint_symbol_10(&(sb), 80u, vec3<u32>());
- tint_symbol_11(&(sb), 96u, vec3<f16>());
- tint_symbol_12(&(sb), 112u, vec4<f32>());
- tint_symbol_13(&(sb), 128u, vec4<i32>());
- tint_symbol_14(&(sb), 144u, vec4<u32>());
- tint_symbol_15(&(sb), 160u, vec4<f16>());
- tint_symbol_16(&(sb), 168u, mat2x2<f32>());
- tint_symbol_17(&(sb), 192u, mat2x3<f32>());
- tint_symbol_18(&(sb), 224u, mat2x4<f32>());
- tint_symbol_19(&(sb), 256u, mat3x2<f32>());
- tint_symbol_20(&(sb), 288u, mat3x3<f32>());
- tint_symbol_21(&(sb), 336u, mat3x4<f32>());
- tint_symbol_22(&(sb), 384u, mat4x2<f32>());
- tint_symbol_23(&(sb), 416u, mat4x3<f32>());
- tint_symbol_24(&(sb), 480u, mat4x4<f32>());
- tint_symbol_25(&(sb), 544u, mat2x2<f16>());
- tint_symbol_26(&(sb), 552u, mat2x3<f16>());
- tint_symbol_27(&(sb), 568u, mat2x4<f16>());
- tint_symbol_28(&(sb), 584u, mat3x2<f16>());
- tint_symbol_29(&(sb), 600u, mat3x3<f16>());
- tint_symbol_30(&(sb), 624u, mat3x4<f16>());
- tint_symbol_31(&(sb), 648u, mat4x2<f16>());
- tint_symbol_32(&(sb), 664u, mat4x3<f16>());
- tint_symbol_33(&(sb), 696u, mat4x4<f16>());
- tint_symbol_34(&(sb), 736u, array<vec3<f32>, 2>());
- tint_symbol_35(&(sb), 768u, array<mat4x2<f16>, 2>());
+ sb_store(0u, f32());
+ sb_store_1(4u, i32());
+ sb_store_2(8u, u32());
+ sb_store_3(12u, f16());
+ sb_store_4(16u, vec2<f32>());
+ sb_store_5(24u, vec2<i32>());
+ sb_store_6(32u, vec2<u32>());
+ sb_store_7(40u, vec2<f16>());
+ sb_store_8(48u, vec3<f32>());
+ sb_store_9(64u, vec3<i32>());
+ sb_store_10(80u, vec3<u32>());
+ sb_store_11(96u, vec3<f16>());
+ sb_store_12(112u, vec4<f32>());
+ sb_store_13(128u, vec4<i32>());
+ sb_store_14(144u, vec4<u32>());
+ sb_store_15(160u, vec4<f16>());
+ sb_store_16(168u, mat2x2<f32>());
+ sb_store_17(192u, mat2x3<f32>());
+ sb_store_18(224u, mat2x4<f32>());
+ sb_store_19(256u, mat3x2<f32>());
+ sb_store_20(288u, mat3x3<f32>());
+ sb_store_21(336u, mat3x4<f32>());
+ sb_store_22(384u, mat4x2<f32>());
+ sb_store_23(416u, mat4x3<f32>());
+ sb_store_24(480u, mat4x4<f32>());
+ sb_store_25(544u, mat2x2<f16>());
+ sb_store_26(552u, mat2x3<f16>());
+ sb_store_27(568u, mat2x4<f16>());
+ sb_store_28(584u, mat3x2<f16>());
+ sb_store_29(600u, mat3x3<f16>());
+ sb_store_30(624u, mat3x4<f16>());
+ sb_store_31(648u, mat4x2<f16>());
+ sb_store_32(664u, mat4x3<f16>());
+ sb_store_33(696u, mat4x4<f16>());
+ sb_store_34(736u, array<vec3<f32>, 2>());
+ sb_store_35(768u, array<mat4x2<f16>, 2>());
}
@group(0) @binding(0) var<storage, read_write> sb : SB;
@@ -2085,148 +2085,148 @@
@group(0) @binding(0) var<storage, read_write> sb : SB;
@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> f32
+fn sb_load_1(offset : u32) -> f32
@internal(intrinsic_load_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_2(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> i32
+fn sb_load_2(offset : u32) -> i32
@internal(intrinsic_load_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_3(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> u32
+fn sb_load_3(offset : u32) -> u32
@internal(intrinsic_load_storage_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_4(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> f16
+fn sb_load_4(offset : u32) -> f16
@internal(intrinsic_load_storage_vec2_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_5(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<f32>
+fn sb_load_5(offset : u32) -> vec2<f32>
@internal(intrinsic_load_storage_vec2_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_6(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<i32>
+fn sb_load_6(offset : u32) -> vec2<i32>
@internal(intrinsic_load_storage_vec2_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_7(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<u32>
+fn sb_load_7(offset : u32) -> vec2<u32>
@internal(intrinsic_load_storage_vec2_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_8(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<f16>
+fn sb_load_8(offset : u32) -> vec2<f16>
@internal(intrinsic_load_storage_vec3_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_9(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<f32>
+fn sb_load_9(offset : u32) -> vec3<f32>
@internal(intrinsic_load_storage_vec3_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_10(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<i32>
+fn sb_load_10(offset : u32) -> vec3<i32>
@internal(intrinsic_load_storage_vec3_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_11(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<u32>
+fn sb_load_11(offset : u32) -> vec3<u32>
@internal(intrinsic_load_storage_vec3_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_12(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<f16>
+fn sb_load_12(offset : u32) -> vec3<f16>
@internal(intrinsic_load_storage_vec4_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_13(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<f32>
+fn sb_load_13(offset : u32) -> vec4<f32>
@internal(intrinsic_load_storage_vec4_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_14(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<i32>
+fn sb_load_14(offset : u32) -> vec4<i32>
@internal(intrinsic_load_storage_vec4_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_15(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<u32>
+fn sb_load_15(offset : u32) -> vec4<u32>
@internal(intrinsic_load_storage_vec4_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_16(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<f16>
+fn sb_load_16(offset : u32) -> vec4<f16>
-fn tint_symbol_17(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x2<f32> {
- return mat2x2<f32>(tint_symbol_5(buffer, (offset + 0u)), tint_symbol_5(buffer, (offset + 8u)));
+fn sb_load_17(offset : u32) -> mat2x2<f32> {
+ return mat2x2<f32>(sb_load_5((offset + 0u)), sb_load_5((offset + 8u)));
}
-fn tint_symbol_18(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x3<f32> {
- return mat2x3<f32>(tint_symbol_9(buffer, (offset + 0u)), tint_symbol_9(buffer, (offset + 16u)));
+fn sb_load_18(offset : u32) -> mat2x3<f32> {
+ return mat2x3<f32>(sb_load_9((offset + 0u)), sb_load_9((offset + 16u)));
}
-fn tint_symbol_19(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x4<f32> {
- return mat2x4<f32>(tint_symbol_13(buffer, (offset + 0u)), tint_symbol_13(buffer, (offset + 16u)));
+fn sb_load_19(offset : u32) -> mat2x4<f32> {
+ return mat2x4<f32>(sb_load_13((offset + 0u)), sb_load_13((offset + 16u)));
}
-fn tint_symbol_20(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x2<f32> {
- return mat3x2<f32>(tint_symbol_5(buffer, (offset + 0u)), tint_symbol_5(buffer, (offset + 8u)), tint_symbol_5(buffer, (offset + 16u)));
+fn sb_load_20(offset : u32) -> mat3x2<f32> {
+ return mat3x2<f32>(sb_load_5((offset + 0u)), sb_load_5((offset + 8u)), sb_load_5((offset + 16u)));
}
-fn tint_symbol_21(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x3<f32> {
- return mat3x3<f32>(tint_symbol_9(buffer, (offset + 0u)), tint_symbol_9(buffer, (offset + 16u)), tint_symbol_9(buffer, (offset + 32u)));
+fn sb_load_21(offset : u32) -> mat3x3<f32> {
+ return mat3x3<f32>(sb_load_9((offset + 0u)), sb_load_9((offset + 16u)), sb_load_9((offset + 32u)));
}
-fn tint_symbol_22(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x4<f32> {
- return mat3x4<f32>(tint_symbol_13(buffer, (offset + 0u)), tint_symbol_13(buffer, (offset + 16u)), tint_symbol_13(buffer, (offset + 32u)));
+fn sb_load_22(offset : u32) -> mat3x4<f32> {
+ return mat3x4<f32>(sb_load_13((offset + 0u)), sb_load_13((offset + 16u)), sb_load_13((offset + 32u)));
}
-fn tint_symbol_23(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x2<f32> {
- return mat4x2<f32>(tint_symbol_5(buffer, (offset + 0u)), tint_symbol_5(buffer, (offset + 8u)), tint_symbol_5(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 24u)));
+fn sb_load_23(offset : u32) -> mat4x2<f32> {
+ return mat4x2<f32>(sb_load_5((offset + 0u)), sb_load_5((offset + 8u)), sb_load_5((offset + 16u)), sb_load_5((offset + 24u)));
}
-fn tint_symbol_24(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x3<f32> {
- return mat4x3<f32>(tint_symbol_9(buffer, (offset + 0u)), tint_symbol_9(buffer, (offset + 16u)), tint_symbol_9(buffer, (offset + 32u)), tint_symbol_9(buffer, (offset + 48u)));
+fn sb_load_24(offset : u32) -> mat4x3<f32> {
+ return mat4x3<f32>(sb_load_9((offset + 0u)), sb_load_9((offset + 16u)), sb_load_9((offset + 32u)), sb_load_9((offset + 48u)));
}
-fn tint_symbol_25(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x4<f32> {
- return mat4x4<f32>(tint_symbol_13(buffer, (offset + 0u)), tint_symbol_13(buffer, (offset + 16u)), tint_symbol_13(buffer, (offset + 32u)), tint_symbol_13(buffer, (offset + 48u)));
+fn sb_load_25(offset : u32) -> mat4x4<f32> {
+ return mat4x4<f32>(sb_load_13((offset + 0u)), sb_load_13((offset + 16u)), sb_load_13((offset + 32u)), sb_load_13((offset + 48u)));
}
-fn tint_symbol_26(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x2<f16> {
- return mat2x2<f16>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 4u)));
+fn sb_load_26(offset : u32) -> mat2x2<f16> {
+ return mat2x2<f16>(sb_load_8((offset + 0u)), sb_load_8((offset + 4u)));
}
-fn tint_symbol_27(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x3<f16> {
- return mat2x3<f16>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 8u)));
+fn sb_load_27(offset : u32) -> mat2x3<f16> {
+ return mat2x3<f16>(sb_load_12((offset + 0u)), sb_load_12((offset + 8u)));
}
-fn tint_symbol_28(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x4<f16> {
- return mat2x4<f16>(tint_symbol_16(buffer, (offset + 0u)), tint_symbol_16(buffer, (offset + 8u)));
+fn sb_load_28(offset : u32) -> mat2x4<f16> {
+ return mat2x4<f16>(sb_load_16((offset + 0u)), sb_load_16((offset + 8u)));
}
-fn tint_symbol_29(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x2<f16> {
- return mat3x2<f16>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 4u)), tint_symbol_8(buffer, (offset + 8u)));
+fn sb_load_29(offset : u32) -> mat3x2<f16> {
+ return mat3x2<f16>(sb_load_8((offset + 0u)), sb_load_8((offset + 4u)), sb_load_8((offset + 8u)));
}
-fn tint_symbol_30(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x3<f16> {
- return mat3x3<f16>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 8u)), tint_symbol_12(buffer, (offset + 16u)));
+fn sb_load_30(offset : u32) -> mat3x3<f16> {
+ return mat3x3<f16>(sb_load_12((offset + 0u)), sb_load_12((offset + 8u)), sb_load_12((offset + 16u)));
}
-fn tint_symbol_31(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x4<f16> {
- return mat3x4<f16>(tint_symbol_16(buffer, (offset + 0u)), tint_symbol_16(buffer, (offset + 8u)), tint_symbol_16(buffer, (offset + 16u)));
+fn sb_load_31(offset : u32) -> mat3x4<f16> {
+ return mat3x4<f16>(sb_load_16((offset + 0u)), sb_load_16((offset + 8u)), sb_load_16((offset + 16u)));
}
-fn tint_symbol_32(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x2<f16> {
- return mat4x2<f16>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 4u)), tint_symbol_8(buffer, (offset + 8u)), tint_symbol_8(buffer, (offset + 12u)));
+fn sb_load_32(offset : u32) -> mat4x2<f16> {
+ return mat4x2<f16>(sb_load_8((offset + 0u)), sb_load_8((offset + 4u)), sb_load_8((offset + 8u)), sb_load_8((offset + 12u)));
}
-fn tint_symbol_33(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x3<f16> {
- return mat4x3<f16>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 8u)), tint_symbol_12(buffer, (offset + 16u)), tint_symbol_12(buffer, (offset + 24u)));
+fn sb_load_33(offset : u32) -> mat4x3<f16> {
+ return mat4x3<f16>(sb_load_12((offset + 0u)), sb_load_12((offset + 8u)), sb_load_12((offset + 16u)), sb_load_12((offset + 24u)));
}
-fn tint_symbol_34(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x4<f16> {
- return mat4x4<f16>(tint_symbol_16(buffer, (offset + 0u)), tint_symbol_16(buffer, (offset + 8u)), tint_symbol_16(buffer, (offset + 16u)), tint_symbol_16(buffer, (offset + 24u)));
+fn sb_load_34(offset : u32) -> mat4x4<f16> {
+ return mat4x4<f16>(sb_load_16((offset + 0u)), sb_load_16((offset + 8u)), sb_load_16((offset + 16u)), sb_load_16((offset + 24u)));
}
-fn tint_symbol_35(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> array<vec3<f32>, 2u> {
+fn sb_load_35(offset : u32) -> array<vec3<f32>, 2u> {
var arr : array<vec3<f32>, 2u>;
for(var i = 0u; (i < 2u); i = (i + 1u)) {
- arr[i] = tint_symbol_9(buffer, (offset + (i * 16u)));
+ arr[i] = sb_load_9((offset + (i * 16u)));
}
return arr;
}
-fn tint_symbol_36(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> array<mat4x2<f16>, 2u> {
+fn sb_load_36(offset : u32) -> array<mat4x2<f16>, 2u> {
var arr_1 : array<mat4x2<f16>, 2u>;
for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_32(buffer, (offset + (i_1 * 16u)));
+ arr_1[i_1] = sb_load_32((offset + (i_1 * 16u)));
}
return arr_1;
}
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> SB {
- return SB(tint_symbol_1(buffer, (offset + 0u)), tint_symbol_2(buffer, (offset + 4u)), tint_symbol_3(buffer, (offset + 8u)), tint_symbol_4(buffer, (offset + 12u)), tint_symbol_5(buffer, (offset + 16u)), tint_symbol_6(buffer, (offset + 24u)), tint_symbol_7(buffer, (offset + 32u)), tint_symbol_8(buffer, (offset + 40u)), tint_symbol_9(buffer, (offset + 48u)), tint_symbol_10(buffer, (offset + 64u)), tint_symbol_11(buffer, (offset + 80u)), tint_symbol_12(buffer, (offset + 96u)), tint_symbol_13(buffer, (offset + 112u)), tint_symbol_14(buffer, (offset + 128u)), tint_symbol_15(buffer, (offset + 144u)), tint_symbol_16(buffer, (offset + 160u)), tint_symbol_17(buffer, (offset + 168u)), tint_symbol_18(buffer, (offset + 192u)), tint_symbol_19(buffer, (offset + 224u)), tint_symbol_20(buffer, (offset + 256u)), tint_symbol_21(buffer, (offset + 288u)), tint_symbol_22(buffer, (offset + 336u)), tint_symbol_23(buffer, (offset + 384u)), tint_symbol_24(buffer, (offset + 416u)), tint_symbol_25(buffer, (offset + 480u)), tint_symbol_26(buffer, (offset + 544u)), tint_symbol_27(buffer, (offset + 552u)), tint_symbol_28(buffer, (offset + 568u)), tint_symbol_29(buffer, (offset + 584u)), tint_symbol_30(buffer, (offset + 600u)), tint_symbol_31(buffer, (offset + 624u)), tint_symbol_32(buffer, (offset + 648u)), tint_symbol_33(buffer, (offset + 664u)), tint_symbol_34(buffer, (offset + 696u)), tint_symbol_35(buffer, (offset + 736u)), tint_symbol_36(buffer, (offset + 768u)));
+fn sb_load(offset : u32) -> SB {
+ return SB(sb_load_1((offset + 0u)), sb_load_2((offset + 4u)), sb_load_3((offset + 8u)), sb_load_4((offset + 12u)), sb_load_5((offset + 16u)), sb_load_6((offset + 24u)), sb_load_7((offset + 32u)), sb_load_8((offset + 40u)), sb_load_9((offset + 48u)), sb_load_10((offset + 64u)), sb_load_11((offset + 80u)), sb_load_12((offset + 96u)), sb_load_13((offset + 112u)), sb_load_14((offset + 128u)), sb_load_15((offset + 144u)), sb_load_16((offset + 160u)), sb_load_17((offset + 168u)), sb_load_18((offset + 192u)), sb_load_19((offset + 224u)), sb_load_20((offset + 256u)), sb_load_21((offset + 288u)), sb_load_22((offset + 336u)), sb_load_23((offset + 384u)), sb_load_24((offset + 416u)), sb_load_25((offset + 480u)), sb_load_26((offset + 544u)), sb_load_27((offset + 552u)), sb_load_28((offset + 568u)), sb_load_29((offset + 584u)), sb_load_30((offset + 600u)), sb_load_31((offset + 624u)), sb_load_32((offset + 648u)), sb_load_33((offset + 664u)), sb_load_34((offset + 696u)), sb_load_35((offset + 736u)), sb_load_36((offset + 768u)));
}
@compute @workgroup_size(1)
fn main() {
- var x : SB = tint_symbol(&(sb), 0u);
+ var x : SB = sb_load(0u);
}
)";
@@ -2290,148 +2290,148 @@
enable f16;
@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> f32
+fn sb_load_1(offset : u32) -> f32
@internal(intrinsic_load_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_2(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> i32
+fn sb_load_2(offset : u32) -> i32
@internal(intrinsic_load_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_3(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> u32
+fn sb_load_3(offset : u32) -> u32
@internal(intrinsic_load_storage_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_4(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> f16
+fn sb_load_4(offset : u32) -> f16
@internal(intrinsic_load_storage_vec2_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_5(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<f32>
+fn sb_load_5(offset : u32) -> vec2<f32>
@internal(intrinsic_load_storage_vec2_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_6(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<i32>
+fn sb_load_6(offset : u32) -> vec2<i32>
@internal(intrinsic_load_storage_vec2_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_7(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<u32>
+fn sb_load_7(offset : u32) -> vec2<u32>
@internal(intrinsic_load_storage_vec2_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_8(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec2<f16>
+fn sb_load_8(offset : u32) -> vec2<f16>
@internal(intrinsic_load_storage_vec3_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_9(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<f32>
+fn sb_load_9(offset : u32) -> vec3<f32>
@internal(intrinsic_load_storage_vec3_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_10(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<i32>
+fn sb_load_10(offset : u32) -> vec3<i32>
@internal(intrinsic_load_storage_vec3_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_11(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<u32>
+fn sb_load_11(offset : u32) -> vec3<u32>
@internal(intrinsic_load_storage_vec3_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_12(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec3<f16>
+fn sb_load_12(offset : u32) -> vec3<f16>
@internal(intrinsic_load_storage_vec4_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_13(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<f32>
+fn sb_load_13(offset : u32) -> vec4<f32>
@internal(intrinsic_load_storage_vec4_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_14(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<i32>
+fn sb_load_14(offset : u32) -> vec4<i32>
@internal(intrinsic_load_storage_vec4_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_15(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<u32>
+fn sb_load_15(offset : u32) -> vec4<u32>
@internal(intrinsic_load_storage_vec4_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_16(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> vec4<f16>
+fn sb_load_16(offset : u32) -> vec4<f16>
-fn tint_symbol_17(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x2<f32> {
- return mat2x2<f32>(tint_symbol_5(buffer, (offset + 0u)), tint_symbol_5(buffer, (offset + 8u)));
+fn sb_load_17(offset : u32) -> mat2x2<f32> {
+ return mat2x2<f32>(sb_load_5((offset + 0u)), sb_load_5((offset + 8u)));
}
-fn tint_symbol_18(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x3<f32> {
- return mat2x3<f32>(tint_symbol_9(buffer, (offset + 0u)), tint_symbol_9(buffer, (offset + 16u)));
+fn sb_load_18(offset : u32) -> mat2x3<f32> {
+ return mat2x3<f32>(sb_load_9((offset + 0u)), sb_load_9((offset + 16u)));
}
-fn tint_symbol_19(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x4<f32> {
- return mat2x4<f32>(tint_symbol_13(buffer, (offset + 0u)), tint_symbol_13(buffer, (offset + 16u)));
+fn sb_load_19(offset : u32) -> mat2x4<f32> {
+ return mat2x4<f32>(sb_load_13((offset + 0u)), sb_load_13((offset + 16u)));
}
-fn tint_symbol_20(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x2<f32> {
- return mat3x2<f32>(tint_symbol_5(buffer, (offset + 0u)), tint_symbol_5(buffer, (offset + 8u)), tint_symbol_5(buffer, (offset + 16u)));
+fn sb_load_20(offset : u32) -> mat3x2<f32> {
+ return mat3x2<f32>(sb_load_5((offset + 0u)), sb_load_5((offset + 8u)), sb_load_5((offset + 16u)));
}
-fn tint_symbol_21(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x3<f32> {
- return mat3x3<f32>(tint_symbol_9(buffer, (offset + 0u)), tint_symbol_9(buffer, (offset + 16u)), tint_symbol_9(buffer, (offset + 32u)));
+fn sb_load_21(offset : u32) -> mat3x3<f32> {
+ return mat3x3<f32>(sb_load_9((offset + 0u)), sb_load_9((offset + 16u)), sb_load_9((offset + 32u)));
}
-fn tint_symbol_22(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x4<f32> {
- return mat3x4<f32>(tint_symbol_13(buffer, (offset + 0u)), tint_symbol_13(buffer, (offset + 16u)), tint_symbol_13(buffer, (offset + 32u)));
+fn sb_load_22(offset : u32) -> mat3x4<f32> {
+ return mat3x4<f32>(sb_load_13((offset + 0u)), sb_load_13((offset + 16u)), sb_load_13((offset + 32u)));
}
-fn tint_symbol_23(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x2<f32> {
- return mat4x2<f32>(tint_symbol_5(buffer, (offset + 0u)), tint_symbol_5(buffer, (offset + 8u)), tint_symbol_5(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 24u)));
+fn sb_load_23(offset : u32) -> mat4x2<f32> {
+ return mat4x2<f32>(sb_load_5((offset + 0u)), sb_load_5((offset + 8u)), sb_load_5((offset + 16u)), sb_load_5((offset + 24u)));
}
-fn tint_symbol_24(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x3<f32> {
- return mat4x3<f32>(tint_symbol_9(buffer, (offset + 0u)), tint_symbol_9(buffer, (offset + 16u)), tint_symbol_9(buffer, (offset + 32u)), tint_symbol_9(buffer, (offset + 48u)));
+fn sb_load_24(offset : u32) -> mat4x3<f32> {
+ return mat4x3<f32>(sb_load_9((offset + 0u)), sb_load_9((offset + 16u)), sb_load_9((offset + 32u)), sb_load_9((offset + 48u)));
}
-fn tint_symbol_25(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x4<f32> {
- return mat4x4<f32>(tint_symbol_13(buffer, (offset + 0u)), tint_symbol_13(buffer, (offset + 16u)), tint_symbol_13(buffer, (offset + 32u)), tint_symbol_13(buffer, (offset + 48u)));
+fn sb_load_25(offset : u32) -> mat4x4<f32> {
+ return mat4x4<f32>(sb_load_13((offset + 0u)), sb_load_13((offset + 16u)), sb_load_13((offset + 32u)), sb_load_13((offset + 48u)));
}
-fn tint_symbol_26(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x2<f16> {
- return mat2x2<f16>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 4u)));
+fn sb_load_26(offset : u32) -> mat2x2<f16> {
+ return mat2x2<f16>(sb_load_8((offset + 0u)), sb_load_8((offset + 4u)));
}
-fn tint_symbol_27(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x3<f16> {
- return mat2x3<f16>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 8u)));
+fn sb_load_27(offset : u32) -> mat2x3<f16> {
+ return mat2x3<f16>(sb_load_12((offset + 0u)), sb_load_12((offset + 8u)));
}
-fn tint_symbol_28(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat2x4<f16> {
- return mat2x4<f16>(tint_symbol_16(buffer, (offset + 0u)), tint_symbol_16(buffer, (offset + 8u)));
+fn sb_load_28(offset : u32) -> mat2x4<f16> {
+ return mat2x4<f16>(sb_load_16((offset + 0u)), sb_load_16((offset + 8u)));
}
-fn tint_symbol_29(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x2<f16> {
- return mat3x2<f16>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 4u)), tint_symbol_8(buffer, (offset + 8u)));
+fn sb_load_29(offset : u32) -> mat3x2<f16> {
+ return mat3x2<f16>(sb_load_8((offset + 0u)), sb_load_8((offset + 4u)), sb_load_8((offset + 8u)));
}
-fn tint_symbol_30(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x3<f16> {
- return mat3x3<f16>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 8u)), tint_symbol_12(buffer, (offset + 16u)));
+fn sb_load_30(offset : u32) -> mat3x3<f16> {
+ return mat3x3<f16>(sb_load_12((offset + 0u)), sb_load_12((offset + 8u)), sb_load_12((offset + 16u)));
}
-fn tint_symbol_31(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat3x4<f16> {
- return mat3x4<f16>(tint_symbol_16(buffer, (offset + 0u)), tint_symbol_16(buffer, (offset + 8u)), tint_symbol_16(buffer, (offset + 16u)));
+fn sb_load_31(offset : u32) -> mat3x4<f16> {
+ return mat3x4<f16>(sb_load_16((offset + 0u)), sb_load_16((offset + 8u)), sb_load_16((offset + 16u)));
}
-fn tint_symbol_32(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x2<f16> {
- return mat4x2<f16>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 4u)), tint_symbol_8(buffer, (offset + 8u)), tint_symbol_8(buffer, (offset + 12u)));
+fn sb_load_32(offset : u32) -> mat4x2<f16> {
+ return mat4x2<f16>(sb_load_8((offset + 0u)), sb_load_8((offset + 4u)), sb_load_8((offset + 8u)), sb_load_8((offset + 12u)));
}
-fn tint_symbol_33(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x3<f16> {
- return mat4x3<f16>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 8u)), tint_symbol_12(buffer, (offset + 16u)), tint_symbol_12(buffer, (offset + 24u)));
+fn sb_load_33(offset : u32) -> mat4x3<f16> {
+ return mat4x3<f16>(sb_load_12((offset + 0u)), sb_load_12((offset + 8u)), sb_load_12((offset + 16u)), sb_load_12((offset + 24u)));
}
-fn tint_symbol_34(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> mat4x4<f16> {
- return mat4x4<f16>(tint_symbol_16(buffer, (offset + 0u)), tint_symbol_16(buffer, (offset + 8u)), tint_symbol_16(buffer, (offset + 16u)), tint_symbol_16(buffer, (offset + 24u)));
+fn sb_load_34(offset : u32) -> mat4x4<f16> {
+ return mat4x4<f16>(sb_load_16((offset + 0u)), sb_load_16((offset + 8u)), sb_load_16((offset + 16u)), sb_load_16((offset + 24u)));
}
-fn tint_symbol_35(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> array<vec3<f32>, 2u> {
+fn sb_load_35(offset : u32) -> array<vec3<f32>, 2u> {
var arr : array<vec3<f32>, 2u>;
for(var i = 0u; (i < 2u); i = (i + 1u)) {
- arr[i] = tint_symbol_9(buffer, (offset + (i * 16u)));
+ arr[i] = sb_load_9((offset + (i * 16u)));
}
return arr;
}
-fn tint_symbol_36(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> array<mat4x2<f16>, 2u> {
+fn sb_load_36(offset : u32) -> array<mat4x2<f16>, 2u> {
var arr_1 : array<mat4x2<f16>, 2u>;
for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_32(buffer, (offset + (i_1 * 16u)));
+ arr_1[i_1] = sb_load_32((offset + (i_1 * 16u)));
}
return arr_1;
}
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> SB {
- return SB(tint_symbol_1(buffer, (offset + 0u)), tint_symbol_2(buffer, (offset + 4u)), tint_symbol_3(buffer, (offset + 8u)), tint_symbol_4(buffer, (offset + 12u)), tint_symbol_5(buffer, (offset + 16u)), tint_symbol_6(buffer, (offset + 24u)), tint_symbol_7(buffer, (offset + 32u)), tint_symbol_8(buffer, (offset + 40u)), tint_symbol_9(buffer, (offset + 48u)), tint_symbol_10(buffer, (offset + 64u)), tint_symbol_11(buffer, (offset + 80u)), tint_symbol_12(buffer, (offset + 96u)), tint_symbol_13(buffer, (offset + 112u)), tint_symbol_14(buffer, (offset + 128u)), tint_symbol_15(buffer, (offset + 144u)), tint_symbol_16(buffer, (offset + 160u)), tint_symbol_17(buffer, (offset + 168u)), tint_symbol_18(buffer, (offset + 192u)), tint_symbol_19(buffer, (offset + 224u)), tint_symbol_20(buffer, (offset + 256u)), tint_symbol_21(buffer, (offset + 288u)), tint_symbol_22(buffer, (offset + 336u)), tint_symbol_23(buffer, (offset + 384u)), tint_symbol_24(buffer, (offset + 416u)), tint_symbol_25(buffer, (offset + 480u)), tint_symbol_26(buffer, (offset + 544u)), tint_symbol_27(buffer, (offset + 552u)), tint_symbol_28(buffer, (offset + 568u)), tint_symbol_29(buffer, (offset + 584u)), tint_symbol_30(buffer, (offset + 600u)), tint_symbol_31(buffer, (offset + 624u)), tint_symbol_32(buffer, (offset + 648u)), tint_symbol_33(buffer, (offset + 664u)), tint_symbol_34(buffer, (offset + 696u)), tint_symbol_35(buffer, (offset + 736u)), tint_symbol_36(buffer, (offset + 768u)));
+fn sb_load(offset : u32) -> SB {
+ return SB(sb_load_1((offset + 0u)), sb_load_2((offset + 4u)), sb_load_3((offset + 8u)), sb_load_4((offset + 12u)), sb_load_5((offset + 16u)), sb_load_6((offset + 24u)), sb_load_7((offset + 32u)), sb_load_8((offset + 40u)), sb_load_9((offset + 48u)), sb_load_10((offset + 64u)), sb_load_11((offset + 80u)), sb_load_12((offset + 96u)), sb_load_13((offset + 112u)), sb_load_14((offset + 128u)), sb_load_15((offset + 144u)), sb_load_16((offset + 160u)), sb_load_17((offset + 168u)), sb_load_18((offset + 192u)), sb_load_19((offset + 224u)), sb_load_20((offset + 256u)), sb_load_21((offset + 288u)), sb_load_22((offset + 336u)), sb_load_23((offset + 384u)), sb_load_24((offset + 416u)), sb_load_25((offset + 480u)), sb_load_26((offset + 544u)), sb_load_27((offset + 552u)), sb_load_28((offset + 568u)), sb_load_29((offset + 584u)), sb_load_30((offset + 600u)), sb_load_31((offset + 624u)), sb_load_32((offset + 648u)), sb_load_33((offset + 664u)), sb_load_34((offset + 696u)), sb_load_35((offset + 736u)), sb_load_36((offset + 768u)));
}
@compute @workgroup_size(1)
fn main() {
- var x : SB = tint_symbol(&(sb), 0u);
+ var x : SB = sb_load(0u);
}
@group(0) @binding(0) var<storage, read_write> sb : SB;
@@ -2577,217 +2577,217 @@
@group(0) @binding(0) var<storage, read_write> sb : SB;
@internal(intrinsic_store_storage_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : f32)
+fn sb_store_1(offset : u32, value : f32)
@internal(intrinsic_store_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_2(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : i32)
+fn sb_store_2(offset : u32, value : i32)
@internal(intrinsic_store_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_3(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : u32)
+fn sb_store_3(offset : u32, value : u32)
@internal(intrinsic_store_storage_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_4(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : f16)
+fn sb_store_4(offset : u32, value : f16)
@internal(intrinsic_store_storage_vec2_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_5(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<f32>)
+fn sb_store_5(offset : u32, value : vec2<f32>)
@internal(intrinsic_store_storage_vec2_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_6(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<i32>)
+fn sb_store_6(offset : u32, value : vec2<i32>)
@internal(intrinsic_store_storage_vec2_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_7(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<u32>)
+fn sb_store_7(offset : u32, value : vec2<u32>)
@internal(intrinsic_store_storage_vec2_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_8(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<f16>)
+fn sb_store_8(offset : u32, value : vec2<f16>)
@internal(intrinsic_store_storage_vec3_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_9(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<f32>)
+fn sb_store_9(offset : u32, value : vec3<f32>)
@internal(intrinsic_store_storage_vec3_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_10(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<i32>)
+fn sb_store_10(offset : u32, value : vec3<i32>)
@internal(intrinsic_store_storage_vec3_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_11(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<u32>)
+fn sb_store_11(offset : u32, value : vec3<u32>)
@internal(intrinsic_store_storage_vec3_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_12(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<f16>)
+fn sb_store_12(offset : u32, value : vec3<f16>)
@internal(intrinsic_store_storage_vec4_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_13(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<f32>)
+fn sb_store_13(offset : u32, value : vec4<f32>)
@internal(intrinsic_store_storage_vec4_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_14(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<i32>)
+fn sb_store_14(offset : u32, value : vec4<i32>)
@internal(intrinsic_store_storage_vec4_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_15(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<u32>)
+fn sb_store_15(offset : u32, value : vec4<u32>)
@internal(intrinsic_store_storage_vec4_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_16(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<f16>)
+fn sb_store_16(offset : u32, value : vec4<f16>)
-fn tint_symbol_17(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x2<f32>) {
- tint_symbol_5(buffer, (offset + 0u), value[0u]);
- tint_symbol_5(buffer, (offset + 8u), value[1u]);
+fn sb_store_17(offset : u32, value : mat2x2<f32>) {
+ sb_store_5((offset + 0u), value[0u]);
+ sb_store_5((offset + 8u), value[1u]);
}
-fn tint_symbol_18(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x3<f32>) {
- tint_symbol_9(buffer, (offset + 0u), value[0u]);
- tint_symbol_9(buffer, (offset + 16u), value[1u]);
+fn sb_store_18(offset : u32, value : mat2x3<f32>) {
+ sb_store_9((offset + 0u), value[0u]);
+ sb_store_9((offset + 16u), value[1u]);
}
-fn tint_symbol_19(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x4<f32>) {
- tint_symbol_13(buffer, (offset + 0u), value[0u]);
- tint_symbol_13(buffer, (offset + 16u), value[1u]);
+fn sb_store_19(offset : u32, value : mat2x4<f32>) {
+ sb_store_13((offset + 0u), value[0u]);
+ sb_store_13((offset + 16u), value[1u]);
}
-fn tint_symbol_20(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x2<f32>) {
- tint_symbol_5(buffer, (offset + 0u), value[0u]);
- tint_symbol_5(buffer, (offset + 8u), value[1u]);
- tint_symbol_5(buffer, (offset + 16u), value[2u]);
+fn sb_store_20(offset : u32, value : mat3x2<f32>) {
+ sb_store_5((offset + 0u), value[0u]);
+ sb_store_5((offset + 8u), value[1u]);
+ sb_store_5((offset + 16u), value[2u]);
}
-fn tint_symbol_21(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x3<f32>) {
- tint_symbol_9(buffer, (offset + 0u), value[0u]);
- tint_symbol_9(buffer, (offset + 16u), value[1u]);
- tint_symbol_9(buffer, (offset + 32u), value[2u]);
+fn sb_store_21(offset : u32, value : mat3x3<f32>) {
+ sb_store_9((offset + 0u), value[0u]);
+ sb_store_9((offset + 16u), value[1u]);
+ sb_store_9((offset + 32u), value[2u]);
}
-fn tint_symbol_22(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x4<f32>) {
- tint_symbol_13(buffer, (offset + 0u), value[0u]);
- tint_symbol_13(buffer, (offset + 16u), value[1u]);
- tint_symbol_13(buffer, (offset + 32u), value[2u]);
+fn sb_store_22(offset : u32, value : mat3x4<f32>) {
+ sb_store_13((offset + 0u), value[0u]);
+ sb_store_13((offset + 16u), value[1u]);
+ sb_store_13((offset + 32u), value[2u]);
}
-fn tint_symbol_23(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x2<f32>) {
- tint_symbol_5(buffer, (offset + 0u), value[0u]);
- tint_symbol_5(buffer, (offset + 8u), value[1u]);
- tint_symbol_5(buffer, (offset + 16u), value[2u]);
- tint_symbol_5(buffer, (offset + 24u), value[3u]);
+fn sb_store_23(offset : u32, value : mat4x2<f32>) {
+ sb_store_5((offset + 0u), value[0u]);
+ sb_store_5((offset + 8u), value[1u]);
+ sb_store_5((offset + 16u), value[2u]);
+ sb_store_5((offset + 24u), value[3u]);
}
-fn tint_symbol_24(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x3<f32>) {
- tint_symbol_9(buffer, (offset + 0u), value[0u]);
- tint_symbol_9(buffer, (offset + 16u), value[1u]);
- tint_symbol_9(buffer, (offset + 32u), value[2u]);
- tint_symbol_9(buffer, (offset + 48u), value[3u]);
+fn sb_store_24(offset : u32, value : mat4x3<f32>) {
+ sb_store_9((offset + 0u), value[0u]);
+ sb_store_9((offset + 16u), value[1u]);
+ sb_store_9((offset + 32u), value[2u]);
+ sb_store_9((offset + 48u), value[3u]);
}
-fn tint_symbol_25(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x4<f32>) {
- tint_symbol_13(buffer, (offset + 0u), value[0u]);
- tint_symbol_13(buffer, (offset + 16u), value[1u]);
- tint_symbol_13(buffer, (offset + 32u), value[2u]);
- tint_symbol_13(buffer, (offset + 48u), value[3u]);
+fn sb_store_25(offset : u32, value : mat4x4<f32>) {
+ sb_store_13((offset + 0u), value[0u]);
+ sb_store_13((offset + 16u), value[1u]);
+ sb_store_13((offset + 32u), value[2u]);
+ sb_store_13((offset + 48u), value[3u]);
}
-fn tint_symbol_26(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x2<f16>) {
- tint_symbol_8(buffer, (offset + 0u), value[0u]);
- tint_symbol_8(buffer, (offset + 4u), value[1u]);
+fn sb_store_26(offset : u32, value : mat2x2<f16>) {
+ sb_store_8((offset + 0u), value[0u]);
+ sb_store_8((offset + 4u), value[1u]);
}
-fn tint_symbol_27(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x3<f16>) {
- tint_symbol_12(buffer, (offset + 0u), value[0u]);
- tint_symbol_12(buffer, (offset + 8u), value[1u]);
+fn sb_store_27(offset : u32, value : mat2x3<f16>) {
+ sb_store_12((offset + 0u), value[0u]);
+ sb_store_12((offset + 8u), value[1u]);
}
-fn tint_symbol_28(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x4<f16>) {
- tint_symbol_16(buffer, (offset + 0u), value[0u]);
- tint_symbol_16(buffer, (offset + 8u), value[1u]);
+fn sb_store_28(offset : u32, value : mat2x4<f16>) {
+ sb_store_16((offset + 0u), value[0u]);
+ sb_store_16((offset + 8u), value[1u]);
}
-fn tint_symbol_29(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x2<f16>) {
- tint_symbol_8(buffer, (offset + 0u), value[0u]);
- tint_symbol_8(buffer, (offset + 4u), value[1u]);
- tint_symbol_8(buffer, (offset + 8u), value[2u]);
+fn sb_store_29(offset : u32, value : mat3x2<f16>) {
+ sb_store_8((offset + 0u), value[0u]);
+ sb_store_8((offset + 4u), value[1u]);
+ sb_store_8((offset + 8u), value[2u]);
}
-fn tint_symbol_30(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x3<f16>) {
- tint_symbol_12(buffer, (offset + 0u), value[0u]);
- tint_symbol_12(buffer, (offset + 8u), value[1u]);
- tint_symbol_12(buffer, (offset + 16u), value[2u]);
+fn sb_store_30(offset : u32, value : mat3x3<f16>) {
+ sb_store_12((offset + 0u), value[0u]);
+ sb_store_12((offset + 8u), value[1u]);
+ sb_store_12((offset + 16u), value[2u]);
}
-fn tint_symbol_31(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x4<f16>) {
- tint_symbol_16(buffer, (offset + 0u), value[0u]);
- tint_symbol_16(buffer, (offset + 8u), value[1u]);
- tint_symbol_16(buffer, (offset + 16u), value[2u]);
+fn sb_store_31(offset : u32, value : mat3x4<f16>) {
+ sb_store_16((offset + 0u), value[0u]);
+ sb_store_16((offset + 8u), value[1u]);
+ sb_store_16((offset + 16u), value[2u]);
}
-fn tint_symbol_32(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x2<f16>) {
- tint_symbol_8(buffer, (offset + 0u), value[0u]);
- tint_symbol_8(buffer, (offset + 4u), value[1u]);
- tint_symbol_8(buffer, (offset + 8u), value[2u]);
- tint_symbol_8(buffer, (offset + 12u), value[3u]);
+fn sb_store_32(offset : u32, value : mat4x2<f16>) {
+ sb_store_8((offset + 0u), value[0u]);
+ sb_store_8((offset + 4u), value[1u]);
+ sb_store_8((offset + 8u), value[2u]);
+ sb_store_8((offset + 12u), value[3u]);
}
-fn tint_symbol_33(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x3<f16>) {
- tint_symbol_12(buffer, (offset + 0u), value[0u]);
- tint_symbol_12(buffer, (offset + 8u), value[1u]);
- tint_symbol_12(buffer, (offset + 16u), value[2u]);
- tint_symbol_12(buffer, (offset + 24u), value[3u]);
+fn sb_store_33(offset : u32, value : mat4x3<f16>) {
+ sb_store_12((offset + 0u), value[0u]);
+ sb_store_12((offset + 8u), value[1u]);
+ sb_store_12((offset + 16u), value[2u]);
+ sb_store_12((offset + 24u), value[3u]);
}
-fn tint_symbol_34(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x4<f16>) {
- tint_symbol_16(buffer, (offset + 0u), value[0u]);
- tint_symbol_16(buffer, (offset + 8u), value[1u]);
- tint_symbol_16(buffer, (offset + 16u), value[2u]);
- tint_symbol_16(buffer, (offset + 24u), value[3u]);
+fn sb_store_34(offset : u32, value : mat4x4<f16>) {
+ sb_store_16((offset + 0u), value[0u]);
+ sb_store_16((offset + 8u), value[1u]);
+ sb_store_16((offset + 16u), value[2u]);
+ sb_store_16((offset + 24u), value[3u]);
}
-fn tint_symbol_35(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : array<vec3<f32>, 2u>) {
+fn sb_store_35(offset : u32, value : array<vec3<f32>, 2u>) {
var array_1 = value;
for(var i = 0u; (i < 2u); i = (i + 1u)) {
- tint_symbol_9(buffer, (offset + (i * 16u)), array_1[i]);
+ sb_store_9((offset + (i * 16u)), array_1[i]);
}
}
-fn tint_symbol_36(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : array<mat4x2<f16>, 2u>) {
+fn sb_store_36(offset : u32, value : array<mat4x2<f16>, 2u>) {
var array_2 = value;
for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- tint_symbol_32(buffer, (offset + (i_1 * 16u)), array_2[i_1]);
+ sb_store_32((offset + (i_1 * 16u)), array_2[i_1]);
}
}
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : SB) {
- tint_symbol_1(buffer, (offset + 0u), value.scalar_f32);
- tint_symbol_2(buffer, (offset + 4u), value.scalar_i32);
- tint_symbol_3(buffer, (offset + 8u), value.scalar_u32);
- tint_symbol_4(buffer, (offset + 12u), value.scalar_f16);
- tint_symbol_5(buffer, (offset + 16u), value.vec2_f32);
- tint_symbol_6(buffer, (offset + 24u), value.vec2_i32);
- tint_symbol_7(buffer, (offset + 32u), value.vec2_u32);
- tint_symbol_8(buffer, (offset + 40u), value.vec2_f16);
- tint_symbol_9(buffer, (offset + 48u), value.vec3_f32);
- tint_symbol_10(buffer, (offset + 64u), value.vec3_i32);
- tint_symbol_11(buffer, (offset + 80u), value.vec3_u32);
- tint_symbol_12(buffer, (offset + 96u), value.vec3_f16);
- tint_symbol_13(buffer, (offset + 112u), value.vec4_f32);
- tint_symbol_14(buffer, (offset + 128u), value.vec4_i32);
- tint_symbol_15(buffer, (offset + 144u), value.vec4_u32);
- tint_symbol_16(buffer, (offset + 160u), value.vec4_f16);
- tint_symbol_17(buffer, (offset + 168u), value.mat2x2_f32);
- tint_symbol_18(buffer, (offset + 192u), value.mat2x3_f32);
- tint_symbol_19(buffer, (offset + 224u), value.mat2x4_f32);
- tint_symbol_20(buffer, (offset + 256u), value.mat3x2_f32);
- tint_symbol_21(buffer, (offset + 288u), value.mat3x3_f32);
- tint_symbol_22(buffer, (offset + 336u), value.mat3x4_f32);
- tint_symbol_23(buffer, (offset + 384u), value.mat4x2_f32);
- tint_symbol_24(buffer, (offset + 416u), value.mat4x3_f32);
- tint_symbol_25(buffer, (offset + 480u), value.mat4x4_f32);
- tint_symbol_26(buffer, (offset + 544u), value.mat2x2_f16);
- tint_symbol_27(buffer, (offset + 552u), value.mat2x3_f16);
- tint_symbol_28(buffer, (offset + 568u), value.mat2x4_f16);
- tint_symbol_29(buffer, (offset + 584u), value.mat3x2_f16);
- tint_symbol_30(buffer, (offset + 600u), value.mat3x3_f16);
- tint_symbol_31(buffer, (offset + 624u), value.mat3x4_f16);
- tint_symbol_32(buffer, (offset + 648u), value.mat4x2_f16);
- tint_symbol_33(buffer, (offset + 664u), value.mat4x3_f16);
- tint_symbol_34(buffer, (offset + 696u), value.mat4x4_f16);
- tint_symbol_35(buffer, (offset + 736u), value.arr2_vec3_f32);
- tint_symbol_36(buffer, (offset + 768u), value.arr2_mat4x2_f16);
+fn sb_store(offset : u32, value : SB) {
+ sb_store_1((offset + 0u), value.scalar_f32);
+ sb_store_2((offset + 4u), value.scalar_i32);
+ sb_store_3((offset + 8u), value.scalar_u32);
+ sb_store_4((offset + 12u), value.scalar_f16);
+ sb_store_5((offset + 16u), value.vec2_f32);
+ sb_store_6((offset + 24u), value.vec2_i32);
+ sb_store_7((offset + 32u), value.vec2_u32);
+ sb_store_8((offset + 40u), value.vec2_f16);
+ sb_store_9((offset + 48u), value.vec3_f32);
+ sb_store_10((offset + 64u), value.vec3_i32);
+ sb_store_11((offset + 80u), value.vec3_u32);
+ sb_store_12((offset + 96u), value.vec3_f16);
+ sb_store_13((offset + 112u), value.vec4_f32);
+ sb_store_14((offset + 128u), value.vec4_i32);
+ sb_store_15((offset + 144u), value.vec4_u32);
+ sb_store_16((offset + 160u), value.vec4_f16);
+ sb_store_17((offset + 168u), value.mat2x2_f32);
+ sb_store_18((offset + 192u), value.mat2x3_f32);
+ sb_store_19((offset + 224u), value.mat2x4_f32);
+ sb_store_20((offset + 256u), value.mat3x2_f32);
+ sb_store_21((offset + 288u), value.mat3x3_f32);
+ sb_store_22((offset + 336u), value.mat3x4_f32);
+ sb_store_23((offset + 384u), value.mat4x2_f32);
+ sb_store_24((offset + 416u), value.mat4x3_f32);
+ sb_store_25((offset + 480u), value.mat4x4_f32);
+ sb_store_26((offset + 544u), value.mat2x2_f16);
+ sb_store_27((offset + 552u), value.mat2x3_f16);
+ sb_store_28((offset + 568u), value.mat2x4_f16);
+ sb_store_29((offset + 584u), value.mat3x2_f16);
+ sb_store_30((offset + 600u), value.mat3x3_f16);
+ sb_store_31((offset + 624u), value.mat3x4_f16);
+ sb_store_32((offset + 648u), value.mat4x2_f16);
+ sb_store_33((offset + 664u), value.mat4x3_f16);
+ sb_store_34((offset + 696u), value.mat4x4_f16);
+ sb_store_35((offset + 736u), value.arr2_vec3_f32);
+ sb_store_36((offset + 768u), value.arr2_mat4x2_f16);
}
@compute @workgroup_size(1)
fn main() {
- tint_symbol(&(sb), 0u, SB());
+ sb_store(0u, SB());
}
)";
@@ -2851,217 +2851,217 @@
enable f16;
@internal(intrinsic_store_storage_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : f32)
+fn sb_store_1(offset : u32, value : f32)
@internal(intrinsic_store_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_2(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : i32)
+fn sb_store_2(offset : u32, value : i32)
@internal(intrinsic_store_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_3(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : u32)
+fn sb_store_3(offset : u32, value : u32)
@internal(intrinsic_store_storage_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_4(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : f16)
+fn sb_store_4(offset : u32, value : f16)
@internal(intrinsic_store_storage_vec2_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_5(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<f32>)
+fn sb_store_5(offset : u32, value : vec2<f32>)
@internal(intrinsic_store_storage_vec2_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_6(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<i32>)
+fn sb_store_6(offset : u32, value : vec2<i32>)
@internal(intrinsic_store_storage_vec2_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_7(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<u32>)
+fn sb_store_7(offset : u32, value : vec2<u32>)
@internal(intrinsic_store_storage_vec2_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_8(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec2<f16>)
+fn sb_store_8(offset : u32, value : vec2<f16>)
@internal(intrinsic_store_storage_vec3_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_9(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<f32>)
+fn sb_store_9(offset : u32, value : vec3<f32>)
@internal(intrinsic_store_storage_vec3_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_10(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<i32>)
+fn sb_store_10(offset : u32, value : vec3<i32>)
@internal(intrinsic_store_storage_vec3_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_11(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<u32>)
+fn sb_store_11(offset : u32, value : vec3<u32>)
@internal(intrinsic_store_storage_vec3_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_12(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec3<f16>)
+fn sb_store_12(offset : u32, value : vec3<f16>)
@internal(intrinsic_store_storage_vec4_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_13(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<f32>)
+fn sb_store_13(offset : u32, value : vec4<f32>)
@internal(intrinsic_store_storage_vec4_i32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_14(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<i32>)
+fn sb_store_14(offset : u32, value : vec4<i32>)
@internal(intrinsic_store_storage_vec4_u32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_15(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<u32>)
+fn sb_store_15(offset : u32, value : vec4<u32>)
@internal(intrinsic_store_storage_vec4_f16) @internal(disable_validation__function_has_no_body)
-fn tint_symbol_16(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : vec4<f16>)
+fn sb_store_16(offset : u32, value : vec4<f16>)
-fn tint_symbol_17(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x2<f32>) {
- tint_symbol_5(buffer, (offset + 0u), value[0u]);
- tint_symbol_5(buffer, (offset + 8u), value[1u]);
+fn sb_store_17(offset : u32, value : mat2x2<f32>) {
+ sb_store_5((offset + 0u), value[0u]);
+ sb_store_5((offset + 8u), value[1u]);
}
-fn tint_symbol_18(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x3<f32>) {
- tint_symbol_9(buffer, (offset + 0u), value[0u]);
- tint_symbol_9(buffer, (offset + 16u), value[1u]);
+fn sb_store_18(offset : u32, value : mat2x3<f32>) {
+ sb_store_9((offset + 0u), value[0u]);
+ sb_store_9((offset + 16u), value[1u]);
}
-fn tint_symbol_19(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x4<f32>) {
- tint_symbol_13(buffer, (offset + 0u), value[0u]);
- tint_symbol_13(buffer, (offset + 16u), value[1u]);
+fn sb_store_19(offset : u32, value : mat2x4<f32>) {
+ sb_store_13((offset + 0u), value[0u]);
+ sb_store_13((offset + 16u), value[1u]);
}
-fn tint_symbol_20(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x2<f32>) {
- tint_symbol_5(buffer, (offset + 0u), value[0u]);
- tint_symbol_5(buffer, (offset + 8u), value[1u]);
- tint_symbol_5(buffer, (offset + 16u), value[2u]);
+fn sb_store_20(offset : u32, value : mat3x2<f32>) {
+ sb_store_5((offset + 0u), value[0u]);
+ sb_store_5((offset + 8u), value[1u]);
+ sb_store_5((offset + 16u), value[2u]);
}
-fn tint_symbol_21(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x3<f32>) {
- tint_symbol_9(buffer, (offset + 0u), value[0u]);
- tint_symbol_9(buffer, (offset + 16u), value[1u]);
- tint_symbol_9(buffer, (offset + 32u), value[2u]);
+fn sb_store_21(offset : u32, value : mat3x3<f32>) {
+ sb_store_9((offset + 0u), value[0u]);
+ sb_store_9((offset + 16u), value[1u]);
+ sb_store_9((offset + 32u), value[2u]);
}
-fn tint_symbol_22(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x4<f32>) {
- tint_symbol_13(buffer, (offset + 0u), value[0u]);
- tint_symbol_13(buffer, (offset + 16u), value[1u]);
- tint_symbol_13(buffer, (offset + 32u), value[2u]);
+fn sb_store_22(offset : u32, value : mat3x4<f32>) {
+ sb_store_13((offset + 0u), value[0u]);
+ sb_store_13((offset + 16u), value[1u]);
+ sb_store_13((offset + 32u), value[2u]);
}
-fn tint_symbol_23(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x2<f32>) {
- tint_symbol_5(buffer, (offset + 0u), value[0u]);
- tint_symbol_5(buffer, (offset + 8u), value[1u]);
- tint_symbol_5(buffer, (offset + 16u), value[2u]);
- tint_symbol_5(buffer, (offset + 24u), value[3u]);
+fn sb_store_23(offset : u32, value : mat4x2<f32>) {
+ sb_store_5((offset + 0u), value[0u]);
+ sb_store_5((offset + 8u), value[1u]);
+ sb_store_5((offset + 16u), value[2u]);
+ sb_store_5((offset + 24u), value[3u]);
}
-fn tint_symbol_24(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x3<f32>) {
- tint_symbol_9(buffer, (offset + 0u), value[0u]);
- tint_symbol_9(buffer, (offset + 16u), value[1u]);
- tint_symbol_9(buffer, (offset + 32u), value[2u]);
- tint_symbol_9(buffer, (offset + 48u), value[3u]);
+fn sb_store_24(offset : u32, value : mat4x3<f32>) {
+ sb_store_9((offset + 0u), value[0u]);
+ sb_store_9((offset + 16u), value[1u]);
+ sb_store_9((offset + 32u), value[2u]);
+ sb_store_9((offset + 48u), value[3u]);
}
-fn tint_symbol_25(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x4<f32>) {
- tint_symbol_13(buffer, (offset + 0u), value[0u]);
- tint_symbol_13(buffer, (offset + 16u), value[1u]);
- tint_symbol_13(buffer, (offset + 32u), value[2u]);
- tint_symbol_13(buffer, (offset + 48u), value[3u]);
+fn sb_store_25(offset : u32, value : mat4x4<f32>) {
+ sb_store_13((offset + 0u), value[0u]);
+ sb_store_13((offset + 16u), value[1u]);
+ sb_store_13((offset + 32u), value[2u]);
+ sb_store_13((offset + 48u), value[3u]);
}
-fn tint_symbol_26(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x2<f16>) {
- tint_symbol_8(buffer, (offset + 0u), value[0u]);
- tint_symbol_8(buffer, (offset + 4u), value[1u]);
+fn sb_store_26(offset : u32, value : mat2x2<f16>) {
+ sb_store_8((offset + 0u), value[0u]);
+ sb_store_8((offset + 4u), value[1u]);
}
-fn tint_symbol_27(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x3<f16>) {
- tint_symbol_12(buffer, (offset + 0u), value[0u]);
- tint_symbol_12(buffer, (offset + 8u), value[1u]);
+fn sb_store_27(offset : u32, value : mat2x3<f16>) {
+ sb_store_12((offset + 0u), value[0u]);
+ sb_store_12((offset + 8u), value[1u]);
}
-fn tint_symbol_28(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat2x4<f16>) {
- tint_symbol_16(buffer, (offset + 0u), value[0u]);
- tint_symbol_16(buffer, (offset + 8u), value[1u]);
+fn sb_store_28(offset : u32, value : mat2x4<f16>) {
+ sb_store_16((offset + 0u), value[0u]);
+ sb_store_16((offset + 8u), value[1u]);
}
-fn tint_symbol_29(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x2<f16>) {
- tint_symbol_8(buffer, (offset + 0u), value[0u]);
- tint_symbol_8(buffer, (offset + 4u), value[1u]);
- tint_symbol_8(buffer, (offset + 8u), value[2u]);
+fn sb_store_29(offset : u32, value : mat3x2<f16>) {
+ sb_store_8((offset + 0u), value[0u]);
+ sb_store_8((offset + 4u), value[1u]);
+ sb_store_8((offset + 8u), value[2u]);
}
-fn tint_symbol_30(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x3<f16>) {
- tint_symbol_12(buffer, (offset + 0u), value[0u]);
- tint_symbol_12(buffer, (offset + 8u), value[1u]);
- tint_symbol_12(buffer, (offset + 16u), value[2u]);
+fn sb_store_30(offset : u32, value : mat3x3<f16>) {
+ sb_store_12((offset + 0u), value[0u]);
+ sb_store_12((offset + 8u), value[1u]);
+ sb_store_12((offset + 16u), value[2u]);
}
-fn tint_symbol_31(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat3x4<f16>) {
- tint_symbol_16(buffer, (offset + 0u), value[0u]);
- tint_symbol_16(buffer, (offset + 8u), value[1u]);
- tint_symbol_16(buffer, (offset + 16u), value[2u]);
+fn sb_store_31(offset : u32, value : mat3x4<f16>) {
+ sb_store_16((offset + 0u), value[0u]);
+ sb_store_16((offset + 8u), value[1u]);
+ sb_store_16((offset + 16u), value[2u]);
}
-fn tint_symbol_32(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x2<f16>) {
- tint_symbol_8(buffer, (offset + 0u), value[0u]);
- tint_symbol_8(buffer, (offset + 4u), value[1u]);
- tint_symbol_8(buffer, (offset + 8u), value[2u]);
- tint_symbol_8(buffer, (offset + 12u), value[3u]);
+fn sb_store_32(offset : u32, value : mat4x2<f16>) {
+ sb_store_8((offset + 0u), value[0u]);
+ sb_store_8((offset + 4u), value[1u]);
+ sb_store_8((offset + 8u), value[2u]);
+ sb_store_8((offset + 12u), value[3u]);
}
-fn tint_symbol_33(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x3<f16>) {
- tint_symbol_12(buffer, (offset + 0u), value[0u]);
- tint_symbol_12(buffer, (offset + 8u), value[1u]);
- tint_symbol_12(buffer, (offset + 16u), value[2u]);
- tint_symbol_12(buffer, (offset + 24u), value[3u]);
+fn sb_store_33(offset : u32, value : mat4x3<f16>) {
+ sb_store_12((offset + 0u), value[0u]);
+ sb_store_12((offset + 8u), value[1u]);
+ sb_store_12((offset + 16u), value[2u]);
+ sb_store_12((offset + 24u), value[3u]);
}
-fn tint_symbol_34(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : mat4x4<f16>) {
- tint_symbol_16(buffer, (offset + 0u), value[0u]);
- tint_symbol_16(buffer, (offset + 8u), value[1u]);
- tint_symbol_16(buffer, (offset + 16u), value[2u]);
- tint_symbol_16(buffer, (offset + 24u), value[3u]);
+fn sb_store_34(offset : u32, value : mat4x4<f16>) {
+ sb_store_16((offset + 0u), value[0u]);
+ sb_store_16((offset + 8u), value[1u]);
+ sb_store_16((offset + 16u), value[2u]);
+ sb_store_16((offset + 24u), value[3u]);
}
-fn tint_symbol_35(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : array<vec3<f32>, 2u>) {
+fn sb_store_35(offset : u32, value : array<vec3<f32>, 2u>) {
var array_1 = value;
for(var i = 0u; (i < 2u); i = (i + 1u)) {
- tint_symbol_9(buffer, (offset + (i * 16u)), array_1[i]);
+ sb_store_9((offset + (i * 16u)), array_1[i]);
}
}
-fn tint_symbol_36(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : array<mat4x2<f16>, 2u>) {
+fn sb_store_36(offset : u32, value : array<mat4x2<f16>, 2u>) {
var array_2 = value;
for(var i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- tint_symbol_32(buffer, (offset + (i_1 * 16u)), array_2[i_1]);
+ sb_store_32((offset + (i_1 * 16u)), array_2[i_1]);
}
}
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, value : SB) {
- tint_symbol_1(buffer, (offset + 0u), value.scalar_f32);
- tint_symbol_2(buffer, (offset + 4u), value.scalar_i32);
- tint_symbol_3(buffer, (offset + 8u), value.scalar_u32);
- tint_symbol_4(buffer, (offset + 12u), value.scalar_f16);
- tint_symbol_5(buffer, (offset + 16u), value.vec2_f32);
- tint_symbol_6(buffer, (offset + 24u), value.vec2_i32);
- tint_symbol_7(buffer, (offset + 32u), value.vec2_u32);
- tint_symbol_8(buffer, (offset + 40u), value.vec2_f16);
- tint_symbol_9(buffer, (offset + 48u), value.vec3_f32);
- tint_symbol_10(buffer, (offset + 64u), value.vec3_i32);
- tint_symbol_11(buffer, (offset + 80u), value.vec3_u32);
- tint_symbol_12(buffer, (offset + 96u), value.vec3_f16);
- tint_symbol_13(buffer, (offset + 112u), value.vec4_f32);
- tint_symbol_14(buffer, (offset + 128u), value.vec4_i32);
- tint_symbol_15(buffer, (offset + 144u), value.vec4_u32);
- tint_symbol_16(buffer, (offset + 160u), value.vec4_f16);
- tint_symbol_17(buffer, (offset + 168u), value.mat2x2_f32);
- tint_symbol_18(buffer, (offset + 192u), value.mat2x3_f32);
- tint_symbol_19(buffer, (offset + 224u), value.mat2x4_f32);
- tint_symbol_20(buffer, (offset + 256u), value.mat3x2_f32);
- tint_symbol_21(buffer, (offset + 288u), value.mat3x3_f32);
- tint_symbol_22(buffer, (offset + 336u), value.mat3x4_f32);
- tint_symbol_23(buffer, (offset + 384u), value.mat4x2_f32);
- tint_symbol_24(buffer, (offset + 416u), value.mat4x3_f32);
- tint_symbol_25(buffer, (offset + 480u), value.mat4x4_f32);
- tint_symbol_26(buffer, (offset + 544u), value.mat2x2_f16);
- tint_symbol_27(buffer, (offset + 552u), value.mat2x3_f16);
- tint_symbol_28(buffer, (offset + 568u), value.mat2x4_f16);
- tint_symbol_29(buffer, (offset + 584u), value.mat3x2_f16);
- tint_symbol_30(buffer, (offset + 600u), value.mat3x3_f16);
- tint_symbol_31(buffer, (offset + 624u), value.mat3x4_f16);
- tint_symbol_32(buffer, (offset + 648u), value.mat4x2_f16);
- tint_symbol_33(buffer, (offset + 664u), value.mat4x3_f16);
- tint_symbol_34(buffer, (offset + 696u), value.mat4x4_f16);
- tint_symbol_35(buffer, (offset + 736u), value.arr2_vec3_f32);
- tint_symbol_36(buffer, (offset + 768u), value.arr2_mat4x2_f16);
+fn sb_store(offset : u32, value : SB) {
+ sb_store_1((offset + 0u), value.scalar_f32);
+ sb_store_2((offset + 4u), value.scalar_i32);
+ sb_store_3((offset + 8u), value.scalar_u32);
+ sb_store_4((offset + 12u), value.scalar_f16);
+ sb_store_5((offset + 16u), value.vec2_f32);
+ sb_store_6((offset + 24u), value.vec2_i32);
+ sb_store_7((offset + 32u), value.vec2_u32);
+ sb_store_8((offset + 40u), value.vec2_f16);
+ sb_store_9((offset + 48u), value.vec3_f32);
+ sb_store_10((offset + 64u), value.vec3_i32);
+ sb_store_11((offset + 80u), value.vec3_u32);
+ sb_store_12((offset + 96u), value.vec3_f16);
+ sb_store_13((offset + 112u), value.vec4_f32);
+ sb_store_14((offset + 128u), value.vec4_i32);
+ sb_store_15((offset + 144u), value.vec4_u32);
+ sb_store_16((offset + 160u), value.vec4_f16);
+ sb_store_17((offset + 168u), value.mat2x2_f32);
+ sb_store_18((offset + 192u), value.mat2x3_f32);
+ sb_store_19((offset + 224u), value.mat2x4_f32);
+ sb_store_20((offset + 256u), value.mat3x2_f32);
+ sb_store_21((offset + 288u), value.mat3x3_f32);
+ sb_store_22((offset + 336u), value.mat3x4_f32);
+ sb_store_23((offset + 384u), value.mat4x2_f32);
+ sb_store_24((offset + 416u), value.mat4x3_f32);
+ sb_store_25((offset + 480u), value.mat4x4_f32);
+ sb_store_26((offset + 544u), value.mat2x2_f16);
+ sb_store_27((offset + 552u), value.mat2x3_f16);
+ sb_store_28((offset + 568u), value.mat2x4_f16);
+ sb_store_29((offset + 584u), value.mat3x2_f16);
+ sb_store_30((offset + 600u), value.mat3x3_f16);
+ sb_store_31((offset + 624u), value.mat3x4_f16);
+ sb_store_32((offset + 648u), value.mat4x2_f16);
+ sb_store_33((offset + 664u), value.mat4x3_f16);
+ sb_store_34((offset + 696u), value.mat4x4_f16);
+ sb_store_35((offset + 736u), value.arr2_vec3_f32);
+ sb_store_36((offset + 768u), value.arr2_mat4x2_f16);
}
@compute @workgroup_size(1)
fn main() {
- tint_symbol(&(sb), 0u, SB());
+ sb_store(0u, SB());
}
@group(0) @binding(0) var<storage, read_write> sb : SB;
@@ -3172,11 +3172,11 @@
@group(0) @binding(0) var<storage, read_write> sb : SB;
@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> f32
+fn sb_load(offset : u32) -> f32
@compute @workgroup_size(1)
fn main() {
- var x : f32 = tint_symbol(&(sb), 712u);
+ var x : f32 = sb_load(712u);
}
)";
@@ -3222,11 +3222,11 @@
auto* expect = R"(
@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> f32
+fn sb_load(offset : u32) -> f32
@compute @workgroup_size(1)
fn main() {
- var x : f32 = tint_symbol(&(sb), 712u);
+ var x : f32 = sb_load(712u);
}
@group(0) @binding(0) var<storage, read_write> sb : SB;
@@ -3308,14 +3308,14 @@
@group(0) @binding(0) var<storage, read_write> sb : SB;
@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> f32
+fn sb_load(offset : u32) -> f32
@compute @workgroup_size(1)
fn main() {
var i : i32 = 4;
var j : u32 = 1u;
var k : i32 = 2;
- var x : f32 = tint_symbol(&(sb), (((((128u + (128u * u32(i))) + 16u) + (32u * j)) + 16u) + (4u * u32(k))));
+ var x : f32 = sb_load((((((128u + (128u * u32(i))) + 16u) + (32u * j)) + 16u) + (4u * u32(k))));
}
)";
@@ -3357,14 +3357,14 @@
auto* expect = R"(
@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> f32
+fn sb_load(offset : u32) -> f32
@compute @workgroup_size(1)
fn main() {
var i : i32 = 4;
var j : u32 = 1u;
var k : i32 = 2;
- var x : f32 = tint_symbol(&(sb), (((((128u + (128u * u32(i))) + 16u) + (32u * j)) + 16u) + (4u * u32(k))));
+ var x : f32 = sb_load((((((128u + (128u * u32(i))) + 16u) + (32u * j)) + 16u) + (4u * u32(k))));
}
@group(0) @binding(0) var<storage, read_write> sb : SB;
@@ -3462,14 +3462,14 @@
@group(0) @binding(0) var<storage, read_write> sb : SB;
@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> f32
+fn sb_load(offset : u32) -> f32
@compute @workgroup_size(1)
fn main() {
var i : i32 = 4;
var j : u32 = 1u;
var k : i32 = 2;
- var x : f32 = tint_symbol(&(sb), (((((128u + (128u * u32(i))) + 16u) + (32u * j)) + 16u) + (4u * u32(k))));
+ var x : f32 = sb_load((((((128u + (128u * u32(i))) + 16u) + (32u * j)) + 16u) + (4u * u32(k))));
}
)";
@@ -3519,14 +3519,14 @@
auto* expect = R"(
@internal(intrinsic_load_storage_f32) @internal(disable_validation__function_has_no_body)
-fn tint_symbol(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> f32
+fn sb_load(offset : u32) -> f32
@compute @workgroup_size(1)
fn main() {
var i : i32 = 4;
var j : u32 = 1u;
var k : i32 = 2;
- var x : f32 = tint_symbol(&(sb), (((((128u + (128u * u32(i))) + 16u) + (32u * j)) + 16u) + (4u * u32(k))));
+ var x : f32 = sb_load((((((128u + (128u * u32(i))) + 16u) + (32u * j)) + 16u) + (4u * u32(k))));
}
@group(0) @binding(0) var<storage, read_write> sb : SB;
@@ -3611,34 +3611,34 @@
@group(0) @binding(0) var<storage, read_write> sb : SB;
@internal(intrinsic_atomic_store_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicStore(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32)
+fn sbatomicStore(offset : u32, param_1 : i32)
@internal(intrinsic_atomic_load_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicLoad(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> i32
+fn sbatomicLoad(offset : u32) -> i32
@internal(intrinsic_atomic_add_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicAdd(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicAdd(offset : u32, param_1 : i32) -> i32
@internal(intrinsic_atomic_sub_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicSub(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicSub(offset : u32, param_1 : i32) -> i32
@internal(intrinsic_atomic_max_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicMax(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicMax(offset : u32, param_1 : i32) -> i32
@internal(intrinsic_atomic_min_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicMin(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicMin(offset : u32, param_1 : i32) -> i32
@internal(intrinsic_atomic_and_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicAnd(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicAnd(offset : u32, param_1 : i32) -> i32
@internal(intrinsic_atomic_or_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicOr(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicOr(offset : u32, param_1 : i32) -> i32
@internal(intrinsic_atomic_xor_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicXor(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicXor(offset : u32, param_1 : i32) -> i32
@internal(intrinsic_atomic_exchange_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicExchange(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicExchange(offset : u32, param_1 : i32) -> i32
struct atomic_compare_exchange_weak_ret_type {
old_value : i32,
@@ -3646,37 +3646,37 @@
}
@internal(intrinsic_atomic_compare_exchange_weak_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicCompareExchangeWeak(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32, param_2 : i32) -> atomic_compare_exchange_weak_ret_type
+fn sbatomicCompareExchangeWeak(offset : u32, param_1 : i32, param_2 : i32) -> atomic_compare_exchange_weak_ret_type
@internal(intrinsic_atomic_store_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicStore_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32)
+fn sbatomicStore_1(offset : u32, param_1 : u32)
@internal(intrinsic_atomic_load_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicLoad_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> u32
+fn sbatomicLoad_1(offset : u32) -> u32
@internal(intrinsic_atomic_add_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicAdd_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicAdd_1(offset : u32, param_1 : u32) -> u32
@internal(intrinsic_atomic_sub_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicSub_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicSub_1(offset : u32, param_1 : u32) -> u32
@internal(intrinsic_atomic_max_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicMax_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicMax_1(offset : u32, param_1 : u32) -> u32
@internal(intrinsic_atomic_min_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicMin_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicMin_1(offset : u32, param_1 : u32) -> u32
@internal(intrinsic_atomic_and_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicAnd_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicAnd_1(offset : u32, param_1 : u32) -> u32
@internal(intrinsic_atomic_or_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicOr_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicOr_1(offset : u32, param_1 : u32) -> u32
@internal(intrinsic_atomic_xor_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicXor_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicXor_1(offset : u32, param_1 : u32) -> u32
@internal(intrinsic_atomic_exchange_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicExchange_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicExchange_1(offset : u32, param_1 : u32) -> u32
struct atomic_compare_exchange_weak_ret_type_1 {
old_value : u32,
@@ -3684,32 +3684,32 @@
}
@internal(intrinsic_atomic_compare_exchange_weak_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicCompareExchangeWeak_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32, param_2 : u32) -> atomic_compare_exchange_weak_ret_type_1
+fn sbatomicCompareExchangeWeak_1(offset : u32, param_1 : u32, param_2 : u32) -> atomic_compare_exchange_weak_ret_type_1
@compute @workgroup_size(1)
fn main() {
- tint_atomicStore(&(sb), 16u, 123);
- tint_atomicLoad(&(sb), 16u);
- tint_atomicAdd(&(sb), 16u, 123);
- tint_atomicSub(&(sb), 16u, 123);
- tint_atomicMax(&(sb), 16u, 123);
- tint_atomicMin(&(sb), 16u, 123);
- tint_atomicAnd(&(sb), 16u, 123);
- tint_atomicOr(&(sb), 16u, 123);
- tint_atomicXor(&(sb), 16u, 123);
- tint_atomicExchange(&(sb), 16u, 123);
- tint_atomicCompareExchangeWeak(&(sb), 16u, 123, 345);
- tint_atomicStore_1(&(sb), 20u, 123u);
- tint_atomicLoad_1(&(sb), 20u);
- tint_atomicAdd_1(&(sb), 20u, 123u);
- tint_atomicSub_1(&(sb), 20u, 123u);
- tint_atomicMax_1(&(sb), 20u, 123u);
- tint_atomicMin_1(&(sb), 20u, 123u);
- tint_atomicAnd_1(&(sb), 20u, 123u);
- tint_atomicOr_1(&(sb), 20u, 123u);
- tint_atomicXor_1(&(sb), 20u, 123u);
- tint_atomicExchange_1(&(sb), 20u, 123u);
- tint_atomicCompareExchangeWeak_1(&(sb), 20u, 123u, 345u);
+ sbatomicStore(16u, 123);
+ sbatomicLoad(16u);
+ sbatomicAdd(16u, 123);
+ sbatomicSub(16u, 123);
+ sbatomicMax(16u, 123);
+ sbatomicMin(16u, 123);
+ sbatomicAnd(16u, 123);
+ sbatomicOr(16u, 123);
+ sbatomicXor(16u, 123);
+ sbatomicExchange(16u, 123);
+ sbatomicCompareExchangeWeak(16u, 123, 345);
+ sbatomicStore_1(20u, 123u);
+ sbatomicLoad_1(20u);
+ sbatomicAdd_1(20u, 123u);
+ sbatomicSub_1(20u, 123u);
+ sbatomicMax_1(20u, 123u);
+ sbatomicMin_1(20u, 123u);
+ sbatomicAnd_1(20u, 123u);
+ sbatomicOr_1(20u, 123u);
+ sbatomicXor_1(20u, 123u);
+ sbatomicExchange_1(20u, 123u);
+ sbatomicCompareExchangeWeak_1(20u, 123u, 345u);
}
)";
@@ -3758,34 +3758,34 @@
auto* expect = R"(
@internal(intrinsic_atomic_store_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicStore(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32)
+fn sbatomicStore(offset : u32, param_1 : i32)
@internal(intrinsic_atomic_load_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicLoad(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> i32
+fn sbatomicLoad(offset : u32) -> i32
@internal(intrinsic_atomic_add_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicAdd(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicAdd(offset : u32, param_1 : i32) -> i32
@internal(intrinsic_atomic_sub_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicSub(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicSub(offset : u32, param_1 : i32) -> i32
@internal(intrinsic_atomic_max_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicMax(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicMax(offset : u32, param_1 : i32) -> i32
@internal(intrinsic_atomic_min_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicMin(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicMin(offset : u32, param_1 : i32) -> i32
@internal(intrinsic_atomic_and_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicAnd(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicAnd(offset : u32, param_1 : i32) -> i32
@internal(intrinsic_atomic_or_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicOr(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicOr(offset : u32, param_1 : i32) -> i32
@internal(intrinsic_atomic_xor_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicXor(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicXor(offset : u32, param_1 : i32) -> i32
@internal(intrinsic_atomic_exchange_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicExchange(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32) -> i32
+fn sbatomicExchange(offset : u32, param_1 : i32) -> i32
struct atomic_compare_exchange_weak_ret_type {
old_value : i32,
@@ -3793,37 +3793,37 @@
}
@internal(intrinsic_atomic_compare_exchange_weak_storage_i32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicCompareExchangeWeak(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : i32, param_2 : i32) -> atomic_compare_exchange_weak_ret_type
+fn sbatomicCompareExchangeWeak(offset : u32, param_1 : i32, param_2 : i32) -> atomic_compare_exchange_weak_ret_type
@internal(intrinsic_atomic_store_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicStore_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32)
+fn sbatomicStore_1(offset : u32, param_1 : u32)
@internal(intrinsic_atomic_load_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicLoad_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32) -> u32
+fn sbatomicLoad_1(offset : u32) -> u32
@internal(intrinsic_atomic_add_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicAdd_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicAdd_1(offset : u32, param_1 : u32) -> u32
@internal(intrinsic_atomic_sub_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicSub_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicSub_1(offset : u32, param_1 : u32) -> u32
@internal(intrinsic_atomic_max_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicMax_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicMax_1(offset : u32, param_1 : u32) -> u32
@internal(intrinsic_atomic_min_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicMin_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicMin_1(offset : u32, param_1 : u32) -> u32
@internal(intrinsic_atomic_and_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicAnd_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicAnd_1(offset : u32, param_1 : u32) -> u32
@internal(intrinsic_atomic_or_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicOr_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicOr_1(offset : u32, param_1 : u32) -> u32
@internal(intrinsic_atomic_xor_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicXor_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicXor_1(offset : u32, param_1 : u32) -> u32
@internal(intrinsic_atomic_exchange_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicExchange_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32) -> u32
+fn sbatomicExchange_1(offset : u32, param_1 : u32) -> u32
struct atomic_compare_exchange_weak_ret_type_1 {
old_value : u32,
@@ -3831,32 +3831,32 @@
}
@internal(intrinsic_atomic_compare_exchange_weak_storage_u32) @internal(disable_validation__function_has_no_body)
-fn tint_atomicCompareExchangeWeak_1(@internal(disable_validation__function_parameter) buffer : ptr<storage, SB, read_write>, offset : u32, param_1 : u32, param_2 : u32) -> atomic_compare_exchange_weak_ret_type_1
+fn sbatomicCompareExchangeWeak_1(offset : u32, param_1 : u32, param_2 : u32) -> atomic_compare_exchange_weak_ret_type_1
@compute @workgroup_size(1)
fn main() {
- tint_atomicStore(&(sb), 16u, 123);
- tint_atomicLoad(&(sb), 16u);
- tint_atomicAdd(&(sb), 16u, 123);
- tint_atomicSub(&(sb), 16u, 123);
- tint_atomicMax(&(sb), 16u, 123);
- tint_atomicMin(&(sb), 16u, 123);
- tint_atomicAnd(&(sb), 16u, 123);
- tint_atomicOr(&(sb), 16u, 123);
- tint_atomicXor(&(sb), 16u, 123);
- tint_atomicExchange(&(sb), 16u, 123);
- tint_atomicCompareExchangeWeak(&(sb), 16u, 123, 345);
- tint_atomicStore_1(&(sb), 20u, 123u);
- tint_atomicLoad_1(&(sb), 20u);
- tint_atomicAdd_1(&(sb), 20u, 123u);
- tint_atomicSub_1(&(sb), 20u, 123u);
- tint_atomicMax_1(&(sb), 20u, 123u);
- tint_atomicMin_1(&(sb), 20u, 123u);
- tint_atomicAnd_1(&(sb), 20u, 123u);
- tint_atomicOr_1(&(sb), 20u, 123u);
- tint_atomicXor_1(&(sb), 20u, 123u);
- tint_atomicExchange_1(&(sb), 20u, 123u);
- tint_atomicCompareExchangeWeak_1(&(sb), 20u, 123u, 345u);
+ sbatomicStore(16u, 123);
+ sbatomicLoad(16u);
+ sbatomicAdd(16u, 123);
+ sbatomicSub(16u, 123);
+ sbatomicMax(16u, 123);
+ sbatomicMin(16u, 123);
+ sbatomicAnd(16u, 123);
+ sbatomicOr(16u, 123);
+ sbatomicXor(16u, 123);
+ sbatomicExchange(16u, 123);
+ sbatomicCompareExchangeWeak(16u, 123, 345);
+ sbatomicStore_1(20u, 123u);
+ sbatomicLoad_1(20u);
+ sbatomicAdd_1(20u, 123u);
+ sbatomicSub_1(20u, 123u);
+ sbatomicMax_1(20u, 123u);
+ sbatomicMin_1(20u, 123u);
+ sbatomicAnd_1(20u, 123u);
+ sbatomicOr_1(20u, 123u);
+ sbatomicXor_1(20u, 123u);
+ sbatomicExchange_1(20u, 123u);
+ sbatomicCompareExchangeWeak_1(20u, 123u, 345u);
}
@group(0) @binding(0) var<storage, read_write> sb : SB;
diff --git a/src/tint/writer/hlsl/generator_impl.cc b/src/tint/writer/hlsl/generator_impl.cc
index cce8c06..787962b 100644
--- a/src/tint/writer/hlsl/generator_impl.cc
+++ b/src/tint/writer/hlsl/generator_impl.cc
@@ -1112,8 +1112,8 @@
std::ostream& out,
const ast::CallExpression* expr,
const transform::DecomposeMemoryAccess::Intrinsic* intrinsic) {
- const auto& args = expr->args;
- auto* offset_arg = builder_.Sem().GetVal(args[1]);
+ auto const buffer = program_->Symbols().NameFor(intrinsic->buffer);
+ auto* const offset = expr->args[0];
// offset in bytes
uint32_t scalar_offset_bytes = 0;
@@ -1129,7 +1129,7 @@
// If true, use scalar_offset_index, otherwise use scalar_offset_index_expr
bool scalar_offset_constant = false;
- if (auto* val = offset_arg->ConstantValue()) {
+ if (auto* val = builder_.Sem().GetVal(offset)->ConstantValue()) {
TINT_ASSERT(Writer, val->Type()->Is<type::U32>());
scalar_offset_bytes = static_cast<uint32_t>(val->ValueAs<AInt>());
scalar_offset_index = scalar_offset_bytes / 4; // bytes -> scalar index
@@ -1151,7 +1151,7 @@
{
auto pre = line();
pre << "const uint " << scalar_offset_bytes_expr << " = (";
- if (!EmitExpression(pre, args[1])) { // offset
+ if (!EmitExpression(pre, offset)) {
return false;
}
pre << ");";
@@ -1162,7 +1162,7 @@
scalar_offset_index_unified_expr = UniqueIdentifier("scalar_offset");
auto pre = line();
pre << "const uint " << scalar_offset_index_unified_expr << " = (";
- if (!EmitExpression(pre, args[1])) { // offset
+ if (!EmitExpression(pre, offset)) {
return false;
}
pre << ") / 4;";
@@ -1182,9 +1182,7 @@
return result;
};
auto load_u32_to = [&](std::ostream& target) {
- if (!EmitExpression(target, args[0])) { // buffer
- return false;
- }
+ target << buffer;
if (scalar_offset_constant) {
target << "[" << (scalar_offset_index / 4) << "]."
<< swizzle[scalar_offset_index & 3];
@@ -1198,20 +1196,14 @@
// Has a minimum alignment of 8 bytes, so is either .xy or .zw
auto load_vec2_u32_to = [&](std::ostream& target) {
if (scalar_offset_constant) {
- if (!EmitExpression(target, args[0])) { // buffer
- return false;
- }
- target << "[" << (scalar_offset_index / 4) << "]";
- target << ((scalar_offset_index & 2) == 0 ? ".xy" : ".zw");
+ target << buffer << "[" << (scalar_offset_index / 4) << "]"
+ << ((scalar_offset_index & 2) == 0 ? ".xy" : ".zw");
} else {
std::string ubo_load = UniqueIdentifier("ubo_load");
{
auto pre = line();
- pre << "uint4 " << ubo_load << " = ";
- if (!EmitExpression(pre, args[0])) { // buffer
- return false;
- }
- pre << "[" << scalar_offset_index_unified_expr << " / 4];";
+ pre << "uint4 " << ubo_load << " = " << buffer << "["
+ << scalar_offset_index_unified_expr << " / 4];";
}
target << "((" << scalar_offset_index_unified_expr << " & 2) ? " << ubo_load
<< ".zw : " << ubo_load << ".xy)";
@@ -1221,9 +1213,7 @@
auto load_vec2_u32 = [&] { return load_vec2_u32_to(out); };
// vec4 has a minimum alignment of 16 bytes, easiest case
auto load_vec4_u32 = [&] {
- if (!EmitExpression(out, args[0])) { // buffer
- return false;
- }
+ out << buffer;
if (scalar_offset_constant) {
out << "[" << (scalar_offset_index / 4) << "]";
} else {
@@ -1242,10 +1232,7 @@
auto load_scalar_f16 = [&] {
// offset bytes = 4k, ((buffer[index].x) & 0xFFFF)
// offset bytes = 4k+2, ((buffer[index].x >> 16) & 0xFFFF)
- out << "float16_t(f16tof32(((";
- if (!EmitExpression(out, args[0])) { // buffer
- return false;
- }
+ out << "float16_t(f16tof32(((" << buffer;
if (scalar_offset_constant) {
out << "[" << (scalar_offset_index / 4) << "]."
<< swizzle[scalar_offset_index & 3];
@@ -1413,7 +1400,9 @@
std::ostream& out,
const ast::CallExpression* expr,
const transform::DecomposeMemoryAccess::Intrinsic* intrinsic) {
- const auto& args = expr->args;
+ auto const buffer = program_->Symbols().NameFor(intrinsic->buffer);
+ auto* const offset = expr->args[0];
+ auto* const value = expr->args[1];
using Op = transform::DecomposeMemoryAccess::Intrinsic::Op;
using DataType = transform::DecomposeMemoryAccess::Intrinsic::DataType;
@@ -1423,15 +1412,12 @@
if (cast) {
out << cast << "(";
}
- if (!EmitExpression(out, args[0])) { // buffer
- return false;
- }
- out << ".Load";
+ out << buffer << ".Load";
if (n > 1) {
out << n;
}
ScopedParen sp(out);
- if (!EmitExpression(out, args[1])) { // offset
+ if (!EmitExpression(out, offset)) {
return false;
}
if (cast) {
@@ -1443,12 +1429,9 @@
// Used by loading f16 types, e.g. for f16 type, set type parameter to "float16_t"
// to emit `buffer.Load<float16_t>(offset)`.
auto templated_load = [&](const char* type) {
- if (!EmitExpression(out, args[0])) { // buffer
- return false;
- }
- out << ".Load<" << type << ">"; // templated load
+ out << buffer << ".Load<" << type << ">"; // templated load
ScopedParen sp(out);
- if (!EmitExpression(out, args[1])) { // offset
+ if (!EmitExpression(out, offset)) {
return false;
}
return true;
@@ -1495,20 +1478,17 @@
case Op::kStore: {
auto store = [&](int n) {
- if (!EmitExpression(out, args[0])) { // buffer
- return false;
- }
- out << ".Store";
+ out << buffer << ".Store";
if (n > 1) {
out << n;
}
ScopedParen sp1(out);
- if (!EmitExpression(out, args[1])) { // offset
+ if (!EmitExpression(out, offset)) {
return false;
}
out << ", asuint";
ScopedParen sp2(out);
- if (!EmitExpression(out, args[2])) { // value
+ if (!EmitExpression(out, value)) {
return false;
}
return true;
@@ -1517,16 +1497,13 @@
// Used by storing f16 types, e.g. for f16 type, set type parameter to "float16_t"
// to emit `buffer.Store<float16_t>(offset)`.
auto templated_store = [&](const char* type) {
- if (!EmitExpression(out, args[0])) { // buffer
- return false;
- }
- out << ".Store<" << type << ">"; // templated store
+ out << buffer << ".Store<" << type << ">"; // templated store
ScopedParen sp1(out);
- if (!EmitExpression(out, args[1])) { // offset
+ if (!EmitExpression(out, offset)) {
return false;
}
out << ", ";
- if (!EmitExpression(out, args[2])) { // value
+ if (!EmitExpression(out, value)) {
return false;
}
return true;
@@ -1571,7 +1548,7 @@
return false;
}
default:
- // Break out to error case below/
+ // Break out to error case below
// Note that atomic intrinsics are generated as functions.
break;
}
@@ -1588,10 +1565,11 @@
const sem::Function* sem_func = builder_.Sem().Get(func);
auto* result_ty = sem_func->ReturnType();
- const auto& params = sem_func->Parameters();
const auto name = builder_.Symbols().NameFor(func->name->symbol);
auto& buf = *current_buffer_;
+ auto const buffer = program_->Symbols().NameFor(intrinsic->buffer);
+
auto rmw = [&](const char* hlsl) -> bool {
{
auto fn = line(&buf);
@@ -1599,7 +1577,7 @@
builtin::Access::kUndefined, name)) {
return false;
}
- fn << "(RWByteAddressBuffer buffer, uint offset, ";
+ fn << "(uint offset, ";
if (!EmitTypeAndName(fn, result_ty, builtin::AddressSpace::kUndefined,
builtin::Access::kUndefined, "value")) {
return false;
@@ -1624,7 +1602,7 @@
}
{
auto l = line(&buf);
- l << "buffer." << hlsl << "(offset, ";
+ l << buffer << "." << hlsl << "(offset, ";
if (intrinsic->op == Op::kAtomicSub) {
l << "-";
}
@@ -1669,7 +1647,7 @@
builtin::Access::kUndefined, name)) {
return false;
}
- fn << "(RWByteAddressBuffer buffer, uint offset) {";
+ fn << "(uint offset) {";
}
buf.IncrementIndent();
@@ -1688,17 +1666,17 @@
l << " = 0;";
}
- line(&buf) << "buffer.InterlockedOr(offset, 0, value);";
+ line(&buf) << buffer << ".InterlockedOr(offset, 0, value);";
line(&buf) << "return value;";
return true;
}
case Op::kAtomicStore: {
+ auto* const value_ty = sem_func->Parameters()[1]->Type()->UnwrapRef();
// HLSL does not have an InterlockedStore, so we emulate it with
// InterlockedExchange and discard the returned value
- auto* value_ty = params[2]->Type()->UnwrapRef();
{
auto fn = line(&buf);
- fn << "void " << name << "(RWByteAddressBuffer buffer, uint offset, ";
+ fn << "void " << name << "(uint offset, ";
if (!EmitTypeAndName(fn, value_ty, builtin::AddressSpace::kUndefined,
builtin::Access::kUndefined, "value")) {
return false;
@@ -1721,20 +1699,20 @@
}
l << ";";
}
- line(&buf) << "buffer.InterlockedExchange(offset, value, ignored);";
+ line(&buf) << buffer << ".InterlockedExchange(offset, value, ignored);";
return true;
}
case Op::kAtomicCompareExchangeWeak: {
+ auto* const value_ty = sem_func->Parameters()[1]->Type()->UnwrapRef();
// NOTE: We don't need to emit the return type struct here as DecomposeMemoryAccess
// already added it to the AST, and it should have already been emitted by now.
- auto* value_ty = params[2]->Type()->UnwrapRef();
{
auto fn = line(&buf);
if (!EmitTypeAndName(fn, result_ty, builtin::AddressSpace::kUndefined,
builtin::Access::kUndefined, name)) {
return false;
}
- fn << "(RWByteAddressBuffer buffer, uint offset, ";
+ fn << "(uint offset, ";
if (!EmitTypeAndName(fn, value_ty, builtin::AddressSpace::kUndefined,
builtin::Access::kUndefined, "compare")) {
return false;
@@ -1767,8 +1745,8 @@
l << ";";
}
- line(&buf) << "buffer.InterlockedCompareExchange(offset, compare, value, "
- "result.old_value);";
+ line(&buf) << buffer
+ << ".InterlockedCompareExchange(offset, compare, value, result.old_value);";
line(&buf) << "result.exchanged = result.old_value == compare;";
line(&buf) << "return result;";
diff --git a/src/tint/writer/hlsl/generator_impl_member_accessor_test.cc b/src/tint/writer/hlsl/generator_impl_member_accessor_test.cc
index 0a2112b..ca08714 100644
--- a/src/tint/writer/hlsl/generator_impl_member_accessor_test.cc
+++ b/src/tint/writer/hlsl/generator_impl_member_accessor_test.cc
@@ -202,86 +202,86 @@
TypeCase{ty_vec4<i32>, "asint(data.Load4(16u))"},
TypeCase{ty_vec4<f16>, "data.Load<vector<float16_t, 4> >(8u)"},
TypeCase{ty_mat2x2<f32>,
- "return float2x2(asfloat(buffer.Load2((offset + 0u))), "
- "asfloat(buffer.Load2((offset + 8u))));"},
+ "return float2x2(asfloat(data.Load2((offset + 0u))), "
+ "asfloat(data.Load2((offset + 8u))));"},
TypeCase{ty_mat2x3<f32>,
- "return float2x3(asfloat(buffer.Load3((offset + 0u))), "
- "asfloat(buffer.Load3((offset + 16u))));"},
+ "return float2x3(asfloat(data.Load3((offset + 0u))), "
+ "asfloat(data.Load3((offset + 16u))));"},
TypeCase{ty_mat2x4<f32>,
- "return float2x4(asfloat(buffer.Load4((offset + 0u))), "
- "asfloat(buffer.Load4((offset + 16u))));"},
+ "return float2x4(asfloat(data.Load4((offset + 0u))), "
+ "asfloat(data.Load4((offset + 16u))));"},
TypeCase{ty_mat3x2<f32>,
- "return float3x2(asfloat(buffer.Load2((offset + 0u))), "
- "asfloat(buffer.Load2((offset + 8u))), "
- "asfloat(buffer.Load2((offset + 16u))));"},
+ "return float3x2(asfloat(data.Load2((offset + 0u))), "
+ "asfloat(data.Load2((offset + 8u))), "
+ "asfloat(data.Load2((offset + 16u))));"},
TypeCase{ty_mat3x3<f32>,
- "return float3x3(asfloat(buffer.Load3((offset + 0u))), "
- "asfloat(buffer.Load3((offset + 16u))), "
- "asfloat(buffer.Load3((offset + 32u))));"},
+ "return float3x3(asfloat(data.Load3((offset + 0u))), "
+ "asfloat(data.Load3((offset + 16u))), "
+ "asfloat(data.Load3((offset + 32u))));"},
TypeCase{ty_mat3x4<f32>,
- "return float3x4(asfloat(buffer.Load4((offset + 0u))), "
- "asfloat(buffer.Load4((offset + 16u))), "
- "asfloat(buffer.Load4((offset + 32u))));"},
+ "return float3x4(asfloat(data.Load4((offset + 0u))), "
+ "asfloat(data.Load4((offset + 16u))), "
+ "asfloat(data.Load4((offset + 32u))));"},
TypeCase{ty_mat4x2<f32>,
- "return float4x2(asfloat(buffer.Load2((offset + 0u))), "
- "asfloat(buffer.Load2((offset + 8u))), "
- "asfloat(buffer.Load2((offset + 16u))), "
- "asfloat(buffer.Load2((offset + 24u))));"},
+ "return float4x2(asfloat(data.Load2((offset + 0u))), "
+ "asfloat(data.Load2((offset + 8u))), "
+ "asfloat(data.Load2((offset + 16u))), "
+ "asfloat(data.Load2((offset + 24u))));"},
TypeCase{ty_mat4x3<f32>,
- "return float4x3(asfloat(buffer.Load3((offset + 0u))), "
- "asfloat(buffer.Load3((offset + 16u))), "
- "asfloat(buffer.Load3((offset + 32u))), "
- "asfloat(buffer.Load3((offset + 48u))));"},
+ "return float4x3(asfloat(data.Load3((offset + 0u))), "
+ "asfloat(data.Load3((offset + 16u))), "
+ "asfloat(data.Load3((offset + 32u))), "
+ "asfloat(data.Load3((offset + 48u))));"},
TypeCase{ty_mat4x4<f32>,
- "return float4x4(asfloat(buffer.Load4((offset + 0u))), "
- "asfloat(buffer.Load4((offset + 16u))), "
- "asfloat(buffer.Load4((offset + 32u))), "
- "asfloat(buffer.Load4((offset + 48u))));"},
+ "return float4x4(asfloat(data.Load4((offset + 0u))), "
+ "asfloat(data.Load4((offset + 16u))), "
+ "asfloat(data.Load4((offset + 32u))), "
+ "asfloat(data.Load4((offset + 48u))));"},
TypeCase{ty_mat2x2<f16>,
"return matrix<float16_t, 2, 2>("
- "buffer.Load<vector<float16_t, 2> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 2> >((offset + 4u)));"},
+ "data.Load<vector<float16_t, 2> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 2> >((offset + 4u)));"},
TypeCase{ty_mat2x3<f16>,
"return matrix<float16_t, 2, 3>("
- "buffer.Load<vector<float16_t, 3> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 3> >((offset + 8u)));"},
+ "data.Load<vector<float16_t, 3> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 3> >((offset + 8u)));"},
TypeCase{ty_mat2x4<f16>,
"return matrix<float16_t, 2, 4>("
- "buffer.Load<vector<float16_t, 4> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 4> >((offset + 8u)));"},
+ "data.Load<vector<float16_t, 4> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 4> >((offset + 8u)));"},
TypeCase{ty_mat3x2<f16>,
"return matrix<float16_t, 3, 2>("
- "buffer.Load<vector<float16_t, 2> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 2> >((offset + 4u)), "
- "buffer.Load<vector<float16_t, 2> >((offset + 8u)));"},
+ "data.Load<vector<float16_t, 2> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 2> >((offset + 4u)), "
+ "data.Load<vector<float16_t, 2> >((offset + 8u)));"},
TypeCase{ty_mat3x3<f16>,
"return matrix<float16_t, 3, 3>("
- "buffer.Load<vector<float16_t, 3> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 3> >((offset + 8u)), "
- "buffer.Load<vector<float16_t, 3> >((offset + 16u)));"},
+ "data.Load<vector<float16_t, 3> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 3> >((offset + 8u)), "
+ "data.Load<vector<float16_t, 3> >((offset + 16u)));"},
TypeCase{ty_mat3x4<f16>,
"return matrix<float16_t, 3, 4>("
- "buffer.Load<vector<float16_t, 4> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 4> >((offset + 8u)), "
- "buffer.Load<vector<float16_t, 4> >((offset + 16u)));"},
+ "data.Load<vector<float16_t, 4> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 4> >((offset + 8u)), "
+ "data.Load<vector<float16_t, 4> >((offset + 16u)));"},
TypeCase{ty_mat4x2<f16>,
"return matrix<float16_t, 4, 2>("
- "buffer.Load<vector<float16_t, 2> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 2> >((offset + 4u)), "
- "buffer.Load<vector<float16_t, 2> >((offset + 8u)), "
- "buffer.Load<vector<float16_t, 2> >((offset + 12u)));"},
+ "data.Load<vector<float16_t, 2> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 2> >((offset + 4u)), "
+ "data.Load<vector<float16_t, 2> >((offset + 8u)), "
+ "data.Load<vector<float16_t, 2> >((offset + 12u)));"},
TypeCase{ty_mat4x3<f16>,
"return matrix<float16_t, 4, 3>("
- "buffer.Load<vector<float16_t, 3> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 3> >((offset + 8u)), "
- "buffer.Load<vector<float16_t, 3> >((offset + 16u)), "
- "buffer.Load<vector<float16_t, 3> >((offset + 24u)));"},
+ "data.Load<vector<float16_t, 3> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 3> >((offset + 8u)), "
+ "data.Load<vector<float16_t, 3> >((offset + 16u)), "
+ "data.Load<vector<float16_t, 3> >((offset + 24u)));"},
TypeCase{ty_mat4x4<f16>,
"return matrix<float16_t, 4, 4>("
- "buffer.Load<vector<float16_t, 4> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 4> >((offset + 8u)), "
- "buffer.Load<vector<float16_t, 4> >((offset + 16u)), "
- "buffer.Load<vector<float16_t, 4> >((offset + 24u)));"}));
+ "data.Load<vector<float16_t, 4> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 4> >((offset + 8u)), "
+ "data.Load<vector<float16_t, 4> >((offset + 16u)), "
+ "data.Load<vector<float16_t, 4> >((offset + 24u)));"}));
using HlslGeneratorImplTest_MemberAccessor_StorageBufferLoad_DynamicOffset =
HlslGeneratorImplTest_MemberAccessorWithParam<TypeCase>;
@@ -346,86 +346,86 @@
TypeCase{ty_vec4<i32>, "asint(data.Load4(((48u * uint(i)) + 16u)))"},
TypeCase{ty_vec4<f16>, "data.Load<vector<float16_t, 4> >(((32u * uint(i)) + 8u))"},
TypeCase{ty_mat2x2<f32>,
- "return float2x2(asfloat(buffer.Load2((offset + 0u))), "
- "asfloat(buffer.Load2((offset + 8u))));"},
+ "return float2x2(asfloat(data.Load2((offset + 0u))), "
+ "asfloat(data.Load2((offset + 8u))));"},
TypeCase{ty_mat2x3<f32>,
- "return float2x3(asfloat(buffer.Load3((offset + 0u))), "
- "asfloat(buffer.Load3((offset + 16u))));"},
+ "return float2x3(asfloat(data.Load3((offset + 0u))), "
+ "asfloat(data.Load3((offset + 16u))));"},
TypeCase{ty_mat2x4<f32>,
- "return float2x4(asfloat(buffer.Load4((offset + 0u))), "
- "asfloat(buffer.Load4((offset + 16u))));"},
+ "return float2x4(asfloat(data.Load4((offset + 0u))), "
+ "asfloat(data.Load4((offset + 16u))));"},
TypeCase{ty_mat3x2<f32>,
- "return float3x2(asfloat(buffer.Load2((offset + 0u))), "
- "asfloat(buffer.Load2((offset + 8u))), "
- "asfloat(buffer.Load2((offset + 16u))));"},
+ "return float3x2(asfloat(data.Load2((offset + 0u))), "
+ "asfloat(data.Load2((offset + 8u))), "
+ "asfloat(data.Load2((offset + 16u))));"},
TypeCase{ty_mat3x3<f32>,
- "return float3x3(asfloat(buffer.Load3((offset + 0u))), "
- "asfloat(buffer.Load3((offset + 16u))), "
- "asfloat(buffer.Load3((offset + 32u))));"},
+ "return float3x3(asfloat(data.Load3((offset + 0u))), "
+ "asfloat(data.Load3((offset + 16u))), "
+ "asfloat(data.Load3((offset + 32u))));"},
TypeCase{ty_mat3x4<f32>,
- "return float3x4(asfloat(buffer.Load4((offset + 0u))), "
- "asfloat(buffer.Load4((offset + 16u))), "
- "asfloat(buffer.Load4((offset + 32u))));"},
+ "return float3x4(asfloat(data.Load4((offset + 0u))), "
+ "asfloat(data.Load4((offset + 16u))), "
+ "asfloat(data.Load4((offset + 32u))));"},
TypeCase{ty_mat4x2<f32>,
- "return float4x2(asfloat(buffer.Load2((offset + 0u))), "
- "asfloat(buffer.Load2((offset + 8u))), "
- "asfloat(buffer.Load2((offset + 16u))), "
- "asfloat(buffer.Load2((offset + 24u))));"},
+ "return float4x2(asfloat(data.Load2((offset + 0u))), "
+ "asfloat(data.Load2((offset + 8u))), "
+ "asfloat(data.Load2((offset + 16u))), "
+ "asfloat(data.Load2((offset + 24u))));"},
TypeCase{ty_mat4x3<f32>,
- "return float4x3(asfloat(buffer.Load3((offset + 0u))), "
- "asfloat(buffer.Load3((offset + 16u))), "
- "asfloat(buffer.Load3((offset + 32u))), "
- "asfloat(buffer.Load3((offset + 48u))));"},
+ "return float4x3(asfloat(data.Load3((offset + 0u))), "
+ "asfloat(data.Load3((offset + 16u))), "
+ "asfloat(data.Load3((offset + 32u))), "
+ "asfloat(data.Load3((offset + 48u))));"},
TypeCase{ty_mat4x4<f32>,
- "return float4x4(asfloat(buffer.Load4((offset + 0u))), "
- "asfloat(buffer.Load4((offset + 16u))), "
- "asfloat(buffer.Load4((offset + 32u))), "
- "asfloat(buffer.Load4((offset + 48u))));"},
+ "return float4x4(asfloat(data.Load4((offset + 0u))), "
+ "asfloat(data.Load4((offset + 16u))), "
+ "asfloat(data.Load4((offset + 32u))), "
+ "asfloat(data.Load4((offset + 48u))));"},
TypeCase{ty_mat2x2<f16>,
"return matrix<float16_t, 2, 2>("
- "buffer.Load<vector<float16_t, 2> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 2> >((offset + 4u)));"},
+ "data.Load<vector<float16_t, 2> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 2> >((offset + 4u)));"},
TypeCase{ty_mat2x3<f16>,
"return matrix<float16_t, 2, 3>("
- "buffer.Load<vector<float16_t, 3> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 3> >((offset + 8u)));"},
+ "data.Load<vector<float16_t, 3> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 3> >((offset + 8u)));"},
TypeCase{ty_mat2x4<f16>,
"return matrix<float16_t, 2, 4>("
- "buffer.Load<vector<float16_t, 4> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 4> >((offset + 8u)));"},
+ "data.Load<vector<float16_t, 4> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 4> >((offset + 8u)));"},
TypeCase{ty_mat3x2<f16>,
"return matrix<float16_t, 3, 2>("
- "buffer.Load<vector<float16_t, 2> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 2> >((offset + 4u)), "
- "buffer.Load<vector<float16_t, 2> >((offset + 8u)));"},
+ "data.Load<vector<float16_t, 2> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 2> >((offset + 4u)), "
+ "data.Load<vector<float16_t, 2> >((offset + 8u)));"},
TypeCase{ty_mat3x3<f16>,
"return matrix<float16_t, 3, 3>("
- "buffer.Load<vector<float16_t, 3> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 3> >((offset + 8u)), "
- "buffer.Load<vector<float16_t, 3> >((offset + 16u)));"},
+ "data.Load<vector<float16_t, 3> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 3> >((offset + 8u)), "
+ "data.Load<vector<float16_t, 3> >((offset + 16u)));"},
TypeCase{ty_mat3x4<f16>,
"return matrix<float16_t, 3, 4>("
- "buffer.Load<vector<float16_t, 4> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 4> >((offset + 8u)), "
- "buffer.Load<vector<float16_t, 4> >((offset + 16u)));"},
+ "data.Load<vector<float16_t, 4> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 4> >((offset + 8u)), "
+ "data.Load<vector<float16_t, 4> >((offset + 16u)));"},
TypeCase{ty_mat4x2<f16>,
"return matrix<float16_t, 4, 2>("
- "buffer.Load<vector<float16_t, 2> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 2> >((offset + 4u)), "
- "buffer.Load<vector<float16_t, 2> >((offset + 8u)), "
- "buffer.Load<vector<float16_t, 2> >((offset + 12u)));"},
+ "data.Load<vector<float16_t, 2> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 2> >((offset + 4u)), "
+ "data.Load<vector<float16_t, 2> >((offset + 8u)), "
+ "data.Load<vector<float16_t, 2> >((offset + 12u)));"},
TypeCase{ty_mat4x3<f16>,
"return matrix<float16_t, 4, 3>("
- "buffer.Load<vector<float16_t, 3> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 3> >((offset + 8u)), "
- "buffer.Load<vector<float16_t, 3> >((offset + 16u)), "
- "buffer.Load<vector<float16_t, 3> >((offset + 24u)));"},
+ "data.Load<vector<float16_t, 3> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 3> >((offset + 8u)), "
+ "data.Load<vector<float16_t, 3> >((offset + 16u)), "
+ "data.Load<vector<float16_t, 3> >((offset + 24u)));"},
TypeCase{ty_mat4x4<f16>,
"return matrix<float16_t, 4, 4>("
- "buffer.Load<vector<float16_t, 4> >((offset + 0u)), "
- "buffer.Load<vector<float16_t, 4> >((offset + 8u)), "
- "buffer.Load<vector<float16_t, 4> >((offset + 16u)), "
- "buffer.Load<vector<float16_t, 4> >((offset + 24u)));"}));
+ "data.Load<vector<float16_t, 4> >((offset + 0u)), "
+ "data.Load<vector<float16_t, 4> >((offset + 8u)), "
+ "data.Load<vector<float16_t, 4> >((offset + 16u)), "
+ "data.Load<vector<float16_t, 4> >((offset + 24u)));"}));
using HlslGeneratorImplTest_MemberAccessor_UniformBufferLoad_ConstantOffset =
HlslGeneratorImplTest_MemberAccessorWithParam<TypeCase>;
@@ -483,207 +483,207 @@
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
vector<float16_t, 4> x = vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]);)"},
- TypeCase{ty_mat2x2<f32>, R"(float2x2 tint_symbol(uint4 buffer[2], uint offset) {
+ TypeCase{ty_mat2x2<f32>, R"(float2x2 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = data[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = data[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
})"},
- TypeCase{ty_mat2x3<f32>, R"(float2x3 tint_symbol(uint4 buffer[3], uint offset) {
+ TypeCase{ty_mat2x3<f32>, R"(float2x3 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(data[scalar_offset / 4].xyz), asfloat(data[scalar_offset_1 / 4].xyz));
})"},
- TypeCase{ty_mat2x4<f32>, R"(float2x4 tint_symbol(uint4 buffer[3], uint offset) {
+ TypeCase{ty_mat2x4<f32>, R"(float2x4 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(data[scalar_offset / 4]), asfloat(data[scalar_offset_1 / 4]));
})"},
- TypeCase{ty_mat3x2<f32>, R"(float3x2 tint_symbol(uint4 buffer[2], uint offset) {
+ TypeCase{ty_mat3x2<f32>, R"(float3x2 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = data[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = data[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = data[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
})"},
- TypeCase{ty_mat3x3<f32>, R"(float3x3 tint_symbol(uint4 buffer[4], uint offset) {
+ TypeCase{ty_mat3x3<f32>, R"(float3x3 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(data[scalar_offset / 4].xyz), asfloat(data[scalar_offset_1 / 4].xyz), asfloat(data[scalar_offset_2 / 4].xyz));
})"},
- TypeCase{ty_mat3x4<f32>, R"(float3x4 tint_symbol(uint4 buffer[4], uint offset) {
+ TypeCase{ty_mat3x4<f32>, R"(float3x4 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(data[scalar_offset / 4]), asfloat(data[scalar_offset_1 / 4]), asfloat(data[scalar_offset_2 / 4]));
})"},
- TypeCase{ty_mat4x2<f32>, R"(float4x2 tint_symbol(uint4 buffer[3], uint offset) {
+ TypeCase{ty_mat4x2<f32>, R"(float4x2 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = data[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = data[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = data[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
})"},
- TypeCase{ty_mat4x3<f32>, R"(float4x3 tint_symbol(uint4 buffer[5], uint offset) {
+ TypeCase{ty_mat4x3<f32>, R"(float4x3 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(data[scalar_offset / 4].xyz), asfloat(data[scalar_offset_1 / 4].xyz), asfloat(data[scalar_offset_2 / 4].xyz), asfloat(data[scalar_offset_3 / 4].xyz));
})"},
- TypeCase{ty_mat4x4<f32>, R"(float4x4 tint_symbol(uint4 buffer[5], uint offset) {
+ TypeCase{ty_mat4x4<f32>, R"(float4x4 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(data[scalar_offset / 4]), asfloat(data[scalar_offset_1 / 4]), asfloat(data[scalar_offset_2 / 4]), asfloat(data[scalar_offset_3 / 4]));
})"},
TypeCase{ty_mat2x2<f16>,
- R"(matrix<float16_t, 2, 2> tint_symbol(uint4 buffer[1], uint offset) {
+ R"(matrix<float16_t, 2, 2> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = data[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = data[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
})"},
TypeCase{ty_mat2x3<f16>,
- R"(matrix<float16_t, 2, 3> tint_symbol(uint4 buffer[2], uint offset) {
+ R"(matrix<float16_t, 2, 3> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]));
})"},
TypeCase{ty_mat2x4<f16>,
- R"(matrix<float16_t, 2, 4> tint_symbol(uint4 buffer[2], uint offset) {
+ R"(matrix<float16_t, 2, 4> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
})"},
TypeCase{ty_mat3x2<f16>,
- R"(matrix<float16_t, 3, 2> tint_symbol(uint4 buffer[1], uint offset) {
+ R"(matrix<float16_t, 3, 2> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = data[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = data[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = data[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
})"},
TypeCase{ty_mat3x3<f16>,
- R"(matrix<float16_t, 3, 3> tint_symbol(uint4 buffer[2], uint offset) {
+ R"(matrix<float16_t, 3, 3> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = data[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
return matrix<float16_t, 3, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]));
})"},
TypeCase{ty_mat3x4<f16>,
- R"(matrix<float16_t, 3, 4> tint_symbol(uint4 buffer[2], uint offset) {
+ R"(matrix<float16_t, 3, 4> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = data[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
return matrix<float16_t, 3, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]));)"},
TypeCase{ty_mat4x2<f16>,
- R"(matrix<float16_t, 4, 2> tint_symbol(uint4 buffer[2], uint offset) {
+ R"(matrix<float16_t, 4, 2> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = data[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = data[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = data[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = data[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
})"},
TypeCase{ty_mat4x3<f16>,
- R"(matrix<float16_t, 4, 3> tint_symbol(uint4 buffer[3], uint offset) {
+ R"(matrix<float16_t, 4, 3> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = data[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = data[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
})"},
TypeCase{ty_mat4x4<f16>,
- R"(matrix<float16_t, 4, 4> tint_symbol(uint4 buffer[3], uint offset) {
+ R"(matrix<float16_t, 4, 4> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = data[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = data[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
@@ -769,208 +769,208 @@
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
vector<float16_t, 4> x = vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]);)"},
- TypeCase{ty_mat2x2<f32>, R"(float2x2 tint_symbol(uint4 buffer[12], uint offset) {
+ TypeCase{ty_mat2x2<f32>, R"(float2x2 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = data[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = data[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
})"},
- TypeCase{ty_mat2x3<f32>, R"(float2x3 tint_symbol(uint4 buffer[16], uint offset) {
+ TypeCase{ty_mat2x3<f32>, R"(float2x3 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(data[scalar_offset / 4].xyz), asfloat(data[scalar_offset_1 / 4].xyz));
})"},
- TypeCase{ty_mat2x4<f32>, R"(float2x4 tint_symbol(uint4 buffer[16], uint offset) {
+ TypeCase{ty_mat2x4<f32>, R"(float2x4 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(data[scalar_offset / 4]), asfloat(data[scalar_offset_1 / 4]));
})"},
- TypeCase{ty_mat3x2<f32>, R"(float3x2 tint_symbol(uint4 buffer[12], uint offset) {
+ TypeCase{ty_mat3x2<f32>, R"(float3x2 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = data[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = data[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = data[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
})"},
- TypeCase{ty_mat3x3<f32>, R"(float3x3 tint_symbol(uint4 buffer[20], uint offset) {
+ TypeCase{ty_mat3x3<f32>, R"(float3x3 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(data[scalar_offset / 4].xyz), asfloat(data[scalar_offset_1 / 4].xyz), asfloat(data[scalar_offset_2 / 4].xyz));
})"},
- TypeCase{ty_mat3x4<f32>, R"(float3x4 tint_symbol(uint4 buffer[20], uint offset) {
+ TypeCase{ty_mat3x4<f32>, R"(float3x4 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(data[scalar_offset / 4]), asfloat(data[scalar_offset_1 / 4]), asfloat(data[scalar_offset_2 / 4]));
})"},
- TypeCase{ty_mat4x2<f32>, R"(float4x2 tint_symbol(uint4 buffer[16], uint offset) {
+ TypeCase{ty_mat4x2<f32>, R"(float4x2 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = data[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = data[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = data[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
})"},
- TypeCase{ty_mat4x3<f32>, R"(float4x3 tint_symbol(uint4 buffer[24], uint offset) {
+ TypeCase{ty_mat4x3<f32>, R"(float4x3 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(data[scalar_offset / 4].xyz), asfloat(data[scalar_offset_1 / 4].xyz), asfloat(data[scalar_offset_2 / 4].xyz), asfloat(data[scalar_offset_3 / 4].xyz));
})"},
- TypeCase{ty_mat4x4<f32>, R"(float4x4 tint_symbol(uint4 buffer[24], uint offset) {
+ TypeCase{ty_mat4x4<f32>, R"(float4x4 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(data[scalar_offset / 4]), asfloat(data[scalar_offset_1 / 4]), asfloat(data[scalar_offset_2 / 4]), asfloat(data[scalar_offset_3 / 4]));
})"},
TypeCase{ty_mat2x2<f16>,
- R"(matrix<float16_t, 2, 2> tint_symbol(uint4 buffer[8], uint offset) {
+ R"(matrix<float16_t, 2, 2> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = data[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = data[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
})"},
TypeCase{ty_mat2x3<f16>,
- R"(matrix<float16_t, 2, 3> tint_symbol(uint4 buffer[12], uint offset) {
+ R"(matrix<float16_t, 2, 3> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]));
})"},
TypeCase{ty_mat2x4<f16>,
- R"(matrix<float16_t, 2, 4> tint_symbol(uint4 buffer[12], uint offset) {
+ R"(matrix<float16_t, 2, 4> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
})"},
TypeCase{ty_mat3x2<f16>,
- R"(matrix<float16_t, 3, 2> tint_symbol(uint4 buffer[8], uint offset) {
+ R"(matrix<float16_t, 3, 2> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = data[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = data[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = data[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
})"},
TypeCase{ty_mat3x3<f16>,
- R"(matrix<float16_t, 3, 3> tint_symbol(uint4 buffer[12], uint offset) {
+ R"(matrix<float16_t, 3, 3> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = data[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
return matrix<float16_t, 3, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]));
})"},
TypeCase{ty_mat3x4<f16>,
- R"(matrix<float16_t, 3, 4> tint_symbol(uint4 buffer[12], uint offset) {
+ R"(matrix<float16_t, 3, 4> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = data[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
return matrix<float16_t, 3, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]));
})"},
TypeCase{ty_mat4x2<f16>,
- R"(matrix<float16_t, 4, 2> tint_symbol(uint4 buffer[12], uint offset) {
+ R"(matrix<float16_t, 4, 2> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = data[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = data[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = data[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = data[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
})"},
TypeCase{ty_mat4x3<f16>,
- R"(matrix<float16_t, 4, 3> tint_symbol(uint4 buffer[16], uint offset) {
+ R"(matrix<float16_t, 4, 3> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = data[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = data[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
})"},
TypeCase{ty_mat4x4<f16>,
- R"(matrix<float16_t, 4, 4> tint_symbol(uint4 buffer[16], uint offset) {
+ R"(matrix<float16_t, 4, 4> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = data[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = data[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
@@ -1026,95 +1026,97 @@
TypeCase{ty_vec4<f32>, "data.Store4(16u, asuint(value))"},
TypeCase{ty_vec4<i32>, "data.Store4(16u, asuint(value))"},
TypeCase{ty_vec4<f16>, "data.Store<vector<float16_t, 4> >(8u, value)"},
- TypeCase{ty_mat2x2<f32>, R"({
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+ TypeCase{ty_mat2x2<f32>, R"(
+
+void data_store(uint offset, float2x2 value) {
+ data.Store2((offset + 0u), asuint(value[0u]));
+ data.Store2((offset + 8u), asuint(value[1u]));
})"},
TypeCase{ty_mat2x3<f32>, R"({
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+ data.Store3((offset + 0u), asuint(value[0u]));
+ data.Store3((offset + 16u), asuint(value[1u]));
})"},
TypeCase{ty_mat2x4<f32>, R"({
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+ data.Store4((offset + 0u), asuint(value[0u]));
+ data.Store4((offset + 16u), asuint(value[1u]));
})"},
TypeCase{ty_mat3x2<f32>, R"({
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
+ data.Store2((offset + 0u), asuint(value[0u]));
+ data.Store2((offset + 8u), asuint(value[1u]));
+ data.Store2((offset + 16u), asuint(value[2u]));
})"},
TypeCase{ty_mat3x3<f32>, R"({
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+ data.Store3((offset + 0u), asuint(value[0u]));
+ data.Store3((offset + 16u), asuint(value[1u]));
+ data.Store3((offset + 32u), asuint(value[2u]));
})"},
TypeCase{ty_mat3x4<f32>, R"({
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+ data.Store4((offset + 0u), asuint(value[0u]));
+ data.Store4((offset + 16u), asuint(value[1u]));
+ data.Store4((offset + 32u), asuint(value[2u]));
})"},
TypeCase{ty_mat4x2<f32>, R"({
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+ data.Store2((offset + 0u), asuint(value[0u]));
+ data.Store2((offset + 8u), asuint(value[1u]));
+ data.Store2((offset + 16u), asuint(value[2u]));
+ data.Store2((offset + 24u), asuint(value[3u]));
})"},
TypeCase{ty_mat4x3<f32>, R"({
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+ data.Store3((offset + 0u), asuint(value[0u]));
+ data.Store3((offset + 16u), asuint(value[1u]));
+ data.Store3((offset + 32u), asuint(value[2u]));
+ data.Store3((offset + 48u), asuint(value[3u]));
})"},
TypeCase{ty_mat4x4<f32>, R"({
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+ data.Store4((offset + 0u), asuint(value[0u]));
+ data.Store4((offset + 16u), asuint(value[1u]));
+ data.Store4((offset + 32u), asuint(value[2u]));
+ data.Store4((offset + 48u), asuint(value[3u]));
})"},
TypeCase{ty_mat2x2<f16>, R"({
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+ data.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ data.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
})"},
TypeCase{ty_mat2x3<f16>, R"({
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+ data.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ data.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
})"},
TypeCase{ty_mat2x4<f16>, R"({
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+ data.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ data.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
})"},
TypeCase{ty_mat3x2<f16>, R"({
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
- buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
+ data.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ data.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+ data.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
})"},
TypeCase{ty_mat3x3<f16>, R"({
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
+ data.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ data.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+ data.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
})"},
TypeCase{ty_mat3x4<f16>, R"({
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
+ data.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ data.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+ data.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
})"},
TypeCase{ty_mat4x2<f16>, R"({
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
- buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
- buffer.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
+ data.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ data.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+ data.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
+ data.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
})"},
TypeCase{ty_mat4x3<f16>, R"({
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
- buffer.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
+ data.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ data.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+ data.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
+ data.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
})"},
TypeCase{ty_mat4x4<f16>, R"({
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
- buffer.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
+ data.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ data.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+ data.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
+ data.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
})"}));
TEST_F(HlslGeneratorImplTest_MemberAccessor, StorageBuffer_Store_Matrix_Empty) {
@@ -1140,13 +1142,13 @@
auto* expected =
R"(RWByteAddressBuffer data : register(u0, space1);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void data_store(uint offset, float2x3 value) {
+ data.Store3((offset + 0u), asuint(value[0u]));
+ data.Store3((offset + 16u), asuint(value[1u]));
}
void main() {
- tint_symbol(data, 16u, float2x3((0.0f).xxx, (0.0f).xxx));
+ data_store(16u, float2x3((0.0f).xxx, (0.0f).xxx));
return;
}
)";
@@ -1388,13 +1390,13 @@
RWByteAddressBuffer data : register(u0, space1);
-Inner tint_symbol(RWByteAddressBuffer buffer, uint offset) {
- const Inner tint_symbol_2 = {asint(buffer.Load((offset + 0u)))};
- return tint_symbol_2;
+Inner data_load(uint offset) {
+ const Inner tint_symbol = {asint(data.Load((offset + 0u)))};
+ return tint_symbol;
}
void main() {
- Inner x = tint_symbol(data, 48u);
+ Inner x = data_load(48u);
return;
}
)";
@@ -1440,14 +1442,14 @@
uint4 data[6];
};
-Inner tint_symbol(uint4 buffer[6], uint offset) {
+Inner data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- const Inner tint_symbol_2 = {asint(buffer[scalar_offset / 4][scalar_offset % 4])};
- return tint_symbol_2;
+ const Inner tint_symbol = {asint(data[scalar_offset / 4][scalar_offset % 4])};
+ return tint_symbol;
}
void main() {
- Inner x = tint_symbol(data, 48u);
+ Inner x = data_load(48u);
return;
}
)";
diff --git a/src/tint/writer/hlsl/generator_impl_sanitizer_test.cc b/src/tint/writer/hlsl/generator_impl_sanitizer_test.cc
index b7d1bb9..e349b5c 100644
--- a/src/tint/writer/hlsl/generator_impl_sanitizer_test.cc
+++ b/src/tint/writer/hlsl/generator_impl_sanitizer_test.cc
@@ -159,10 +159,10 @@
ByteAddressBuffer c : register(t2, space2);
void a_func() {
- uint tint_symbol_4 = 0u;
- b.GetDimensions(tint_symbol_4);
- const uint tint_symbol_5 = ((tint_symbol_4 - 0u) / 4u);
- uint len = (tint_symbol_5 + ((tint_symbol_1[1].w - 0u) / 4u));
+ uint tint_symbol_3 = 0u;
+ b.GetDimensions(tint_symbol_3);
+ const uint tint_symbol_4 = ((tint_symbol_3 - 0u) / 4u);
+ uint len = (tint_symbol_4 + ((tint_symbol_1[1].w - 0u) / 4u));
return;
}
)";
diff --git a/test/tint/array/assign_to_function_var.wgsl.expected.dxc.hlsl b/test/tint/array/assign_to_function_var.wgsl.expected.dxc.hlsl
index a697cf1..d492bbf 100644
--- a/test/tint/array/assign_to_function_var.wgsl.expected.dxc.hlsl
+++ b/test/tint/array/assign_to_function_var.wgsl.expected.dxc.hlsl
@@ -16,33 +16,33 @@
typedef int4 ret_arr_ret[4];
ret_arr_ret ret_arr() {
- const int4 tint_symbol_6[4] = (int4[4])0;
- return tint_symbol_6;
+ const int4 tint_symbol_2[4] = (int4[4])0;
+ return tint_symbol_2;
}
S ret_struct_arr() {
- const S tint_symbol_7 = (S)0;
- return tint_symbol_7;
+ const S tint_symbol_3 = (S)0;
+ return tint_symbol_3;
}
-typedef int4 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
+typedef int4 src_uniform_load_ret[4];
+src_uniform_load_ret src_uniform_load(uint offset) {
int4 arr_1[4] = (int4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
const uint scalar_offset = ((offset + (i * 16u))) / 4;
- arr_1[i] = asint(buffer[scalar_offset / 4]);
+ arr_1[i] = asint(src_uniform[scalar_offset / 4]);
}
}
return arr_1;
}
-typedef int4 tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
+typedef int4 src_storage_load_ret[4];
+src_storage_load_ret src_storage_load(uint offset) {
int4 arr_2[4] = (int4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_2[i_1] = asint(buffer.Load4((offset + (i_1 * 16u))));
+ arr_2[i_1] = asint(src_storage.Load4((offset + (i_1 * 16u))));
}
}
return arr_2;
@@ -51,8 +51,8 @@
void foo(int4 src_param[4]) {
int4 src_function[4] = (int4[4])0;
int4 tint_symbol[4] = (int4[4])0;
- const int4 tint_symbol_8[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
- tint_symbol = tint_symbol_8;
+ const int4 tint_symbol_4[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
+ tint_symbol = tint_symbol_4;
tint_symbol = src_param;
tint_symbol = ret_arr();
const int4 src_let[4] = (int4[4])0;
@@ -62,8 +62,8 @@
tint_symbol = src_workgroup;
const S tint_symbol_1 = ret_struct_arr();
tint_symbol = tint_symbol_1.arr;
- tint_symbol = tint_symbol_2(src_uniform, 0u);
- tint_symbol = tint_symbol_4(src_storage, 0u);
+ tint_symbol = src_uniform_load(0u);
+ tint_symbol = src_storage_load(0u);
int dst_nested[4][3][2] = (int[4][3][2])0;
int src_nested[4][3][2] = (int[4][3][2])0;
dst_nested = src_nested;
diff --git a/test/tint/array/assign_to_function_var.wgsl.expected.fxc.hlsl b/test/tint/array/assign_to_function_var.wgsl.expected.fxc.hlsl
index a697cf1..d492bbf 100644
--- a/test/tint/array/assign_to_function_var.wgsl.expected.fxc.hlsl
+++ b/test/tint/array/assign_to_function_var.wgsl.expected.fxc.hlsl
@@ -16,33 +16,33 @@
typedef int4 ret_arr_ret[4];
ret_arr_ret ret_arr() {
- const int4 tint_symbol_6[4] = (int4[4])0;
- return tint_symbol_6;
+ const int4 tint_symbol_2[4] = (int4[4])0;
+ return tint_symbol_2;
}
S ret_struct_arr() {
- const S tint_symbol_7 = (S)0;
- return tint_symbol_7;
+ const S tint_symbol_3 = (S)0;
+ return tint_symbol_3;
}
-typedef int4 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
+typedef int4 src_uniform_load_ret[4];
+src_uniform_load_ret src_uniform_load(uint offset) {
int4 arr_1[4] = (int4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
const uint scalar_offset = ((offset + (i * 16u))) / 4;
- arr_1[i] = asint(buffer[scalar_offset / 4]);
+ arr_1[i] = asint(src_uniform[scalar_offset / 4]);
}
}
return arr_1;
}
-typedef int4 tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
+typedef int4 src_storage_load_ret[4];
+src_storage_load_ret src_storage_load(uint offset) {
int4 arr_2[4] = (int4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_2[i_1] = asint(buffer.Load4((offset + (i_1 * 16u))));
+ arr_2[i_1] = asint(src_storage.Load4((offset + (i_1 * 16u))));
}
}
return arr_2;
@@ -51,8 +51,8 @@
void foo(int4 src_param[4]) {
int4 src_function[4] = (int4[4])0;
int4 tint_symbol[4] = (int4[4])0;
- const int4 tint_symbol_8[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
- tint_symbol = tint_symbol_8;
+ const int4 tint_symbol_4[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
+ tint_symbol = tint_symbol_4;
tint_symbol = src_param;
tint_symbol = ret_arr();
const int4 src_let[4] = (int4[4])0;
@@ -62,8 +62,8 @@
tint_symbol = src_workgroup;
const S tint_symbol_1 = ret_struct_arr();
tint_symbol = tint_symbol_1.arr;
- tint_symbol = tint_symbol_2(src_uniform, 0u);
- tint_symbol = tint_symbol_4(src_storage, 0u);
+ tint_symbol = src_uniform_load(0u);
+ tint_symbol = src_storage_load(0u);
int dst_nested[4][3][2] = (int[4][3][2])0;
int src_nested[4][3][2] = (int[4][3][2])0;
dst_nested = src_nested;
diff --git a/test/tint/array/assign_to_private_var.wgsl.expected.dxc.hlsl b/test/tint/array/assign_to_private_var.wgsl.expected.dxc.hlsl
index d22b14e..6cf00a3 100644
--- a/test/tint/array/assign_to_private_var.wgsl.expected.dxc.hlsl
+++ b/test/tint/array/assign_to_private_var.wgsl.expected.dxc.hlsl
@@ -18,33 +18,33 @@
typedef int4 ret_arr_ret[4];
ret_arr_ret ret_arr() {
- const int4 tint_symbol_6[4] = (int4[4])0;
- return tint_symbol_6;
+ const int4 tint_symbol_2[4] = (int4[4])0;
+ return tint_symbol_2;
}
S ret_struct_arr() {
- const S tint_symbol_7 = (S)0;
- return tint_symbol_7;
+ const S tint_symbol_3 = (S)0;
+ return tint_symbol_3;
}
-typedef int4 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
+typedef int4 src_uniform_load_ret[4];
+src_uniform_load_ret src_uniform_load(uint offset) {
int4 arr_1[4] = (int4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
const uint scalar_offset = ((offset + (i * 16u))) / 4;
- arr_1[i] = asint(buffer[scalar_offset / 4]);
+ arr_1[i] = asint(src_uniform[scalar_offset / 4]);
}
}
return arr_1;
}
-typedef int4 tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
+typedef int4 src_storage_load_ret[4];
+src_storage_load_ret src_storage_load(uint offset) {
int4 arr_2[4] = (int4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_2[i_1] = asint(buffer.Load4((offset + (i_1 * 16u))));
+ arr_2[i_1] = asint(src_storage.Load4((offset + (i_1 * 16u))));
}
}
return arr_2;
@@ -52,8 +52,8 @@
void foo(int4 src_param[4]) {
int4 src_function[4] = (int4[4])0;
- const int4 tint_symbol_8[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
- tint_symbol = tint_symbol_8;
+ const int4 tint_symbol_4[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
+ tint_symbol = tint_symbol_4;
tint_symbol = src_param;
tint_symbol = ret_arr();
const int4 src_let[4] = (int4[4])0;
@@ -63,8 +63,8 @@
tint_symbol = src_workgroup;
const S tint_symbol_1 = ret_struct_arr();
tint_symbol = tint_symbol_1.arr;
- tint_symbol = tint_symbol_2(src_uniform, 0u);
- tint_symbol = tint_symbol_4(src_storage, 0u);
+ tint_symbol = src_uniform_load(0u);
+ tint_symbol = src_storage_load(0u);
int src_nested[4][3][2] = (int[4][3][2])0;
dst_nested = src_nested;
}
diff --git a/test/tint/array/assign_to_private_var.wgsl.expected.fxc.hlsl b/test/tint/array/assign_to_private_var.wgsl.expected.fxc.hlsl
index d22b14e..6cf00a3 100644
--- a/test/tint/array/assign_to_private_var.wgsl.expected.fxc.hlsl
+++ b/test/tint/array/assign_to_private_var.wgsl.expected.fxc.hlsl
@@ -18,33 +18,33 @@
typedef int4 ret_arr_ret[4];
ret_arr_ret ret_arr() {
- const int4 tint_symbol_6[4] = (int4[4])0;
- return tint_symbol_6;
+ const int4 tint_symbol_2[4] = (int4[4])0;
+ return tint_symbol_2;
}
S ret_struct_arr() {
- const S tint_symbol_7 = (S)0;
- return tint_symbol_7;
+ const S tint_symbol_3 = (S)0;
+ return tint_symbol_3;
}
-typedef int4 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
+typedef int4 src_uniform_load_ret[4];
+src_uniform_load_ret src_uniform_load(uint offset) {
int4 arr_1[4] = (int4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
const uint scalar_offset = ((offset + (i * 16u))) / 4;
- arr_1[i] = asint(buffer[scalar_offset / 4]);
+ arr_1[i] = asint(src_uniform[scalar_offset / 4]);
}
}
return arr_1;
}
-typedef int4 tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
+typedef int4 src_storage_load_ret[4];
+src_storage_load_ret src_storage_load(uint offset) {
int4 arr_2[4] = (int4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_2[i_1] = asint(buffer.Load4((offset + (i_1 * 16u))));
+ arr_2[i_1] = asint(src_storage.Load4((offset + (i_1 * 16u))));
}
}
return arr_2;
@@ -52,8 +52,8 @@
void foo(int4 src_param[4]) {
int4 src_function[4] = (int4[4])0;
- const int4 tint_symbol_8[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
- tint_symbol = tint_symbol_8;
+ const int4 tint_symbol_4[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
+ tint_symbol = tint_symbol_4;
tint_symbol = src_param;
tint_symbol = ret_arr();
const int4 src_let[4] = (int4[4])0;
@@ -63,8 +63,8 @@
tint_symbol = src_workgroup;
const S tint_symbol_1 = ret_struct_arr();
tint_symbol = tint_symbol_1.arr;
- tint_symbol = tint_symbol_2(src_uniform, 0u);
- tint_symbol = tint_symbol_4(src_storage, 0u);
+ tint_symbol = src_uniform_load(0u);
+ tint_symbol = src_storage_load(0u);
int src_nested[4][3][2] = (int[4][3][2])0;
dst_nested = src_nested;
}
diff --git a/test/tint/array/assign_to_storage_var.wgsl.expected.dxc.hlsl b/test/tint/array/assign_to_storage_var.wgsl.expected.dxc.hlsl
index 2ce38dc..2603bf4 100644
--- a/test/tint/array/assign_to_storage_var.wgsl.expected.dxc.hlsl
+++ b/test/tint/array/assign_to_storage_var.wgsl.expected.dxc.hlsl
@@ -18,90 +18,90 @@
typedef int4 ret_arr_ret[4];
ret_arr_ret ret_arr() {
- const int4 tint_symbol_13[4] = (int4[4])0;
- return tint_symbol_13;
+ const int4 tint_symbol_3[4] = (int4[4])0;
+ return tint_symbol_3;
}
S ret_struct_arr() {
- const S tint_symbol_14 = (S)0;
- return tint_symbol_14;
+ const S tint_symbol_4 = (S)0;
+ return tint_symbol_4;
}
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, int4 value[4]) {
+void tint_symbol_store(uint offset, int4 value[4]) {
int4 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- buffer.Store4((offset + (i * 16u)), asuint(array_1[i]));
+ tint_symbol.Store4((offset + (i * 16u)), asuint(array_1[i]));
}
}
}
-typedef int4 tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[4], uint offset) {
+typedef int4 src_uniform_load_ret[4];
+src_uniform_load_ret src_uniform_load(uint offset) {
int4 arr_1[4] = (int4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
const uint scalar_offset = ((offset + (i_1 * 16u))) / 4;
- arr_1[i_1] = asint(buffer[scalar_offset / 4]);
+ arr_1[i_1] = asint(src_uniform[scalar_offset / 4]);
}
}
return arr_1;
}
-typedef int4 tint_symbol_7_ret[4];
-tint_symbol_7_ret tint_symbol_7(RWByteAddressBuffer buffer, uint offset) {
+typedef int4 src_storage_load_ret[4];
+src_storage_load_ret src_storage_load(uint offset) {
int4 arr_2[4] = (int4[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_2[i_2] = asint(buffer.Load4((offset + (i_2 * 16u))));
+ arr_2[i_2] = asint(src_storage.Load4((offset + (i_2 * 16u))));
}
}
return arr_2;
}
-void tint_symbol_11(RWByteAddressBuffer buffer, uint offset, int value[2]) {
+void dst_nested_store_2(uint offset, int value[2]) {
int array_4[2] = value;
{
for(uint i_3 = 0u; (i_3 < 2u); i_3 = (i_3 + 1u)) {
- buffer.Store((offset + (i_3 * 4u)), asuint(array_4[i_3]));
+ dst_nested.Store((offset + (i_3 * 4u)), asuint(array_4[i_3]));
}
}
}
-void tint_symbol_10(RWByteAddressBuffer buffer, uint offset, int value[3][2]) {
+void dst_nested_store_1(uint offset, int value[3][2]) {
int array_3[3][2] = value;
{
for(uint i_4 = 0u; (i_4 < 3u); i_4 = (i_4 + 1u)) {
- tint_symbol_11(buffer, (offset + (i_4 * 8u)), array_3[i_4]);
+ dst_nested_store_2((offset + (i_4 * 8u)), array_3[i_4]);
}
}
}
-void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, int value[4][3][2]) {
+void dst_nested_store(uint offset, int value[4][3][2]) {
int array_2[4][3][2] = value;
{
for(uint i_5 = 0u; (i_5 < 4u); i_5 = (i_5 + 1u)) {
- tint_symbol_10(buffer, (offset + (i_5 * 24u)), array_2[i_5]);
+ dst_nested_store_1((offset + (i_5 * 24u)), array_2[i_5]);
}
}
}
void foo(int4 src_param[4]) {
int4 src_function[4] = (int4[4])0;
- const int4 tint_symbol_15[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
- tint_symbol_3(tint_symbol, 0u, tint_symbol_15);
- tint_symbol_3(tint_symbol, 0u, src_param);
+ const int4 tint_symbol_5[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
+ tint_symbol_store(0u, tint_symbol_5);
+ tint_symbol_store(0u, src_param);
const int4 tint_symbol_1[4] = ret_arr();
- tint_symbol_3(tint_symbol, 0u, tint_symbol_1);
+ tint_symbol_store(0u, tint_symbol_1);
const int4 src_let[4] = (int4[4])0;
- tint_symbol_3(tint_symbol, 0u, src_let);
- tint_symbol_3(tint_symbol, 0u, src_function);
- tint_symbol_3(tint_symbol, 0u, src_private);
- tint_symbol_3(tint_symbol, 0u, src_workgroup);
+ tint_symbol_store(0u, src_let);
+ tint_symbol_store(0u, src_function);
+ tint_symbol_store(0u, src_private);
+ tint_symbol_store(0u, src_workgroup);
const S tint_symbol_2 = ret_struct_arr();
- tint_symbol_3(tint_symbol, 0u, tint_symbol_2.arr);
- tint_symbol_3(tint_symbol, 0u, tint_symbol_5(src_uniform, 0u));
- tint_symbol_3(tint_symbol, 0u, tint_symbol_7(src_storage, 0u));
+ tint_symbol_store(0u, tint_symbol_2.arr);
+ tint_symbol_store(0u, src_uniform_load(0u));
+ tint_symbol_store(0u, src_storage_load(0u));
int src_nested[4][3][2] = (int[4][3][2])0;
- tint_symbol_9(dst_nested, 0u, src_nested);
+ dst_nested_store(0u, src_nested);
}
diff --git a/test/tint/array/assign_to_storage_var.wgsl.expected.fxc.hlsl b/test/tint/array/assign_to_storage_var.wgsl.expected.fxc.hlsl
index 2ce38dc..2603bf4 100644
--- a/test/tint/array/assign_to_storage_var.wgsl.expected.fxc.hlsl
+++ b/test/tint/array/assign_to_storage_var.wgsl.expected.fxc.hlsl
@@ -18,90 +18,90 @@
typedef int4 ret_arr_ret[4];
ret_arr_ret ret_arr() {
- const int4 tint_symbol_13[4] = (int4[4])0;
- return tint_symbol_13;
+ const int4 tint_symbol_3[4] = (int4[4])0;
+ return tint_symbol_3;
}
S ret_struct_arr() {
- const S tint_symbol_14 = (S)0;
- return tint_symbol_14;
+ const S tint_symbol_4 = (S)0;
+ return tint_symbol_4;
}
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, int4 value[4]) {
+void tint_symbol_store(uint offset, int4 value[4]) {
int4 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- buffer.Store4((offset + (i * 16u)), asuint(array_1[i]));
+ tint_symbol.Store4((offset + (i * 16u)), asuint(array_1[i]));
}
}
}
-typedef int4 tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[4], uint offset) {
+typedef int4 src_uniform_load_ret[4];
+src_uniform_load_ret src_uniform_load(uint offset) {
int4 arr_1[4] = (int4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
const uint scalar_offset = ((offset + (i_1 * 16u))) / 4;
- arr_1[i_1] = asint(buffer[scalar_offset / 4]);
+ arr_1[i_1] = asint(src_uniform[scalar_offset / 4]);
}
}
return arr_1;
}
-typedef int4 tint_symbol_7_ret[4];
-tint_symbol_7_ret tint_symbol_7(RWByteAddressBuffer buffer, uint offset) {
+typedef int4 src_storage_load_ret[4];
+src_storage_load_ret src_storage_load(uint offset) {
int4 arr_2[4] = (int4[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_2[i_2] = asint(buffer.Load4((offset + (i_2 * 16u))));
+ arr_2[i_2] = asint(src_storage.Load4((offset + (i_2 * 16u))));
}
}
return arr_2;
}
-void tint_symbol_11(RWByteAddressBuffer buffer, uint offset, int value[2]) {
+void dst_nested_store_2(uint offset, int value[2]) {
int array_4[2] = value;
{
for(uint i_3 = 0u; (i_3 < 2u); i_3 = (i_3 + 1u)) {
- buffer.Store((offset + (i_3 * 4u)), asuint(array_4[i_3]));
+ dst_nested.Store((offset + (i_3 * 4u)), asuint(array_4[i_3]));
}
}
}
-void tint_symbol_10(RWByteAddressBuffer buffer, uint offset, int value[3][2]) {
+void dst_nested_store_1(uint offset, int value[3][2]) {
int array_3[3][2] = value;
{
for(uint i_4 = 0u; (i_4 < 3u); i_4 = (i_4 + 1u)) {
- tint_symbol_11(buffer, (offset + (i_4 * 8u)), array_3[i_4]);
+ dst_nested_store_2((offset + (i_4 * 8u)), array_3[i_4]);
}
}
}
-void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, int value[4][3][2]) {
+void dst_nested_store(uint offset, int value[4][3][2]) {
int array_2[4][3][2] = value;
{
for(uint i_5 = 0u; (i_5 < 4u); i_5 = (i_5 + 1u)) {
- tint_symbol_10(buffer, (offset + (i_5 * 24u)), array_2[i_5]);
+ dst_nested_store_1((offset + (i_5 * 24u)), array_2[i_5]);
}
}
}
void foo(int4 src_param[4]) {
int4 src_function[4] = (int4[4])0;
- const int4 tint_symbol_15[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
- tint_symbol_3(tint_symbol, 0u, tint_symbol_15);
- tint_symbol_3(tint_symbol, 0u, src_param);
+ const int4 tint_symbol_5[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
+ tint_symbol_store(0u, tint_symbol_5);
+ tint_symbol_store(0u, src_param);
const int4 tint_symbol_1[4] = ret_arr();
- tint_symbol_3(tint_symbol, 0u, tint_symbol_1);
+ tint_symbol_store(0u, tint_symbol_1);
const int4 src_let[4] = (int4[4])0;
- tint_symbol_3(tint_symbol, 0u, src_let);
- tint_symbol_3(tint_symbol, 0u, src_function);
- tint_symbol_3(tint_symbol, 0u, src_private);
- tint_symbol_3(tint_symbol, 0u, src_workgroup);
+ tint_symbol_store(0u, src_let);
+ tint_symbol_store(0u, src_function);
+ tint_symbol_store(0u, src_private);
+ tint_symbol_store(0u, src_workgroup);
const S tint_symbol_2 = ret_struct_arr();
- tint_symbol_3(tint_symbol, 0u, tint_symbol_2.arr);
- tint_symbol_3(tint_symbol, 0u, tint_symbol_5(src_uniform, 0u));
- tint_symbol_3(tint_symbol, 0u, tint_symbol_7(src_storage, 0u));
+ tint_symbol_store(0u, tint_symbol_2.arr);
+ tint_symbol_store(0u, src_uniform_load(0u));
+ tint_symbol_store(0u, src_storage_load(0u));
int src_nested[4][3][2] = (int[4][3][2])0;
- tint_symbol_9(dst_nested, 0u, src_nested);
+ dst_nested_store(0u, src_nested);
}
diff --git a/test/tint/array/assign_to_workgroup_var.wgsl.expected.dxc.hlsl b/test/tint/array/assign_to_workgroup_var.wgsl.expected.dxc.hlsl
index e8cffb5..49474fb 100644
--- a/test/tint/array/assign_to_workgroup_var.wgsl.expected.dxc.hlsl
+++ b/test/tint/array/assign_to_workgroup_var.wgsl.expected.dxc.hlsl
@@ -18,33 +18,33 @@
typedef int4 ret_arr_ret[4];
ret_arr_ret ret_arr() {
- const int4 tint_symbol_6[4] = (int4[4])0;
- return tint_symbol_6;
+ const int4 tint_symbol_2[4] = (int4[4])0;
+ return tint_symbol_2;
}
S ret_struct_arr() {
- const S tint_symbol_7 = (S)0;
- return tint_symbol_7;
+ const S tint_symbol_3 = (S)0;
+ return tint_symbol_3;
}
-typedef int4 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
+typedef int4 src_uniform_load_ret[4];
+src_uniform_load_ret src_uniform_load(uint offset) {
int4 arr_1[4] = (int4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
const uint scalar_offset = ((offset + (i * 16u))) / 4;
- arr_1[i] = asint(buffer[scalar_offset / 4]);
+ arr_1[i] = asint(src_uniform[scalar_offset / 4]);
}
}
return arr_1;
}
-typedef int4 tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
+typedef int4 src_storage_load_ret[4];
+src_storage_load_ret src_storage_load(uint offset) {
int4 arr_2[4] = (int4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_2[i_1] = asint(buffer.Load4((offset + (i_1 * 16u))));
+ arr_2[i_1] = asint(src_storage.Load4((offset + (i_1 * 16u))));
}
}
return arr_2;
@@ -52,8 +52,8 @@
void foo(int4 src_param[4]) {
int4 src_function[4] = (int4[4])0;
- const int4 tint_symbol_8[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
- tint_symbol = tint_symbol_8;
+ const int4 tint_symbol_4[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
+ tint_symbol = tint_symbol_4;
tint_symbol = src_param;
tint_symbol = ret_arr();
const int4 src_let[4] = (int4[4])0;
@@ -63,8 +63,8 @@
tint_symbol = src_workgroup;
const S tint_symbol_1 = ret_struct_arr();
tint_symbol = tint_symbol_1.arr;
- tint_symbol = tint_symbol_2(src_uniform, 0u);
- tint_symbol = tint_symbol_4(src_storage, 0u);
+ tint_symbol = src_uniform_load(0u);
+ tint_symbol = src_storage_load(0u);
int src_nested[4][3][2] = (int[4][3][2])0;
dst_nested = src_nested;
}
diff --git a/test/tint/array/assign_to_workgroup_var.wgsl.expected.fxc.hlsl b/test/tint/array/assign_to_workgroup_var.wgsl.expected.fxc.hlsl
index e8cffb5..49474fb 100644
--- a/test/tint/array/assign_to_workgroup_var.wgsl.expected.fxc.hlsl
+++ b/test/tint/array/assign_to_workgroup_var.wgsl.expected.fxc.hlsl
@@ -18,33 +18,33 @@
typedef int4 ret_arr_ret[4];
ret_arr_ret ret_arr() {
- const int4 tint_symbol_6[4] = (int4[4])0;
- return tint_symbol_6;
+ const int4 tint_symbol_2[4] = (int4[4])0;
+ return tint_symbol_2;
}
S ret_struct_arr() {
- const S tint_symbol_7 = (S)0;
- return tint_symbol_7;
+ const S tint_symbol_3 = (S)0;
+ return tint_symbol_3;
}
-typedef int4 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
+typedef int4 src_uniform_load_ret[4];
+src_uniform_load_ret src_uniform_load(uint offset) {
int4 arr_1[4] = (int4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
const uint scalar_offset = ((offset + (i * 16u))) / 4;
- arr_1[i] = asint(buffer[scalar_offset / 4]);
+ arr_1[i] = asint(src_uniform[scalar_offset / 4]);
}
}
return arr_1;
}
-typedef int4 tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
+typedef int4 src_storage_load_ret[4];
+src_storage_load_ret src_storage_load(uint offset) {
int4 arr_2[4] = (int4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_2[i_1] = asint(buffer.Load4((offset + (i_1 * 16u))));
+ arr_2[i_1] = asint(src_storage.Load4((offset + (i_1 * 16u))));
}
}
return arr_2;
@@ -52,8 +52,8 @@
void foo(int4 src_param[4]) {
int4 src_function[4] = (int4[4])0;
- const int4 tint_symbol_8[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
- tint_symbol = tint_symbol_8;
+ const int4 tint_symbol_4[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
+ tint_symbol = tint_symbol_4;
tint_symbol = src_param;
tint_symbol = ret_arr();
const int4 src_let[4] = (int4[4])0;
@@ -63,8 +63,8 @@
tint_symbol = src_workgroup;
const S tint_symbol_1 = ret_struct_arr();
tint_symbol = tint_symbol_1.arr;
- tint_symbol = tint_symbol_2(src_uniform, 0u);
- tint_symbol = tint_symbol_4(src_storage, 0u);
+ tint_symbol = src_uniform_load(0u);
+ tint_symbol = src_storage_load(0u);
int src_nested[4][3][2] = (int[4][3][2])0;
dst_nested = src_nested;
}
diff --git a/test/tint/array/strides.spvasm.expected.dxc.hlsl b/test/tint/array/strides.spvasm.expected.dxc.hlsl
index 72a5a23..e510dd6 100644
--- a/test/tint/array/strides.spvasm.expected.dxc.hlsl
+++ b/test/tint/array/strides.spvasm.expected.dxc.hlsl
@@ -7,91 +7,91 @@
RWByteAddressBuffer s : register(u0, space0);
-strided_arr tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
- const strided_arr tint_symbol_12 = {asfloat(buffer.Load((offset + 0u)))};
- return tint_symbol_12;
+strided_arr s_load_4(uint offset) {
+ const strided_arr tint_symbol = {asfloat(s.Load((offset + 0u)))};
+ return tint_symbol;
}
-typedef strided_arr tint_symbol_3_ret[2];
-tint_symbol_3_ret tint_symbol_3(RWByteAddressBuffer buffer, uint offset) {
+typedef strided_arr s_load_3_ret[2];
+s_load_3_ret s_load_3(uint offset) {
strided_arr arr[2] = (strided_arr[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- arr[i] = tint_symbol_4(buffer, (offset + (i * 8u)));
+ arr[i] = s_load_4((offset + (i * 8u)));
}
}
return arr;
}
-typedef strided_arr tint_symbol_2_ret[3][2];
-tint_symbol_2_ret tint_symbol_2(RWByteAddressBuffer buffer, uint offset) {
+typedef strided_arr s_load_2_ret[3][2];
+s_load_2_ret s_load_2(uint offset) {
strided_arr arr_1[3][2] = (strided_arr[3][2])0;
{
for(uint i_1 = 0u; (i_1 < 3u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 16u)));
+ arr_1[i_1] = s_load_3((offset + (i_1 * 16u)));
}
}
return arr_1;
}
-strided_arr_1 tint_symbol_1(RWByteAddressBuffer buffer, uint offset) {
- const strided_arr_1 tint_symbol_13 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_13;
+strided_arr_1 s_load_1(uint offset) {
+ const strided_arr_1 tint_symbol_1 = {s_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef strided_arr_1 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(RWByteAddressBuffer buffer, uint offset) {
+typedef strided_arr_1 s_load_ret[4];
+s_load_ret s_load(uint offset) {
strided_arr_1 arr_2[4] = (strided_arr_1[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_2[i_2] = tint_symbol_1(buffer, (offset + (i_2 * 128u)));
+ arr_2[i_2] = s_load_1((offset + (i_2 * 128u)));
}
}
return arr_2;
}
-void tint_symbol_10(RWByteAddressBuffer buffer, uint offset, strided_arr value) {
- buffer.Store((offset + 0u), asuint(value.el));
+void s_store_4(uint offset, strided_arr value) {
+ s.Store((offset + 0u), asuint(value.el));
}
-void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, strided_arr value[2]) {
+void s_store_3(uint offset, strided_arr value[2]) {
strided_arr array_3[2] = value;
{
for(uint i_3 = 0u; (i_3 < 2u); i_3 = (i_3 + 1u)) {
- tint_symbol_10(buffer, (offset + (i_3 * 8u)), array_3[i_3]);
+ s_store_4((offset + (i_3 * 8u)), array_3[i_3]);
}
}
}
-void tint_symbol_8(RWByteAddressBuffer buffer, uint offset, strided_arr value[3][2]) {
+void s_store_2(uint offset, strided_arr value[3][2]) {
strided_arr array_2[3][2] = value;
{
for(uint i_4 = 0u; (i_4 < 3u); i_4 = (i_4 + 1u)) {
- tint_symbol_9(buffer, (offset + (i_4 * 16u)), array_2[i_4]);
+ s_store_3((offset + (i_4 * 16u)), array_2[i_4]);
}
}
}
-void tint_symbol_7(RWByteAddressBuffer buffer, uint offset, strided_arr_1 value) {
- tint_symbol_8(buffer, (offset + 0u), value.el);
+void s_store_1(uint offset, strided_arr_1 value) {
+ s_store_2((offset + 0u), value.el);
}
-void tint_symbol_6(RWByteAddressBuffer buffer, uint offset, strided_arr_1 value[4]) {
+void s_store(uint offset, strided_arr_1 value[4]) {
strided_arr_1 array_1[4] = value;
{
for(uint i_5 = 0u; (i_5 < 4u); i_5 = (i_5 + 1u)) {
- tint_symbol_7(buffer, (offset + (i_5 * 128u)), array_1[i_5]);
+ s_store_1((offset + (i_5 * 128u)), array_1[i_5]);
}
}
}
void f_1() {
- const strided_arr_1 x_19[4] = tint_symbol(s, 0u);
- const strided_arr x_24[3][2] = tint_symbol_2(s, 384u);
- const strided_arr x_28[2] = tint_symbol_3(s, 416u);
+ const strided_arr_1 x_19[4] = s_load(0u);
+ const strided_arr x_24[3][2] = s_load_2(384u);
+ const strided_arr x_28[2] = s_load_3(416u);
const float x_32 = asfloat(s.Load(424u));
- const strided_arr_1 tint_symbol_14[4] = (strided_arr_1[4])0;
- tint_symbol_6(s, 0u, tint_symbol_14);
+ const strided_arr_1 tint_symbol_2[4] = (strided_arr_1[4])0;
+ s_store(0u, tint_symbol_2);
s.Store(424u, asuint(5.0f));
return;
}
diff --git a/test/tint/array/strides.spvasm.expected.fxc.hlsl b/test/tint/array/strides.spvasm.expected.fxc.hlsl
index 72a5a23..e510dd6 100644
--- a/test/tint/array/strides.spvasm.expected.fxc.hlsl
+++ b/test/tint/array/strides.spvasm.expected.fxc.hlsl
@@ -7,91 +7,91 @@
RWByteAddressBuffer s : register(u0, space0);
-strided_arr tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
- const strided_arr tint_symbol_12 = {asfloat(buffer.Load((offset + 0u)))};
- return tint_symbol_12;
+strided_arr s_load_4(uint offset) {
+ const strided_arr tint_symbol = {asfloat(s.Load((offset + 0u)))};
+ return tint_symbol;
}
-typedef strided_arr tint_symbol_3_ret[2];
-tint_symbol_3_ret tint_symbol_3(RWByteAddressBuffer buffer, uint offset) {
+typedef strided_arr s_load_3_ret[2];
+s_load_3_ret s_load_3(uint offset) {
strided_arr arr[2] = (strided_arr[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- arr[i] = tint_symbol_4(buffer, (offset + (i * 8u)));
+ arr[i] = s_load_4((offset + (i * 8u)));
}
}
return arr;
}
-typedef strided_arr tint_symbol_2_ret[3][2];
-tint_symbol_2_ret tint_symbol_2(RWByteAddressBuffer buffer, uint offset) {
+typedef strided_arr s_load_2_ret[3][2];
+s_load_2_ret s_load_2(uint offset) {
strided_arr arr_1[3][2] = (strided_arr[3][2])0;
{
for(uint i_1 = 0u; (i_1 < 3u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 16u)));
+ arr_1[i_1] = s_load_3((offset + (i_1 * 16u)));
}
}
return arr_1;
}
-strided_arr_1 tint_symbol_1(RWByteAddressBuffer buffer, uint offset) {
- const strided_arr_1 tint_symbol_13 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_13;
+strided_arr_1 s_load_1(uint offset) {
+ const strided_arr_1 tint_symbol_1 = {s_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef strided_arr_1 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(RWByteAddressBuffer buffer, uint offset) {
+typedef strided_arr_1 s_load_ret[4];
+s_load_ret s_load(uint offset) {
strided_arr_1 arr_2[4] = (strided_arr_1[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_2[i_2] = tint_symbol_1(buffer, (offset + (i_2 * 128u)));
+ arr_2[i_2] = s_load_1((offset + (i_2 * 128u)));
}
}
return arr_2;
}
-void tint_symbol_10(RWByteAddressBuffer buffer, uint offset, strided_arr value) {
- buffer.Store((offset + 0u), asuint(value.el));
+void s_store_4(uint offset, strided_arr value) {
+ s.Store((offset + 0u), asuint(value.el));
}
-void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, strided_arr value[2]) {
+void s_store_3(uint offset, strided_arr value[2]) {
strided_arr array_3[2] = value;
{
for(uint i_3 = 0u; (i_3 < 2u); i_3 = (i_3 + 1u)) {
- tint_symbol_10(buffer, (offset + (i_3 * 8u)), array_3[i_3]);
+ s_store_4((offset + (i_3 * 8u)), array_3[i_3]);
}
}
}
-void tint_symbol_8(RWByteAddressBuffer buffer, uint offset, strided_arr value[3][2]) {
+void s_store_2(uint offset, strided_arr value[3][2]) {
strided_arr array_2[3][2] = value;
{
for(uint i_4 = 0u; (i_4 < 3u); i_4 = (i_4 + 1u)) {
- tint_symbol_9(buffer, (offset + (i_4 * 16u)), array_2[i_4]);
+ s_store_3((offset + (i_4 * 16u)), array_2[i_4]);
}
}
}
-void tint_symbol_7(RWByteAddressBuffer buffer, uint offset, strided_arr_1 value) {
- tint_symbol_8(buffer, (offset + 0u), value.el);
+void s_store_1(uint offset, strided_arr_1 value) {
+ s_store_2((offset + 0u), value.el);
}
-void tint_symbol_6(RWByteAddressBuffer buffer, uint offset, strided_arr_1 value[4]) {
+void s_store(uint offset, strided_arr_1 value[4]) {
strided_arr_1 array_1[4] = value;
{
for(uint i_5 = 0u; (i_5 < 4u); i_5 = (i_5 + 1u)) {
- tint_symbol_7(buffer, (offset + (i_5 * 128u)), array_1[i_5]);
+ s_store_1((offset + (i_5 * 128u)), array_1[i_5]);
}
}
}
void f_1() {
- const strided_arr_1 x_19[4] = tint_symbol(s, 0u);
- const strided_arr x_24[3][2] = tint_symbol_2(s, 384u);
- const strided_arr x_28[2] = tint_symbol_3(s, 416u);
+ const strided_arr_1 x_19[4] = s_load(0u);
+ const strided_arr x_24[3][2] = s_load_2(384u);
+ const strided_arr x_28[2] = s_load_3(416u);
const float x_32 = asfloat(s.Load(424u));
- const strided_arr_1 tint_symbol_14[4] = (strided_arr_1[4])0;
- tint_symbol_6(s, 0u, tint_symbol_14);
+ const strided_arr_1 tint_symbol_2[4] = (strided_arr_1[4])0;
+ s_store(0u, tint_symbol_2);
s.Store(424u, asuint(5.0f));
return;
}
diff --git a/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.dxc.hlsl
index 17abe57..bd6bf62 100644
--- a/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.dxc.hlsl
@@ -4,48 +4,48 @@
uint idx : SV_GroupIndex;
};
-float2x2 tint_symbol_14(ByteAddressBuffer buffer, uint offset) {
- return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
+float2x2 sb_load_12(uint offset) {
+ return float2x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))));
}
-float2x3 tint_symbol_15(ByteAddressBuffer buffer, uint offset) {
- return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
+float2x3 sb_load_13(uint offset) {
+ return float2x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))));
}
-float2x4 tint_symbol_16(ByteAddressBuffer buffer, uint offset) {
- return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
+float2x4 sb_load_14(uint offset) {
+ return float2x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))));
}
-float3x2 tint_symbol_17(ByteAddressBuffer buffer, uint offset) {
- return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
+float3x2 sb_load_15(uint offset) {
+ return float3x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))));
}
-float3x3 tint_symbol_18(ByteAddressBuffer buffer, uint offset) {
- return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
+float3x3 sb_load_16(uint offset) {
+ return float3x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))));
}
-float3x4 tint_symbol_19(ByteAddressBuffer buffer, uint offset) {
- return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
+float3x4 sb_load_17(uint offset) {
+ return float3x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))));
}
-float4x2 tint_symbol_20(ByteAddressBuffer buffer, uint offset) {
- return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
+float4x2 sb_load_18(uint offset) {
+ return float4x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))), asfloat(sb.Load2((offset + 24u))));
}
-float4x3 tint_symbol_21(ByteAddressBuffer buffer, uint offset) {
- return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
+float4x3 sb_load_19(uint offset) {
+ return float4x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))), asfloat(sb.Load3((offset + 48u))));
}
-float4x4 tint_symbol_22(ByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 sb_load_20(uint offset) {
+ return float4x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))), asfloat(sb.Load4((offset + 48u))));
}
-typedef float3 tint_symbol_23_ret[2];
-tint_symbol_23_ret tint_symbol_23(ByteAddressBuffer buffer, uint offset) {
+typedef float3 sb_load_21_ret[2];
+sb_load_21_ret sb_load_21(uint offset) {
float3 arr_1[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- arr_1[i] = asfloat(buffer.Load3((offset + (i * 16u))));
+ arr_1[i] = asfloat(sb.Load3((offset + (i * 16u))));
}
}
return arr_1;
@@ -64,16 +64,16 @@
const float4 vec4_f32 = asfloat(sb.Load4(((544u * idx) + 96u)));
const int4 vec4_i32 = asint(sb.Load4(((544u * idx) + 112u)));
const uint4 vec4_u32 = sb.Load4(((544u * idx) + 128u));
- const float2x2 mat2x2_f32 = tint_symbol_14(sb, ((544u * idx) + 144u));
- const float2x3 mat2x3_f32 = tint_symbol_15(sb, ((544u * idx) + 160u));
- const float2x4 mat2x4_f32 = tint_symbol_16(sb, ((544u * idx) + 192u));
- const float3x2 mat3x2_f32 = tint_symbol_17(sb, ((544u * idx) + 224u));
- const float3x3 mat3x3_f32 = tint_symbol_18(sb, ((544u * idx) + 256u));
- const float3x4 mat3x4_f32 = tint_symbol_19(sb, ((544u * idx) + 304u));
- const float4x2 mat4x2_f32 = tint_symbol_20(sb, ((544u * idx) + 352u));
- const float4x3 mat4x3_f32 = tint_symbol_21(sb, ((544u * idx) + 384u));
- const float4x4 mat4x4_f32 = tint_symbol_22(sb, ((544u * idx) + 448u));
- const float3 arr2_vec3_f32[2] = tint_symbol_23(sb, ((544u * idx) + 512u));
+ const float2x2 mat2x2_f32 = sb_load_12(((544u * idx) + 144u));
+ const float2x3 mat2x3_f32 = sb_load_13(((544u * idx) + 160u));
+ const float2x4 mat2x4_f32 = sb_load_14(((544u * idx) + 192u));
+ const float3x2 mat3x2_f32 = sb_load_15(((544u * idx) + 224u));
+ const float3x3 mat3x3_f32 = sb_load_16(((544u * idx) + 256u));
+ const float3x4 mat3x4_f32 = sb_load_17(((544u * idx) + 304u));
+ const float4x2 mat4x2_f32 = sb_load_18(((544u * idx) + 352u));
+ const float4x3 mat4x3_f32 = sb_load_19(((544u * idx) + 384u));
+ const float4x4 mat4x4_f32 = sb_load_20(((544u * idx) + 448u));
+ const float3 arr2_vec3_f32[2] = sb_load_21(((544u * idx) + 512u));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.fxc.hlsl
index 17abe57..bd6bf62 100644
--- a/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.fxc.hlsl
@@ -4,48 +4,48 @@
uint idx : SV_GroupIndex;
};
-float2x2 tint_symbol_14(ByteAddressBuffer buffer, uint offset) {
- return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
+float2x2 sb_load_12(uint offset) {
+ return float2x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))));
}
-float2x3 tint_symbol_15(ByteAddressBuffer buffer, uint offset) {
- return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
+float2x3 sb_load_13(uint offset) {
+ return float2x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))));
}
-float2x4 tint_symbol_16(ByteAddressBuffer buffer, uint offset) {
- return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
+float2x4 sb_load_14(uint offset) {
+ return float2x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))));
}
-float3x2 tint_symbol_17(ByteAddressBuffer buffer, uint offset) {
- return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
+float3x2 sb_load_15(uint offset) {
+ return float3x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))));
}
-float3x3 tint_symbol_18(ByteAddressBuffer buffer, uint offset) {
- return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
+float3x3 sb_load_16(uint offset) {
+ return float3x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))));
}
-float3x4 tint_symbol_19(ByteAddressBuffer buffer, uint offset) {
- return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
+float3x4 sb_load_17(uint offset) {
+ return float3x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))));
}
-float4x2 tint_symbol_20(ByteAddressBuffer buffer, uint offset) {
- return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
+float4x2 sb_load_18(uint offset) {
+ return float4x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))), asfloat(sb.Load2((offset + 24u))));
}
-float4x3 tint_symbol_21(ByteAddressBuffer buffer, uint offset) {
- return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
+float4x3 sb_load_19(uint offset) {
+ return float4x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))), asfloat(sb.Load3((offset + 48u))));
}
-float4x4 tint_symbol_22(ByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 sb_load_20(uint offset) {
+ return float4x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))), asfloat(sb.Load4((offset + 48u))));
}
-typedef float3 tint_symbol_23_ret[2];
-tint_symbol_23_ret tint_symbol_23(ByteAddressBuffer buffer, uint offset) {
+typedef float3 sb_load_21_ret[2];
+sb_load_21_ret sb_load_21(uint offset) {
float3 arr_1[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- arr_1[i] = asfloat(buffer.Load3((offset + (i * 16u))));
+ arr_1[i] = asfloat(sb.Load3((offset + (i * 16u))));
}
}
return arr_1;
@@ -64,16 +64,16 @@
const float4 vec4_f32 = asfloat(sb.Load4(((544u * idx) + 96u)));
const int4 vec4_i32 = asint(sb.Load4(((544u * idx) + 112u)));
const uint4 vec4_u32 = sb.Load4(((544u * idx) + 128u));
- const float2x2 mat2x2_f32 = tint_symbol_14(sb, ((544u * idx) + 144u));
- const float2x3 mat2x3_f32 = tint_symbol_15(sb, ((544u * idx) + 160u));
- const float2x4 mat2x4_f32 = tint_symbol_16(sb, ((544u * idx) + 192u));
- const float3x2 mat3x2_f32 = tint_symbol_17(sb, ((544u * idx) + 224u));
- const float3x3 mat3x3_f32 = tint_symbol_18(sb, ((544u * idx) + 256u));
- const float3x4 mat3x4_f32 = tint_symbol_19(sb, ((544u * idx) + 304u));
- const float4x2 mat4x2_f32 = tint_symbol_20(sb, ((544u * idx) + 352u));
- const float4x3 mat4x3_f32 = tint_symbol_21(sb, ((544u * idx) + 384u));
- const float4x4 mat4x4_f32 = tint_symbol_22(sb, ((544u * idx) + 448u));
- const float3 arr2_vec3_f32[2] = tint_symbol_23(sb, ((544u * idx) + 512u));
+ const float2x2 mat2x2_f32 = sb_load_12(((544u * idx) + 144u));
+ const float2x3 mat2x3_f32 = sb_load_13(((544u * idx) + 160u));
+ const float2x4 mat2x4_f32 = sb_load_14(((544u * idx) + 192u));
+ const float3x2 mat3x2_f32 = sb_load_15(((544u * idx) + 224u));
+ const float3x3 mat3x3_f32 = sb_load_16(((544u * idx) + 256u));
+ const float3x4 mat3x4_f32 = sb_load_17(((544u * idx) + 304u));
+ const float4x2 mat4x2_f32 = sb_load_18(((544u * idx) + 352u));
+ const float4x3 mat4x3_f32 = sb_load_19(((544u * idx) + 384u));
+ const float4x4 mat4x4_f32 = sb_load_20(((544u * idx) + 448u));
+ const float3 arr2_vec3_f32[2] = sb_load_21(((544u * idx) + 512u));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.dxc.hlsl
index e14b161..ee12f42 100644
--- a/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.dxc.hlsl
@@ -4,95 +4,95 @@
uint idx : SV_GroupIndex;
};
-float2x2 tint_symbol_18(ByteAddressBuffer buffer, uint offset) {
- return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
+float2x2 sb_load_16(uint offset) {
+ return float2x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))));
}
-float2x3 tint_symbol_19(ByteAddressBuffer buffer, uint offset) {
- return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
+float2x3 sb_load_17(uint offset) {
+ return float2x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))));
}
-float2x4 tint_symbol_20(ByteAddressBuffer buffer, uint offset) {
- return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
+float2x4 sb_load_18(uint offset) {
+ return float2x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))));
}
-float3x2 tint_symbol_21(ByteAddressBuffer buffer, uint offset) {
- return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
+float3x2 sb_load_19(uint offset) {
+ return float3x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))));
}
-float3x3 tint_symbol_22(ByteAddressBuffer buffer, uint offset) {
- return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
+float3x3 sb_load_20(uint offset) {
+ return float3x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))));
}
-float3x4 tint_symbol_23(ByteAddressBuffer buffer, uint offset) {
- return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
+float3x4 sb_load_21(uint offset) {
+ return float3x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))));
}
-float4x2 tint_symbol_24(ByteAddressBuffer buffer, uint offset) {
- return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
+float4x2 sb_load_22(uint offset) {
+ return float4x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))), asfloat(sb.Load2((offset + 24u))));
}
-float4x3 tint_symbol_25(ByteAddressBuffer buffer, uint offset) {
- return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
+float4x3 sb_load_23(uint offset) {
+ return float4x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))), asfloat(sb.Load3((offset + 48u))));
}
-float4x4 tint_symbol_26(ByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 sb_load_24(uint offset) {
+ return float4x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))), asfloat(sb.Load4((offset + 48u))));
}
-matrix<float16_t, 2, 2> tint_symbol_27(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 2, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)));
+matrix<float16_t, 2, 2> sb_load_25(uint offset) {
+ return matrix<float16_t, 2, 2>(sb.Load<vector<float16_t, 2> >((offset + 0u)), sb.Load<vector<float16_t, 2> >((offset + 4u)));
}
-matrix<float16_t, 2, 3> tint_symbol_28(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 2, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)));
+matrix<float16_t, 2, 3> sb_load_26(uint offset) {
+ return matrix<float16_t, 2, 3>(sb.Load<vector<float16_t, 3> >((offset + 0u)), sb.Load<vector<float16_t, 3> >((offset + 8u)));
}
-matrix<float16_t, 2, 4> tint_symbol_29(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 2, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)));
+matrix<float16_t, 2, 4> sb_load_27(uint offset) {
+ return matrix<float16_t, 2, 4>(sb.Load<vector<float16_t, 4> >((offset + 0u)), sb.Load<vector<float16_t, 4> >((offset + 8u)));
}
-matrix<float16_t, 3, 2> tint_symbol_30(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 3, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)), buffer.Load<vector<float16_t, 2> >((offset + 8u)));
+matrix<float16_t, 3, 2> sb_load_28(uint offset) {
+ return matrix<float16_t, 3, 2>(sb.Load<vector<float16_t, 2> >((offset + 0u)), sb.Load<vector<float16_t, 2> >((offset + 4u)), sb.Load<vector<float16_t, 2> >((offset + 8u)));
}
-matrix<float16_t, 3, 3> tint_symbol_31(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 3, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), buffer.Load<vector<float16_t, 3> >((offset + 16u)));
+matrix<float16_t, 3, 3> sb_load_29(uint offset) {
+ return matrix<float16_t, 3, 3>(sb.Load<vector<float16_t, 3> >((offset + 0u)), sb.Load<vector<float16_t, 3> >((offset + 8u)), sb.Load<vector<float16_t, 3> >((offset + 16u)));
}
-matrix<float16_t, 3, 4> tint_symbol_32(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 3, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)), buffer.Load<vector<float16_t, 4> >((offset + 16u)));
+matrix<float16_t, 3, 4> sb_load_30(uint offset) {
+ return matrix<float16_t, 3, 4>(sb.Load<vector<float16_t, 4> >((offset + 0u)), sb.Load<vector<float16_t, 4> >((offset + 8u)), sb.Load<vector<float16_t, 4> >((offset + 16u)));
}
-matrix<float16_t, 4, 2> tint_symbol_33(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 4, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)), buffer.Load<vector<float16_t, 2> >((offset + 8u)), buffer.Load<vector<float16_t, 2> >((offset + 12u)));
+matrix<float16_t, 4, 2> sb_load_31(uint offset) {
+ return matrix<float16_t, 4, 2>(sb.Load<vector<float16_t, 2> >((offset + 0u)), sb.Load<vector<float16_t, 2> >((offset + 4u)), sb.Load<vector<float16_t, 2> >((offset + 8u)), sb.Load<vector<float16_t, 2> >((offset + 12u)));
}
-matrix<float16_t, 4, 3> tint_symbol_34(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 4, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), buffer.Load<vector<float16_t, 3> >((offset + 16u)), buffer.Load<vector<float16_t, 3> >((offset + 24u)));
+matrix<float16_t, 4, 3> sb_load_32(uint offset) {
+ return matrix<float16_t, 4, 3>(sb.Load<vector<float16_t, 3> >((offset + 0u)), sb.Load<vector<float16_t, 3> >((offset + 8u)), sb.Load<vector<float16_t, 3> >((offset + 16u)), sb.Load<vector<float16_t, 3> >((offset + 24u)));
}
-matrix<float16_t, 4, 4> tint_symbol_35(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 4, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)), buffer.Load<vector<float16_t, 4> >((offset + 16u)), buffer.Load<vector<float16_t, 4> >((offset + 24u)));
+matrix<float16_t, 4, 4> sb_load_33(uint offset) {
+ return matrix<float16_t, 4, 4>(sb.Load<vector<float16_t, 4> >((offset + 0u)), sb.Load<vector<float16_t, 4> >((offset + 8u)), sb.Load<vector<float16_t, 4> >((offset + 16u)), sb.Load<vector<float16_t, 4> >((offset + 24u)));
}
-typedef float3 tint_symbol_36_ret[2];
-tint_symbol_36_ret tint_symbol_36(ByteAddressBuffer buffer, uint offset) {
+typedef float3 sb_load_34_ret[2];
+sb_load_34_ret sb_load_34(uint offset) {
float3 arr_1[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- arr_1[i] = asfloat(buffer.Load3((offset + (i * 16u))));
+ arr_1[i] = asfloat(sb.Load3((offset + (i * 16u))));
}
}
return arr_1;
}
-typedef matrix<float16_t, 4, 2> tint_symbol_37_ret[2];
-tint_symbol_37_ret tint_symbol_37(ByteAddressBuffer buffer, uint offset) {
+typedef matrix<float16_t, 4, 2> sb_load_35_ret[2];
+sb_load_35_ret sb_load_35(uint offset) {
matrix<float16_t, 4, 2> arr_2[2] = (matrix<float16_t, 4, 2>[2])0;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- arr_2[i_1] = tint_symbol_33(buffer, (offset + (i_1 * 16u)));
+ arr_2[i_1] = sb_load_31((offset + (i_1 * 16u)));
}
}
return arr_2;
@@ -115,26 +115,26 @@
const int4 vec4_i32 = asint(sb.Load4(((800u * idx) + 128u)));
const uint4 vec4_u32 = sb.Load4(((800u * idx) + 144u));
const vector<float16_t, 4> vec4_f16 = sb.Load<vector<float16_t, 4> >(((800u * idx) + 160u));
- const float2x2 mat2x2_f32 = tint_symbol_18(sb, ((800u * idx) + 168u));
- const float2x3 mat2x3_f32 = tint_symbol_19(sb, ((800u * idx) + 192u));
- const float2x4 mat2x4_f32 = tint_symbol_20(sb, ((800u * idx) + 224u));
- const float3x2 mat3x2_f32 = tint_symbol_21(sb, ((800u * idx) + 256u));
- const float3x3 mat3x3_f32 = tint_symbol_22(sb, ((800u * idx) + 288u));
- const float3x4 mat3x4_f32 = tint_symbol_23(sb, ((800u * idx) + 336u));
- const float4x2 mat4x2_f32 = tint_symbol_24(sb, ((800u * idx) + 384u));
- const float4x3 mat4x3_f32 = tint_symbol_25(sb, ((800u * idx) + 416u));
- const float4x4 mat4x4_f32 = tint_symbol_26(sb, ((800u * idx) + 480u));
- const matrix<float16_t, 2, 2> mat2x2_f16 = tint_symbol_27(sb, ((800u * idx) + 544u));
- const matrix<float16_t, 2, 3> mat2x3_f16 = tint_symbol_28(sb, ((800u * idx) + 552u));
- const matrix<float16_t, 2, 4> mat2x4_f16 = tint_symbol_29(sb, ((800u * idx) + 568u));
- const matrix<float16_t, 3, 2> mat3x2_f16 = tint_symbol_30(sb, ((800u * idx) + 584u));
- const matrix<float16_t, 3, 3> mat3x3_f16 = tint_symbol_31(sb, ((800u * idx) + 600u));
- const matrix<float16_t, 3, 4> mat3x4_f16 = tint_symbol_32(sb, ((800u * idx) + 624u));
- const matrix<float16_t, 4, 2> mat4x2_f16 = tint_symbol_33(sb, ((800u * idx) + 648u));
- const matrix<float16_t, 4, 3> mat4x3_f16 = tint_symbol_34(sb, ((800u * idx) + 664u));
- const matrix<float16_t, 4, 4> mat4x4_f16 = tint_symbol_35(sb, ((800u * idx) + 696u));
- const float3 arr2_vec3_f32[2] = tint_symbol_36(sb, ((800u * idx) + 736u));
- const matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = tint_symbol_37(sb, ((800u * idx) + 768u));
+ const float2x2 mat2x2_f32 = sb_load_16(((800u * idx) + 168u));
+ const float2x3 mat2x3_f32 = sb_load_17(((800u * idx) + 192u));
+ const float2x4 mat2x4_f32 = sb_load_18(((800u * idx) + 224u));
+ const float3x2 mat3x2_f32 = sb_load_19(((800u * idx) + 256u));
+ const float3x3 mat3x3_f32 = sb_load_20(((800u * idx) + 288u));
+ const float3x4 mat3x4_f32 = sb_load_21(((800u * idx) + 336u));
+ const float4x2 mat4x2_f32 = sb_load_22(((800u * idx) + 384u));
+ const float4x3 mat4x3_f32 = sb_load_23(((800u * idx) + 416u));
+ const float4x4 mat4x4_f32 = sb_load_24(((800u * idx) + 480u));
+ const matrix<float16_t, 2, 2> mat2x2_f16 = sb_load_25(((800u * idx) + 544u));
+ const matrix<float16_t, 2, 3> mat2x3_f16 = sb_load_26(((800u * idx) + 552u));
+ const matrix<float16_t, 2, 4> mat2x4_f16 = sb_load_27(((800u * idx) + 568u));
+ const matrix<float16_t, 3, 2> mat3x2_f16 = sb_load_28(((800u * idx) + 584u));
+ const matrix<float16_t, 3, 3> mat3x3_f16 = sb_load_29(((800u * idx) + 600u));
+ const matrix<float16_t, 3, 4> mat3x4_f16 = sb_load_30(((800u * idx) + 624u));
+ const matrix<float16_t, 4, 2> mat4x2_f16 = sb_load_31(((800u * idx) + 648u));
+ const matrix<float16_t, 4, 3> mat4x3_f16 = sb_load_32(((800u * idx) + 664u));
+ const matrix<float16_t, 4, 4> mat4x4_f16 = sb_load_33(((800u * idx) + 696u));
+ const float3 arr2_vec3_f32[2] = sb_load_34(((800u * idx) + 736u));
+ const matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = sb_load_35(((800u * idx) + 768u));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.dxc.hlsl
index 508e269..b378896 100644
--- a/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.dxc.hlsl
@@ -4,65 +4,65 @@
uint idx : SV_GroupIndex;
};
-void tint_symbol_14(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void sb_store_12(uint offset, float2x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
}
-void tint_symbol_15(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void sb_store_13(uint offset, float2x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_16(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void sb_store_14(uint offset, float2x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_17(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
+void sb_store_15(uint offset, float3x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
+ sb.Store2((offset + 16u), asuint(value[2u]));
}
-void tint_symbol_18(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+void sb_store_16(uint offset, float3x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
+ sb.Store3((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_19(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+void sb_store_17(uint offset, float3x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
+ sb.Store4((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_20(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+void sb_store_18(uint offset, float4x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
+ sb.Store2((offset + 16u), asuint(value[2u]));
+ sb.Store2((offset + 24u), asuint(value[3u]));
}
-void tint_symbol_21(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+void sb_store_19(uint offset, float4x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
+ sb.Store3((offset + 32u), asuint(value[2u]));
+ sb.Store3((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_22(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void sb_store_20(uint offset, float4x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
+ sb.Store4((offset + 32u), asuint(value[2u]));
+ sb.Store4((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_23(RWByteAddressBuffer buffer, uint offset, float3 value[2]) {
+void sb_store_21(uint offset, float3 value[2]) {
float3 array_1[2] = value;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- buffer.Store3((offset + (i * 16u)), asuint(array_1[i]));
+ sb.Store3((offset + (i * 16u)), asuint(array_1[i]));
}
}
}
@@ -80,17 +80,17 @@
sb.Store4(((544u * idx) + 96u), asuint((0.0f).xxxx));
sb.Store4(((544u * idx) + 112u), asuint((0).xxxx));
sb.Store4(((544u * idx) + 128u), asuint((0u).xxxx));
- tint_symbol_14(sb, ((544u * idx) + 144u), float2x2((0.0f).xx, (0.0f).xx));
- tint_symbol_15(sb, ((544u * idx) + 160u), float2x3((0.0f).xxx, (0.0f).xxx));
- tint_symbol_16(sb, ((544u * idx) + 192u), float2x4((0.0f).xxxx, (0.0f).xxxx));
- tint_symbol_17(sb, ((544u * idx) + 224u), float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
- tint_symbol_18(sb, ((544u * idx) + 256u), float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
- tint_symbol_19(sb, ((544u * idx) + 304u), float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
- tint_symbol_20(sb, ((544u * idx) + 352u), float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
- tint_symbol_21(sb, ((544u * idx) + 384u), float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
- tint_symbol_22(sb, ((544u * idx) + 448u), float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
- const float3 tint_symbol_24[2] = (float3[2])0;
- tint_symbol_23(sb, ((544u * idx) + 512u), tint_symbol_24);
+ sb_store_12(((544u * idx) + 144u), float2x2((0.0f).xx, (0.0f).xx));
+ sb_store_13(((544u * idx) + 160u), float2x3((0.0f).xxx, (0.0f).xxx));
+ sb_store_14(((544u * idx) + 192u), float2x4((0.0f).xxxx, (0.0f).xxxx));
+ sb_store_15(((544u * idx) + 224u), float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
+ sb_store_16(((544u * idx) + 256u), float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
+ sb_store_17(((544u * idx) + 304u), float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
+ sb_store_18(((544u * idx) + 352u), float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
+ sb_store_19(((544u * idx) + 384u), float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
+ sb_store_20(((544u * idx) + 448u), float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
+ const float3 tint_symbol_2[2] = (float3[2])0;
+ sb_store_21(((544u * idx) + 512u), tint_symbol_2);
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.fxc.hlsl
index 508e269..b378896 100644
--- a/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.fxc.hlsl
@@ -4,65 +4,65 @@
uint idx : SV_GroupIndex;
};
-void tint_symbol_14(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void sb_store_12(uint offset, float2x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
}
-void tint_symbol_15(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void sb_store_13(uint offset, float2x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_16(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void sb_store_14(uint offset, float2x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_17(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
+void sb_store_15(uint offset, float3x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
+ sb.Store2((offset + 16u), asuint(value[2u]));
}
-void tint_symbol_18(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+void sb_store_16(uint offset, float3x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
+ sb.Store3((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_19(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+void sb_store_17(uint offset, float3x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
+ sb.Store4((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_20(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+void sb_store_18(uint offset, float4x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
+ sb.Store2((offset + 16u), asuint(value[2u]));
+ sb.Store2((offset + 24u), asuint(value[3u]));
}
-void tint_symbol_21(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+void sb_store_19(uint offset, float4x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
+ sb.Store3((offset + 32u), asuint(value[2u]));
+ sb.Store3((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_22(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void sb_store_20(uint offset, float4x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
+ sb.Store4((offset + 32u), asuint(value[2u]));
+ sb.Store4((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_23(RWByteAddressBuffer buffer, uint offset, float3 value[2]) {
+void sb_store_21(uint offset, float3 value[2]) {
float3 array_1[2] = value;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- buffer.Store3((offset + (i * 16u)), asuint(array_1[i]));
+ sb.Store3((offset + (i * 16u)), asuint(array_1[i]));
}
}
}
@@ -80,17 +80,17 @@
sb.Store4(((544u * idx) + 96u), asuint((0.0f).xxxx));
sb.Store4(((544u * idx) + 112u), asuint((0).xxxx));
sb.Store4(((544u * idx) + 128u), asuint((0u).xxxx));
- tint_symbol_14(sb, ((544u * idx) + 144u), float2x2((0.0f).xx, (0.0f).xx));
- tint_symbol_15(sb, ((544u * idx) + 160u), float2x3((0.0f).xxx, (0.0f).xxx));
- tint_symbol_16(sb, ((544u * idx) + 192u), float2x4((0.0f).xxxx, (0.0f).xxxx));
- tint_symbol_17(sb, ((544u * idx) + 224u), float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
- tint_symbol_18(sb, ((544u * idx) + 256u), float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
- tint_symbol_19(sb, ((544u * idx) + 304u), float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
- tint_symbol_20(sb, ((544u * idx) + 352u), float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
- tint_symbol_21(sb, ((544u * idx) + 384u), float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
- tint_symbol_22(sb, ((544u * idx) + 448u), float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
- const float3 tint_symbol_24[2] = (float3[2])0;
- tint_symbol_23(sb, ((544u * idx) + 512u), tint_symbol_24);
+ sb_store_12(((544u * idx) + 144u), float2x2((0.0f).xx, (0.0f).xx));
+ sb_store_13(((544u * idx) + 160u), float2x3((0.0f).xxx, (0.0f).xxx));
+ sb_store_14(((544u * idx) + 192u), float2x4((0.0f).xxxx, (0.0f).xxxx));
+ sb_store_15(((544u * idx) + 224u), float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
+ sb_store_16(((544u * idx) + 256u), float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
+ sb_store_17(((544u * idx) + 304u), float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
+ sb_store_18(((544u * idx) + 352u), float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
+ sb_store_19(((544u * idx) + 384u), float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
+ sb_store_20(((544u * idx) + 448u), float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
+ const float3 tint_symbol_2[2] = (float3[2])0;
+ sb_store_21(((544u * idx) + 512u), tint_symbol_2);
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.dxc.hlsl
index 2688819..ec1c0f0 100644
--- a/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.dxc.hlsl
@@ -4,128 +4,128 @@
uint idx : SV_GroupIndex;
};
-void tint_symbol_18(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void sb_store_16(uint offset, float2x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
}
-void tint_symbol_19(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void sb_store_17(uint offset, float2x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_20(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void sb_store_18(uint offset, float2x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_21(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
+void sb_store_19(uint offset, float3x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
+ sb.Store2((offset + 16u), asuint(value[2u]));
}
-void tint_symbol_22(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+void sb_store_20(uint offset, float3x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
+ sb.Store3((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_23(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+void sb_store_21(uint offset, float3x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
+ sb.Store4((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_24(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+void sb_store_22(uint offset, float4x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
+ sb.Store2((offset + 16u), asuint(value[2u]));
+ sb.Store2((offset + 24u), asuint(value[3u]));
}
-void tint_symbol_25(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+void sb_store_23(uint offset, float4x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
+ sb.Store3((offset + 32u), asuint(value[2u]));
+ sb.Store3((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_26(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void sb_store_24(uint offset, float4x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
+ sb.Store4((offset + 32u), asuint(value[2u]));
+ sb.Store4((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_27(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+void sb_store_25(uint offset, matrix<float16_t, 2, 2> value) {
+ sb.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
}
-void tint_symbol_28(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+void sb_store_26(uint offset, matrix<float16_t, 2, 3> value) {
+ sb.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
}
-void tint_symbol_29(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+void sb_store_27(uint offset, matrix<float16_t, 2, 4> value) {
+ sb.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
}
-void tint_symbol_30(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
- buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
+void sb_store_28(uint offset, matrix<float16_t, 3, 2> value) {
+ sb.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+ sb.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
}
-void tint_symbol_31(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
+void sb_store_29(uint offset, matrix<float16_t, 3, 3> value) {
+ sb.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+ sb.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
}
-void tint_symbol_32(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
+void sb_store_30(uint offset, matrix<float16_t, 3, 4> value) {
+ sb.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+ sb.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
}
-void tint_symbol_33(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
- buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
- buffer.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
+void sb_store_31(uint offset, matrix<float16_t, 4, 2> value) {
+ sb.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+ sb.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
+ sb.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
}
-void tint_symbol_34(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
- buffer.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
+void sb_store_32(uint offset, matrix<float16_t, 4, 3> value) {
+ sb.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+ sb.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
+ sb.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
}
-void tint_symbol_35(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
- buffer.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
+void sb_store_33(uint offset, matrix<float16_t, 4, 4> value) {
+ sb.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+ sb.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
+ sb.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
}
-void tint_symbol_36(RWByteAddressBuffer buffer, uint offset, float3 value[2]) {
+void sb_store_34(uint offset, float3 value[2]) {
float3 array_1[2] = value;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- buffer.Store3((offset + (i * 16u)), asuint(array_1[i]));
+ sb.Store3((offset + (i * 16u)), asuint(array_1[i]));
}
}
}
-void tint_symbol_37(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value[2]) {
+void sb_store_35(uint offset, matrix<float16_t, 4, 2> value[2]) {
matrix<float16_t, 4, 2> array_2[2] = value;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- tint_symbol_33(buffer, (offset + (i_1 * 16u)), array_2[i_1]);
+ sb_store_31((offset + (i_1 * 16u)), array_2[i_1]);
}
}
}
@@ -147,28 +147,28 @@
sb.Store4(((800u * idx) + 128u), asuint((0).xxxx));
sb.Store4(((800u * idx) + 144u), asuint((0u).xxxx));
sb.Store<vector<float16_t, 4> >(((800u * idx) + 160u), (float16_t(0.0h)).xxxx);
- tint_symbol_18(sb, ((800u * idx) + 168u), float2x2((0.0f).xx, (0.0f).xx));
- tint_symbol_19(sb, ((800u * idx) + 192u), float2x3((0.0f).xxx, (0.0f).xxx));
- tint_symbol_20(sb, ((800u * idx) + 224u), float2x4((0.0f).xxxx, (0.0f).xxxx));
- tint_symbol_21(sb, ((800u * idx) + 256u), float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
- tint_symbol_22(sb, ((800u * idx) + 288u), float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
- tint_symbol_23(sb, ((800u * idx) + 336u), float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
- tint_symbol_24(sb, ((800u * idx) + 384u), float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
- tint_symbol_25(sb, ((800u * idx) + 416u), float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
- tint_symbol_26(sb, ((800u * idx) + 480u), float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
- tint_symbol_27(sb, ((800u * idx) + 544u), matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
- tint_symbol_28(sb, ((800u * idx) + 552u), matrix<float16_t, 2, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
- tint_symbol_29(sb, ((800u * idx) + 568u), matrix<float16_t, 2, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
- tint_symbol_30(sb, ((800u * idx) + 584u), matrix<float16_t, 3, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
- tint_symbol_31(sb, ((800u * idx) + 600u), matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
- tint_symbol_32(sb, ((800u * idx) + 624u), matrix<float16_t, 3, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
- tint_symbol_33(sb, ((800u * idx) + 648u), matrix<float16_t, 4, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
- tint_symbol_34(sb, ((800u * idx) + 664u), matrix<float16_t, 4, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
- tint_symbol_35(sb, ((800u * idx) + 696u), matrix<float16_t, 4, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
- const float3 tint_symbol_38[2] = (float3[2])0;
- tint_symbol_36(sb, ((800u * idx) + 736u), tint_symbol_38);
- const matrix<float16_t, 4, 2> tint_symbol_39[2] = (matrix<float16_t, 4, 2>[2])0;
- tint_symbol_37(sb, ((800u * idx) + 768u), tint_symbol_39);
+ sb_store_16(((800u * idx) + 168u), float2x2((0.0f).xx, (0.0f).xx));
+ sb_store_17(((800u * idx) + 192u), float2x3((0.0f).xxx, (0.0f).xxx));
+ sb_store_18(((800u * idx) + 224u), float2x4((0.0f).xxxx, (0.0f).xxxx));
+ sb_store_19(((800u * idx) + 256u), float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
+ sb_store_20(((800u * idx) + 288u), float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
+ sb_store_21(((800u * idx) + 336u), float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
+ sb_store_22(((800u * idx) + 384u), float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
+ sb_store_23(((800u * idx) + 416u), float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
+ sb_store_24(((800u * idx) + 480u), float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
+ sb_store_25(((800u * idx) + 544u), matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
+ sb_store_26(((800u * idx) + 552u), matrix<float16_t, 2, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
+ sb_store_27(((800u * idx) + 568u), matrix<float16_t, 2, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
+ sb_store_28(((800u * idx) + 584u), matrix<float16_t, 3, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
+ sb_store_29(((800u * idx) + 600u), matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
+ sb_store_30(((800u * idx) + 624u), matrix<float16_t, 3, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
+ sb_store_31(((800u * idx) + 648u), matrix<float16_t, 4, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
+ sb_store_32(((800u * idx) + 664u), matrix<float16_t, 4, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
+ sb_store_33(((800u * idx) + 696u), matrix<float16_t, 4, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
+ const float3 tint_symbol_2[2] = (float3[2])0;
+ sb_store_34(((800u * idx) + 736u), tint_symbol_2);
+ const matrix<float16_t, 4, 2> tint_symbol_3[2] = (matrix<float16_t, 4, 2>[2])0;
+ sb_store_35(((800u * idx) + 768u), tint_symbol_3);
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/static_index/read.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/static_index/read.wgsl.expected.dxc.hlsl
index 49b16b2..4bcc90c 100644
--- a/test/tint/buffer/storage/static_index/read.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/static_index/read.wgsl.expected.dxc.hlsl
@@ -5,64 +5,64 @@
ByteAddressBuffer sb : register(t0, space0);
-float2x2 tint_symbol_12(ByteAddressBuffer buffer, uint offset) {
- return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
+float2x2 sb_load_12(uint offset) {
+ return float2x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))));
}
-float2x3 tint_symbol_13(ByteAddressBuffer buffer, uint offset) {
- return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
+float2x3 sb_load_13(uint offset) {
+ return float2x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))));
}
-float2x4 tint_symbol_14(ByteAddressBuffer buffer, uint offset) {
- return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
+float2x4 sb_load_14(uint offset) {
+ return float2x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))));
}
-float3x2 tint_symbol_15(ByteAddressBuffer buffer, uint offset) {
- return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
+float3x2 sb_load_15(uint offset) {
+ return float3x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))));
}
-float3x3 tint_symbol_16(ByteAddressBuffer buffer, uint offset) {
- return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
+float3x3 sb_load_16(uint offset) {
+ return float3x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))));
}
-float3x4 tint_symbol_17(ByteAddressBuffer buffer, uint offset) {
- return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
+float3x4 sb_load_17(uint offset) {
+ return float3x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))));
}
-float4x2 tint_symbol_18(ByteAddressBuffer buffer, uint offset) {
- return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
+float4x2 sb_load_18(uint offset) {
+ return float4x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))), asfloat(sb.Load2((offset + 24u))));
}
-float4x3 tint_symbol_19(ByteAddressBuffer buffer, uint offset) {
- return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
+float4x3 sb_load_19(uint offset) {
+ return float4x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))), asfloat(sb.Load3((offset + 48u))));
}
-float4x4 tint_symbol_20(ByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 sb_load_20(uint offset) {
+ return float4x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))), asfloat(sb.Load4((offset + 48u))));
}
-typedef float3 tint_symbol_21_ret[2];
-tint_symbol_21_ret tint_symbol_21(ByteAddressBuffer buffer, uint offset) {
+typedef float3 sb_load_21_ret[2];
+sb_load_21_ret sb_load_21(uint offset) {
float3 arr[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- arr[i] = asfloat(buffer.Load3((offset + (i * 16u))));
+ arr[i] = asfloat(sb.Load3((offset + (i * 16u))));
}
}
return arr;
}
-Inner tint_symbol_22(ByteAddressBuffer buffer, uint offset) {
- const Inner tint_symbol_24 = {asint(buffer.Load((offset + 0u))), asfloat(buffer.Load((offset + 4u)))};
- return tint_symbol_24;
+Inner sb_load_22(uint offset) {
+ const Inner tint_symbol = {asint(sb.Load((offset + 0u))), asfloat(sb.Load((offset + 4u)))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_23_ret[4];
-tint_symbol_23_ret tint_symbol_23(ByteAddressBuffer buffer, uint offset) {
+typedef Inner sb_load_23_ret[4];
+sb_load_23_ret sb_load_23(uint offset) {
Inner arr_1[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_22(buffer, (offset + (i_1 * 8u)));
+ arr_1[i_1] = sb_load_22((offset + (i_1 * 8u)));
}
}
return arr_1;
@@ -82,17 +82,17 @@
const float4 vec4_f32 = asfloat(sb.Load4(96u));
const int4 vec4_i32 = asint(sb.Load4(112u));
const uint4 vec4_u32 = sb.Load4(128u);
- const float2x2 mat2x2_f32 = tint_symbol_12(sb, 144u);
- const float2x3 mat2x3_f32 = tint_symbol_13(sb, 160u);
- const float2x4 mat2x4_f32 = tint_symbol_14(sb, 192u);
- const float3x2 mat3x2_f32 = tint_symbol_15(sb, 224u);
- const float3x3 mat3x3_f32 = tint_symbol_16(sb, 256u);
- const float3x4 mat3x4_f32 = tint_symbol_17(sb, 304u);
- const float4x2 mat4x2_f32 = tint_symbol_18(sb, 352u);
- const float4x3 mat4x3_f32 = tint_symbol_19(sb, 384u);
- const float4x4 mat4x4_f32 = tint_symbol_20(sb, 448u);
- const float3 arr2_vec3_f32[2] = tint_symbol_21(sb, 512u);
- const Inner struct_inner = tint_symbol_22(sb, 544u);
- const Inner array_struct_inner[4] = tint_symbol_23(sb, 552u);
+ const float2x2 mat2x2_f32 = sb_load_12(144u);
+ const float2x3 mat2x3_f32 = sb_load_13(160u);
+ const float2x4 mat2x4_f32 = sb_load_14(192u);
+ const float3x2 mat3x2_f32 = sb_load_15(224u);
+ const float3x3 mat3x3_f32 = sb_load_16(256u);
+ const float3x4 mat3x4_f32 = sb_load_17(304u);
+ const float4x2 mat4x2_f32 = sb_load_18(352u);
+ const float4x3 mat4x3_f32 = sb_load_19(384u);
+ const float4x4 mat4x4_f32 = sb_load_20(448u);
+ const float3 arr2_vec3_f32[2] = sb_load_21(512u);
+ const Inner struct_inner = sb_load_22(544u);
+ const Inner array_struct_inner[4] = sb_load_23(552u);
return;
}
diff --git a/test/tint/buffer/storage/static_index/read.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/static_index/read.wgsl.expected.fxc.hlsl
index 49b16b2..4bcc90c 100644
--- a/test/tint/buffer/storage/static_index/read.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/static_index/read.wgsl.expected.fxc.hlsl
@@ -5,64 +5,64 @@
ByteAddressBuffer sb : register(t0, space0);
-float2x2 tint_symbol_12(ByteAddressBuffer buffer, uint offset) {
- return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
+float2x2 sb_load_12(uint offset) {
+ return float2x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))));
}
-float2x3 tint_symbol_13(ByteAddressBuffer buffer, uint offset) {
- return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
+float2x3 sb_load_13(uint offset) {
+ return float2x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))));
}
-float2x4 tint_symbol_14(ByteAddressBuffer buffer, uint offset) {
- return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
+float2x4 sb_load_14(uint offset) {
+ return float2x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))));
}
-float3x2 tint_symbol_15(ByteAddressBuffer buffer, uint offset) {
- return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
+float3x2 sb_load_15(uint offset) {
+ return float3x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))));
}
-float3x3 tint_symbol_16(ByteAddressBuffer buffer, uint offset) {
- return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
+float3x3 sb_load_16(uint offset) {
+ return float3x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))));
}
-float3x4 tint_symbol_17(ByteAddressBuffer buffer, uint offset) {
- return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
+float3x4 sb_load_17(uint offset) {
+ return float3x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))));
}
-float4x2 tint_symbol_18(ByteAddressBuffer buffer, uint offset) {
- return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
+float4x2 sb_load_18(uint offset) {
+ return float4x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))), asfloat(sb.Load2((offset + 24u))));
}
-float4x3 tint_symbol_19(ByteAddressBuffer buffer, uint offset) {
- return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
+float4x3 sb_load_19(uint offset) {
+ return float4x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))), asfloat(sb.Load3((offset + 48u))));
}
-float4x4 tint_symbol_20(ByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 sb_load_20(uint offset) {
+ return float4x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))), asfloat(sb.Load4((offset + 48u))));
}
-typedef float3 tint_symbol_21_ret[2];
-tint_symbol_21_ret tint_symbol_21(ByteAddressBuffer buffer, uint offset) {
+typedef float3 sb_load_21_ret[2];
+sb_load_21_ret sb_load_21(uint offset) {
float3 arr[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- arr[i] = asfloat(buffer.Load3((offset + (i * 16u))));
+ arr[i] = asfloat(sb.Load3((offset + (i * 16u))));
}
}
return arr;
}
-Inner tint_symbol_22(ByteAddressBuffer buffer, uint offset) {
- const Inner tint_symbol_24 = {asint(buffer.Load((offset + 0u))), asfloat(buffer.Load((offset + 4u)))};
- return tint_symbol_24;
+Inner sb_load_22(uint offset) {
+ const Inner tint_symbol = {asint(sb.Load((offset + 0u))), asfloat(sb.Load((offset + 4u)))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_23_ret[4];
-tint_symbol_23_ret tint_symbol_23(ByteAddressBuffer buffer, uint offset) {
+typedef Inner sb_load_23_ret[4];
+sb_load_23_ret sb_load_23(uint offset) {
Inner arr_1[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_22(buffer, (offset + (i_1 * 8u)));
+ arr_1[i_1] = sb_load_22((offset + (i_1 * 8u)));
}
}
return arr_1;
@@ -82,17 +82,17 @@
const float4 vec4_f32 = asfloat(sb.Load4(96u));
const int4 vec4_i32 = asint(sb.Load4(112u));
const uint4 vec4_u32 = sb.Load4(128u);
- const float2x2 mat2x2_f32 = tint_symbol_12(sb, 144u);
- const float2x3 mat2x3_f32 = tint_symbol_13(sb, 160u);
- const float2x4 mat2x4_f32 = tint_symbol_14(sb, 192u);
- const float3x2 mat3x2_f32 = tint_symbol_15(sb, 224u);
- const float3x3 mat3x3_f32 = tint_symbol_16(sb, 256u);
- const float3x4 mat3x4_f32 = tint_symbol_17(sb, 304u);
- const float4x2 mat4x2_f32 = tint_symbol_18(sb, 352u);
- const float4x3 mat4x3_f32 = tint_symbol_19(sb, 384u);
- const float4x4 mat4x4_f32 = tint_symbol_20(sb, 448u);
- const float3 arr2_vec3_f32[2] = tint_symbol_21(sb, 512u);
- const Inner struct_inner = tint_symbol_22(sb, 544u);
- const Inner array_struct_inner[4] = tint_symbol_23(sb, 552u);
+ const float2x2 mat2x2_f32 = sb_load_12(144u);
+ const float2x3 mat2x3_f32 = sb_load_13(160u);
+ const float2x4 mat2x4_f32 = sb_load_14(192u);
+ const float3x2 mat3x2_f32 = sb_load_15(224u);
+ const float3x3 mat3x3_f32 = sb_load_16(256u);
+ const float3x4 mat3x4_f32 = sb_load_17(304u);
+ const float4x2 mat4x2_f32 = sb_load_18(352u);
+ const float4x3 mat4x3_f32 = sb_load_19(384u);
+ const float4x4 mat4x4_f32 = sb_load_20(448u);
+ const float3 arr2_vec3_f32[2] = sb_load_21(512u);
+ const Inner struct_inner = sb_load_22(544u);
+ const Inner array_struct_inner[4] = sb_load_23(552u);
return;
}
diff --git a/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.dxc.hlsl
index e0be8a3..b5b0abf 100644
--- a/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.dxc.hlsl
@@ -6,111 +6,111 @@
ByteAddressBuffer sb : register(t0, space0);
-float2x2 tint_symbol_16(ByteAddressBuffer buffer, uint offset) {
- return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
+float2x2 sb_load_16(uint offset) {
+ return float2x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))));
}
-float2x3 tint_symbol_17(ByteAddressBuffer buffer, uint offset) {
- return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
+float2x3 sb_load_17(uint offset) {
+ return float2x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))));
}
-float2x4 tint_symbol_18(ByteAddressBuffer buffer, uint offset) {
- return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
+float2x4 sb_load_18(uint offset) {
+ return float2x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))));
}
-float3x2 tint_symbol_19(ByteAddressBuffer buffer, uint offset) {
- return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
+float3x2 sb_load_19(uint offset) {
+ return float3x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))));
}
-float3x3 tint_symbol_20(ByteAddressBuffer buffer, uint offset) {
- return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
+float3x3 sb_load_20(uint offset) {
+ return float3x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))));
}
-float3x4 tint_symbol_21(ByteAddressBuffer buffer, uint offset) {
- return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
+float3x4 sb_load_21(uint offset) {
+ return float3x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))));
}
-float4x2 tint_symbol_22(ByteAddressBuffer buffer, uint offset) {
- return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
+float4x2 sb_load_22(uint offset) {
+ return float4x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))), asfloat(sb.Load2((offset + 24u))));
}
-float4x3 tint_symbol_23(ByteAddressBuffer buffer, uint offset) {
- return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
+float4x3 sb_load_23(uint offset) {
+ return float4x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))), asfloat(sb.Load3((offset + 48u))));
}
-float4x4 tint_symbol_24(ByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 sb_load_24(uint offset) {
+ return float4x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))), asfloat(sb.Load4((offset + 48u))));
}
-matrix<float16_t, 2, 2> tint_symbol_25(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 2, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)));
+matrix<float16_t, 2, 2> sb_load_25(uint offset) {
+ return matrix<float16_t, 2, 2>(sb.Load<vector<float16_t, 2> >((offset + 0u)), sb.Load<vector<float16_t, 2> >((offset + 4u)));
}
-matrix<float16_t, 2, 3> tint_symbol_26(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 2, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)));
+matrix<float16_t, 2, 3> sb_load_26(uint offset) {
+ return matrix<float16_t, 2, 3>(sb.Load<vector<float16_t, 3> >((offset + 0u)), sb.Load<vector<float16_t, 3> >((offset + 8u)));
}
-matrix<float16_t, 2, 4> tint_symbol_27(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 2, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)));
+matrix<float16_t, 2, 4> sb_load_27(uint offset) {
+ return matrix<float16_t, 2, 4>(sb.Load<vector<float16_t, 4> >((offset + 0u)), sb.Load<vector<float16_t, 4> >((offset + 8u)));
}
-matrix<float16_t, 3, 2> tint_symbol_28(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 3, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)), buffer.Load<vector<float16_t, 2> >((offset + 8u)));
+matrix<float16_t, 3, 2> sb_load_28(uint offset) {
+ return matrix<float16_t, 3, 2>(sb.Load<vector<float16_t, 2> >((offset + 0u)), sb.Load<vector<float16_t, 2> >((offset + 4u)), sb.Load<vector<float16_t, 2> >((offset + 8u)));
}
-matrix<float16_t, 3, 3> tint_symbol_29(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 3, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), buffer.Load<vector<float16_t, 3> >((offset + 16u)));
+matrix<float16_t, 3, 3> sb_load_29(uint offset) {
+ return matrix<float16_t, 3, 3>(sb.Load<vector<float16_t, 3> >((offset + 0u)), sb.Load<vector<float16_t, 3> >((offset + 8u)), sb.Load<vector<float16_t, 3> >((offset + 16u)));
}
-matrix<float16_t, 3, 4> tint_symbol_30(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 3, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)), buffer.Load<vector<float16_t, 4> >((offset + 16u)));
+matrix<float16_t, 3, 4> sb_load_30(uint offset) {
+ return matrix<float16_t, 3, 4>(sb.Load<vector<float16_t, 4> >((offset + 0u)), sb.Load<vector<float16_t, 4> >((offset + 8u)), sb.Load<vector<float16_t, 4> >((offset + 16u)));
}
-matrix<float16_t, 4, 2> tint_symbol_31(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 4, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)), buffer.Load<vector<float16_t, 2> >((offset + 8u)), buffer.Load<vector<float16_t, 2> >((offset + 12u)));
+matrix<float16_t, 4, 2> sb_load_31(uint offset) {
+ return matrix<float16_t, 4, 2>(sb.Load<vector<float16_t, 2> >((offset + 0u)), sb.Load<vector<float16_t, 2> >((offset + 4u)), sb.Load<vector<float16_t, 2> >((offset + 8u)), sb.Load<vector<float16_t, 2> >((offset + 12u)));
}
-matrix<float16_t, 4, 3> tint_symbol_32(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 4, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), buffer.Load<vector<float16_t, 3> >((offset + 16u)), buffer.Load<vector<float16_t, 3> >((offset + 24u)));
+matrix<float16_t, 4, 3> sb_load_32(uint offset) {
+ return matrix<float16_t, 4, 3>(sb.Load<vector<float16_t, 3> >((offset + 0u)), sb.Load<vector<float16_t, 3> >((offset + 8u)), sb.Load<vector<float16_t, 3> >((offset + 16u)), sb.Load<vector<float16_t, 3> >((offset + 24u)));
}
-matrix<float16_t, 4, 4> tint_symbol_33(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 4, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)), buffer.Load<vector<float16_t, 4> >((offset + 16u)), buffer.Load<vector<float16_t, 4> >((offset + 24u)));
+matrix<float16_t, 4, 4> sb_load_33(uint offset) {
+ return matrix<float16_t, 4, 4>(sb.Load<vector<float16_t, 4> >((offset + 0u)), sb.Load<vector<float16_t, 4> >((offset + 8u)), sb.Load<vector<float16_t, 4> >((offset + 16u)), sb.Load<vector<float16_t, 4> >((offset + 24u)));
}
-typedef float3 tint_symbol_34_ret[2];
-tint_symbol_34_ret tint_symbol_34(ByteAddressBuffer buffer, uint offset) {
+typedef float3 sb_load_34_ret[2];
+sb_load_34_ret sb_load_34(uint offset) {
float3 arr[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- arr[i] = asfloat(buffer.Load3((offset + (i * 16u))));
+ arr[i] = asfloat(sb.Load3((offset + (i * 16u))));
}
}
return arr;
}
-typedef matrix<float16_t, 4, 2> tint_symbol_35_ret[2];
-tint_symbol_35_ret tint_symbol_35(ByteAddressBuffer buffer, uint offset) {
+typedef matrix<float16_t, 4, 2> sb_load_35_ret[2];
+sb_load_35_ret sb_load_35(uint offset) {
matrix<float16_t, 4, 2> arr_1[2] = (matrix<float16_t, 4, 2>[2])0;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_31(buffer, (offset + (i_1 * 16u)));
+ arr_1[i_1] = sb_load_31((offset + (i_1 * 16u)));
}
}
return arr_1;
}
-Inner tint_symbol_36(ByteAddressBuffer buffer, uint offset) {
- const Inner tint_symbol_38 = {asint(buffer.Load((offset + 0u))), asfloat(buffer.Load((offset + 4u))), buffer.Load<float16_t>((offset + 8u))};
- return tint_symbol_38;
+Inner sb_load_36(uint offset) {
+ const Inner tint_symbol = {asint(sb.Load((offset + 0u))), asfloat(sb.Load((offset + 4u))), sb.Load<float16_t>((offset + 8u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_37_ret[4];
-tint_symbol_37_ret tint_symbol_37(ByteAddressBuffer buffer, uint offset) {
+typedef Inner sb_load_37_ret[4];
+sb_load_37_ret sb_load_37(uint offset) {
Inner arr_2[4] = (Inner[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_2[i_2] = tint_symbol_36(buffer, (offset + (i_2 * 12u)));
+ arr_2[i_2] = sb_load_36((offset + (i_2 * 12u)));
}
}
return arr_2;
@@ -134,27 +134,27 @@
const int4 vec4_i32 = asint(sb.Load4(128u));
const uint4 vec4_u32 = sb.Load4(144u);
const vector<float16_t, 4> vec4_f16 = sb.Load<vector<float16_t, 4> >(160u);
- const float2x2 mat2x2_f32 = tint_symbol_16(sb, 168u);
- const float2x3 mat2x3_f32 = tint_symbol_17(sb, 192u);
- const float2x4 mat2x4_f32 = tint_symbol_18(sb, 224u);
- const float3x2 mat3x2_f32 = tint_symbol_19(sb, 256u);
- const float3x3 mat3x3_f32 = tint_symbol_20(sb, 288u);
- const float3x4 mat3x4_f32 = tint_symbol_21(sb, 336u);
- const float4x2 mat4x2_f32 = tint_symbol_22(sb, 384u);
- const float4x3 mat4x3_f32 = tint_symbol_23(sb, 416u);
- const float4x4 mat4x4_f32 = tint_symbol_24(sb, 480u);
- const matrix<float16_t, 2, 2> mat2x2_f16 = tint_symbol_25(sb, 544u);
- const matrix<float16_t, 2, 3> mat2x3_f16 = tint_symbol_26(sb, 552u);
- const matrix<float16_t, 2, 4> mat2x4_f16 = tint_symbol_27(sb, 568u);
- const matrix<float16_t, 3, 2> mat3x2_f16 = tint_symbol_28(sb, 584u);
- const matrix<float16_t, 3, 3> mat3x3_f16 = tint_symbol_29(sb, 600u);
- const matrix<float16_t, 3, 4> mat3x4_f16 = tint_symbol_30(sb, 624u);
- const matrix<float16_t, 4, 2> mat4x2_f16 = tint_symbol_31(sb, 648u);
- const matrix<float16_t, 4, 3> mat4x3_f16 = tint_symbol_32(sb, 664u);
- const matrix<float16_t, 4, 4> mat4x4_f16 = tint_symbol_33(sb, 696u);
- const float3 arr2_vec3_f32[2] = tint_symbol_34(sb, 736u);
- const matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = tint_symbol_35(sb, 768u);
- const Inner struct_inner = tint_symbol_36(sb, 800u);
- const Inner array_struct_inner[4] = tint_symbol_37(sb, 812u);
+ const float2x2 mat2x2_f32 = sb_load_16(168u);
+ const float2x3 mat2x3_f32 = sb_load_17(192u);
+ const float2x4 mat2x4_f32 = sb_load_18(224u);
+ const float3x2 mat3x2_f32 = sb_load_19(256u);
+ const float3x3 mat3x3_f32 = sb_load_20(288u);
+ const float3x4 mat3x4_f32 = sb_load_21(336u);
+ const float4x2 mat4x2_f32 = sb_load_22(384u);
+ const float4x3 mat4x3_f32 = sb_load_23(416u);
+ const float4x4 mat4x4_f32 = sb_load_24(480u);
+ const matrix<float16_t, 2, 2> mat2x2_f16 = sb_load_25(544u);
+ const matrix<float16_t, 2, 3> mat2x3_f16 = sb_load_26(552u);
+ const matrix<float16_t, 2, 4> mat2x4_f16 = sb_load_27(568u);
+ const matrix<float16_t, 3, 2> mat3x2_f16 = sb_load_28(584u);
+ const matrix<float16_t, 3, 3> mat3x3_f16 = sb_load_29(600u);
+ const matrix<float16_t, 3, 4> mat3x4_f16 = sb_load_30(624u);
+ const matrix<float16_t, 4, 2> mat4x2_f16 = sb_load_31(648u);
+ const matrix<float16_t, 4, 3> mat4x3_f16 = sb_load_32(664u);
+ const matrix<float16_t, 4, 4> mat4x4_f16 = sb_load_33(696u);
+ const float3 arr2_vec3_f32[2] = sb_load_34(736u);
+ const matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = sb_load_35(768u);
+ const Inner struct_inner = sb_load_36(800u);
+ const Inner array_struct_inner[4] = sb_load_37(812u);
return;
}
diff --git a/test/tint/buffer/storage/static_index/write.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/static_index/write.wgsl.expected.dxc.hlsl
index 9bf75ff..9f3c51d 100644
--- a/test/tint/buffer/storage/static_index/write.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/static_index/write.wgsl.expected.dxc.hlsl
@@ -5,79 +5,79 @@
RWByteAddressBuffer sb : register(u0, space0);
-void tint_symbol_12(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void sb_store_12(uint offset, float2x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
}
-void tint_symbol_13(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void sb_store_13(uint offset, float2x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_14(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void sb_store_14(uint offset, float2x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_15(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
+void sb_store_15(uint offset, float3x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
+ sb.Store2((offset + 16u), asuint(value[2u]));
}
-void tint_symbol_16(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+void sb_store_16(uint offset, float3x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
+ sb.Store3((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_17(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+void sb_store_17(uint offset, float3x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
+ sb.Store4((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_18(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+void sb_store_18(uint offset, float4x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
+ sb.Store2((offset + 16u), asuint(value[2u]));
+ sb.Store2((offset + 24u), asuint(value[3u]));
}
-void tint_symbol_19(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+void sb_store_19(uint offset, float4x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
+ sb.Store3((offset + 32u), asuint(value[2u]));
+ sb.Store3((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_20(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void sb_store_20(uint offset, float4x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
+ sb.Store4((offset + 32u), asuint(value[2u]));
+ sb.Store4((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_21(RWByteAddressBuffer buffer, uint offset, float3 value[2]) {
+void sb_store_21(uint offset, float3 value[2]) {
float3 array_1[2] = value;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- buffer.Store3((offset + (i * 16u)), asuint(array_1[i]));
+ sb.Store3((offset + (i * 16u)), asuint(array_1[i]));
}
}
}
-void tint_symbol_22(RWByteAddressBuffer buffer, uint offset, Inner value) {
- buffer.Store((offset + 0u), asuint(value.scalar_i32));
- buffer.Store((offset + 4u), asuint(value.scalar_f32));
+void sb_store_22(uint offset, Inner value) {
+ sb.Store((offset + 0u), asuint(value.scalar_i32));
+ sb.Store((offset + 4u), asuint(value.scalar_f32));
}
-void tint_symbol_23(RWByteAddressBuffer buffer, uint offset, Inner value[4]) {
+void sb_store_23(uint offset, Inner value[4]) {
Inner array_2[4] = value;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- tint_symbol_22(buffer, (offset + (i_1 * 8u)), array_2[i_1]);
+ sb_store_22((offset + (i_1 * 8u)), array_2[i_1]);
}
}
}
@@ -96,20 +96,20 @@
sb.Store4(96u, asuint((0.0f).xxxx));
sb.Store4(112u, asuint((0).xxxx));
sb.Store4(128u, asuint((0u).xxxx));
- tint_symbol_12(sb, 144u, float2x2((0.0f).xx, (0.0f).xx));
- tint_symbol_13(sb, 160u, float2x3((0.0f).xxx, (0.0f).xxx));
- tint_symbol_14(sb, 192u, float2x4((0.0f).xxxx, (0.0f).xxxx));
- tint_symbol_15(sb, 224u, float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
- tint_symbol_16(sb, 256u, float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
- tint_symbol_17(sb, 304u, float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
- tint_symbol_18(sb, 352u, float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
- tint_symbol_19(sb, 384u, float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
- tint_symbol_20(sb, 448u, float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
- const float3 tint_symbol_24[2] = (float3[2])0;
- tint_symbol_21(sb, 512u, tint_symbol_24);
- const Inner tint_symbol_25 = (Inner)0;
- tint_symbol_22(sb, 544u, tint_symbol_25);
- const Inner tint_symbol_26[4] = (Inner[4])0;
- tint_symbol_23(sb, 552u, tint_symbol_26);
+ sb_store_12(144u, float2x2((0.0f).xx, (0.0f).xx));
+ sb_store_13(160u, float2x3((0.0f).xxx, (0.0f).xxx));
+ sb_store_14(192u, float2x4((0.0f).xxxx, (0.0f).xxxx));
+ sb_store_15(224u, float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
+ sb_store_16(256u, float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
+ sb_store_17(304u, float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
+ sb_store_18(352u, float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
+ sb_store_19(384u, float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
+ sb_store_20(448u, float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
+ const float3 tint_symbol[2] = (float3[2])0;
+ sb_store_21(512u, tint_symbol);
+ const Inner tint_symbol_1 = (Inner)0;
+ sb_store_22(544u, tint_symbol_1);
+ const Inner tint_symbol_2[4] = (Inner[4])0;
+ sb_store_23(552u, tint_symbol_2);
return;
}
diff --git a/test/tint/buffer/storage/static_index/write.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/static_index/write.wgsl.expected.fxc.hlsl
index 9bf75ff..9f3c51d 100644
--- a/test/tint/buffer/storage/static_index/write.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/static_index/write.wgsl.expected.fxc.hlsl
@@ -5,79 +5,79 @@
RWByteAddressBuffer sb : register(u0, space0);
-void tint_symbol_12(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void sb_store_12(uint offset, float2x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
}
-void tint_symbol_13(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void sb_store_13(uint offset, float2x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_14(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void sb_store_14(uint offset, float2x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_15(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
+void sb_store_15(uint offset, float3x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
+ sb.Store2((offset + 16u), asuint(value[2u]));
}
-void tint_symbol_16(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+void sb_store_16(uint offset, float3x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
+ sb.Store3((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_17(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+void sb_store_17(uint offset, float3x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
+ sb.Store4((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_18(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+void sb_store_18(uint offset, float4x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
+ sb.Store2((offset + 16u), asuint(value[2u]));
+ sb.Store2((offset + 24u), asuint(value[3u]));
}
-void tint_symbol_19(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+void sb_store_19(uint offset, float4x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
+ sb.Store3((offset + 32u), asuint(value[2u]));
+ sb.Store3((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_20(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void sb_store_20(uint offset, float4x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
+ sb.Store4((offset + 32u), asuint(value[2u]));
+ sb.Store4((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_21(RWByteAddressBuffer buffer, uint offset, float3 value[2]) {
+void sb_store_21(uint offset, float3 value[2]) {
float3 array_1[2] = value;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- buffer.Store3((offset + (i * 16u)), asuint(array_1[i]));
+ sb.Store3((offset + (i * 16u)), asuint(array_1[i]));
}
}
}
-void tint_symbol_22(RWByteAddressBuffer buffer, uint offset, Inner value) {
- buffer.Store((offset + 0u), asuint(value.scalar_i32));
- buffer.Store((offset + 4u), asuint(value.scalar_f32));
+void sb_store_22(uint offset, Inner value) {
+ sb.Store((offset + 0u), asuint(value.scalar_i32));
+ sb.Store((offset + 4u), asuint(value.scalar_f32));
}
-void tint_symbol_23(RWByteAddressBuffer buffer, uint offset, Inner value[4]) {
+void sb_store_23(uint offset, Inner value[4]) {
Inner array_2[4] = value;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- tint_symbol_22(buffer, (offset + (i_1 * 8u)), array_2[i_1]);
+ sb_store_22((offset + (i_1 * 8u)), array_2[i_1]);
}
}
}
@@ -96,20 +96,20 @@
sb.Store4(96u, asuint((0.0f).xxxx));
sb.Store4(112u, asuint((0).xxxx));
sb.Store4(128u, asuint((0u).xxxx));
- tint_symbol_12(sb, 144u, float2x2((0.0f).xx, (0.0f).xx));
- tint_symbol_13(sb, 160u, float2x3((0.0f).xxx, (0.0f).xxx));
- tint_symbol_14(sb, 192u, float2x4((0.0f).xxxx, (0.0f).xxxx));
- tint_symbol_15(sb, 224u, float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
- tint_symbol_16(sb, 256u, float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
- tint_symbol_17(sb, 304u, float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
- tint_symbol_18(sb, 352u, float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
- tint_symbol_19(sb, 384u, float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
- tint_symbol_20(sb, 448u, float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
- const float3 tint_symbol_24[2] = (float3[2])0;
- tint_symbol_21(sb, 512u, tint_symbol_24);
- const Inner tint_symbol_25 = (Inner)0;
- tint_symbol_22(sb, 544u, tint_symbol_25);
- const Inner tint_symbol_26[4] = (Inner[4])0;
- tint_symbol_23(sb, 552u, tint_symbol_26);
+ sb_store_12(144u, float2x2((0.0f).xx, (0.0f).xx));
+ sb_store_13(160u, float2x3((0.0f).xxx, (0.0f).xxx));
+ sb_store_14(192u, float2x4((0.0f).xxxx, (0.0f).xxxx));
+ sb_store_15(224u, float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
+ sb_store_16(256u, float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
+ sb_store_17(304u, float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
+ sb_store_18(352u, float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
+ sb_store_19(384u, float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
+ sb_store_20(448u, float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
+ const float3 tint_symbol[2] = (float3[2])0;
+ sb_store_21(512u, tint_symbol);
+ const Inner tint_symbol_1 = (Inner)0;
+ sb_store_22(544u, tint_symbol_1);
+ const Inner tint_symbol_2[4] = (Inner[4])0;
+ sb_store_23(552u, tint_symbol_2);
return;
}
diff --git a/test/tint/buffer/storage/static_index/write_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/static_index/write_f16.wgsl.expected.dxc.hlsl
index 121700a..0ff24fe 100644
--- a/test/tint/buffer/storage/static_index/write_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/static_index/write_f16.wgsl.expected.dxc.hlsl
@@ -6,143 +6,143 @@
RWByteAddressBuffer sb : register(u0, space0);
-void tint_symbol_16(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void sb_store_16(uint offset, float2x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
}
-void tint_symbol_17(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void sb_store_17(uint offset, float2x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_18(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void sb_store_18(uint offset, float2x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_19(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
+void sb_store_19(uint offset, float3x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
+ sb.Store2((offset + 16u), asuint(value[2u]));
}
-void tint_symbol_20(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+void sb_store_20(uint offset, float3x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
+ sb.Store3((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_21(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+void sb_store_21(uint offset, float3x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
+ sb.Store4((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_22(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+void sb_store_22(uint offset, float4x2 value) {
+ sb.Store2((offset + 0u), asuint(value[0u]));
+ sb.Store2((offset + 8u), asuint(value[1u]));
+ sb.Store2((offset + 16u), asuint(value[2u]));
+ sb.Store2((offset + 24u), asuint(value[3u]));
}
-void tint_symbol_23(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+void sb_store_23(uint offset, float4x3 value) {
+ sb.Store3((offset + 0u), asuint(value[0u]));
+ sb.Store3((offset + 16u), asuint(value[1u]));
+ sb.Store3((offset + 32u), asuint(value[2u]));
+ sb.Store3((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_24(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void sb_store_24(uint offset, float4x4 value) {
+ sb.Store4((offset + 0u), asuint(value[0u]));
+ sb.Store4((offset + 16u), asuint(value[1u]));
+ sb.Store4((offset + 32u), asuint(value[2u]));
+ sb.Store4((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_25(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+void sb_store_25(uint offset, matrix<float16_t, 2, 2> value) {
+ sb.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
}
-void tint_symbol_26(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+void sb_store_26(uint offset, matrix<float16_t, 2, 3> value) {
+ sb.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
}
-void tint_symbol_27(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+void sb_store_27(uint offset, matrix<float16_t, 2, 4> value) {
+ sb.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
}
-void tint_symbol_28(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
- buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
+void sb_store_28(uint offset, matrix<float16_t, 3, 2> value) {
+ sb.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+ sb.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
}
-void tint_symbol_29(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
+void sb_store_29(uint offset, matrix<float16_t, 3, 3> value) {
+ sb.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+ sb.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
}
-void tint_symbol_30(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
+void sb_store_30(uint offset, matrix<float16_t, 3, 4> value) {
+ sb.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+ sb.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
}
-void tint_symbol_31(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
- buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
- buffer.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
+void sb_store_31(uint offset, matrix<float16_t, 4, 2> value) {
+ sb.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+ sb.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
+ sb.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
}
-void tint_symbol_32(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
- buffer.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
+void sb_store_32(uint offset, matrix<float16_t, 4, 3> value) {
+ sb.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+ sb.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
+ sb.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
}
-void tint_symbol_33(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
- buffer.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
+void sb_store_33(uint offset, matrix<float16_t, 4, 4> value) {
+ sb.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ sb.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+ sb.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
+ sb.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
}
-void tint_symbol_34(RWByteAddressBuffer buffer, uint offset, float3 value[2]) {
+void sb_store_34(uint offset, float3 value[2]) {
float3 array_1[2] = value;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- buffer.Store3((offset + (i * 16u)), asuint(array_1[i]));
+ sb.Store3((offset + (i * 16u)), asuint(array_1[i]));
}
}
}
-void tint_symbol_35(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value[2]) {
+void sb_store_35(uint offset, matrix<float16_t, 4, 2> value[2]) {
matrix<float16_t, 4, 2> array_2[2] = value;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- tint_symbol_31(buffer, (offset + (i_1 * 16u)), array_2[i_1]);
+ sb_store_31((offset + (i_1 * 16u)), array_2[i_1]);
}
}
}
-void tint_symbol_36(RWByteAddressBuffer buffer, uint offset, Inner value) {
- buffer.Store((offset + 0u), asuint(value.scalar_i32));
- buffer.Store((offset + 4u), asuint(value.scalar_f32));
- buffer.Store<float16_t>((offset + 8u), value.scalar_f16);
+void sb_store_36(uint offset, Inner value) {
+ sb.Store((offset + 0u), asuint(value.scalar_i32));
+ sb.Store((offset + 4u), asuint(value.scalar_f32));
+ sb.Store<float16_t>((offset + 8u), value.scalar_f16);
}
-void tint_symbol_37(RWByteAddressBuffer buffer, uint offset, Inner value[4]) {
+void sb_store_37(uint offset, Inner value[4]) {
Inner array_3[4] = value;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- tint_symbol_36(buffer, (offset + (i_2 * 12u)), array_3[i_2]);
+ sb_store_36((offset + (i_2 * 12u)), array_3[i_2]);
}
}
}
@@ -165,31 +165,31 @@
sb.Store4(128u, asuint((0).xxxx));
sb.Store4(144u, asuint((0u).xxxx));
sb.Store<vector<float16_t, 4> >(160u, (float16_t(0.0h)).xxxx);
- tint_symbol_16(sb, 168u, float2x2((0.0f).xx, (0.0f).xx));
- tint_symbol_17(sb, 192u, float2x3((0.0f).xxx, (0.0f).xxx));
- tint_symbol_18(sb, 224u, float2x4((0.0f).xxxx, (0.0f).xxxx));
- tint_symbol_19(sb, 256u, float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
- tint_symbol_20(sb, 288u, float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
- tint_symbol_21(sb, 336u, float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
- tint_symbol_22(sb, 384u, float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
- tint_symbol_23(sb, 416u, float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
- tint_symbol_24(sb, 480u, float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
- tint_symbol_25(sb, 544u, matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
- tint_symbol_26(sb, 552u, matrix<float16_t, 2, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
- tint_symbol_27(sb, 568u, matrix<float16_t, 2, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
- tint_symbol_28(sb, 584u, matrix<float16_t, 3, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
- tint_symbol_29(sb, 600u, matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
- tint_symbol_30(sb, 624u, matrix<float16_t, 3, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
- tint_symbol_31(sb, 648u, matrix<float16_t, 4, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
- tint_symbol_32(sb, 664u, matrix<float16_t, 4, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
- tint_symbol_33(sb, 696u, matrix<float16_t, 4, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
- const float3 tint_symbol_38[2] = (float3[2])0;
- tint_symbol_34(sb, 736u, tint_symbol_38);
- const matrix<float16_t, 4, 2> tint_symbol_39[2] = (matrix<float16_t, 4, 2>[2])0;
- tint_symbol_35(sb, 768u, tint_symbol_39);
- const Inner tint_symbol_40 = (Inner)0;
- tint_symbol_36(sb, 800u, tint_symbol_40);
- const Inner tint_symbol_41[4] = (Inner[4])0;
- tint_symbol_37(sb, 812u, tint_symbol_41);
+ sb_store_16(168u, float2x2((0.0f).xx, (0.0f).xx));
+ sb_store_17(192u, float2x3((0.0f).xxx, (0.0f).xxx));
+ sb_store_18(224u, float2x4((0.0f).xxxx, (0.0f).xxxx));
+ sb_store_19(256u, float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
+ sb_store_20(288u, float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
+ sb_store_21(336u, float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
+ sb_store_22(384u, float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
+ sb_store_23(416u, float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
+ sb_store_24(480u, float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
+ sb_store_25(544u, matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
+ sb_store_26(552u, matrix<float16_t, 2, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
+ sb_store_27(568u, matrix<float16_t, 2, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
+ sb_store_28(584u, matrix<float16_t, 3, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
+ sb_store_29(600u, matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
+ sb_store_30(624u, matrix<float16_t, 3, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
+ sb_store_31(648u, matrix<float16_t, 4, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
+ sb_store_32(664u, matrix<float16_t, 4, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
+ sb_store_33(696u, matrix<float16_t, 4, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
+ const float3 tint_symbol[2] = (float3[2])0;
+ sb_store_34(736u, tint_symbol);
+ const matrix<float16_t, 4, 2> tint_symbol_1[2] = (matrix<float16_t, 4, 2>[2])0;
+ sb_store_35(768u, tint_symbol_1);
+ const Inner tint_symbol_2 = (Inner)0;
+ sb_store_36(800u, tint_symbol_2);
+ const Inner tint_symbol_3[4] = (Inner[4])0;
+ sb_store_37(812u, tint_symbol_3);
return;
}
diff --git a/test/tint/buffer/storage/types/array4_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/array4_f16.wgsl.expected.dxc.hlsl
index ac93313..41743d1 100644
--- a/test/tint/buffer/storage/types/array4_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/array4_f16.wgsl.expected.dxc.hlsl
@@ -1,21 +1,21 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float16_t value[4]) {
+void tint_symbol_1_store(uint offset, float16_t value[4]) {
float16_t array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- buffer.Store<float16_t>((offset + (i * 2u)), array_1[i]);
+ tint_symbol_1.Store<float16_t>((offset + (i * 2u)), array_1[i]);
}
}
}
-typedef float16_t tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
+typedef float16_t tint_symbol_load_ret[4];
+tint_symbol_load_ret tint_symbol_load(uint offset) {
float16_t arr[4] = (float16_t[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = buffer.Load<float16_t>((offset + (i_1 * 2u)));
+ arr[i_1] = tint_symbol.Load<float16_t>((offset + (i_1 * 2u)));
}
}
return arr;
@@ -23,6 +23,6 @@
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/array4_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/array4_f32.wgsl.expected.dxc.hlsl
index b1f25b2..23ced88 100644
--- a/test/tint/buffer/storage/types/array4_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/array4_f32.wgsl.expected.dxc.hlsl
@@ -1,21 +1,21 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float value[4]) {
+void tint_symbol_1_store(uint offset, float value[4]) {
float array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- buffer.Store((offset + (i * 4u)), asuint(array_1[i]));
+ tint_symbol_1.Store((offset + (i * 4u)), asuint(array_1[i]));
}
}
}
-typedef float tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
+typedef float tint_symbol_load_ret[4];
+tint_symbol_load_ret tint_symbol_load(uint offset) {
float arr[4] = (float[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = asfloat(buffer.Load((offset + (i_1 * 4u))));
+ arr[i_1] = asfloat(tint_symbol.Load((offset + (i_1 * 4u))));
}
}
return arr;
@@ -23,6 +23,6 @@
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/array4_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/types/array4_f32.wgsl.expected.fxc.hlsl
index b1f25b2..23ced88 100644
--- a/test/tint/buffer/storage/types/array4_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/types/array4_f32.wgsl.expected.fxc.hlsl
@@ -1,21 +1,21 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float value[4]) {
+void tint_symbol_1_store(uint offset, float value[4]) {
float array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- buffer.Store((offset + (i * 4u)), asuint(array_1[i]));
+ tint_symbol_1.Store((offset + (i * 4u)), asuint(array_1[i]));
}
}
}
-typedef float tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
+typedef float tint_symbol_load_ret[4];
+tint_symbol_load_ret tint_symbol_load(uint offset) {
float arr[4] = (float[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = asfloat(buffer.Load((offset + (i_1 * 4u))));
+ arr[i_1] = asfloat(tint_symbol.Load((offset + (i_1 * 4u))));
}
}
return arr;
@@ -23,6 +23,6 @@
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.dxc.hlsl
index 3730b98..b49afff 100644
--- a/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+void tint_symbol_1_store(uint offset, matrix<float16_t, 2, 2> value) {
+ tint_symbol_1.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ tint_symbol_1.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
}
-matrix<float16_t, 2, 2> tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 2, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)));
+matrix<float16_t, 2, 2> tint_symbol_load(uint offset) {
+ return matrix<float16_t, 2, 2>(tint_symbol.Load<vector<float16_t, 2> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 2> >((offset + 4u)));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.dxc.hlsl
index a1fc1b6..3d23849 100644
--- a/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void tint_symbol_1_store(uint offset, float2x2 value) {
+ tint_symbol_1.Store2((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store2((offset + 8u), asuint(value[1u]));
}
-float2x2 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
+float2x2 tint_symbol_load(uint offset) {
+ return float2x2(asfloat(tint_symbol.Load2((offset + 0u))), asfloat(tint_symbol.Load2((offset + 8u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.fxc.hlsl
index a1fc1b6..3d23849 100644
--- a/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.fxc.hlsl
@@ -1,17 +1,17 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void tint_symbol_1_store(uint offset, float2x2 value) {
+ tint_symbol_1.Store2((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store2((offset + 8u), asuint(value[1u]));
}
-float2x2 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
+float2x2 tint_symbol_load(uint offset) {
+ return float2x2(asfloat(tint_symbol.Load2((offset + 0u))), asfloat(tint_symbol.Load2((offset + 8u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.dxc.hlsl
index 0411bf3..868abbd 100644
--- a/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+void tint_symbol_1_store(uint offset, matrix<float16_t, 2, 3> value) {
+ tint_symbol_1.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ tint_symbol_1.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
}
-matrix<float16_t, 2, 3> tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 2, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)));
+matrix<float16_t, 2, 3> tint_symbol_load(uint offset) {
+ return matrix<float16_t, 2, 3>(tint_symbol.Load<vector<float16_t, 3> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 3> >((offset + 8u)));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.dxc.hlsl
index baff4c5..a45a2fc 100644
--- a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void tint_symbol_1_store(uint offset, float2x3 value) {
+ tint_symbol_1.Store3((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store3((offset + 16u), asuint(value[1u]));
}
-float2x3 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
+float2x3 tint_symbol_load(uint offset) {
+ return float2x3(asfloat(tint_symbol.Load3((offset + 0u))), asfloat(tint_symbol.Load3((offset + 16u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.fxc.hlsl
index baff4c5..a45a2fc 100644
--- a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.fxc.hlsl
@@ -1,17 +1,17 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void tint_symbol_1_store(uint offset, float2x3 value) {
+ tint_symbol_1.Store3((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store3((offset + 16u), asuint(value[1u]));
}
-float2x3 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
+float2x3 tint_symbol_load(uint offset) {
+ return float2x3(asfloat(tint_symbol.Load3((offset + 0u))), asfloat(tint_symbol.Load3((offset + 16u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.dxc.hlsl
index ac4058f..f431553 100644
--- a/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+void tint_symbol_1_store(uint offset, matrix<float16_t, 2, 4> value) {
+ tint_symbol_1.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ tint_symbol_1.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
}
-matrix<float16_t, 2, 4> tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 2, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)));
+matrix<float16_t, 2, 4> tint_symbol_load(uint offset) {
+ return matrix<float16_t, 2, 4>(tint_symbol.Load<vector<float16_t, 4> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 4> >((offset + 8u)));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.dxc.hlsl
index 2776e89..ed2a9ba 100644
--- a/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void tint_symbol_1_store(uint offset, float2x4 value) {
+ tint_symbol_1.Store4((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store4((offset + 16u), asuint(value[1u]));
}
-float2x4 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
+float2x4 tint_symbol_load(uint offset) {
+ return float2x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.fxc.hlsl
index 2776e89..ed2a9ba 100644
--- a/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.fxc.hlsl
@@ -1,17 +1,17 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void tint_symbol_1_store(uint offset, float2x4 value) {
+ tint_symbol_1.Store4((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store4((offset + 16u), asuint(value[1u]));
}
-float2x4 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
+float2x4 tint_symbol_load(uint offset) {
+ return float2x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.dxc.hlsl
index f5984ae..e2bbcc3 100644
--- a/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.dxc.hlsl
@@ -1,18 +1,18 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
- buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
+void tint_symbol_1_store(uint offset, matrix<float16_t, 3, 2> value) {
+ tint_symbol_1.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ tint_symbol_1.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+ tint_symbol_1.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
}
-matrix<float16_t, 3, 2> tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 3, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)), buffer.Load<vector<float16_t, 2> >((offset + 8u)));
+matrix<float16_t, 3, 2> tint_symbol_load(uint offset) {
+ return matrix<float16_t, 3, 2>(tint_symbol.Load<vector<float16_t, 2> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 2> >((offset + 4u)), tint_symbol.Load<vector<float16_t, 2> >((offset + 8u)));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.dxc.hlsl
index 31d606b..6b0f9b3 100644
--- a/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.dxc.hlsl
@@ -1,18 +1,18 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
+void tint_symbol_1_store(uint offset, float3x2 value) {
+ tint_symbol_1.Store2((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store2((offset + 8u), asuint(value[1u]));
+ tint_symbol_1.Store2((offset + 16u), asuint(value[2u]));
}
-float3x2 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
+float3x2 tint_symbol_load(uint offset) {
+ return float3x2(asfloat(tint_symbol.Load2((offset + 0u))), asfloat(tint_symbol.Load2((offset + 8u))), asfloat(tint_symbol.Load2((offset + 16u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.fxc.hlsl
index 31d606b..6b0f9b3 100644
--- a/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.fxc.hlsl
@@ -1,18 +1,18 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
+void tint_symbol_1_store(uint offset, float3x2 value) {
+ tint_symbol_1.Store2((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store2((offset + 8u), asuint(value[1u]));
+ tint_symbol_1.Store2((offset + 16u), asuint(value[2u]));
}
-float3x2 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
+float3x2 tint_symbol_load(uint offset) {
+ return float3x2(asfloat(tint_symbol.Load2((offset + 0u))), asfloat(tint_symbol.Load2((offset + 8u))), asfloat(tint_symbol.Load2((offset + 16u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.dxc.hlsl
index 01aa7ad..f5a51d5 100644
--- a/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.dxc.hlsl
@@ -1,18 +1,18 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
+void tint_symbol_1_store(uint offset, matrix<float16_t, 3, 3> value) {
+ tint_symbol_1.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ tint_symbol_1.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+ tint_symbol_1.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
}
-matrix<float16_t, 3, 3> tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 3, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), buffer.Load<vector<float16_t, 3> >((offset + 16u)));
+matrix<float16_t, 3, 3> tint_symbol_load(uint offset) {
+ return matrix<float16_t, 3, 3>(tint_symbol.Load<vector<float16_t, 3> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 3> >((offset + 8u)), tint_symbol.Load<vector<float16_t, 3> >((offset + 16u)));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.dxc.hlsl
index 086d35a..9be27c9 100644
--- a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.dxc.hlsl
@@ -1,18 +1,18 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+void tint_symbol_1_store(uint offset, float3x3 value) {
+ tint_symbol_1.Store3((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store3((offset + 16u), asuint(value[1u]));
+ tint_symbol_1.Store3((offset + 32u), asuint(value[2u]));
}
-float3x3 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
+float3x3 tint_symbol_load(uint offset) {
+ return float3x3(asfloat(tint_symbol.Load3((offset + 0u))), asfloat(tint_symbol.Load3((offset + 16u))), asfloat(tint_symbol.Load3((offset + 32u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.fxc.hlsl
index 086d35a..9be27c9 100644
--- a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.fxc.hlsl
@@ -1,18 +1,18 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+void tint_symbol_1_store(uint offset, float3x3 value) {
+ tint_symbol_1.Store3((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store3((offset + 16u), asuint(value[1u]));
+ tint_symbol_1.Store3((offset + 32u), asuint(value[2u]));
}
-float3x3 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float3x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))));
+float3x3 tint_symbol_load(uint offset) {
+ return float3x3(asfloat(tint_symbol.Load3((offset + 0u))), asfloat(tint_symbol.Load3((offset + 16u))), asfloat(tint_symbol.Load3((offset + 32u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.dxc.hlsl
index c788def..d85296a 100644
--- a/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.dxc.hlsl
@@ -1,18 +1,18 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
+void tint_symbol_1_store(uint offset, matrix<float16_t, 3, 4> value) {
+ tint_symbol_1.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ tint_symbol_1.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+ tint_symbol_1.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
}
-matrix<float16_t, 3, 4> tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 3, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)), buffer.Load<vector<float16_t, 4> >((offset + 16u)));
+matrix<float16_t, 3, 4> tint_symbol_load(uint offset) {
+ return matrix<float16_t, 3, 4>(tint_symbol.Load<vector<float16_t, 4> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 4> >((offset + 8u)), tint_symbol.Load<vector<float16_t, 4> >((offset + 16u)));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.dxc.hlsl
index 2d8f11b..fd2ea5b 100644
--- a/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.dxc.hlsl
@@ -1,18 +1,18 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+void tint_symbol_1_store(uint offset, float3x4 value) {
+ tint_symbol_1.Store4((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store4((offset + 16u), asuint(value[1u]));
+ tint_symbol_1.Store4((offset + 32u), asuint(value[2u]));
}
-float3x4 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
+float3x4 tint_symbol_load(uint offset) {
+ return float3x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))), asfloat(tint_symbol.Load4((offset + 32u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.fxc.hlsl
index 2d8f11b..fd2ea5b 100644
--- a/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.fxc.hlsl
@@ -1,18 +1,18 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+void tint_symbol_1_store(uint offset, float3x4 value) {
+ tint_symbol_1.Store4((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store4((offset + 16u), asuint(value[1u]));
+ tint_symbol_1.Store4((offset + 32u), asuint(value[2u]));
}
-float3x4 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float3x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))));
+float3x4 tint_symbol_load(uint offset) {
+ return float3x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))), asfloat(tint_symbol.Load4((offset + 32u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.dxc.hlsl
index 8dce844..f31fc10 100644
--- a/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.dxc.hlsl
@@ -1,19 +1,19 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
- buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
- buffer.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
+void tint_symbol_1_store(uint offset, matrix<float16_t, 4, 2> value) {
+ tint_symbol_1.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ tint_symbol_1.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+ tint_symbol_1.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
+ tint_symbol_1.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
}
-matrix<float16_t, 4, 2> tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 4, 2>(buffer.Load<vector<float16_t, 2> >((offset + 0u)), buffer.Load<vector<float16_t, 2> >((offset + 4u)), buffer.Load<vector<float16_t, 2> >((offset + 8u)), buffer.Load<vector<float16_t, 2> >((offset + 12u)));
+matrix<float16_t, 4, 2> tint_symbol_load(uint offset) {
+ return matrix<float16_t, 4, 2>(tint_symbol.Load<vector<float16_t, 2> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 2> >((offset + 4u)), tint_symbol.Load<vector<float16_t, 2> >((offset + 8u)), tint_symbol.Load<vector<float16_t, 2> >((offset + 12u)));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.dxc.hlsl
index a8ca4f5..747312e 100644
--- a/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.dxc.hlsl
@@ -1,19 +1,19 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+void tint_symbol_1_store(uint offset, float4x2 value) {
+ tint_symbol_1.Store2((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store2((offset + 8u), asuint(value[1u]));
+ tint_symbol_1.Store2((offset + 16u), asuint(value[2u]));
+ tint_symbol_1.Store2((offset + 24u), asuint(value[3u]));
}
-float4x2 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
+float4x2 tint_symbol_load(uint offset) {
+ return float4x2(asfloat(tint_symbol.Load2((offset + 0u))), asfloat(tint_symbol.Load2((offset + 8u))), asfloat(tint_symbol.Load2((offset + 16u))), asfloat(tint_symbol.Load2((offset + 24u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.fxc.hlsl
index a8ca4f5..747312e 100644
--- a/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.fxc.hlsl
@@ -1,19 +1,19 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+void tint_symbol_1_store(uint offset, float4x2 value) {
+ tint_symbol_1.Store2((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store2((offset + 8u), asuint(value[1u]));
+ tint_symbol_1.Store2((offset + 16u), asuint(value[2u]));
+ tint_symbol_1.Store2((offset + 24u), asuint(value[3u]));
}
-float4x2 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float4x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))), asfloat(buffer.Load2((offset + 24u))));
+float4x2 tint_symbol_load(uint offset) {
+ return float4x2(asfloat(tint_symbol.Load2((offset + 0u))), asfloat(tint_symbol.Load2((offset + 8u))), asfloat(tint_symbol.Load2((offset + 16u))), asfloat(tint_symbol.Load2((offset + 24u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.dxc.hlsl
index 29a2a90..4d7ed8b 100644
--- a/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.dxc.hlsl
@@ -1,19 +1,19 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
- buffer.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
+void tint_symbol_1_store(uint offset, matrix<float16_t, 4, 3> value) {
+ tint_symbol_1.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ tint_symbol_1.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+ tint_symbol_1.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
+ tint_symbol_1.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
}
-matrix<float16_t, 4, 3> tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 4, 3>(buffer.Load<vector<float16_t, 3> >((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), buffer.Load<vector<float16_t, 3> >((offset + 16u)), buffer.Load<vector<float16_t, 3> >((offset + 24u)));
+matrix<float16_t, 4, 3> tint_symbol_load(uint offset) {
+ return matrix<float16_t, 4, 3>(tint_symbol.Load<vector<float16_t, 3> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 3> >((offset + 8u)), tint_symbol.Load<vector<float16_t, 3> >((offset + 16u)), tint_symbol.Load<vector<float16_t, 3> >((offset + 24u)));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.dxc.hlsl
index 44051da..0d14370 100644
--- a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.dxc.hlsl
@@ -1,19 +1,19 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+void tint_symbol_1_store(uint offset, float4x3 value) {
+ tint_symbol_1.Store3((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store3((offset + 16u), asuint(value[1u]));
+ tint_symbol_1.Store3((offset + 32u), asuint(value[2u]));
+ tint_symbol_1.Store3((offset + 48u), asuint(value[3u]));
}
-float4x3 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
+float4x3 tint_symbol_load(uint offset) {
+ return float4x3(asfloat(tint_symbol.Load3((offset + 0u))), asfloat(tint_symbol.Load3((offset + 16u))), asfloat(tint_symbol.Load3((offset + 32u))), asfloat(tint_symbol.Load3((offset + 48u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.fxc.hlsl
index 44051da..0d14370 100644
--- a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.fxc.hlsl
@@ -1,19 +1,19 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+void tint_symbol_1_store(uint offset, float4x3 value) {
+ tint_symbol_1.Store3((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store3((offset + 16u), asuint(value[1u]));
+ tint_symbol_1.Store3((offset + 32u), asuint(value[2u]));
+ tint_symbol_1.Store3((offset + 48u), asuint(value[3u]));
}
-float4x3 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float4x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), asfloat(buffer.Load3((offset + 32u))), asfloat(buffer.Load3((offset + 48u))));
+float4x3 tint_symbol_load(uint offset) {
+ return float4x3(asfloat(tint_symbol.Load3((offset + 0u))), asfloat(tint_symbol.Load3((offset + 16u))), asfloat(tint_symbol.Load3((offset + 32u))), asfloat(tint_symbol.Load3((offset + 48u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.dxc.hlsl
index 3931c45..2bd3ee5 100644
--- a/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.dxc.hlsl
@@ -1,19 +1,19 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
- buffer.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
+void tint_symbol_1_store(uint offset, matrix<float16_t, 4, 4> value) {
+ tint_symbol_1.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ tint_symbol_1.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+ tint_symbol_1.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
+ tint_symbol_1.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
}
-matrix<float16_t, 4, 4> tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 4, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)), buffer.Load<vector<float16_t, 4> >((offset + 16u)), buffer.Load<vector<float16_t, 4> >((offset + 24u)));
+matrix<float16_t, 4, 4> tint_symbol_load(uint offset) {
+ return matrix<float16_t, 4, 4>(tint_symbol.Load<vector<float16_t, 4> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 4> >((offset + 8u)), tint_symbol.Load<vector<float16_t, 4> >((offset + 16u)), tint_symbol.Load<vector<float16_t, 4> >((offset + 24u)));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.dxc.hlsl
index e818c09..f40d5de 100644
--- a/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.dxc.hlsl
@@ -1,19 +1,19 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void tint_symbol_1_store(uint offset, float4x4 value) {
+ tint_symbol_1.Store4((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store4((offset + 16u), asuint(value[1u]));
+ tint_symbol_1.Store4((offset + 32u), asuint(value[2u]));
+ tint_symbol_1.Store4((offset + 48u), asuint(value[3u]));
}
-float4x4 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 tint_symbol_load(uint offset) {
+ return float4x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))), asfloat(tint_symbol.Load4((offset + 32u))), asfloat(tint_symbol.Load4((offset + 48u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.fxc.hlsl
index e818c09..f40d5de 100644
--- a/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.fxc.hlsl
@@ -1,19 +1,19 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void tint_symbol_1_store(uint offset, float4x4 value) {
+ tint_symbol_1.Store4((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store4((offset + 16u), asuint(value[1u]));
+ tint_symbol_1.Store4((offset + 32u), asuint(value[2u]));
+ tint_symbol_1.Store4((offset + 48u), asuint(value[3u]));
}
-float4x4 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 tint_symbol_load(uint offset) {
+ return float4x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))), asfloat(tint_symbol.Load4((offset + 32u))), asfloat(tint_symbol.Load4((offset + 48u))));
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/buffer/storage/types/struct_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/struct_f16.wgsl.expected.dxc.hlsl
index 9a48940..0c177ff 100644
--- a/test/tint/buffer/storage/types/struct_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/struct_f16.wgsl.expected.dxc.hlsl
@@ -10,38 +10,38 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-matrix<float16_t, 2, 4> tint_symbol_6(ByteAddressBuffer buffer, uint offset) {
- return matrix<float16_t, 2, 4>(buffer.Load<vector<float16_t, 4> >((offset + 0u)), buffer.Load<vector<float16_t, 4> >((offset + 8u)));
+matrix<float16_t, 2, 4> tint_symbol_load_4(uint offset) {
+ return matrix<float16_t, 2, 4>(tint_symbol.Load<vector<float16_t, 4> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 4> >((offset + 8u)));
}
-Inner tint_symbol_3(ByteAddressBuffer buffer, uint offset) {
- const Inner tint_symbol_14 = {buffer.Load<float16_t>((offset + 0u)), buffer.Load<vector<float16_t, 3> >((offset + 8u)), tint_symbol_6(buffer, (offset + 16u))};
- return tint_symbol_14;
+Inner tint_symbol_load_1(uint offset) {
+ const Inner tint_symbol_2 = {tint_symbol.Load<float16_t>((offset + 0u)), tint_symbol.Load<vector<float16_t, 3> >((offset + 8u)), tint_symbol_load_4((offset + 16u))};
+ return tint_symbol_2;
}
-S tint_symbol_2(ByteAddressBuffer buffer, uint offset) {
- const S tint_symbol_15 = {tint_symbol_3(buffer, (offset + 0u))};
- return tint_symbol_15;
+S tint_symbol_load(uint offset) {
+ const S tint_symbol_3 = {tint_symbol_load_1((offset + 0u))};
+ return tint_symbol_3;
}
-void tint_symbol_12(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+void tint_symbol_1_store_4(uint offset, matrix<float16_t, 2, 4> value) {
+ tint_symbol_1.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ tint_symbol_1.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
}
-void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, Inner value) {
- buffer.Store<float16_t>((offset + 0u), value.scalar_f16);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value.vec3_f16);
- tint_symbol_12(buffer, (offset + 16u), value.mat2x4_f16);
+void tint_symbol_1_store_1(uint offset, Inner value) {
+ tint_symbol_1.Store<float16_t>((offset + 0u), value.scalar_f16);
+ tint_symbol_1.Store<vector<float16_t, 3> >((offset + 8u), value.vec3_f16);
+ tint_symbol_1_store_4((offset + 16u), value.mat2x4_f16);
}
-void tint_symbol_8(RWByteAddressBuffer buffer, uint offset, S value) {
- tint_symbol_9(buffer, (offset + 0u), value.inner);
+void tint_symbol_1_store(uint offset, S value) {
+ tint_symbol_1_store_1((offset + 0u), value.inner);
}
[numthreads(1, 1, 1)]
void main() {
- const S t = tint_symbol_2(tint_symbol, 0u);
- tint_symbol_8(tint_symbol_1, 0u, t);
+ const S t = tint_symbol_load(0u);
+ tint_symbol_1_store(0u, t);
return;
}
diff --git a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.dxc.hlsl
index b32317f..6e8702b 100644
--- a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.dxc.hlsl
@@ -10,38 +10,38 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-float2x4 tint_symbol_6(ByteAddressBuffer buffer, uint offset) {
- return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
+float2x4 tint_symbol_load_4(uint offset) {
+ return float2x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))));
}
-Inner tint_symbol_3(ByteAddressBuffer buffer, uint offset) {
- const Inner tint_symbol_14 = {asfloat(buffer.Load((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), tint_symbol_6(buffer, (offset + 32u))};
- return tint_symbol_14;
+Inner tint_symbol_load_1(uint offset) {
+ const Inner tint_symbol_2 = {asfloat(tint_symbol.Load((offset + 0u))), asfloat(tint_symbol.Load3((offset + 16u))), tint_symbol_load_4((offset + 32u))};
+ return tint_symbol_2;
}
-S tint_symbol_2(ByteAddressBuffer buffer, uint offset) {
- const S tint_symbol_15 = {tint_symbol_3(buffer, (offset + 0u))};
- return tint_symbol_15;
+S tint_symbol_load(uint offset) {
+ const S tint_symbol_3 = {tint_symbol_load_1((offset + 0u))};
+ return tint_symbol_3;
}
-void tint_symbol_12(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void tint_symbol_1_store_4(uint offset, float2x4 value) {
+ tint_symbol_1.Store4((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store4((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, Inner value) {
- buffer.Store((offset + 0u), asuint(value.scalar_f32));
- buffer.Store3((offset + 16u), asuint(value.vec3_f32));
- tint_symbol_12(buffer, (offset + 32u), value.mat2x4_f32);
+void tint_symbol_1_store_1(uint offset, Inner value) {
+ tint_symbol_1.Store((offset + 0u), asuint(value.scalar_f32));
+ tint_symbol_1.Store3((offset + 16u), asuint(value.vec3_f32));
+ tint_symbol_1_store_4((offset + 32u), value.mat2x4_f32);
}
-void tint_symbol_8(RWByteAddressBuffer buffer, uint offset, S value) {
- tint_symbol_9(buffer, (offset + 0u), value.inner);
+void tint_symbol_1_store(uint offset, S value) {
+ tint_symbol_1_store_1((offset + 0u), value.inner);
}
[numthreads(1, 1, 1)]
void main() {
- const S t = tint_symbol_2(tint_symbol, 0u);
- tint_symbol_8(tint_symbol_1, 0u, t);
+ const S t = tint_symbol_load(0u);
+ tint_symbol_1_store(0u, t);
return;
}
diff --git a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.fxc.hlsl
index b32317f..6e8702b 100644
--- a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.fxc.hlsl
@@ -10,38 +10,38 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-float2x4 tint_symbol_6(ByteAddressBuffer buffer, uint offset) {
- return float2x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))));
+float2x4 tint_symbol_load_4(uint offset) {
+ return float2x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))));
}
-Inner tint_symbol_3(ByteAddressBuffer buffer, uint offset) {
- const Inner tint_symbol_14 = {asfloat(buffer.Load((offset + 0u))), asfloat(buffer.Load3((offset + 16u))), tint_symbol_6(buffer, (offset + 32u))};
- return tint_symbol_14;
+Inner tint_symbol_load_1(uint offset) {
+ const Inner tint_symbol_2 = {asfloat(tint_symbol.Load((offset + 0u))), asfloat(tint_symbol.Load3((offset + 16u))), tint_symbol_load_4((offset + 32u))};
+ return tint_symbol_2;
}
-S tint_symbol_2(ByteAddressBuffer buffer, uint offset) {
- const S tint_symbol_15 = {tint_symbol_3(buffer, (offset + 0u))};
- return tint_symbol_15;
+S tint_symbol_load(uint offset) {
+ const S tint_symbol_3 = {tint_symbol_load_1((offset + 0u))};
+ return tint_symbol_3;
}
-void tint_symbol_12(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void tint_symbol_1_store_4(uint offset, float2x4 value) {
+ tint_symbol_1.Store4((offset + 0u), asuint(value[0u]));
+ tint_symbol_1.Store4((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, Inner value) {
- buffer.Store((offset + 0u), asuint(value.scalar_f32));
- buffer.Store3((offset + 16u), asuint(value.vec3_f32));
- tint_symbol_12(buffer, (offset + 32u), value.mat2x4_f32);
+void tint_symbol_1_store_1(uint offset, Inner value) {
+ tint_symbol_1.Store((offset + 0u), asuint(value.scalar_f32));
+ tint_symbol_1.Store3((offset + 16u), asuint(value.vec3_f32));
+ tint_symbol_1_store_4((offset + 32u), value.mat2x4_f32);
}
-void tint_symbol_8(RWByteAddressBuffer buffer, uint offset, S value) {
- tint_symbol_9(buffer, (offset + 0u), value.inner);
+void tint_symbol_1_store(uint offset, S value) {
+ tint_symbol_1_store_1((offset + 0u), value.inner);
}
[numthreads(1, 1, 1)]
void main() {
- const S t = tint_symbol_2(tint_symbol, 0u);
- tint_symbol_8(tint_symbol_1, 0u, t);
+ const S t = tint_symbol_load(0u);
+ tint_symbol_1_store(0u, t);
return;
}
diff --git a/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.dxc.hlsl
index 4e80c66..35a9c30 100644
--- a/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.dxc.hlsl
@@ -6,85 +6,85 @@
uint idx : SV_GroupIndex;
};
-float2x2 tint_symbol_14(uint4 buffer[272], uint offset) {
+float2x2 ub_load_12(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = ub[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = ub[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-float2x3 tint_symbol_15(uint4 buffer[272], uint offset) {
+float2x3 ub_load_13(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float2x3(asfloat(ub[scalar_offset_2 / 4].xyz), asfloat(ub[scalar_offset_3 / 4].xyz));
}
-float2x4 tint_symbol_16(uint4 buffer[272], uint offset) {
+float2x4 ub_load_14(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]));
+ return float2x4(asfloat(ub[scalar_offset_4 / 4]), asfloat(ub[scalar_offset_5 / 4]));
}
-float3x2 tint_symbol_17(uint4 buffer[272], uint offset) {
+float3x2 ub_load_15(uint offset) {
const uint scalar_offset_6 = ((offset + 0u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_6 / 4];
+ uint4 ubo_load_2 = ub[scalar_offset_6 / 4];
const uint scalar_offset_7 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_7 / 4];
+ uint4 ubo_load_3 = ub[scalar_offset_7 / 4];
const uint scalar_offset_8 = ((offset + 16u)) / 4;
- uint4 ubo_load_4 = buffer[scalar_offset_8 / 4];
+ uint4 ubo_load_4 = ub[scalar_offset_8 / 4];
return float3x2(asfloat(((scalar_offset_6 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_7 & 2) ? ubo_load_3.zw : ubo_load_3.xy)), asfloat(((scalar_offset_8 & 2) ? ubo_load_4.zw : ubo_load_4.xy)));
}
-float3x3 tint_symbol_18(uint4 buffer[272], uint offset) {
+float3x3 ub_load_16(uint offset) {
const uint scalar_offset_9 = ((offset + 0u)) / 4;
const uint scalar_offset_10 = ((offset + 16u)) / 4;
const uint scalar_offset_11 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_9 / 4].xyz), asfloat(buffer[scalar_offset_10 / 4].xyz), asfloat(buffer[scalar_offset_11 / 4].xyz));
+ return float3x3(asfloat(ub[scalar_offset_9 / 4].xyz), asfloat(ub[scalar_offset_10 / 4].xyz), asfloat(ub[scalar_offset_11 / 4].xyz));
}
-float3x4 tint_symbol_19(uint4 buffer[272], uint offset) {
+float3x4 ub_load_17(uint offset) {
const uint scalar_offset_12 = ((offset + 0u)) / 4;
const uint scalar_offset_13 = ((offset + 16u)) / 4;
const uint scalar_offset_14 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset_12 / 4]), asfloat(buffer[scalar_offset_13 / 4]), asfloat(buffer[scalar_offset_14 / 4]));
+ return float3x4(asfloat(ub[scalar_offset_12 / 4]), asfloat(ub[scalar_offset_13 / 4]), asfloat(ub[scalar_offset_14 / 4]));
}
-float4x2 tint_symbol_20(uint4 buffer[272], uint offset) {
+float4x2 ub_load_18(uint offset) {
const uint scalar_offset_15 = ((offset + 0u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_5 = ub[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 8u)) / 4;
- uint4 ubo_load_6 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_6 = ub[scalar_offset_16 / 4];
const uint scalar_offset_17 = ((offset + 16u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_17 / 4];
+ uint4 ubo_load_7 = ub[scalar_offset_17 / 4];
const uint scalar_offset_18 = ((offset + 24u)) / 4;
- uint4 ubo_load_8 = buffer[scalar_offset_18 / 4];
+ uint4 ubo_load_8 = ub[scalar_offset_18 / 4];
return float4x2(asfloat(((scalar_offset_15 & 2) ? ubo_load_5.zw : ubo_load_5.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_6.zw : ubo_load_6.xy)), asfloat(((scalar_offset_17 & 2) ? ubo_load_7.zw : ubo_load_7.xy)), asfloat(((scalar_offset_18 & 2) ? ubo_load_8.zw : ubo_load_8.xy)));
}
-float4x3 tint_symbol_21(uint4 buffer[272], uint offset) {
+float4x3 ub_load_19(uint offset) {
const uint scalar_offset_19 = ((offset + 0u)) / 4;
const uint scalar_offset_20 = ((offset + 16u)) / 4;
const uint scalar_offset_21 = ((offset + 32u)) / 4;
const uint scalar_offset_22 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset_19 / 4].xyz), asfloat(buffer[scalar_offset_20 / 4].xyz), asfloat(buffer[scalar_offset_21 / 4].xyz), asfloat(buffer[scalar_offset_22 / 4].xyz));
+ return float4x3(asfloat(ub[scalar_offset_19 / 4].xyz), asfloat(ub[scalar_offset_20 / 4].xyz), asfloat(ub[scalar_offset_21 / 4].xyz), asfloat(ub[scalar_offset_22 / 4].xyz));
}
-float4x4 tint_symbol_22(uint4 buffer[272], uint offset) {
+float4x4 ub_load_20(uint offset) {
const uint scalar_offset_23 = ((offset + 0u)) / 4;
const uint scalar_offset_24 = ((offset + 16u)) / 4;
const uint scalar_offset_25 = ((offset + 32u)) / 4;
const uint scalar_offset_26 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset_23 / 4]), asfloat(buffer[scalar_offset_24 / 4]), asfloat(buffer[scalar_offset_25 / 4]), asfloat(buffer[scalar_offset_26 / 4]));
+ return float4x4(asfloat(ub[scalar_offset_23 / 4]), asfloat(ub[scalar_offset_24 / 4]), asfloat(ub[scalar_offset_25 / 4]), asfloat(ub[scalar_offset_26 / 4]));
}
-typedef float3 tint_symbol_23_ret[2];
-tint_symbol_23_ret tint_symbol_23(uint4 buffer[272], uint offset) {
+typedef float3 ub_load_21_ret[2];
+ub_load_21_ret ub_load_21(uint offset) {
float3 arr_1[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
const uint scalar_offset_27 = ((offset + (i * 16u))) / 4;
- arr_1[i] = asfloat(buffer[scalar_offset_27 / 4].xyz);
+ arr_1[i] = asfloat(ub[scalar_offset_27 / 4].xyz);
}
}
return arr_1;
@@ -118,16 +118,16 @@
const int4 vec4_i32 = asint(ub[scalar_offset_38 / 4]);
const uint scalar_offset_39 = (((544u * idx) + 128u)) / 4;
const uint4 vec4_u32 = ub[scalar_offset_39 / 4];
- const float2x2 mat2x2_f32 = tint_symbol_14(ub, ((544u * idx) + 144u));
- const float2x3 mat2x3_f32 = tint_symbol_15(ub, ((544u * idx) + 160u));
- const float2x4 mat2x4_f32 = tint_symbol_16(ub, ((544u * idx) + 192u));
- const float3x2 mat3x2_f32 = tint_symbol_17(ub, ((544u * idx) + 224u));
- const float3x3 mat3x3_f32 = tint_symbol_18(ub, ((544u * idx) + 256u));
- const float3x4 mat3x4_f32 = tint_symbol_19(ub, ((544u * idx) + 304u));
- const float4x2 mat4x2_f32 = tint_symbol_20(ub, ((544u * idx) + 352u));
- const float4x3 mat4x3_f32 = tint_symbol_21(ub, ((544u * idx) + 384u));
- const float4x4 mat4x4_f32 = tint_symbol_22(ub, ((544u * idx) + 448u));
- const float3 arr2_vec3_f32[2] = tint_symbol_23(ub, ((544u * idx) + 512u));
+ const float2x2 mat2x2_f32 = ub_load_12(((544u * idx) + 144u));
+ const float2x3 mat2x3_f32 = ub_load_13(((544u * idx) + 160u));
+ const float2x4 mat2x4_f32 = ub_load_14(((544u * idx) + 192u));
+ const float3x2 mat3x2_f32 = ub_load_15(((544u * idx) + 224u));
+ const float3x3 mat3x3_f32 = ub_load_16(((544u * idx) + 256u));
+ const float3x4 mat3x4_f32 = ub_load_17(((544u * idx) + 304u));
+ const float4x2 mat4x2_f32 = ub_load_18(((544u * idx) + 352u));
+ const float4x3 mat4x3_f32 = ub_load_19(((544u * idx) + 384u));
+ const float4x4 mat4x4_f32 = ub_load_20(((544u * idx) + 448u));
+ const float3 arr2_vec3_f32[2] = ub_load_21(((544u * idx) + 512u));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.fxc.hlsl
index 4e80c66..35a9c30 100644
--- a/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.fxc.hlsl
@@ -6,85 +6,85 @@
uint idx : SV_GroupIndex;
};
-float2x2 tint_symbol_14(uint4 buffer[272], uint offset) {
+float2x2 ub_load_12(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = ub[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = ub[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-float2x3 tint_symbol_15(uint4 buffer[272], uint offset) {
+float2x3 ub_load_13(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float2x3(asfloat(ub[scalar_offset_2 / 4].xyz), asfloat(ub[scalar_offset_3 / 4].xyz));
}
-float2x4 tint_symbol_16(uint4 buffer[272], uint offset) {
+float2x4 ub_load_14(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]));
+ return float2x4(asfloat(ub[scalar_offset_4 / 4]), asfloat(ub[scalar_offset_5 / 4]));
}
-float3x2 tint_symbol_17(uint4 buffer[272], uint offset) {
+float3x2 ub_load_15(uint offset) {
const uint scalar_offset_6 = ((offset + 0u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_6 / 4];
+ uint4 ubo_load_2 = ub[scalar_offset_6 / 4];
const uint scalar_offset_7 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_7 / 4];
+ uint4 ubo_load_3 = ub[scalar_offset_7 / 4];
const uint scalar_offset_8 = ((offset + 16u)) / 4;
- uint4 ubo_load_4 = buffer[scalar_offset_8 / 4];
+ uint4 ubo_load_4 = ub[scalar_offset_8 / 4];
return float3x2(asfloat(((scalar_offset_6 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_7 & 2) ? ubo_load_3.zw : ubo_load_3.xy)), asfloat(((scalar_offset_8 & 2) ? ubo_load_4.zw : ubo_load_4.xy)));
}
-float3x3 tint_symbol_18(uint4 buffer[272], uint offset) {
+float3x3 ub_load_16(uint offset) {
const uint scalar_offset_9 = ((offset + 0u)) / 4;
const uint scalar_offset_10 = ((offset + 16u)) / 4;
const uint scalar_offset_11 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_9 / 4].xyz), asfloat(buffer[scalar_offset_10 / 4].xyz), asfloat(buffer[scalar_offset_11 / 4].xyz));
+ return float3x3(asfloat(ub[scalar_offset_9 / 4].xyz), asfloat(ub[scalar_offset_10 / 4].xyz), asfloat(ub[scalar_offset_11 / 4].xyz));
}
-float3x4 tint_symbol_19(uint4 buffer[272], uint offset) {
+float3x4 ub_load_17(uint offset) {
const uint scalar_offset_12 = ((offset + 0u)) / 4;
const uint scalar_offset_13 = ((offset + 16u)) / 4;
const uint scalar_offset_14 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset_12 / 4]), asfloat(buffer[scalar_offset_13 / 4]), asfloat(buffer[scalar_offset_14 / 4]));
+ return float3x4(asfloat(ub[scalar_offset_12 / 4]), asfloat(ub[scalar_offset_13 / 4]), asfloat(ub[scalar_offset_14 / 4]));
}
-float4x2 tint_symbol_20(uint4 buffer[272], uint offset) {
+float4x2 ub_load_18(uint offset) {
const uint scalar_offset_15 = ((offset + 0u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_5 = ub[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 8u)) / 4;
- uint4 ubo_load_6 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_6 = ub[scalar_offset_16 / 4];
const uint scalar_offset_17 = ((offset + 16u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_17 / 4];
+ uint4 ubo_load_7 = ub[scalar_offset_17 / 4];
const uint scalar_offset_18 = ((offset + 24u)) / 4;
- uint4 ubo_load_8 = buffer[scalar_offset_18 / 4];
+ uint4 ubo_load_8 = ub[scalar_offset_18 / 4];
return float4x2(asfloat(((scalar_offset_15 & 2) ? ubo_load_5.zw : ubo_load_5.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_6.zw : ubo_load_6.xy)), asfloat(((scalar_offset_17 & 2) ? ubo_load_7.zw : ubo_load_7.xy)), asfloat(((scalar_offset_18 & 2) ? ubo_load_8.zw : ubo_load_8.xy)));
}
-float4x3 tint_symbol_21(uint4 buffer[272], uint offset) {
+float4x3 ub_load_19(uint offset) {
const uint scalar_offset_19 = ((offset + 0u)) / 4;
const uint scalar_offset_20 = ((offset + 16u)) / 4;
const uint scalar_offset_21 = ((offset + 32u)) / 4;
const uint scalar_offset_22 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset_19 / 4].xyz), asfloat(buffer[scalar_offset_20 / 4].xyz), asfloat(buffer[scalar_offset_21 / 4].xyz), asfloat(buffer[scalar_offset_22 / 4].xyz));
+ return float4x3(asfloat(ub[scalar_offset_19 / 4].xyz), asfloat(ub[scalar_offset_20 / 4].xyz), asfloat(ub[scalar_offset_21 / 4].xyz), asfloat(ub[scalar_offset_22 / 4].xyz));
}
-float4x4 tint_symbol_22(uint4 buffer[272], uint offset) {
+float4x4 ub_load_20(uint offset) {
const uint scalar_offset_23 = ((offset + 0u)) / 4;
const uint scalar_offset_24 = ((offset + 16u)) / 4;
const uint scalar_offset_25 = ((offset + 32u)) / 4;
const uint scalar_offset_26 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset_23 / 4]), asfloat(buffer[scalar_offset_24 / 4]), asfloat(buffer[scalar_offset_25 / 4]), asfloat(buffer[scalar_offset_26 / 4]));
+ return float4x4(asfloat(ub[scalar_offset_23 / 4]), asfloat(ub[scalar_offset_24 / 4]), asfloat(ub[scalar_offset_25 / 4]), asfloat(ub[scalar_offset_26 / 4]));
}
-typedef float3 tint_symbol_23_ret[2];
-tint_symbol_23_ret tint_symbol_23(uint4 buffer[272], uint offset) {
+typedef float3 ub_load_21_ret[2];
+ub_load_21_ret ub_load_21(uint offset) {
float3 arr_1[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
const uint scalar_offset_27 = ((offset + (i * 16u))) / 4;
- arr_1[i] = asfloat(buffer[scalar_offset_27 / 4].xyz);
+ arr_1[i] = asfloat(ub[scalar_offset_27 / 4].xyz);
}
}
return arr_1;
@@ -118,16 +118,16 @@
const int4 vec4_i32 = asint(ub[scalar_offset_38 / 4]);
const uint scalar_offset_39 = (((544u * idx) + 128u)) / 4;
const uint4 vec4_u32 = ub[scalar_offset_39 / 4];
- const float2x2 mat2x2_f32 = tint_symbol_14(ub, ((544u * idx) + 144u));
- const float2x3 mat2x3_f32 = tint_symbol_15(ub, ((544u * idx) + 160u));
- const float2x4 mat2x4_f32 = tint_symbol_16(ub, ((544u * idx) + 192u));
- const float3x2 mat3x2_f32 = tint_symbol_17(ub, ((544u * idx) + 224u));
- const float3x3 mat3x3_f32 = tint_symbol_18(ub, ((544u * idx) + 256u));
- const float3x4 mat3x4_f32 = tint_symbol_19(ub, ((544u * idx) + 304u));
- const float4x2 mat4x2_f32 = tint_symbol_20(ub, ((544u * idx) + 352u));
- const float4x3 mat4x3_f32 = tint_symbol_21(ub, ((544u * idx) + 384u));
- const float4x4 mat4x4_f32 = tint_symbol_22(ub, ((544u * idx) + 448u));
- const float3 arr2_vec3_f32[2] = tint_symbol_23(ub, ((544u * idx) + 512u));
+ const float2x2 mat2x2_f32 = ub_load_12(((544u * idx) + 144u));
+ const float2x3 mat2x3_f32 = ub_load_13(((544u * idx) + 160u));
+ const float2x4 mat2x4_f32 = ub_load_14(((544u * idx) + 192u));
+ const float3x2 mat3x2_f32 = ub_load_15(((544u * idx) + 224u));
+ const float3x3 mat3x3_f32 = ub_load_16(((544u * idx) + 256u));
+ const float3x4 mat3x4_f32 = ub_load_17(((544u * idx) + 304u));
+ const float4x2 mat4x2_f32 = ub_load_18(((544u * idx) + 352u));
+ const float4x3 mat4x3_f32 = ub_load_19(((544u * idx) + 384u));
+ const float4x4 mat4x4_f32 = ub_load_20(((544u * idx) + 448u));
+ const float3 arr2_vec3_f32[2] = ub_load_21(((544u * idx) + 512u));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/dynamic_index/read_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/dynamic_index/read_f16.wgsl.expected.dxc.hlsl
index 5ba1911..e6596be 100644
--- a/test/tint/buffer/uniform/dynamic_index/read_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/dynamic_index/read_f16.wgsl.expected.dxc.hlsl
@@ -6,240 +6,240 @@
uint idx : SV_GroupIndex;
};
-float2x2 tint_symbol_18(uint4 buffer[400], uint offset) {
+float2x2 ub_load_16(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = ub[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = ub[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-float2x3 tint_symbol_19(uint4 buffer[400], uint offset) {
+float2x3 ub_load_17(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float2x3(asfloat(ub[scalar_offset_2 / 4].xyz), asfloat(ub[scalar_offset_3 / 4].xyz));
}
-float2x4 tint_symbol_20(uint4 buffer[400], uint offset) {
+float2x4 ub_load_18(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]));
+ return float2x4(asfloat(ub[scalar_offset_4 / 4]), asfloat(ub[scalar_offset_5 / 4]));
}
-float3x2 tint_symbol_21(uint4 buffer[400], uint offset) {
+float3x2 ub_load_19(uint offset) {
const uint scalar_offset_6 = ((offset + 0u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_6 / 4];
+ uint4 ubo_load_2 = ub[scalar_offset_6 / 4];
const uint scalar_offset_7 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_7 / 4];
+ uint4 ubo_load_3 = ub[scalar_offset_7 / 4];
const uint scalar_offset_8 = ((offset + 16u)) / 4;
- uint4 ubo_load_4 = buffer[scalar_offset_8 / 4];
+ uint4 ubo_load_4 = ub[scalar_offset_8 / 4];
return float3x2(asfloat(((scalar_offset_6 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_7 & 2) ? ubo_load_3.zw : ubo_load_3.xy)), asfloat(((scalar_offset_8 & 2) ? ubo_load_4.zw : ubo_load_4.xy)));
}
-float3x3 tint_symbol_22(uint4 buffer[400], uint offset) {
+float3x3 ub_load_20(uint offset) {
const uint scalar_offset_9 = ((offset + 0u)) / 4;
const uint scalar_offset_10 = ((offset + 16u)) / 4;
const uint scalar_offset_11 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_9 / 4].xyz), asfloat(buffer[scalar_offset_10 / 4].xyz), asfloat(buffer[scalar_offset_11 / 4].xyz));
+ return float3x3(asfloat(ub[scalar_offset_9 / 4].xyz), asfloat(ub[scalar_offset_10 / 4].xyz), asfloat(ub[scalar_offset_11 / 4].xyz));
}
-float3x4 tint_symbol_23(uint4 buffer[400], uint offset) {
+float3x4 ub_load_21(uint offset) {
const uint scalar_offset_12 = ((offset + 0u)) / 4;
const uint scalar_offset_13 = ((offset + 16u)) / 4;
const uint scalar_offset_14 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset_12 / 4]), asfloat(buffer[scalar_offset_13 / 4]), asfloat(buffer[scalar_offset_14 / 4]));
+ return float3x4(asfloat(ub[scalar_offset_12 / 4]), asfloat(ub[scalar_offset_13 / 4]), asfloat(ub[scalar_offset_14 / 4]));
}
-float4x2 tint_symbol_24(uint4 buffer[400], uint offset) {
+float4x2 ub_load_22(uint offset) {
const uint scalar_offset_15 = ((offset + 0u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_5 = ub[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 8u)) / 4;
- uint4 ubo_load_6 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_6 = ub[scalar_offset_16 / 4];
const uint scalar_offset_17 = ((offset + 16u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_17 / 4];
+ uint4 ubo_load_7 = ub[scalar_offset_17 / 4];
const uint scalar_offset_18 = ((offset + 24u)) / 4;
- uint4 ubo_load_8 = buffer[scalar_offset_18 / 4];
+ uint4 ubo_load_8 = ub[scalar_offset_18 / 4];
return float4x2(asfloat(((scalar_offset_15 & 2) ? ubo_load_5.zw : ubo_load_5.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_6.zw : ubo_load_6.xy)), asfloat(((scalar_offset_17 & 2) ? ubo_load_7.zw : ubo_load_7.xy)), asfloat(((scalar_offset_18 & 2) ? ubo_load_8.zw : ubo_load_8.xy)));
}
-float4x3 tint_symbol_25(uint4 buffer[400], uint offset) {
+float4x3 ub_load_23(uint offset) {
const uint scalar_offset_19 = ((offset + 0u)) / 4;
const uint scalar_offset_20 = ((offset + 16u)) / 4;
const uint scalar_offset_21 = ((offset + 32u)) / 4;
const uint scalar_offset_22 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset_19 / 4].xyz), asfloat(buffer[scalar_offset_20 / 4].xyz), asfloat(buffer[scalar_offset_21 / 4].xyz), asfloat(buffer[scalar_offset_22 / 4].xyz));
+ return float4x3(asfloat(ub[scalar_offset_19 / 4].xyz), asfloat(ub[scalar_offset_20 / 4].xyz), asfloat(ub[scalar_offset_21 / 4].xyz), asfloat(ub[scalar_offset_22 / 4].xyz));
}
-float4x4 tint_symbol_26(uint4 buffer[400], uint offset) {
+float4x4 ub_load_24(uint offset) {
const uint scalar_offset_23 = ((offset + 0u)) / 4;
const uint scalar_offset_24 = ((offset + 16u)) / 4;
const uint scalar_offset_25 = ((offset + 32u)) / 4;
const uint scalar_offset_26 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset_23 / 4]), asfloat(buffer[scalar_offset_24 / 4]), asfloat(buffer[scalar_offset_25 / 4]), asfloat(buffer[scalar_offset_26 / 4]));
+ return float4x4(asfloat(ub[scalar_offset_23 / 4]), asfloat(ub[scalar_offset_24 / 4]), asfloat(ub[scalar_offset_25 / 4]), asfloat(ub[scalar_offset_26 / 4]));
}
-matrix<float16_t, 2, 2> tint_symbol_27(uint4 buffer[400], uint offset) {
+matrix<float16_t, 2, 2> ub_load_25(uint offset) {
const uint scalar_offset_27 = ((offset + 0u)) / 4;
- uint ubo_load_9 = buffer[scalar_offset_27 / 4][scalar_offset_27 % 4];
+ uint ubo_load_9 = ub[scalar_offset_27 / 4][scalar_offset_27 % 4];
const uint scalar_offset_28 = ((offset + 4u)) / 4;
- uint ubo_load_10 = buffer[scalar_offset_28 / 4][scalar_offset_28 % 4];
+ uint ubo_load_10 = ub[scalar_offset_28 / 4][scalar_offset_28 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_9 & 0xFFFF)), float16_t(f16tof32(ubo_load_9 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_10 & 0xFFFF)), float16_t(f16tof32(ubo_load_10 >> 16))));
}
-matrix<float16_t, 2, 3> tint_symbol_28(uint4 buffer[400], uint offset) {
+matrix<float16_t, 2, 3> ub_load_26(uint offset) {
const uint scalar_offset_29 = ((offset + 0u)) / 4;
- uint4 ubo_load_12 = buffer[scalar_offset_29 / 4];
+ uint4 ubo_load_12 = ub[scalar_offset_29 / 4];
uint2 ubo_load_11 = ((scalar_offset_29 & 2) ? ubo_load_12.zw : ubo_load_12.xy);
vector<float16_t, 2> ubo_load_11_xz = vector<float16_t, 2>(f16tof32(ubo_load_11 & 0xFFFF));
float16_t ubo_load_11_y = f16tof32(ubo_load_11[0] >> 16);
const uint scalar_offset_30 = ((offset + 8u)) / 4;
- uint4 ubo_load_14 = buffer[scalar_offset_30 / 4];
+ uint4 ubo_load_14 = ub[scalar_offset_30 / 4];
uint2 ubo_load_13 = ((scalar_offset_30 & 2) ? ubo_load_14.zw : ubo_load_14.xy);
vector<float16_t, 2> ubo_load_13_xz = vector<float16_t, 2>(f16tof32(ubo_load_13 & 0xFFFF));
float16_t ubo_load_13_y = f16tof32(ubo_load_13[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_11_xz[0], ubo_load_11_y, ubo_load_11_xz[1]), vector<float16_t, 3>(ubo_load_13_xz[0], ubo_load_13_y, ubo_load_13_xz[1]));
}
-matrix<float16_t, 2, 4> tint_symbol_29(uint4 buffer[400], uint offset) {
+matrix<float16_t, 2, 4> ub_load_27(uint offset) {
const uint scalar_offset_31 = ((offset + 0u)) / 4;
- uint4 ubo_load_16 = buffer[scalar_offset_31 / 4];
+ uint4 ubo_load_16 = ub[scalar_offset_31 / 4];
uint2 ubo_load_15 = ((scalar_offset_31 & 2) ? ubo_load_16.zw : ubo_load_16.xy);
vector<float16_t, 2> ubo_load_15_xz = vector<float16_t, 2>(f16tof32(ubo_load_15 & 0xFFFF));
vector<float16_t, 2> ubo_load_15_yw = vector<float16_t, 2>(f16tof32(ubo_load_15 >> 16));
const uint scalar_offset_32 = ((offset + 8u)) / 4;
- uint4 ubo_load_18 = buffer[scalar_offset_32 / 4];
+ uint4 ubo_load_18 = ub[scalar_offset_32 / 4];
uint2 ubo_load_17 = ((scalar_offset_32 & 2) ? ubo_load_18.zw : ubo_load_18.xy);
vector<float16_t, 2> ubo_load_17_xz = vector<float16_t, 2>(f16tof32(ubo_load_17 & 0xFFFF));
vector<float16_t, 2> ubo_load_17_yw = vector<float16_t, 2>(f16tof32(ubo_load_17 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_15_xz[0], ubo_load_15_yw[0], ubo_load_15_xz[1], ubo_load_15_yw[1]), vector<float16_t, 4>(ubo_load_17_xz[0], ubo_load_17_yw[0], ubo_load_17_xz[1], ubo_load_17_yw[1]));
}
-matrix<float16_t, 3, 2> tint_symbol_30(uint4 buffer[400], uint offset) {
+matrix<float16_t, 3, 2> ub_load_28(uint offset) {
const uint scalar_offset_33 = ((offset + 0u)) / 4;
- uint ubo_load_19 = buffer[scalar_offset_33 / 4][scalar_offset_33 % 4];
+ uint ubo_load_19 = ub[scalar_offset_33 / 4][scalar_offset_33 % 4];
const uint scalar_offset_34 = ((offset + 4u)) / 4;
- uint ubo_load_20 = buffer[scalar_offset_34 / 4][scalar_offset_34 % 4];
+ uint ubo_load_20 = ub[scalar_offset_34 / 4][scalar_offset_34 % 4];
const uint scalar_offset_35 = ((offset + 8u)) / 4;
- uint ubo_load_21 = buffer[scalar_offset_35 / 4][scalar_offset_35 % 4];
+ uint ubo_load_21 = ub[scalar_offset_35 / 4][scalar_offset_35 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_19 & 0xFFFF)), float16_t(f16tof32(ubo_load_19 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_20 & 0xFFFF)), float16_t(f16tof32(ubo_load_20 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_21 & 0xFFFF)), float16_t(f16tof32(ubo_load_21 >> 16))));
}
-matrix<float16_t, 3, 3> tint_symbol_31(uint4 buffer[400], uint offset) {
+matrix<float16_t, 3, 3> ub_load_29(uint offset) {
const uint scalar_offset_36 = ((offset + 0u)) / 4;
- uint4 ubo_load_23 = buffer[scalar_offset_36 / 4];
+ uint4 ubo_load_23 = ub[scalar_offset_36 / 4];
uint2 ubo_load_22 = ((scalar_offset_36 & 2) ? ubo_load_23.zw : ubo_load_23.xy);
vector<float16_t, 2> ubo_load_22_xz = vector<float16_t, 2>(f16tof32(ubo_load_22 & 0xFFFF));
float16_t ubo_load_22_y = f16tof32(ubo_load_22[0] >> 16);
const uint scalar_offset_37 = ((offset + 8u)) / 4;
- uint4 ubo_load_25 = buffer[scalar_offset_37 / 4];
+ uint4 ubo_load_25 = ub[scalar_offset_37 / 4];
uint2 ubo_load_24 = ((scalar_offset_37 & 2) ? ubo_load_25.zw : ubo_load_25.xy);
vector<float16_t, 2> ubo_load_24_xz = vector<float16_t, 2>(f16tof32(ubo_load_24 & 0xFFFF));
float16_t ubo_load_24_y = f16tof32(ubo_load_24[0] >> 16);
const uint scalar_offset_38 = ((offset + 16u)) / 4;
- uint4 ubo_load_27 = buffer[scalar_offset_38 / 4];
+ uint4 ubo_load_27 = ub[scalar_offset_38 / 4];
uint2 ubo_load_26 = ((scalar_offset_38 & 2) ? ubo_load_27.zw : ubo_load_27.xy);
vector<float16_t, 2> ubo_load_26_xz = vector<float16_t, 2>(f16tof32(ubo_load_26 & 0xFFFF));
float16_t ubo_load_26_y = f16tof32(ubo_load_26[0] >> 16);
return matrix<float16_t, 3, 3>(vector<float16_t, 3>(ubo_load_22_xz[0], ubo_load_22_y, ubo_load_22_xz[1]), vector<float16_t, 3>(ubo_load_24_xz[0], ubo_load_24_y, ubo_load_24_xz[1]), vector<float16_t, 3>(ubo_load_26_xz[0], ubo_load_26_y, ubo_load_26_xz[1]));
}
-matrix<float16_t, 3, 4> tint_symbol_32(uint4 buffer[400], uint offset) {
+matrix<float16_t, 3, 4> ub_load_30(uint offset) {
const uint scalar_offset_39 = ((offset + 0u)) / 4;
- uint4 ubo_load_29 = buffer[scalar_offset_39 / 4];
+ uint4 ubo_load_29 = ub[scalar_offset_39 / 4];
uint2 ubo_load_28 = ((scalar_offset_39 & 2) ? ubo_load_29.zw : ubo_load_29.xy);
vector<float16_t, 2> ubo_load_28_xz = vector<float16_t, 2>(f16tof32(ubo_load_28 & 0xFFFF));
vector<float16_t, 2> ubo_load_28_yw = vector<float16_t, 2>(f16tof32(ubo_load_28 >> 16));
const uint scalar_offset_40 = ((offset + 8u)) / 4;
- uint4 ubo_load_31 = buffer[scalar_offset_40 / 4];
+ uint4 ubo_load_31 = ub[scalar_offset_40 / 4];
uint2 ubo_load_30 = ((scalar_offset_40 & 2) ? ubo_load_31.zw : ubo_load_31.xy);
vector<float16_t, 2> ubo_load_30_xz = vector<float16_t, 2>(f16tof32(ubo_load_30 & 0xFFFF));
vector<float16_t, 2> ubo_load_30_yw = vector<float16_t, 2>(f16tof32(ubo_load_30 >> 16));
const uint scalar_offset_41 = ((offset + 16u)) / 4;
- uint4 ubo_load_33 = buffer[scalar_offset_41 / 4];
+ uint4 ubo_load_33 = ub[scalar_offset_41 / 4];
uint2 ubo_load_32 = ((scalar_offset_41 & 2) ? ubo_load_33.zw : ubo_load_33.xy);
vector<float16_t, 2> ubo_load_32_xz = vector<float16_t, 2>(f16tof32(ubo_load_32 & 0xFFFF));
vector<float16_t, 2> ubo_load_32_yw = vector<float16_t, 2>(f16tof32(ubo_load_32 >> 16));
return matrix<float16_t, 3, 4>(vector<float16_t, 4>(ubo_load_28_xz[0], ubo_load_28_yw[0], ubo_load_28_xz[1], ubo_load_28_yw[1]), vector<float16_t, 4>(ubo_load_30_xz[0], ubo_load_30_yw[0], ubo_load_30_xz[1], ubo_load_30_yw[1]), vector<float16_t, 4>(ubo_load_32_xz[0], ubo_load_32_yw[0], ubo_load_32_xz[1], ubo_load_32_yw[1]));
}
-matrix<float16_t, 4, 2> tint_symbol_33(uint4 buffer[400], uint offset) {
+matrix<float16_t, 4, 2> ub_load_31(uint offset) {
const uint scalar_offset_42 = ((offset + 0u)) / 4;
- uint ubo_load_34 = buffer[scalar_offset_42 / 4][scalar_offset_42 % 4];
+ uint ubo_load_34 = ub[scalar_offset_42 / 4][scalar_offset_42 % 4];
const uint scalar_offset_43 = ((offset + 4u)) / 4;
- uint ubo_load_35 = buffer[scalar_offset_43 / 4][scalar_offset_43 % 4];
+ uint ubo_load_35 = ub[scalar_offset_43 / 4][scalar_offset_43 % 4];
const uint scalar_offset_44 = ((offset + 8u)) / 4;
- uint ubo_load_36 = buffer[scalar_offset_44 / 4][scalar_offset_44 % 4];
+ uint ubo_load_36 = ub[scalar_offset_44 / 4][scalar_offset_44 % 4];
const uint scalar_offset_45 = ((offset + 12u)) / 4;
- uint ubo_load_37 = buffer[scalar_offset_45 / 4][scalar_offset_45 % 4];
+ uint ubo_load_37 = ub[scalar_offset_45 / 4][scalar_offset_45 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_34 & 0xFFFF)), float16_t(f16tof32(ubo_load_34 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_35 & 0xFFFF)), float16_t(f16tof32(ubo_load_35 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_36 & 0xFFFF)), float16_t(f16tof32(ubo_load_36 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_37 & 0xFFFF)), float16_t(f16tof32(ubo_load_37 >> 16))));
}
-matrix<float16_t, 4, 3> tint_symbol_34(uint4 buffer[400], uint offset) {
+matrix<float16_t, 4, 3> ub_load_32(uint offset) {
const uint scalar_offset_46 = ((offset + 0u)) / 4;
- uint4 ubo_load_39 = buffer[scalar_offset_46 / 4];
+ uint4 ubo_load_39 = ub[scalar_offset_46 / 4];
uint2 ubo_load_38 = ((scalar_offset_46 & 2) ? ubo_load_39.zw : ubo_load_39.xy);
vector<float16_t, 2> ubo_load_38_xz = vector<float16_t, 2>(f16tof32(ubo_load_38 & 0xFFFF));
float16_t ubo_load_38_y = f16tof32(ubo_load_38[0] >> 16);
const uint scalar_offset_47 = ((offset + 8u)) / 4;
- uint4 ubo_load_41 = buffer[scalar_offset_47 / 4];
+ uint4 ubo_load_41 = ub[scalar_offset_47 / 4];
uint2 ubo_load_40 = ((scalar_offset_47 & 2) ? ubo_load_41.zw : ubo_load_41.xy);
vector<float16_t, 2> ubo_load_40_xz = vector<float16_t, 2>(f16tof32(ubo_load_40 & 0xFFFF));
float16_t ubo_load_40_y = f16tof32(ubo_load_40[0] >> 16);
const uint scalar_offset_48 = ((offset + 16u)) / 4;
- uint4 ubo_load_43 = buffer[scalar_offset_48 / 4];
+ uint4 ubo_load_43 = ub[scalar_offset_48 / 4];
uint2 ubo_load_42 = ((scalar_offset_48 & 2) ? ubo_load_43.zw : ubo_load_43.xy);
vector<float16_t, 2> ubo_load_42_xz = vector<float16_t, 2>(f16tof32(ubo_load_42 & 0xFFFF));
float16_t ubo_load_42_y = f16tof32(ubo_load_42[0] >> 16);
const uint scalar_offset_49 = ((offset + 24u)) / 4;
- uint4 ubo_load_45 = buffer[scalar_offset_49 / 4];
+ uint4 ubo_load_45 = ub[scalar_offset_49 / 4];
uint2 ubo_load_44 = ((scalar_offset_49 & 2) ? ubo_load_45.zw : ubo_load_45.xy);
vector<float16_t, 2> ubo_load_44_xz = vector<float16_t, 2>(f16tof32(ubo_load_44 & 0xFFFF));
float16_t ubo_load_44_y = f16tof32(ubo_load_44[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_38_xz[0], ubo_load_38_y, ubo_load_38_xz[1]), vector<float16_t, 3>(ubo_load_40_xz[0], ubo_load_40_y, ubo_load_40_xz[1]), vector<float16_t, 3>(ubo_load_42_xz[0], ubo_load_42_y, ubo_load_42_xz[1]), vector<float16_t, 3>(ubo_load_44_xz[0], ubo_load_44_y, ubo_load_44_xz[1]));
}
-matrix<float16_t, 4, 4> tint_symbol_35(uint4 buffer[400], uint offset) {
+matrix<float16_t, 4, 4> ub_load_33(uint offset) {
const uint scalar_offset_50 = ((offset + 0u)) / 4;
- uint4 ubo_load_47 = buffer[scalar_offset_50 / 4];
+ uint4 ubo_load_47 = ub[scalar_offset_50 / 4];
uint2 ubo_load_46 = ((scalar_offset_50 & 2) ? ubo_load_47.zw : ubo_load_47.xy);
vector<float16_t, 2> ubo_load_46_xz = vector<float16_t, 2>(f16tof32(ubo_load_46 & 0xFFFF));
vector<float16_t, 2> ubo_load_46_yw = vector<float16_t, 2>(f16tof32(ubo_load_46 >> 16));
const uint scalar_offset_51 = ((offset + 8u)) / 4;
- uint4 ubo_load_49 = buffer[scalar_offset_51 / 4];
+ uint4 ubo_load_49 = ub[scalar_offset_51 / 4];
uint2 ubo_load_48 = ((scalar_offset_51 & 2) ? ubo_load_49.zw : ubo_load_49.xy);
vector<float16_t, 2> ubo_load_48_xz = vector<float16_t, 2>(f16tof32(ubo_load_48 & 0xFFFF));
vector<float16_t, 2> ubo_load_48_yw = vector<float16_t, 2>(f16tof32(ubo_load_48 >> 16));
const uint scalar_offset_52 = ((offset + 16u)) / 4;
- uint4 ubo_load_51 = buffer[scalar_offset_52 / 4];
+ uint4 ubo_load_51 = ub[scalar_offset_52 / 4];
uint2 ubo_load_50 = ((scalar_offset_52 & 2) ? ubo_load_51.zw : ubo_load_51.xy);
vector<float16_t, 2> ubo_load_50_xz = vector<float16_t, 2>(f16tof32(ubo_load_50 & 0xFFFF));
vector<float16_t, 2> ubo_load_50_yw = vector<float16_t, 2>(f16tof32(ubo_load_50 >> 16));
const uint scalar_offset_53 = ((offset + 24u)) / 4;
- uint4 ubo_load_53 = buffer[scalar_offset_53 / 4];
+ uint4 ubo_load_53 = ub[scalar_offset_53 / 4];
uint2 ubo_load_52 = ((scalar_offset_53 & 2) ? ubo_load_53.zw : ubo_load_53.xy);
vector<float16_t, 2> ubo_load_52_xz = vector<float16_t, 2>(f16tof32(ubo_load_52 & 0xFFFF));
vector<float16_t, 2> ubo_load_52_yw = vector<float16_t, 2>(f16tof32(ubo_load_52 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_46_xz[0], ubo_load_46_yw[0], ubo_load_46_xz[1], ubo_load_46_yw[1]), vector<float16_t, 4>(ubo_load_48_xz[0], ubo_load_48_yw[0], ubo_load_48_xz[1], ubo_load_48_yw[1]), vector<float16_t, 4>(ubo_load_50_xz[0], ubo_load_50_yw[0], ubo_load_50_xz[1], ubo_load_50_yw[1]), vector<float16_t, 4>(ubo_load_52_xz[0], ubo_load_52_yw[0], ubo_load_52_xz[1], ubo_load_52_yw[1]));
}
-typedef float3 tint_symbol_36_ret[2];
-tint_symbol_36_ret tint_symbol_36(uint4 buffer[400], uint offset) {
+typedef float3 ub_load_34_ret[2];
+ub_load_34_ret ub_load_34(uint offset) {
float3 arr_1[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
const uint scalar_offset_54 = ((offset + (i * 16u))) / 4;
- arr_1[i] = asfloat(buffer[scalar_offset_54 / 4].xyz);
+ arr_1[i] = asfloat(ub[scalar_offset_54 / 4].xyz);
}
}
return arr_1;
}
-typedef matrix<float16_t, 4, 2> tint_symbol_37_ret[2];
-tint_symbol_37_ret tint_symbol_37(uint4 buffer[400], uint offset) {
+typedef matrix<float16_t, 4, 2> ub_load_35_ret[2];
+ub_load_35_ret ub_load_35(uint offset) {
matrix<float16_t, 4, 2> arr_2[2] = (matrix<float16_t, 4, 2>[2])0;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- arr_2[i_1] = tint_symbol_33(buffer, (offset + (i_1 * 16u)));
+ arr_2[i_1] = ub_load_31((offset + (i_1 * 16u)));
}
}
return arr_2;
@@ -291,26 +291,26 @@
vector<float16_t, 2> ubo_load_60_xz = vector<float16_t, 2>(f16tof32(ubo_load_60 & 0xFFFF));
vector<float16_t, 2> ubo_load_60_yw = vector<float16_t, 2>(f16tof32(ubo_load_60 >> 16));
const vector<float16_t, 4> vec4_f16 = vector<float16_t, 4>(ubo_load_60_xz[0], ubo_load_60_yw[0], ubo_load_60_xz[1], ubo_load_60_yw[1]);
- const float2x2 mat2x2_f32 = tint_symbol_18(ub, ((800u * idx) + 168u));
- const float2x3 mat2x3_f32 = tint_symbol_19(ub, ((800u * idx) + 192u));
- const float2x4 mat2x4_f32 = tint_symbol_20(ub, ((800u * idx) + 224u));
- const float3x2 mat3x2_f32 = tint_symbol_21(ub, ((800u * idx) + 256u));
- const float3x3 mat3x3_f32 = tint_symbol_22(ub, ((800u * idx) + 288u));
- const float3x4 mat3x4_f32 = tint_symbol_23(ub, ((800u * idx) + 336u));
- const float4x2 mat4x2_f32 = tint_symbol_24(ub, ((800u * idx) + 384u));
- const float4x3 mat4x3_f32 = tint_symbol_25(ub, ((800u * idx) + 416u));
- const float4x4 mat4x4_f32 = tint_symbol_26(ub, ((800u * idx) + 480u));
- const matrix<float16_t, 2, 2> mat2x2_f16 = tint_symbol_27(ub, ((800u * idx) + 544u));
- const matrix<float16_t, 2, 3> mat2x3_f16 = tint_symbol_28(ub, ((800u * idx) + 552u));
- const matrix<float16_t, 2, 4> mat2x4_f16 = tint_symbol_29(ub, ((800u * idx) + 568u));
- const matrix<float16_t, 3, 2> mat3x2_f16 = tint_symbol_30(ub, ((800u * idx) + 584u));
- const matrix<float16_t, 3, 3> mat3x3_f16 = tint_symbol_31(ub, ((800u * idx) + 600u));
- const matrix<float16_t, 3, 4> mat3x4_f16 = tint_symbol_32(ub, ((800u * idx) + 624u));
- const matrix<float16_t, 4, 2> mat4x2_f16 = tint_symbol_33(ub, ((800u * idx) + 648u));
- const matrix<float16_t, 4, 3> mat4x3_f16 = tint_symbol_34(ub, ((800u * idx) + 664u));
- const matrix<float16_t, 4, 4> mat4x4_f16 = tint_symbol_35(ub, ((800u * idx) + 696u));
- const float3 arr2_vec3_f32[2] = tint_symbol_36(ub, ((800u * idx) + 736u));
- const matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = tint_symbol_37(ub, ((800u * idx) + 768u));
+ const float2x2 mat2x2_f32 = ub_load_16(((800u * idx) + 168u));
+ const float2x3 mat2x3_f32 = ub_load_17(((800u * idx) + 192u));
+ const float2x4 mat2x4_f32 = ub_load_18(((800u * idx) + 224u));
+ const float3x2 mat3x2_f32 = ub_load_19(((800u * idx) + 256u));
+ const float3x3 mat3x3_f32 = ub_load_20(((800u * idx) + 288u));
+ const float3x4 mat3x4_f32 = ub_load_21(((800u * idx) + 336u));
+ const float4x2 mat4x2_f32 = ub_load_22(((800u * idx) + 384u));
+ const float4x3 mat4x3_f32 = ub_load_23(((800u * idx) + 416u));
+ const float4x4 mat4x4_f32 = ub_load_24(((800u * idx) + 480u));
+ const matrix<float16_t, 2, 2> mat2x2_f16 = ub_load_25(((800u * idx) + 544u));
+ const matrix<float16_t, 2, 3> mat2x3_f16 = ub_load_26(((800u * idx) + 552u));
+ const matrix<float16_t, 2, 4> mat2x4_f16 = ub_load_27(((800u * idx) + 568u));
+ const matrix<float16_t, 3, 2> mat3x2_f16 = ub_load_28(((800u * idx) + 584u));
+ const matrix<float16_t, 3, 3> mat3x3_f16 = ub_load_29(((800u * idx) + 600u));
+ const matrix<float16_t, 3, 4> mat3x4_f16 = ub_load_30(((800u * idx) + 624u));
+ const matrix<float16_t, 4, 2> mat4x2_f16 = ub_load_31(((800u * idx) + 648u));
+ const matrix<float16_t, 4, 3> mat4x3_f16 = ub_load_32(((800u * idx) + 664u));
+ const matrix<float16_t, 4, 4> mat4x4_f16 = ub_load_33(((800u * idx) + 696u));
+ const float3 arr2_vec3_f32[2] = ub_load_34(((800u * idx) + 736u));
+ const matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = ub_load_35(((800u * idx) + 768u));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/static_index/read.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/static_index/read.wgsl.expected.dxc.hlsl
index 7a69526..d4a78bb 100644
--- a/test/tint/buffer/uniform/static_index/read.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/static_index/read.wgsl.expected.dxc.hlsl
@@ -7,103 +7,103 @@
uint4 ub[44];
};
-float2x2 tint_symbol_12(uint4 buffer[44], uint offset) {
+float2x2 ub_load_12(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = ub[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = ub[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-float2x3 tint_symbol_13(uint4 buffer[44], uint offset) {
+float2x3 ub_load_13(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float2x3(asfloat(ub[scalar_offset_2 / 4].xyz), asfloat(ub[scalar_offset_3 / 4].xyz));
}
-float2x4 tint_symbol_14(uint4 buffer[44], uint offset) {
+float2x4 ub_load_14(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]));
+ return float2x4(asfloat(ub[scalar_offset_4 / 4]), asfloat(ub[scalar_offset_5 / 4]));
}
-float3x2 tint_symbol_15(uint4 buffer[44], uint offset) {
+float3x2 ub_load_15(uint offset) {
const uint scalar_offset_6 = ((offset + 0u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_6 / 4];
+ uint4 ubo_load_2 = ub[scalar_offset_6 / 4];
const uint scalar_offset_7 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_7 / 4];
+ uint4 ubo_load_3 = ub[scalar_offset_7 / 4];
const uint scalar_offset_8 = ((offset + 16u)) / 4;
- uint4 ubo_load_4 = buffer[scalar_offset_8 / 4];
+ uint4 ubo_load_4 = ub[scalar_offset_8 / 4];
return float3x2(asfloat(((scalar_offset_6 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_7 & 2) ? ubo_load_3.zw : ubo_load_3.xy)), asfloat(((scalar_offset_8 & 2) ? ubo_load_4.zw : ubo_load_4.xy)));
}
-float3x3 tint_symbol_16(uint4 buffer[44], uint offset) {
+float3x3 ub_load_16(uint offset) {
const uint scalar_offset_9 = ((offset + 0u)) / 4;
const uint scalar_offset_10 = ((offset + 16u)) / 4;
const uint scalar_offset_11 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_9 / 4].xyz), asfloat(buffer[scalar_offset_10 / 4].xyz), asfloat(buffer[scalar_offset_11 / 4].xyz));
+ return float3x3(asfloat(ub[scalar_offset_9 / 4].xyz), asfloat(ub[scalar_offset_10 / 4].xyz), asfloat(ub[scalar_offset_11 / 4].xyz));
}
-float3x4 tint_symbol_17(uint4 buffer[44], uint offset) {
+float3x4 ub_load_17(uint offset) {
const uint scalar_offset_12 = ((offset + 0u)) / 4;
const uint scalar_offset_13 = ((offset + 16u)) / 4;
const uint scalar_offset_14 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset_12 / 4]), asfloat(buffer[scalar_offset_13 / 4]), asfloat(buffer[scalar_offset_14 / 4]));
+ return float3x4(asfloat(ub[scalar_offset_12 / 4]), asfloat(ub[scalar_offset_13 / 4]), asfloat(ub[scalar_offset_14 / 4]));
}
-float4x2 tint_symbol_18(uint4 buffer[44], uint offset) {
+float4x2 ub_load_18(uint offset) {
const uint scalar_offset_15 = ((offset + 0u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_5 = ub[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 8u)) / 4;
- uint4 ubo_load_6 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_6 = ub[scalar_offset_16 / 4];
const uint scalar_offset_17 = ((offset + 16u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_17 / 4];
+ uint4 ubo_load_7 = ub[scalar_offset_17 / 4];
const uint scalar_offset_18 = ((offset + 24u)) / 4;
- uint4 ubo_load_8 = buffer[scalar_offset_18 / 4];
+ uint4 ubo_load_8 = ub[scalar_offset_18 / 4];
return float4x2(asfloat(((scalar_offset_15 & 2) ? ubo_load_5.zw : ubo_load_5.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_6.zw : ubo_load_6.xy)), asfloat(((scalar_offset_17 & 2) ? ubo_load_7.zw : ubo_load_7.xy)), asfloat(((scalar_offset_18 & 2) ? ubo_load_8.zw : ubo_load_8.xy)));
}
-float4x3 tint_symbol_19(uint4 buffer[44], uint offset) {
+float4x3 ub_load_19(uint offset) {
const uint scalar_offset_19 = ((offset + 0u)) / 4;
const uint scalar_offset_20 = ((offset + 16u)) / 4;
const uint scalar_offset_21 = ((offset + 32u)) / 4;
const uint scalar_offset_22 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset_19 / 4].xyz), asfloat(buffer[scalar_offset_20 / 4].xyz), asfloat(buffer[scalar_offset_21 / 4].xyz), asfloat(buffer[scalar_offset_22 / 4].xyz));
+ return float4x3(asfloat(ub[scalar_offset_19 / 4].xyz), asfloat(ub[scalar_offset_20 / 4].xyz), asfloat(ub[scalar_offset_21 / 4].xyz), asfloat(ub[scalar_offset_22 / 4].xyz));
}
-float4x4 tint_symbol_20(uint4 buffer[44], uint offset) {
+float4x4 ub_load_20(uint offset) {
const uint scalar_offset_23 = ((offset + 0u)) / 4;
const uint scalar_offset_24 = ((offset + 16u)) / 4;
const uint scalar_offset_25 = ((offset + 32u)) / 4;
const uint scalar_offset_26 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset_23 / 4]), asfloat(buffer[scalar_offset_24 / 4]), asfloat(buffer[scalar_offset_25 / 4]), asfloat(buffer[scalar_offset_26 / 4]));
+ return float4x4(asfloat(ub[scalar_offset_23 / 4]), asfloat(ub[scalar_offset_24 / 4]), asfloat(ub[scalar_offset_25 / 4]), asfloat(ub[scalar_offset_26 / 4]));
}
-typedef float3 tint_symbol_21_ret[2];
-tint_symbol_21_ret tint_symbol_21(uint4 buffer[44], uint offset) {
+typedef float3 ub_load_21_ret[2];
+ub_load_21_ret ub_load_21(uint offset) {
float3 arr[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
const uint scalar_offset_27 = ((offset + (i * 16u))) / 4;
- arr[i] = asfloat(buffer[scalar_offset_27 / 4].xyz);
+ arr[i] = asfloat(ub[scalar_offset_27 / 4].xyz);
}
}
return arr;
}
-Inner tint_symbol_22(uint4 buffer[44], uint offset) {
+Inner ub_load_22(uint offset) {
const uint scalar_offset_28 = ((offset + 0u)) / 4;
const uint scalar_offset_29 = ((offset + 16u)) / 4;
- const Inner tint_symbol_24 = {asint(buffer[scalar_offset_28 / 4][scalar_offset_28 % 4]), asfloat(buffer[scalar_offset_29 / 4][scalar_offset_29 % 4])};
- return tint_symbol_24;
+ const Inner tint_symbol = {asint(ub[scalar_offset_28 / 4][scalar_offset_28 % 4]), asfloat(ub[scalar_offset_29 / 4][scalar_offset_29 % 4])};
+ return tint_symbol;
}
-typedef Inner tint_symbol_23_ret[4];
-tint_symbol_23_ret tint_symbol_23(uint4 buffer[44], uint offset) {
+typedef Inner ub_load_23_ret[4];
+ub_load_23_ret ub_load_23(uint offset) {
Inner arr_1[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_22(buffer, (offset + (i_1 * 32u)));
+ arr_1[i_1] = ub_load_22((offset + (i_1 * 32u)));
}
}
return arr_1;
@@ -123,17 +123,17 @@
const float4 vec4_f32 = asfloat(ub[6]);
const int4 vec4_i32 = asint(ub[7]);
const uint4 vec4_u32 = ub[8];
- const float2x2 mat2x2_f32 = tint_symbol_12(ub, 144u);
- const float2x3 mat2x3_f32 = tint_symbol_13(ub, 160u);
- const float2x4 mat2x4_f32 = tint_symbol_14(ub, 192u);
- const float3x2 mat3x2_f32 = tint_symbol_15(ub, 224u);
- const float3x3 mat3x3_f32 = tint_symbol_16(ub, 256u);
- const float3x4 mat3x4_f32 = tint_symbol_17(ub, 304u);
- const float4x2 mat4x2_f32 = tint_symbol_18(ub, 352u);
- const float4x3 mat4x3_f32 = tint_symbol_19(ub, 384u);
- const float4x4 mat4x4_f32 = tint_symbol_20(ub, 448u);
- const float3 arr2_vec3_f32[2] = tint_symbol_21(ub, 512u);
- const Inner struct_inner = tint_symbol_22(ub, 544u);
- const Inner array_struct_inner[4] = tint_symbol_23(ub, 576u);
+ const float2x2 mat2x2_f32 = ub_load_12(144u);
+ const float2x3 mat2x3_f32 = ub_load_13(160u);
+ const float2x4 mat2x4_f32 = ub_load_14(192u);
+ const float3x2 mat3x2_f32 = ub_load_15(224u);
+ const float3x3 mat3x3_f32 = ub_load_16(256u);
+ const float3x4 mat3x4_f32 = ub_load_17(304u);
+ const float4x2 mat4x2_f32 = ub_load_18(352u);
+ const float4x3 mat4x3_f32 = ub_load_19(384u);
+ const float4x4 mat4x4_f32 = ub_load_20(448u);
+ const float3 arr2_vec3_f32[2] = ub_load_21(512u);
+ const Inner struct_inner = ub_load_22(544u);
+ const Inner array_struct_inner[4] = ub_load_23(576u);
return;
}
diff --git a/test/tint/buffer/uniform/static_index/read.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/static_index/read.wgsl.expected.fxc.hlsl
index 7a69526..d4a78bb 100644
--- a/test/tint/buffer/uniform/static_index/read.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/static_index/read.wgsl.expected.fxc.hlsl
@@ -7,103 +7,103 @@
uint4 ub[44];
};
-float2x2 tint_symbol_12(uint4 buffer[44], uint offset) {
+float2x2 ub_load_12(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = ub[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = ub[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-float2x3 tint_symbol_13(uint4 buffer[44], uint offset) {
+float2x3 ub_load_13(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float2x3(asfloat(ub[scalar_offset_2 / 4].xyz), asfloat(ub[scalar_offset_3 / 4].xyz));
}
-float2x4 tint_symbol_14(uint4 buffer[44], uint offset) {
+float2x4 ub_load_14(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]));
+ return float2x4(asfloat(ub[scalar_offset_4 / 4]), asfloat(ub[scalar_offset_5 / 4]));
}
-float3x2 tint_symbol_15(uint4 buffer[44], uint offset) {
+float3x2 ub_load_15(uint offset) {
const uint scalar_offset_6 = ((offset + 0u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_6 / 4];
+ uint4 ubo_load_2 = ub[scalar_offset_6 / 4];
const uint scalar_offset_7 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_7 / 4];
+ uint4 ubo_load_3 = ub[scalar_offset_7 / 4];
const uint scalar_offset_8 = ((offset + 16u)) / 4;
- uint4 ubo_load_4 = buffer[scalar_offset_8 / 4];
+ uint4 ubo_load_4 = ub[scalar_offset_8 / 4];
return float3x2(asfloat(((scalar_offset_6 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_7 & 2) ? ubo_load_3.zw : ubo_load_3.xy)), asfloat(((scalar_offset_8 & 2) ? ubo_load_4.zw : ubo_load_4.xy)));
}
-float3x3 tint_symbol_16(uint4 buffer[44], uint offset) {
+float3x3 ub_load_16(uint offset) {
const uint scalar_offset_9 = ((offset + 0u)) / 4;
const uint scalar_offset_10 = ((offset + 16u)) / 4;
const uint scalar_offset_11 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_9 / 4].xyz), asfloat(buffer[scalar_offset_10 / 4].xyz), asfloat(buffer[scalar_offset_11 / 4].xyz));
+ return float3x3(asfloat(ub[scalar_offset_9 / 4].xyz), asfloat(ub[scalar_offset_10 / 4].xyz), asfloat(ub[scalar_offset_11 / 4].xyz));
}
-float3x4 tint_symbol_17(uint4 buffer[44], uint offset) {
+float3x4 ub_load_17(uint offset) {
const uint scalar_offset_12 = ((offset + 0u)) / 4;
const uint scalar_offset_13 = ((offset + 16u)) / 4;
const uint scalar_offset_14 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset_12 / 4]), asfloat(buffer[scalar_offset_13 / 4]), asfloat(buffer[scalar_offset_14 / 4]));
+ return float3x4(asfloat(ub[scalar_offset_12 / 4]), asfloat(ub[scalar_offset_13 / 4]), asfloat(ub[scalar_offset_14 / 4]));
}
-float4x2 tint_symbol_18(uint4 buffer[44], uint offset) {
+float4x2 ub_load_18(uint offset) {
const uint scalar_offset_15 = ((offset + 0u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_5 = ub[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 8u)) / 4;
- uint4 ubo_load_6 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_6 = ub[scalar_offset_16 / 4];
const uint scalar_offset_17 = ((offset + 16u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_17 / 4];
+ uint4 ubo_load_7 = ub[scalar_offset_17 / 4];
const uint scalar_offset_18 = ((offset + 24u)) / 4;
- uint4 ubo_load_8 = buffer[scalar_offset_18 / 4];
+ uint4 ubo_load_8 = ub[scalar_offset_18 / 4];
return float4x2(asfloat(((scalar_offset_15 & 2) ? ubo_load_5.zw : ubo_load_5.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_6.zw : ubo_load_6.xy)), asfloat(((scalar_offset_17 & 2) ? ubo_load_7.zw : ubo_load_7.xy)), asfloat(((scalar_offset_18 & 2) ? ubo_load_8.zw : ubo_load_8.xy)));
}
-float4x3 tint_symbol_19(uint4 buffer[44], uint offset) {
+float4x3 ub_load_19(uint offset) {
const uint scalar_offset_19 = ((offset + 0u)) / 4;
const uint scalar_offset_20 = ((offset + 16u)) / 4;
const uint scalar_offset_21 = ((offset + 32u)) / 4;
const uint scalar_offset_22 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset_19 / 4].xyz), asfloat(buffer[scalar_offset_20 / 4].xyz), asfloat(buffer[scalar_offset_21 / 4].xyz), asfloat(buffer[scalar_offset_22 / 4].xyz));
+ return float4x3(asfloat(ub[scalar_offset_19 / 4].xyz), asfloat(ub[scalar_offset_20 / 4].xyz), asfloat(ub[scalar_offset_21 / 4].xyz), asfloat(ub[scalar_offset_22 / 4].xyz));
}
-float4x4 tint_symbol_20(uint4 buffer[44], uint offset) {
+float4x4 ub_load_20(uint offset) {
const uint scalar_offset_23 = ((offset + 0u)) / 4;
const uint scalar_offset_24 = ((offset + 16u)) / 4;
const uint scalar_offset_25 = ((offset + 32u)) / 4;
const uint scalar_offset_26 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset_23 / 4]), asfloat(buffer[scalar_offset_24 / 4]), asfloat(buffer[scalar_offset_25 / 4]), asfloat(buffer[scalar_offset_26 / 4]));
+ return float4x4(asfloat(ub[scalar_offset_23 / 4]), asfloat(ub[scalar_offset_24 / 4]), asfloat(ub[scalar_offset_25 / 4]), asfloat(ub[scalar_offset_26 / 4]));
}
-typedef float3 tint_symbol_21_ret[2];
-tint_symbol_21_ret tint_symbol_21(uint4 buffer[44], uint offset) {
+typedef float3 ub_load_21_ret[2];
+ub_load_21_ret ub_load_21(uint offset) {
float3 arr[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
const uint scalar_offset_27 = ((offset + (i * 16u))) / 4;
- arr[i] = asfloat(buffer[scalar_offset_27 / 4].xyz);
+ arr[i] = asfloat(ub[scalar_offset_27 / 4].xyz);
}
}
return arr;
}
-Inner tint_symbol_22(uint4 buffer[44], uint offset) {
+Inner ub_load_22(uint offset) {
const uint scalar_offset_28 = ((offset + 0u)) / 4;
const uint scalar_offset_29 = ((offset + 16u)) / 4;
- const Inner tint_symbol_24 = {asint(buffer[scalar_offset_28 / 4][scalar_offset_28 % 4]), asfloat(buffer[scalar_offset_29 / 4][scalar_offset_29 % 4])};
- return tint_symbol_24;
+ const Inner tint_symbol = {asint(ub[scalar_offset_28 / 4][scalar_offset_28 % 4]), asfloat(ub[scalar_offset_29 / 4][scalar_offset_29 % 4])};
+ return tint_symbol;
}
-typedef Inner tint_symbol_23_ret[4];
-tint_symbol_23_ret tint_symbol_23(uint4 buffer[44], uint offset) {
+typedef Inner ub_load_23_ret[4];
+ub_load_23_ret ub_load_23(uint offset) {
Inner arr_1[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_22(buffer, (offset + (i_1 * 32u)));
+ arr_1[i_1] = ub_load_22((offset + (i_1 * 32u)));
}
}
return arr_1;
@@ -123,17 +123,17 @@
const float4 vec4_f32 = asfloat(ub[6]);
const int4 vec4_i32 = asint(ub[7]);
const uint4 vec4_u32 = ub[8];
- const float2x2 mat2x2_f32 = tint_symbol_12(ub, 144u);
- const float2x3 mat2x3_f32 = tint_symbol_13(ub, 160u);
- const float2x4 mat2x4_f32 = tint_symbol_14(ub, 192u);
- const float3x2 mat3x2_f32 = tint_symbol_15(ub, 224u);
- const float3x3 mat3x3_f32 = tint_symbol_16(ub, 256u);
- const float3x4 mat3x4_f32 = tint_symbol_17(ub, 304u);
- const float4x2 mat4x2_f32 = tint_symbol_18(ub, 352u);
- const float4x3 mat4x3_f32 = tint_symbol_19(ub, 384u);
- const float4x4 mat4x4_f32 = tint_symbol_20(ub, 448u);
- const float3 arr2_vec3_f32[2] = tint_symbol_21(ub, 512u);
- const Inner struct_inner = tint_symbol_22(ub, 544u);
- const Inner array_struct_inner[4] = tint_symbol_23(ub, 576u);
+ const float2x2 mat2x2_f32 = ub_load_12(144u);
+ const float2x3 mat2x3_f32 = ub_load_13(160u);
+ const float2x4 mat2x4_f32 = ub_load_14(192u);
+ const float3x2 mat3x2_f32 = ub_load_15(224u);
+ const float3x3 mat3x3_f32 = ub_load_16(256u);
+ const float3x4 mat3x4_f32 = ub_load_17(304u);
+ const float4x2 mat4x2_f32 = ub_load_18(352u);
+ const float4x3 mat4x3_f32 = ub_load_19(384u);
+ const float4x4 mat4x4_f32 = ub_load_20(448u);
+ const float3 arr2_vec3_f32[2] = ub_load_21(512u);
+ const Inner struct_inner = ub_load_22(544u);
+ const Inner array_struct_inner[4] = ub_load_23(576u);
return;
}
diff --git a/test/tint/buffer/uniform/static_index/read_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/static_index/read_f16.wgsl.expected.dxc.hlsl
index d0e6ba8..be90b92 100644
--- a/test/tint/buffer/uniform/static_index/read_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/static_index/read_f16.wgsl.expected.dxc.hlsl
@@ -8,260 +8,260 @@
uint4 ub[55];
};
-float2x2 tint_symbol_16(uint4 buffer[55], uint offset) {
+float2x2 ub_load_16(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = ub[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = ub[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-float2x3 tint_symbol_17(uint4 buffer[55], uint offset) {
+float2x3 ub_load_17(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float2x3(asfloat(ub[scalar_offset_2 / 4].xyz), asfloat(ub[scalar_offset_3 / 4].xyz));
}
-float2x4 tint_symbol_18(uint4 buffer[55], uint offset) {
+float2x4 ub_load_18(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]));
+ return float2x4(asfloat(ub[scalar_offset_4 / 4]), asfloat(ub[scalar_offset_5 / 4]));
}
-float3x2 tint_symbol_19(uint4 buffer[55], uint offset) {
+float3x2 ub_load_19(uint offset) {
const uint scalar_offset_6 = ((offset + 0u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_6 / 4];
+ uint4 ubo_load_2 = ub[scalar_offset_6 / 4];
const uint scalar_offset_7 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_7 / 4];
+ uint4 ubo_load_3 = ub[scalar_offset_7 / 4];
const uint scalar_offset_8 = ((offset + 16u)) / 4;
- uint4 ubo_load_4 = buffer[scalar_offset_8 / 4];
+ uint4 ubo_load_4 = ub[scalar_offset_8 / 4];
return float3x2(asfloat(((scalar_offset_6 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_7 & 2) ? ubo_load_3.zw : ubo_load_3.xy)), asfloat(((scalar_offset_8 & 2) ? ubo_load_4.zw : ubo_load_4.xy)));
}
-float3x3 tint_symbol_20(uint4 buffer[55], uint offset) {
+float3x3 ub_load_20(uint offset) {
const uint scalar_offset_9 = ((offset + 0u)) / 4;
const uint scalar_offset_10 = ((offset + 16u)) / 4;
const uint scalar_offset_11 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_9 / 4].xyz), asfloat(buffer[scalar_offset_10 / 4].xyz), asfloat(buffer[scalar_offset_11 / 4].xyz));
+ return float3x3(asfloat(ub[scalar_offset_9 / 4].xyz), asfloat(ub[scalar_offset_10 / 4].xyz), asfloat(ub[scalar_offset_11 / 4].xyz));
}
-float3x4 tint_symbol_21(uint4 buffer[55], uint offset) {
+float3x4 ub_load_21(uint offset) {
const uint scalar_offset_12 = ((offset + 0u)) / 4;
const uint scalar_offset_13 = ((offset + 16u)) / 4;
const uint scalar_offset_14 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset_12 / 4]), asfloat(buffer[scalar_offset_13 / 4]), asfloat(buffer[scalar_offset_14 / 4]));
+ return float3x4(asfloat(ub[scalar_offset_12 / 4]), asfloat(ub[scalar_offset_13 / 4]), asfloat(ub[scalar_offset_14 / 4]));
}
-float4x2 tint_symbol_22(uint4 buffer[55], uint offset) {
+float4x2 ub_load_22(uint offset) {
const uint scalar_offset_15 = ((offset + 0u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_5 = ub[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 8u)) / 4;
- uint4 ubo_load_6 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_6 = ub[scalar_offset_16 / 4];
const uint scalar_offset_17 = ((offset + 16u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_17 / 4];
+ uint4 ubo_load_7 = ub[scalar_offset_17 / 4];
const uint scalar_offset_18 = ((offset + 24u)) / 4;
- uint4 ubo_load_8 = buffer[scalar_offset_18 / 4];
+ uint4 ubo_load_8 = ub[scalar_offset_18 / 4];
return float4x2(asfloat(((scalar_offset_15 & 2) ? ubo_load_5.zw : ubo_load_5.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_6.zw : ubo_load_6.xy)), asfloat(((scalar_offset_17 & 2) ? ubo_load_7.zw : ubo_load_7.xy)), asfloat(((scalar_offset_18 & 2) ? ubo_load_8.zw : ubo_load_8.xy)));
}
-float4x3 tint_symbol_23(uint4 buffer[55], uint offset) {
+float4x3 ub_load_23(uint offset) {
const uint scalar_offset_19 = ((offset + 0u)) / 4;
const uint scalar_offset_20 = ((offset + 16u)) / 4;
const uint scalar_offset_21 = ((offset + 32u)) / 4;
const uint scalar_offset_22 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset_19 / 4].xyz), asfloat(buffer[scalar_offset_20 / 4].xyz), asfloat(buffer[scalar_offset_21 / 4].xyz), asfloat(buffer[scalar_offset_22 / 4].xyz));
+ return float4x3(asfloat(ub[scalar_offset_19 / 4].xyz), asfloat(ub[scalar_offset_20 / 4].xyz), asfloat(ub[scalar_offset_21 / 4].xyz), asfloat(ub[scalar_offset_22 / 4].xyz));
}
-float4x4 tint_symbol_24(uint4 buffer[55], uint offset) {
+float4x4 ub_load_24(uint offset) {
const uint scalar_offset_23 = ((offset + 0u)) / 4;
const uint scalar_offset_24 = ((offset + 16u)) / 4;
const uint scalar_offset_25 = ((offset + 32u)) / 4;
const uint scalar_offset_26 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset_23 / 4]), asfloat(buffer[scalar_offset_24 / 4]), asfloat(buffer[scalar_offset_25 / 4]), asfloat(buffer[scalar_offset_26 / 4]));
+ return float4x4(asfloat(ub[scalar_offset_23 / 4]), asfloat(ub[scalar_offset_24 / 4]), asfloat(ub[scalar_offset_25 / 4]), asfloat(ub[scalar_offset_26 / 4]));
}
-matrix<float16_t, 2, 2> tint_symbol_25(uint4 buffer[55], uint offset) {
+matrix<float16_t, 2, 2> ub_load_25(uint offset) {
const uint scalar_offset_27 = ((offset + 0u)) / 4;
- uint ubo_load_9 = buffer[scalar_offset_27 / 4][scalar_offset_27 % 4];
+ uint ubo_load_9 = ub[scalar_offset_27 / 4][scalar_offset_27 % 4];
const uint scalar_offset_28 = ((offset + 4u)) / 4;
- uint ubo_load_10 = buffer[scalar_offset_28 / 4][scalar_offset_28 % 4];
+ uint ubo_load_10 = ub[scalar_offset_28 / 4][scalar_offset_28 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_9 & 0xFFFF)), float16_t(f16tof32(ubo_load_9 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_10 & 0xFFFF)), float16_t(f16tof32(ubo_load_10 >> 16))));
}
-matrix<float16_t, 2, 3> tint_symbol_26(uint4 buffer[55], uint offset) {
+matrix<float16_t, 2, 3> ub_load_26(uint offset) {
const uint scalar_offset_29 = ((offset + 0u)) / 4;
- uint4 ubo_load_12 = buffer[scalar_offset_29 / 4];
+ uint4 ubo_load_12 = ub[scalar_offset_29 / 4];
uint2 ubo_load_11 = ((scalar_offset_29 & 2) ? ubo_load_12.zw : ubo_load_12.xy);
vector<float16_t, 2> ubo_load_11_xz = vector<float16_t, 2>(f16tof32(ubo_load_11 & 0xFFFF));
float16_t ubo_load_11_y = f16tof32(ubo_load_11[0] >> 16);
const uint scalar_offset_30 = ((offset + 8u)) / 4;
- uint4 ubo_load_14 = buffer[scalar_offset_30 / 4];
+ uint4 ubo_load_14 = ub[scalar_offset_30 / 4];
uint2 ubo_load_13 = ((scalar_offset_30 & 2) ? ubo_load_14.zw : ubo_load_14.xy);
vector<float16_t, 2> ubo_load_13_xz = vector<float16_t, 2>(f16tof32(ubo_load_13 & 0xFFFF));
float16_t ubo_load_13_y = f16tof32(ubo_load_13[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_11_xz[0], ubo_load_11_y, ubo_load_11_xz[1]), vector<float16_t, 3>(ubo_load_13_xz[0], ubo_load_13_y, ubo_load_13_xz[1]));
}
-matrix<float16_t, 2, 4> tint_symbol_27(uint4 buffer[55], uint offset) {
+matrix<float16_t, 2, 4> ub_load_27(uint offset) {
const uint scalar_offset_31 = ((offset + 0u)) / 4;
- uint4 ubo_load_16 = buffer[scalar_offset_31 / 4];
+ uint4 ubo_load_16 = ub[scalar_offset_31 / 4];
uint2 ubo_load_15 = ((scalar_offset_31 & 2) ? ubo_load_16.zw : ubo_load_16.xy);
vector<float16_t, 2> ubo_load_15_xz = vector<float16_t, 2>(f16tof32(ubo_load_15 & 0xFFFF));
vector<float16_t, 2> ubo_load_15_yw = vector<float16_t, 2>(f16tof32(ubo_load_15 >> 16));
const uint scalar_offset_32 = ((offset + 8u)) / 4;
- uint4 ubo_load_18 = buffer[scalar_offset_32 / 4];
+ uint4 ubo_load_18 = ub[scalar_offset_32 / 4];
uint2 ubo_load_17 = ((scalar_offset_32 & 2) ? ubo_load_18.zw : ubo_load_18.xy);
vector<float16_t, 2> ubo_load_17_xz = vector<float16_t, 2>(f16tof32(ubo_load_17 & 0xFFFF));
vector<float16_t, 2> ubo_load_17_yw = vector<float16_t, 2>(f16tof32(ubo_load_17 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_15_xz[0], ubo_load_15_yw[0], ubo_load_15_xz[1], ubo_load_15_yw[1]), vector<float16_t, 4>(ubo_load_17_xz[0], ubo_load_17_yw[0], ubo_load_17_xz[1], ubo_load_17_yw[1]));
}
-matrix<float16_t, 3, 2> tint_symbol_28(uint4 buffer[55], uint offset) {
+matrix<float16_t, 3, 2> ub_load_28(uint offset) {
const uint scalar_offset_33 = ((offset + 0u)) / 4;
- uint ubo_load_19 = buffer[scalar_offset_33 / 4][scalar_offset_33 % 4];
+ uint ubo_load_19 = ub[scalar_offset_33 / 4][scalar_offset_33 % 4];
const uint scalar_offset_34 = ((offset + 4u)) / 4;
- uint ubo_load_20 = buffer[scalar_offset_34 / 4][scalar_offset_34 % 4];
+ uint ubo_load_20 = ub[scalar_offset_34 / 4][scalar_offset_34 % 4];
const uint scalar_offset_35 = ((offset + 8u)) / 4;
- uint ubo_load_21 = buffer[scalar_offset_35 / 4][scalar_offset_35 % 4];
+ uint ubo_load_21 = ub[scalar_offset_35 / 4][scalar_offset_35 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_19 & 0xFFFF)), float16_t(f16tof32(ubo_load_19 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_20 & 0xFFFF)), float16_t(f16tof32(ubo_load_20 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_21 & 0xFFFF)), float16_t(f16tof32(ubo_load_21 >> 16))));
}
-matrix<float16_t, 3, 3> tint_symbol_29(uint4 buffer[55], uint offset) {
+matrix<float16_t, 3, 3> ub_load_29(uint offset) {
const uint scalar_offset_36 = ((offset + 0u)) / 4;
- uint4 ubo_load_23 = buffer[scalar_offset_36 / 4];
+ uint4 ubo_load_23 = ub[scalar_offset_36 / 4];
uint2 ubo_load_22 = ((scalar_offset_36 & 2) ? ubo_load_23.zw : ubo_load_23.xy);
vector<float16_t, 2> ubo_load_22_xz = vector<float16_t, 2>(f16tof32(ubo_load_22 & 0xFFFF));
float16_t ubo_load_22_y = f16tof32(ubo_load_22[0] >> 16);
const uint scalar_offset_37 = ((offset + 8u)) / 4;
- uint4 ubo_load_25 = buffer[scalar_offset_37 / 4];
+ uint4 ubo_load_25 = ub[scalar_offset_37 / 4];
uint2 ubo_load_24 = ((scalar_offset_37 & 2) ? ubo_load_25.zw : ubo_load_25.xy);
vector<float16_t, 2> ubo_load_24_xz = vector<float16_t, 2>(f16tof32(ubo_load_24 & 0xFFFF));
float16_t ubo_load_24_y = f16tof32(ubo_load_24[0] >> 16);
const uint scalar_offset_38 = ((offset + 16u)) / 4;
- uint4 ubo_load_27 = buffer[scalar_offset_38 / 4];
+ uint4 ubo_load_27 = ub[scalar_offset_38 / 4];
uint2 ubo_load_26 = ((scalar_offset_38 & 2) ? ubo_load_27.zw : ubo_load_27.xy);
vector<float16_t, 2> ubo_load_26_xz = vector<float16_t, 2>(f16tof32(ubo_load_26 & 0xFFFF));
float16_t ubo_load_26_y = f16tof32(ubo_load_26[0] >> 16);
return matrix<float16_t, 3, 3>(vector<float16_t, 3>(ubo_load_22_xz[0], ubo_load_22_y, ubo_load_22_xz[1]), vector<float16_t, 3>(ubo_load_24_xz[0], ubo_load_24_y, ubo_load_24_xz[1]), vector<float16_t, 3>(ubo_load_26_xz[0], ubo_load_26_y, ubo_load_26_xz[1]));
}
-matrix<float16_t, 3, 4> tint_symbol_30(uint4 buffer[55], uint offset) {
+matrix<float16_t, 3, 4> ub_load_30(uint offset) {
const uint scalar_offset_39 = ((offset + 0u)) / 4;
- uint4 ubo_load_29 = buffer[scalar_offset_39 / 4];
+ uint4 ubo_load_29 = ub[scalar_offset_39 / 4];
uint2 ubo_load_28 = ((scalar_offset_39 & 2) ? ubo_load_29.zw : ubo_load_29.xy);
vector<float16_t, 2> ubo_load_28_xz = vector<float16_t, 2>(f16tof32(ubo_load_28 & 0xFFFF));
vector<float16_t, 2> ubo_load_28_yw = vector<float16_t, 2>(f16tof32(ubo_load_28 >> 16));
const uint scalar_offset_40 = ((offset + 8u)) / 4;
- uint4 ubo_load_31 = buffer[scalar_offset_40 / 4];
+ uint4 ubo_load_31 = ub[scalar_offset_40 / 4];
uint2 ubo_load_30 = ((scalar_offset_40 & 2) ? ubo_load_31.zw : ubo_load_31.xy);
vector<float16_t, 2> ubo_load_30_xz = vector<float16_t, 2>(f16tof32(ubo_load_30 & 0xFFFF));
vector<float16_t, 2> ubo_load_30_yw = vector<float16_t, 2>(f16tof32(ubo_load_30 >> 16));
const uint scalar_offset_41 = ((offset + 16u)) / 4;
- uint4 ubo_load_33 = buffer[scalar_offset_41 / 4];
+ uint4 ubo_load_33 = ub[scalar_offset_41 / 4];
uint2 ubo_load_32 = ((scalar_offset_41 & 2) ? ubo_load_33.zw : ubo_load_33.xy);
vector<float16_t, 2> ubo_load_32_xz = vector<float16_t, 2>(f16tof32(ubo_load_32 & 0xFFFF));
vector<float16_t, 2> ubo_load_32_yw = vector<float16_t, 2>(f16tof32(ubo_load_32 >> 16));
return matrix<float16_t, 3, 4>(vector<float16_t, 4>(ubo_load_28_xz[0], ubo_load_28_yw[0], ubo_load_28_xz[1], ubo_load_28_yw[1]), vector<float16_t, 4>(ubo_load_30_xz[0], ubo_load_30_yw[0], ubo_load_30_xz[1], ubo_load_30_yw[1]), vector<float16_t, 4>(ubo_load_32_xz[0], ubo_load_32_yw[0], ubo_load_32_xz[1], ubo_load_32_yw[1]));
}
-matrix<float16_t, 4, 2> tint_symbol_31(uint4 buffer[55], uint offset) {
+matrix<float16_t, 4, 2> ub_load_31(uint offset) {
const uint scalar_offset_42 = ((offset + 0u)) / 4;
- uint ubo_load_34 = buffer[scalar_offset_42 / 4][scalar_offset_42 % 4];
+ uint ubo_load_34 = ub[scalar_offset_42 / 4][scalar_offset_42 % 4];
const uint scalar_offset_43 = ((offset + 4u)) / 4;
- uint ubo_load_35 = buffer[scalar_offset_43 / 4][scalar_offset_43 % 4];
+ uint ubo_load_35 = ub[scalar_offset_43 / 4][scalar_offset_43 % 4];
const uint scalar_offset_44 = ((offset + 8u)) / 4;
- uint ubo_load_36 = buffer[scalar_offset_44 / 4][scalar_offset_44 % 4];
+ uint ubo_load_36 = ub[scalar_offset_44 / 4][scalar_offset_44 % 4];
const uint scalar_offset_45 = ((offset + 12u)) / 4;
- uint ubo_load_37 = buffer[scalar_offset_45 / 4][scalar_offset_45 % 4];
+ uint ubo_load_37 = ub[scalar_offset_45 / 4][scalar_offset_45 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_34 & 0xFFFF)), float16_t(f16tof32(ubo_load_34 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_35 & 0xFFFF)), float16_t(f16tof32(ubo_load_35 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_36 & 0xFFFF)), float16_t(f16tof32(ubo_load_36 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_37 & 0xFFFF)), float16_t(f16tof32(ubo_load_37 >> 16))));
}
-matrix<float16_t, 4, 3> tint_symbol_32(uint4 buffer[55], uint offset) {
+matrix<float16_t, 4, 3> ub_load_32(uint offset) {
const uint scalar_offset_46 = ((offset + 0u)) / 4;
- uint4 ubo_load_39 = buffer[scalar_offset_46 / 4];
+ uint4 ubo_load_39 = ub[scalar_offset_46 / 4];
uint2 ubo_load_38 = ((scalar_offset_46 & 2) ? ubo_load_39.zw : ubo_load_39.xy);
vector<float16_t, 2> ubo_load_38_xz = vector<float16_t, 2>(f16tof32(ubo_load_38 & 0xFFFF));
float16_t ubo_load_38_y = f16tof32(ubo_load_38[0] >> 16);
const uint scalar_offset_47 = ((offset + 8u)) / 4;
- uint4 ubo_load_41 = buffer[scalar_offset_47 / 4];
+ uint4 ubo_load_41 = ub[scalar_offset_47 / 4];
uint2 ubo_load_40 = ((scalar_offset_47 & 2) ? ubo_load_41.zw : ubo_load_41.xy);
vector<float16_t, 2> ubo_load_40_xz = vector<float16_t, 2>(f16tof32(ubo_load_40 & 0xFFFF));
float16_t ubo_load_40_y = f16tof32(ubo_load_40[0] >> 16);
const uint scalar_offset_48 = ((offset + 16u)) / 4;
- uint4 ubo_load_43 = buffer[scalar_offset_48 / 4];
+ uint4 ubo_load_43 = ub[scalar_offset_48 / 4];
uint2 ubo_load_42 = ((scalar_offset_48 & 2) ? ubo_load_43.zw : ubo_load_43.xy);
vector<float16_t, 2> ubo_load_42_xz = vector<float16_t, 2>(f16tof32(ubo_load_42 & 0xFFFF));
float16_t ubo_load_42_y = f16tof32(ubo_load_42[0] >> 16);
const uint scalar_offset_49 = ((offset + 24u)) / 4;
- uint4 ubo_load_45 = buffer[scalar_offset_49 / 4];
+ uint4 ubo_load_45 = ub[scalar_offset_49 / 4];
uint2 ubo_load_44 = ((scalar_offset_49 & 2) ? ubo_load_45.zw : ubo_load_45.xy);
vector<float16_t, 2> ubo_load_44_xz = vector<float16_t, 2>(f16tof32(ubo_load_44 & 0xFFFF));
float16_t ubo_load_44_y = f16tof32(ubo_load_44[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_38_xz[0], ubo_load_38_y, ubo_load_38_xz[1]), vector<float16_t, 3>(ubo_load_40_xz[0], ubo_load_40_y, ubo_load_40_xz[1]), vector<float16_t, 3>(ubo_load_42_xz[0], ubo_load_42_y, ubo_load_42_xz[1]), vector<float16_t, 3>(ubo_load_44_xz[0], ubo_load_44_y, ubo_load_44_xz[1]));
}
-matrix<float16_t, 4, 4> tint_symbol_33(uint4 buffer[55], uint offset) {
+matrix<float16_t, 4, 4> ub_load_33(uint offset) {
const uint scalar_offset_50 = ((offset + 0u)) / 4;
- uint4 ubo_load_47 = buffer[scalar_offset_50 / 4];
+ uint4 ubo_load_47 = ub[scalar_offset_50 / 4];
uint2 ubo_load_46 = ((scalar_offset_50 & 2) ? ubo_load_47.zw : ubo_load_47.xy);
vector<float16_t, 2> ubo_load_46_xz = vector<float16_t, 2>(f16tof32(ubo_load_46 & 0xFFFF));
vector<float16_t, 2> ubo_load_46_yw = vector<float16_t, 2>(f16tof32(ubo_load_46 >> 16));
const uint scalar_offset_51 = ((offset + 8u)) / 4;
- uint4 ubo_load_49 = buffer[scalar_offset_51 / 4];
+ uint4 ubo_load_49 = ub[scalar_offset_51 / 4];
uint2 ubo_load_48 = ((scalar_offset_51 & 2) ? ubo_load_49.zw : ubo_load_49.xy);
vector<float16_t, 2> ubo_load_48_xz = vector<float16_t, 2>(f16tof32(ubo_load_48 & 0xFFFF));
vector<float16_t, 2> ubo_load_48_yw = vector<float16_t, 2>(f16tof32(ubo_load_48 >> 16));
const uint scalar_offset_52 = ((offset + 16u)) / 4;
- uint4 ubo_load_51 = buffer[scalar_offset_52 / 4];
+ uint4 ubo_load_51 = ub[scalar_offset_52 / 4];
uint2 ubo_load_50 = ((scalar_offset_52 & 2) ? ubo_load_51.zw : ubo_load_51.xy);
vector<float16_t, 2> ubo_load_50_xz = vector<float16_t, 2>(f16tof32(ubo_load_50 & 0xFFFF));
vector<float16_t, 2> ubo_load_50_yw = vector<float16_t, 2>(f16tof32(ubo_load_50 >> 16));
const uint scalar_offset_53 = ((offset + 24u)) / 4;
- uint4 ubo_load_53 = buffer[scalar_offset_53 / 4];
+ uint4 ubo_load_53 = ub[scalar_offset_53 / 4];
uint2 ubo_load_52 = ((scalar_offset_53 & 2) ? ubo_load_53.zw : ubo_load_53.xy);
vector<float16_t, 2> ubo_load_52_xz = vector<float16_t, 2>(f16tof32(ubo_load_52 & 0xFFFF));
vector<float16_t, 2> ubo_load_52_yw = vector<float16_t, 2>(f16tof32(ubo_load_52 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_46_xz[0], ubo_load_46_yw[0], ubo_load_46_xz[1], ubo_load_46_yw[1]), vector<float16_t, 4>(ubo_load_48_xz[0], ubo_load_48_yw[0], ubo_load_48_xz[1], ubo_load_48_yw[1]), vector<float16_t, 4>(ubo_load_50_xz[0], ubo_load_50_yw[0], ubo_load_50_xz[1], ubo_load_50_yw[1]), vector<float16_t, 4>(ubo_load_52_xz[0], ubo_load_52_yw[0], ubo_load_52_xz[1], ubo_load_52_yw[1]));
}
-typedef float3 tint_symbol_34_ret[2];
-tint_symbol_34_ret tint_symbol_34(uint4 buffer[55], uint offset) {
+typedef float3 ub_load_34_ret[2];
+ub_load_34_ret ub_load_34(uint offset) {
float3 arr[2] = (float3[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
const uint scalar_offset_54 = ((offset + (i * 16u))) / 4;
- arr[i] = asfloat(buffer[scalar_offset_54 / 4].xyz);
+ arr[i] = asfloat(ub[scalar_offset_54 / 4].xyz);
}
}
return arr;
}
-typedef matrix<float16_t, 4, 2> tint_symbol_35_ret[2];
-tint_symbol_35_ret tint_symbol_35(uint4 buffer[55], uint offset) {
+typedef matrix<float16_t, 4, 2> ub_load_35_ret[2];
+ub_load_35_ret ub_load_35(uint offset) {
matrix<float16_t, 4, 2> arr_1[2] = (matrix<float16_t, 4, 2>[2])0;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_31(buffer, (offset + (i_1 * 16u)));
+ arr_1[i_1] = ub_load_31((offset + (i_1 * 16u)));
}
}
return arr_1;
}
-Inner tint_symbol_36(uint4 buffer[55], uint offset) {
+Inner ub_load_36(uint offset) {
const uint scalar_offset_55 = ((offset + 0u)) / 4;
const uint scalar_offset_56 = ((offset + 4u)) / 4;
const uint scalar_offset_bytes = ((offset + 8u));
const uint scalar_offset_index = scalar_offset_bytes / 4;
- const Inner tint_symbol_38 = {asint(buffer[scalar_offset_55 / 4][scalar_offset_55 % 4]), asfloat(buffer[scalar_offset_56 / 4][scalar_offset_56 % 4]), float16_t(f16tof32(((buffer[scalar_offset_index / 4][scalar_offset_index % 4] >> (scalar_offset_bytes % 4 == 0 ? 0 : 16)) & 0xFFFF)))};
- return tint_symbol_38;
+ const Inner tint_symbol = {asint(ub[scalar_offset_55 / 4][scalar_offset_55 % 4]), asfloat(ub[scalar_offset_56 / 4][scalar_offset_56 % 4]), float16_t(f16tof32(((ub[scalar_offset_index / 4][scalar_offset_index % 4] >> (scalar_offset_bytes % 4 == 0 ? 0 : 16)) & 0xFFFF)))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_37_ret[4];
-tint_symbol_37_ret tint_symbol_37(uint4 buffer[55], uint offset) {
+typedef Inner ub_load_37_ret[4];
+ub_load_37_ret ub_load_37(uint offset) {
Inner arr_2[4] = (Inner[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_2[i_2] = tint_symbol_36(buffer, (offset + (i_2 * 16u)));
+ arr_2[i_2] = ub_load_36((offset + (i_2 * 16u)));
}
}
return arr_2;
@@ -292,27 +292,27 @@
vector<float16_t, 2> ubo_load_56_xz = vector<float16_t, 2>(f16tof32(ubo_load_56 & 0xFFFF));
vector<float16_t, 2> ubo_load_56_yw = vector<float16_t, 2>(f16tof32(ubo_load_56 >> 16));
const vector<float16_t, 4> vec4_f16 = vector<float16_t, 4>(ubo_load_56_xz[0], ubo_load_56_yw[0], ubo_load_56_xz[1], ubo_load_56_yw[1]);
- const float2x2 mat2x2_f32 = tint_symbol_16(ub, 168u);
- const float2x3 mat2x3_f32 = tint_symbol_17(ub, 192u);
- const float2x4 mat2x4_f32 = tint_symbol_18(ub, 224u);
- const float3x2 mat3x2_f32 = tint_symbol_19(ub, 256u);
- const float3x3 mat3x3_f32 = tint_symbol_20(ub, 288u);
- const float3x4 mat3x4_f32 = tint_symbol_21(ub, 336u);
- const float4x2 mat4x2_f32 = tint_symbol_22(ub, 384u);
- const float4x3 mat4x3_f32 = tint_symbol_23(ub, 416u);
- const float4x4 mat4x4_f32 = tint_symbol_24(ub, 480u);
- const matrix<float16_t, 2, 2> mat2x2_f16 = tint_symbol_25(ub, 544u);
- const matrix<float16_t, 2, 3> mat2x3_f16 = tint_symbol_26(ub, 552u);
- const matrix<float16_t, 2, 4> mat2x4_f16 = tint_symbol_27(ub, 568u);
- const matrix<float16_t, 3, 2> mat3x2_f16 = tint_symbol_28(ub, 584u);
- const matrix<float16_t, 3, 3> mat3x3_f16 = tint_symbol_29(ub, 600u);
- const matrix<float16_t, 3, 4> mat3x4_f16 = tint_symbol_30(ub, 624u);
- const matrix<float16_t, 4, 2> mat4x2_f16 = tint_symbol_31(ub, 648u);
- const matrix<float16_t, 4, 3> mat4x3_f16 = tint_symbol_32(ub, 664u);
- const matrix<float16_t, 4, 4> mat4x4_f16 = tint_symbol_33(ub, 696u);
- const float3 arr2_vec3_f32[2] = tint_symbol_34(ub, 736u);
- const matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = tint_symbol_35(ub, 768u);
- const Inner struct_inner = tint_symbol_36(ub, 800u);
- const Inner array_struct_inner[4] = tint_symbol_37(ub, 816u);
+ const float2x2 mat2x2_f32 = ub_load_16(168u);
+ const float2x3 mat2x3_f32 = ub_load_17(192u);
+ const float2x4 mat2x4_f32 = ub_load_18(224u);
+ const float3x2 mat3x2_f32 = ub_load_19(256u);
+ const float3x3 mat3x3_f32 = ub_load_20(288u);
+ const float3x4 mat3x4_f32 = ub_load_21(336u);
+ const float4x2 mat4x2_f32 = ub_load_22(384u);
+ const float4x3 mat4x3_f32 = ub_load_23(416u);
+ const float4x4 mat4x4_f32 = ub_load_24(480u);
+ const matrix<float16_t, 2, 2> mat2x2_f16 = ub_load_25(544u);
+ const matrix<float16_t, 2, 3> mat2x3_f16 = ub_load_26(552u);
+ const matrix<float16_t, 2, 4> mat2x4_f16 = ub_load_27(568u);
+ const matrix<float16_t, 3, 2> mat3x2_f16 = ub_load_28(584u);
+ const matrix<float16_t, 3, 3> mat3x3_f16 = ub_load_29(600u);
+ const matrix<float16_t, 3, 4> mat3x4_f16 = ub_load_30(624u);
+ const matrix<float16_t, 4, 2> mat4x2_f16 = ub_load_31(648u);
+ const matrix<float16_t, 4, 3> mat4x3_f16 = ub_load_32(664u);
+ const matrix<float16_t, 4, 4> mat4x4_f16 = ub_load_33(696u);
+ const float3 arr2_vec3_f32[2] = ub_load_34(736u);
+ const matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = ub_load_35(768u);
+ const Inner struct_inner = ub_load_36(800u);
+ const Inner array_struct_inner[4] = ub_load_37(816u);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 10f9f7c..27a33b0 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,20 +8,20 @@
return counter;
}
-float2x2 tint_symbol_1(uint4 buffer[4], uint offset) {
+float2x2 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-typedef float2x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef float2x2 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float2x2 arr[4] = (float2x2[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -31,8 +31,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float2x2 l_a[4] = tint_symbol(a, 0u);
- const float2x2 l_a_i = tint_symbol_1(a, (16u * uint(p_a_i_save)));
+ const float2x2 l_a[4] = a_load(0u);
+ const float2x2 l_a_i = a_load_1((16u * uint(p_a_i_save)));
const uint scalar_offset_2 = (((16u * uint(p_a_i_save)) + (8u * uint(p_a_i_i_save)))) / 4;
uint4 ubo_load_2 = a[scalar_offset_2 / 4];
const float2 l_a_i_i = asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 10f9f7c..27a33b0 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,20 +8,20 @@
return counter;
}
-float2x2 tint_symbol_1(uint4 buffer[4], uint offset) {
+float2x2 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-typedef float2x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef float2x2 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float2x2 arr[4] = (float2x2[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -31,8 +31,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float2x2 l_a[4] = tint_symbol(a, 0u);
- const float2x2 l_a_i = tint_symbol_1(a, (16u * uint(p_a_i_save)));
+ const float2x2 l_a[4] = a_load(0u);
+ const float2x2 l_a_i = a_load_1((16u * uint(p_a_i_save)));
const uint scalar_offset_2 = (((16u * uint(p_a_i_save)) + (8u * uint(p_a_i_i_save)))) / 4;
uint4 ubo_load_2 = a[scalar_offset_2 / 4];
const float2 l_a_i_i = asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index c533eba..167a5f6 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -2,20 +2,20 @@
uint4 a[4];
};
-float2x2 tint_symbol_1(uint4 buffer[4], uint offset) {
+float2x2 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-typedef float2x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef float2x2 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float2x2 arr[4] = (float2x2[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = a_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -23,8 +23,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float2x2 l_a[4] = tint_symbol(a, 0u);
- const float2x2 l_a_i = tint_symbol_1(a, 32u);
+ const float2x2 l_a[4] = a_load(0u);
+ const float2x2 l_a_i = a_load_1(32u);
const float2 l_a_i_i = asfloat(a[2].zw);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index c533eba..167a5f6 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -2,20 +2,20 @@
uint4 a[4];
};
-float2x2 tint_symbol_1(uint4 buffer[4], uint offset) {
+float2x2 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-typedef float2x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef float2x2 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float2x2 arr[4] = (float2x2[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = a_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -23,8 +23,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float2x2 l_a[4] = tint_symbol(a, 0u);
- const float2x2 l_a_i = tint_symbol_1(a, 32u);
+ const float2x2 l_a[4] = a_load(0u);
+ const float2x2 l_a_i = a_load_1(32u);
const float2 l_a_i_i = asfloat(a[2].zw);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_builtin.wgsl.expected.dxc.hlsl
index e8f4937..454c4dc 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[4];
};
-float2x2 tint_symbol(uint4 buffer[4], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x2 t = transpose(tint_symbol(u, 32u));
+ const float2x2 t = transpose(u_load(32u));
const float l = length(asfloat(u[0].zw).yx);
const float a = abs(asfloat(u[0].zw).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_builtin.wgsl.expected.fxc.hlsl
index e8f4937..454c4dc 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[4];
};
-float2x2 tint_symbol(uint4 buffer[4], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x2 t = transpose(tint_symbol(u, 32u));
+ const float2x2 t = transpose(u_load(32u));
const float l = length(asfloat(u[0].zw).yx);
const float a = abs(asfloat(u[0].zw).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.dxc.hlsl
index 46e25b6..22e2429 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -14,20 +14,20 @@
void d(float f_1) {
}
-float2x2 tint_symbol_1(uint4 buffer[4], uint offset) {
+float2x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-typedef float2x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef float2x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x2 arr[4] = (float2x2[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = u_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -35,8 +35,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 16u));
+ a(u_load(0u));
+ b(u_load_1(16u));
c(asfloat(u[1].xy).yx);
d(asfloat(u[1].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.fxc.hlsl
index 46e25b6..22e2429 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -14,20 +14,20 @@
void d(float f_1) {
}
-float2x2 tint_symbol_1(uint4 buffer[4], uint offset) {
+float2x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-typedef float2x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef float2x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x2 arr[4] = (float2x2[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = u_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -35,8 +35,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 16u));
+ a(u_load(0u));
+ b(u_load_1(16u));
c(asfloat(u[1].xy).yx);
d(asfloat(u[1].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.dxc.hlsl
index 4595eb2..a35a970 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,20 +3,20 @@
};
static float2x2 p[4] = (float2x2[4])0;
-float2x2 tint_symbol_1(uint4 buffer[4], uint offset) {
+float2x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-typedef float2x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef float2x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x2 arr[4] = (float2x2[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = u_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -24,8 +24,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 32u);
+ p = u_load(0u);
+ p[1] = u_load_1(32u);
p[1][0] = asfloat(u[0].zw).yx;
p[1][0].x = asfloat(u[0].z);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.fxc.hlsl
index 4595eb2..a35a970 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,20 +3,20 @@
};
static float2x2 p[4] = (float2x2[4])0;
-float2x2 tint_symbol_1(uint4 buffer[4], uint offset) {
+float2x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-typedef float2x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef float2x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x2 arr[4] = (float2x2[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = u_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -24,8 +24,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 32u);
+ p = u_load(0u);
+ p[1] = u_load_1(32u);
p[1][0] = asfloat(u[0].zw).yx;
p[1][0].x = asfloat(u[0].z);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.dxc.hlsl
index 280d978..ff1c64e 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,34 +3,34 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void s_store_1(uint offset, float2x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float2x2 value[4]) {
+void s_store(uint offset, float2x2 value[4]) {
float2x2 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 16u)), array_1[i]);
+ s_store_1((offset + (i * 16u)), array_1[i]);
}
}
}
-float2x2 tint_symbol_4(uint4 buffer[4], uint offset) {
+float2x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-typedef float2x2 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[4], uint offset) {
+typedef float2x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x2 arr[4] = (float2x2[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -38,8 +38,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 16u, tint_symbol_4(u, 32u));
+ s_store(0u, u_load(0u));
+ s_store_1(16u, u_load_1(32u));
s.Store2(16u, asuint(asfloat(u[0].zw).yx));
s.Store(16u, asuint(asfloat(u[0].z)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.fxc.hlsl
index 280d978..ff1c64e 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,34 +3,34 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void s_store_1(uint offset, float2x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float2x2 value[4]) {
+void s_store(uint offset, float2x2 value[4]) {
float2x2 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 16u)), array_1[i]);
+ s_store_1((offset + (i * 16u)), array_1[i]);
}
}
}
-float2x2 tint_symbol_4(uint4 buffer[4], uint offset) {
+float2x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-typedef float2x2 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[4], uint offset) {
+typedef float2x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x2 arr[4] = (float2x2[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -38,8 +38,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 16u, tint_symbol_4(u, 32u));
+ s_store(0u, u_load(0u));
+ s_store_1(16u, u_load_1(32u));
s.Store2(16u, asuint(asfloat(u[0].zw).yx));
s.Store(16u, asuint(asfloat(u[0].z)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 29d1ba2..e000768 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,20 +7,20 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x2 tint_symbol_3(uint4 buffer[4], uint offset) {
+float2x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-typedef float2x2 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
+typedef float2x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x2 arr[4] = (float2x2[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -34,8 +34,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 32u);
+ w = u_load(0u);
+ w[1] = u_load_1(32u);
w[1][0] = asfloat(u[0].zw).yx;
w[1][0].x = asfloat(u[0].z);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 29d1ba2..e000768 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,20 +7,20 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x2 tint_symbol_3(uint4 buffer[4], uint offset) {
+float2x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-typedef float2x2 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
+typedef float2x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x2 arr[4] = (float2x2[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -34,8 +34,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 32u);
+ w = u_load(0u);
+ w[1] = u_load_1(32u);
w[1][0] = asfloat(u[0].zw).yx;
w[1][0].x = asfloat(u[0].z);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 43a8682..9f294b3 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,26 +8,26 @@
return counter;
}
-matrix<float16_t, 2, 3> tint_symbol_1(uint4 buffer[4], uint offset) {
+matrix<float16_t, 2, 3> a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]));
}
-typedef matrix<float16_t, 2, 3> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 2, 3> a_load_ret[4];
+a_load_ret a_load(uint offset) {
matrix<float16_t, 2, 3> arr[4] = (matrix<float16_t, 2, 3>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -37,8 +37,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const matrix<float16_t, 2, 3> l_a[4] = tint_symbol(a, 0u);
- const matrix<float16_t, 2, 3> l_a_i = tint_symbol_1(a, (16u * uint(p_a_i_save)));
+ const matrix<float16_t, 2, 3> l_a[4] = a_load(0u);
+ const matrix<float16_t, 2, 3> l_a_i = a_load_1((16u * uint(p_a_i_save)));
const uint scalar_offset_2 = (((16u * uint(p_a_i_save)) + (8u * uint(p_a_i_i_save)))) / 4;
uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 6a66652..da13a52 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -2,26 +2,26 @@
uint4 a[4];
};
-matrix<float16_t, 2, 3> tint_symbol_1(uint4 buffer[4], uint offset) {
+matrix<float16_t, 2, 3> a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]));
}
-typedef matrix<float16_t, 2, 3> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 2, 3> a_load_ret[4];
+a_load_ret a_load(uint offset) {
matrix<float16_t, 2, 3> arr[4] = (matrix<float16_t, 2, 3>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = a_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -29,8 +29,8 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 2, 3> l_a[4] = tint_symbol(a, 0u);
- const matrix<float16_t, 2, 3> l_a_i = tint_symbol_1(a, 32u);
+ const matrix<float16_t, 2, 3> l_a[4] = a_load(0u);
+ const matrix<float16_t, 2, 3> l_a_i = a_load_1(32u);
uint2 ubo_load_4 = a[2].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_builtin.wgsl.expected.dxc.hlsl
index 277e378..3f7c98b 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,14 +2,14 @@
uint4 u[4];
};
-matrix<float16_t, 2, 3> tint_symbol(uint4 buffer[4], uint offset) {
+matrix<float16_t, 2, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
@@ -18,7 +18,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 3, 2> t = transpose(tint_symbol(u, 32u));
+ const matrix<float16_t, 3, 2> t = transpose(u_load(32u));
uint2 ubo_load_4 = u[0].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_fn.wgsl.expected.dxc.hlsl
index 19bfcc6..65a0d29 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -14,26 +14,26 @@
void d(float16_t f_1) {
}
-matrix<float16_t, 2, 3> tint_symbol_1(uint4 buffer[4], uint offset) {
+matrix<float16_t, 2, 3> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]));
}
-typedef matrix<float16_t, 2, 3> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 2, 3> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 2, 3> arr[4] = (matrix<float16_t, 2, 3>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = u_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -41,8 +41,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 16u));
+ a(u_load(0u));
+ b(u_load_1(16u));
uint2 ubo_load_4 = u[1].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.dxc.hlsl
index 9fbd299..7282cf2 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.dxc.hlsl
@@ -3,26 +3,26 @@
};
static matrix<float16_t, 2, 3> p[4] = (matrix<float16_t, 2, 3>[4])0;
-matrix<float16_t, 2, 3> tint_symbol_1(uint4 buffer[4], uint offset) {
+matrix<float16_t, 2, 3> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]));
}
-typedef matrix<float16_t, 2, 3> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 2, 3> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 2, 3> arr[4] = (matrix<float16_t, 2, 3>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = u_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -30,8 +30,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 32u);
+ p = u_load(0u);
+ p[1] = u_load_1(32u);
uint2 ubo_load_4 = u[0].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_storage.wgsl.expected.dxc.hlsl
index b406594..995da33 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -3,40 +3,40 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+void s_store_1(uint offset, matrix<float16_t, 2, 3> value) {
+ s.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 3> value[4]) {
+void s_store(uint offset, matrix<float16_t, 2, 3> value[4]) {
matrix<float16_t, 2, 3> array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 16u)), array_1[i]);
+ s_store_1((offset + (i * 16u)), array_1[i]);
}
}
}
-matrix<float16_t, 2, 3> tint_symbol_4(uint4 buffer[4], uint offset) {
+matrix<float16_t, 2, 3> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]));
}
-typedef matrix<float16_t, 2, 3> tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 2, 3> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 2, 3> arr[4] = (matrix<float16_t, 2, 3>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -44,8 +44,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 16u, tint_symbol_4(u, 32u));
+ s_store(0u, u_load(0u));
+ s_store_1(16u, u_load_1(32u));
uint2 ubo_load_4 = u[0].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 4f956e9..9a0e71a 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,26 +7,26 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 2, 3> tint_symbol_3(uint4 buffer[4], uint offset) {
+matrix<float16_t, 2, 3> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]));
}
-typedef matrix<float16_t, 2, 3> tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 2, 3> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 2, 3> arr[4] = (matrix<float16_t, 2, 3>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -40,8 +40,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 32u);
+ w = u_load(0u);
+ w[1] = u_load_1(32u);
uint2 ubo_load_4 = u[0].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 0533b18..379c606 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,18 +8,18 @@
return counter;
}
-float2x3 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x3 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz));
}
-typedef float2x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x3 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float2x3 arr[4] = (float2x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -29,8 +29,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float2x3 l_a[4] = tint_symbol(a, 0u);
- const float2x3 l_a_i = tint_symbol_1(a, (32u * uint(p_a_i_save)));
+ const float2x3 l_a[4] = a_load(0u);
+ const float2x3 l_a_i = a_load_1((32u * uint(p_a_i_save)));
const uint scalar_offset_2 = (((32u * uint(p_a_i_save)) + (16u * uint(p_a_i_i_save)))) / 4;
const float3 l_a_i_i = asfloat(a[scalar_offset_2 / 4].xyz);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 0533b18..379c606 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,18 +8,18 @@
return counter;
}
-float2x3 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x3 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz));
}
-typedef float2x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x3 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float2x3 arr[4] = (float2x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -29,8 +29,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float2x3 l_a[4] = tint_symbol(a, 0u);
- const float2x3 l_a_i = tint_symbol_1(a, (32u * uint(p_a_i_save)));
+ const float2x3 l_a[4] = a_load(0u);
+ const float2x3 l_a_i = a_load_1((32u * uint(p_a_i_save)));
const uint scalar_offset_2 = (((32u * uint(p_a_i_save)) + (16u * uint(p_a_i_i_save)))) / 4;
const float3 l_a_i_i = asfloat(a[scalar_offset_2 / 4].xyz);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index a6dcbe4..d638727 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -2,18 +2,18 @@
uint4 a[8];
};
-float2x3 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x3 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz));
}
-typedef float2x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x3 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float2x3 arr[4] = (float2x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = a_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -21,8 +21,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float2x3 l_a[4] = tint_symbol(a, 0u);
- const float2x3 l_a_i = tint_symbol_1(a, 64u);
+ const float2x3 l_a[4] = a_load(0u);
+ const float2x3 l_a_i = a_load_1(64u);
const float3 l_a_i_i = asfloat(a[5].xyz);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index a6dcbe4..d638727 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -2,18 +2,18 @@
uint4 a[8];
};
-float2x3 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x3 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz));
}
-typedef float2x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x3 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float2x3 arr[4] = (float2x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = a_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -21,8 +21,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float2x3 l_a[4] = tint_symbol(a, 0u);
- const float2x3 l_a_i = tint_symbol_1(a, 64u);
+ const float2x3 l_a[4] = a_load(0u);
+ const float2x3 l_a_i = a_load_1(64u);
const float3 l_a_i_i = asfloat(a[5].xyz);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.dxc.hlsl
index 3ba88af..80263fe 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[8];
};
-float2x3 tint_symbol(uint4 buffer[8], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x2 t = transpose(tint_symbol(u, 64u));
+ const float3x2 t = transpose(u_load(64u));
const float l = length(asfloat(u[1].xyz).zxy);
const float a = abs(asfloat(u[1].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.fxc.hlsl
index 3ba88af..80263fe 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[8];
};
-float2x3 tint_symbol(uint4 buffer[8], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x2 t = transpose(tint_symbol(u, 64u));
+ const float3x2 t = transpose(u_load(64u));
const float l = length(asfloat(u[1].xyz).zxy);
const float a = abs(asfloat(u[1].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.dxc.hlsl
index 9c293d7..87ee405 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -14,18 +14,18 @@
void d(float f_1) {
}
-float2x3 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-typedef float2x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x3 arr[4] = (float2x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -33,8 +33,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 32u));
+ a(u_load(0u));
+ b(u_load_1(32u));
c(asfloat(u[2].xyz).zxy);
d(asfloat(u[2].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.fxc.hlsl
index 9c293d7..87ee405 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -14,18 +14,18 @@
void d(float f_1) {
}
-float2x3 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-typedef float2x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x3 arr[4] = (float2x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -33,8 +33,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 32u));
+ a(u_load(0u));
+ b(u_load_1(32u));
c(asfloat(u[2].xyz).zxy);
d(asfloat(u[2].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.dxc.hlsl
index 5f9d507..296b739 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,18 +3,18 @@
};
static float2x3 p[4] = (float2x3[4])0;
-float2x3 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-typedef float2x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x3 arr[4] = (float2x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -22,8 +22,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 64u);
+ p = u_load(0u);
+ p[1] = u_load_1(64u);
p[1][0] = asfloat(u[1].xyz).zxy;
p[1][0].x = asfloat(u[1].x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.fxc.hlsl
index 5f9d507..296b739 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,18 +3,18 @@
};
static float2x3 p[4] = (float2x3[4])0;
-float2x3 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-typedef float2x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x3 arr[4] = (float2x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -22,8 +22,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 64u);
+ p = u_load(0u);
+ p[1] = u_load_1(64u);
p[1][0] = asfloat(u[1].xyz).zxy;
p[1][0].x = asfloat(u[1].x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.dxc.hlsl
index 93021a5..fb02fff 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,32 +3,32 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void s_store_1(uint offset, float2x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float2x3 value[4]) {
+void s_store(uint offset, float2x3 value[4]) {
float2x3 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 32u)), array_1[i]);
+ s_store_1((offset + (i * 32u)), array_1[i]);
}
}
}
-float2x3 tint_symbol_4(uint4 buffer[8], uint offset) {
+float2x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-typedef float2x3 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[8], uint offset) {
+typedef float2x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x3 arr[4] = (float2x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -36,8 +36,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 32u, tint_symbol_4(u, 64u));
+ s_store(0u, u_load(0u));
+ s_store_1(32u, u_load_1(64u));
s.Store3(32u, asuint(asfloat(u[1].xyz).zxy));
s.Store(32u, asuint(asfloat(u[1].x)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.fxc.hlsl
index 93021a5..fb02fff 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,32 +3,32 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void s_store_1(uint offset, float2x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float2x3 value[4]) {
+void s_store(uint offset, float2x3 value[4]) {
float2x3 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 32u)), array_1[i]);
+ s_store_1((offset + (i * 32u)), array_1[i]);
}
}
}
-float2x3 tint_symbol_4(uint4 buffer[8], uint offset) {
+float2x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-typedef float2x3 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[8], uint offset) {
+typedef float2x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x3 arr[4] = (float2x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -36,8 +36,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 32u, tint_symbol_4(u, 64u));
+ s_store(0u, u_load(0u));
+ s_store_1(32u, u_load_1(64u));
s.Store3(32u, asuint(asfloat(u[1].xyz).zxy));
s.Store(32u, asuint(asfloat(u[1].x)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 0b13b88..aa69e96 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,18 +7,18 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x3 tint_symbol_3(uint4 buffer[8], uint offset) {
+float2x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-typedef float2x3 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[8], uint offset) {
+typedef float2x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x3 arr[4] = (float2x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -32,8 +32,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 64u);
+ w = u_load(0u);
+ w[1] = u_load_1(64u);
w[1][0] = asfloat(u[1].xyz).zxy;
w[1][0].x = asfloat(u[1].x);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 0b13b88..aa69e96 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,18 +7,18 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x3 tint_symbol_3(uint4 buffer[8], uint offset) {
+float2x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-typedef float2x3 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[8], uint offset) {
+typedef float2x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x3 arr[4] = (float2x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -32,8 +32,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 64u);
+ w = u_load(0u);
+ w[1] = u_load_1(64u);
w[1][0] = asfloat(u[1].xyz).zxy;
w[1][0].x = asfloat(u[1].x);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index fe06356..28bccc7 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,26 +8,26 @@
return counter;
}
-matrix<float16_t, 2, 4> tint_symbol_1(uint4 buffer[4], uint offset) {
+matrix<float16_t, 2, 4> a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
}
-typedef matrix<float16_t, 2, 4> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 2, 4> a_load_ret[4];
+a_load_ret a_load(uint offset) {
matrix<float16_t, 2, 4> arr[4] = (matrix<float16_t, 2, 4>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -37,8 +37,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const matrix<float16_t, 2, 4> l_a[4] = tint_symbol(a, 0u);
- const matrix<float16_t, 2, 4> l_a_i = tint_symbol_1(a, (16u * uint(p_a_i_save)));
+ const matrix<float16_t, 2, 4> l_a[4] = a_load(0u);
+ const matrix<float16_t, 2, 4> l_a_i = a_load_1((16u * uint(p_a_i_save)));
const uint scalar_offset_2 = (((16u * uint(p_a_i_save)) + (8u * uint(p_a_i_i_save)))) / 4;
uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 3632bea..37d8cdd 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -2,26 +2,26 @@
uint4 a[4];
};
-matrix<float16_t, 2, 4> tint_symbol_1(uint4 buffer[4], uint offset) {
+matrix<float16_t, 2, 4> a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
}
-typedef matrix<float16_t, 2, 4> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 2, 4> a_load_ret[4];
+a_load_ret a_load(uint offset) {
matrix<float16_t, 2, 4> arr[4] = (matrix<float16_t, 2, 4>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = a_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -29,8 +29,8 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 2, 4> l_a[4] = tint_symbol(a, 0u);
- const matrix<float16_t, 2, 4> l_a_i = tint_symbol_1(a, 32u);
+ const matrix<float16_t, 2, 4> l_a[4] = a_load(0u);
+ const matrix<float16_t, 2, 4> l_a_i = a_load_1(32u);
uint2 ubo_load_4 = a[2].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_builtin.wgsl.expected.dxc.hlsl
index b6a103e..7b85111 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,14 +2,14 @@
uint4 u[4];
};
-matrix<float16_t, 2, 4> tint_symbol(uint4 buffer[4], uint offset) {
+matrix<float16_t, 2, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
@@ -18,7 +18,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 4, 2> t = transpose(tint_symbol(u, 32u));
+ const matrix<float16_t, 4, 2> t = transpose(u_load(32u));
uint2 ubo_load_4 = u[0].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_fn.wgsl.expected.dxc.hlsl
index f249b86..e3bbeba 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -14,26 +14,26 @@
void d(float16_t f_1) {
}
-matrix<float16_t, 2, 4> tint_symbol_1(uint4 buffer[4], uint offset) {
+matrix<float16_t, 2, 4> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
}
-typedef matrix<float16_t, 2, 4> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 2, 4> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 2, 4> arr[4] = (matrix<float16_t, 2, 4>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = u_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -41,8 +41,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 16u));
+ a(u_load(0u));
+ b(u_load_1(16u));
uint2 ubo_load_4 = u[1].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.dxc.hlsl
index 245b619..2dbdd05 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.dxc.hlsl
@@ -3,26 +3,26 @@
};
static matrix<float16_t, 2, 4> p[4] = (matrix<float16_t, 2, 4>[4])0;
-matrix<float16_t, 2, 4> tint_symbol_1(uint4 buffer[4], uint offset) {
+matrix<float16_t, 2, 4> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
}
-typedef matrix<float16_t, 2, 4> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 2, 4> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 2, 4> arr[4] = (matrix<float16_t, 2, 4>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = u_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -30,8 +30,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 32u);
+ p = u_load(0u);
+ p[1] = u_load_1(32u);
uint2 ubo_load_4 = u[0].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_storage.wgsl.expected.dxc.hlsl
index 28c564e..33f7c70 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -3,40 +3,40 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+void s_store_1(uint offset, matrix<float16_t, 2, 4> value) {
+ s.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 4> value[4]) {
+void s_store(uint offset, matrix<float16_t, 2, 4> value[4]) {
matrix<float16_t, 2, 4> array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 16u)), array_1[i]);
+ s_store_1((offset + (i * 16u)), array_1[i]);
}
}
}
-matrix<float16_t, 2, 4> tint_symbol_4(uint4 buffer[4], uint offset) {
+matrix<float16_t, 2, 4> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
}
-typedef matrix<float16_t, 2, 4> tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 2, 4> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 2, 4> arr[4] = (matrix<float16_t, 2, 4>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -44,8 +44,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 16u, tint_symbol_4(u, 32u));
+ s_store(0u, u_load(0u));
+ s_store_1(16u, u_load_1(32u));
uint2 ubo_load_4 = u[0].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 2efdd38..888645b 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,26 +7,26 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 2, 4> tint_symbol_3(uint4 buffer[4], uint offset) {
+matrix<float16_t, 2, 4> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
}
-typedef matrix<float16_t, 2, 4> tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 2, 4> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 2, 4> arr[4] = (matrix<float16_t, 2, 4>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -40,8 +40,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 32u);
+ w = u_load(0u);
+ w[1] = u_load_1(32u);
uint2 ubo_load_4 = u[0].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 2f907f8..c8636d8 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,18 +8,18 @@
return counter;
}
-float2x4 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x4 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]));
}
-typedef float2x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x4 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float2x4 arr[4] = (float2x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -29,8 +29,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float2x4 l_a[4] = tint_symbol(a, 0u);
- const float2x4 l_a_i = tint_symbol_1(a, (32u * uint(p_a_i_save)));
+ const float2x4 l_a[4] = a_load(0u);
+ const float2x4 l_a_i = a_load_1((32u * uint(p_a_i_save)));
const uint scalar_offset_2 = (((32u * uint(p_a_i_save)) + (16u * uint(p_a_i_i_save)))) / 4;
const float4 l_a_i_i = asfloat(a[scalar_offset_2 / 4]);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 2f907f8..c8636d8 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,18 +8,18 @@
return counter;
}
-float2x4 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x4 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]));
}
-typedef float2x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x4 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float2x4 arr[4] = (float2x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -29,8 +29,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float2x4 l_a[4] = tint_symbol(a, 0u);
- const float2x4 l_a_i = tint_symbol_1(a, (32u * uint(p_a_i_save)));
+ const float2x4 l_a[4] = a_load(0u);
+ const float2x4 l_a_i = a_load_1((32u * uint(p_a_i_save)));
const uint scalar_offset_2 = (((32u * uint(p_a_i_save)) + (16u * uint(p_a_i_i_save)))) / 4;
const float4 l_a_i_i = asfloat(a[scalar_offset_2 / 4]);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 89fd887..f8d3475 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -2,18 +2,18 @@
uint4 a[8];
};
-float2x4 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x4 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]));
}
-typedef float2x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x4 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float2x4 arr[4] = (float2x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = a_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -21,8 +21,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float2x4 l_a[4] = tint_symbol(a, 0u);
- const float2x4 l_a_i = tint_symbol_1(a, 64u);
+ const float2x4 l_a[4] = a_load(0u);
+ const float2x4 l_a_i = a_load_1(64u);
const float4 l_a_i_i = asfloat(a[5]);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index 89fd887..f8d3475 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -2,18 +2,18 @@
uint4 a[8];
};
-float2x4 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x4 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]));
}
-typedef float2x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x4 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float2x4 arr[4] = (float2x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = a_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -21,8 +21,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float2x4 l_a[4] = tint_symbol(a, 0u);
- const float2x4 l_a_i = tint_symbol_1(a, 64u);
+ const float2x4 l_a[4] = a_load(0u);
+ const float2x4 l_a_i = a_load_1(64u);
const float4 l_a_i_i = asfloat(a[5]);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.dxc.hlsl
index e5ed937..7ffe200 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[8];
};
-float2x4 tint_symbol(uint4 buffer[8], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x2 t = transpose(tint_symbol(u, 64u));
+ const float4x2 t = transpose(u_load(64u));
const float l = length(asfloat(u[1]).ywxz);
const float a = abs(asfloat(u[1]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.fxc.hlsl
index e5ed937..7ffe200 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[8];
};
-float2x4 tint_symbol(uint4 buffer[8], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x2 t = transpose(tint_symbol(u, 64u));
+ const float4x2 t = transpose(u_load(64u));
const float l = length(asfloat(u[1]).ywxz);
const float a = abs(asfloat(u[1]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.dxc.hlsl
index ea9471a..3d5d72d 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -14,18 +14,18 @@
void d(float f_1) {
}
-float2x4 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-typedef float2x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x4 arr[4] = (float2x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -33,8 +33,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 32u));
+ a(u_load(0u));
+ b(u_load_1(32u));
c(asfloat(u[2]).ywxz);
d(asfloat(u[2]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.fxc.hlsl
index ea9471a..3d5d72d 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -14,18 +14,18 @@
void d(float f_1) {
}
-float2x4 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-typedef float2x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x4 arr[4] = (float2x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -33,8 +33,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 32u));
+ a(u_load(0u));
+ b(u_load_1(32u));
c(asfloat(u[2]).ywxz);
d(asfloat(u[2]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.dxc.hlsl
index ba81ce8..88ec239 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,18 +3,18 @@
};
static float2x4 p[4] = (float2x4[4])0;
-float2x4 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-typedef float2x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x4 arr[4] = (float2x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -22,8 +22,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 64u);
+ p = u_load(0u);
+ p[1] = u_load_1(64u);
p[1][0] = asfloat(u[1]).ywxz;
p[1][0].x = asfloat(u[1].x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.fxc.hlsl
index ba81ce8..88ec239 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,18 +3,18 @@
};
static float2x4 p[4] = (float2x4[4])0;
-float2x4 tint_symbol_1(uint4 buffer[8], uint offset) {
+float2x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-typedef float2x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float2x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x4 arr[4] = (float2x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -22,8 +22,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 64u);
+ p = u_load(0u);
+ p[1] = u_load_1(64u);
p[1][0] = asfloat(u[1]).ywxz;
p[1][0].x = asfloat(u[1].x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.dxc.hlsl
index 5b44d2d..b12251b 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,32 +3,32 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void s_store_1(uint offset, float2x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float2x4 value[4]) {
+void s_store(uint offset, float2x4 value[4]) {
float2x4 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 32u)), array_1[i]);
+ s_store_1((offset + (i * 32u)), array_1[i]);
}
}
}
-float2x4 tint_symbol_4(uint4 buffer[8], uint offset) {
+float2x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-typedef float2x4 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[8], uint offset) {
+typedef float2x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x4 arr[4] = (float2x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -36,8 +36,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 32u, tint_symbol_4(u, 64u));
+ s_store(0u, u_load(0u));
+ s_store_1(32u, u_load_1(64u));
s.Store4(32u, asuint(asfloat(u[1]).ywxz));
s.Store(32u, asuint(asfloat(u[1].x)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.fxc.hlsl
index 5b44d2d..b12251b 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,32 +3,32 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void s_store_1(uint offset, float2x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float2x4 value[4]) {
+void s_store(uint offset, float2x4 value[4]) {
float2x4 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 32u)), array_1[i]);
+ s_store_1((offset + (i * 32u)), array_1[i]);
}
}
}
-float2x4 tint_symbol_4(uint4 buffer[8], uint offset) {
+float2x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-typedef float2x4 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[8], uint offset) {
+typedef float2x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x4 arr[4] = (float2x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -36,8 +36,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 32u, tint_symbol_4(u, 64u));
+ s_store(0u, u_load(0u));
+ s_store_1(32u, u_load_1(64u));
s.Store4(32u, asuint(asfloat(u[1]).ywxz));
s.Store(32u, asuint(asfloat(u[1].x)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 963cbf8..26b249f 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,18 +7,18 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x4 tint_symbol_3(uint4 buffer[8], uint offset) {
+float2x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-typedef float2x4 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[8], uint offset) {
+typedef float2x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x4 arr[4] = (float2x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -32,8 +32,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 64u);
+ w = u_load(0u);
+ w[1] = u_load_1(64u);
w[1][0] = asfloat(u[1]).ywxz;
w[1][0].x = asfloat(u[1].x);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 963cbf8..26b249f 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,18 +7,18 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x4 tint_symbol_3(uint4 buffer[8], uint offset) {
+float2x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-typedef float2x4 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[8], uint offset) {
+typedef float2x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float2x4 arr[4] = (float2x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -32,8 +32,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 64u);
+ w = u_load(0u);
+ w[1] = u_load_1(64u);
w[1][0] = asfloat(u[1]).ywxz;
w[1][0].x = asfloat(u[1].x);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index ec7bba0..79aed43 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,19 +8,19 @@
return counter;
}
-float3x3 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x3 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz));
}
-typedef float3x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x3 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float3x3 arr[4] = (float3x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 48u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 48u)));
}
}
return arr;
@@ -30,8 +30,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float3x3 l_a[4] = tint_symbol(a, 0u);
- const float3x3 l_a_i = tint_symbol_1(a, (48u * uint(p_a_i_save)));
+ const float3x3 l_a[4] = a_load(0u);
+ const float3x3 l_a_i = a_load_1((48u * uint(p_a_i_save)));
const uint scalar_offset_3 = (((48u * uint(p_a_i_save)) + (16u * uint(p_a_i_i_save)))) / 4;
const float3 l_a_i_i = asfloat(a[scalar_offset_3 / 4].xyz);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index ec7bba0..79aed43 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,19 +8,19 @@
return counter;
}
-float3x3 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x3 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz));
}
-typedef float3x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x3 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float3x3 arr[4] = (float3x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 48u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 48u)));
}
}
return arr;
@@ -30,8 +30,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float3x3 l_a[4] = tint_symbol(a, 0u);
- const float3x3 l_a_i = tint_symbol_1(a, (48u * uint(p_a_i_save)));
+ const float3x3 l_a[4] = a_load(0u);
+ const float3x3 l_a_i = a_load_1((48u * uint(p_a_i_save)));
const uint scalar_offset_3 = (((48u * uint(p_a_i_save)) + (16u * uint(p_a_i_i_save)))) / 4;
const float3 l_a_i_i = asfloat(a[scalar_offset_3 / 4].xyz);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index ac8182a..428ba4f 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -2,19 +2,19 @@
uint4 a[12];
};
-float3x3 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x3 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz));
}
-typedef float3x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x3 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float3x3 arr[4] = (float3x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 48u)));
+ arr[i] = a_load_1((offset + (i * 48u)));
}
}
return arr;
@@ -22,8 +22,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float3x3 l_a[4] = tint_symbol(a, 0u);
- const float3x3 l_a_i = tint_symbol_1(a, 96u);
+ const float3x3 l_a[4] = a_load(0u);
+ const float3x3 l_a_i = a_load_1(96u);
const float3 l_a_i_i = asfloat(a[7].xyz);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index ac8182a..428ba4f 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -2,19 +2,19 @@
uint4 a[12];
};
-float3x3 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x3 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz));
}
-typedef float3x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x3 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float3x3 arr[4] = (float3x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 48u)));
+ arr[i] = a_load_1((offset + (i * 48u)));
}
}
return arr;
@@ -22,8 +22,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float3x3 l_a[4] = tint_symbol(a, 0u);
- const float3x3 l_a_i = tint_symbol_1(a, 96u);
+ const float3x3 l_a[4] = a_load(0u);
+ const float3x3 l_a_i = a_load_1(96u);
const float3 l_a_i_i = asfloat(a[7].xyz);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.dxc.hlsl
index 6bf5247..5ac2bb6 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[12];
};
-float3x3 tint_symbol(uint4 buffer[12], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x3 t = transpose(tint_symbol(u, 96u));
+ const float3x3 t = transpose(u_load(96u));
const float l = length(asfloat(u[1].xyz).zxy);
const float a = abs(asfloat(u[1].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.fxc.hlsl
index 6bf5247..5ac2bb6 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[12];
};
-float3x3 tint_symbol(uint4 buffer[12], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x3 t = transpose(tint_symbol(u, 96u));
+ const float3x3 t = transpose(u_load(96u));
const float l = length(asfloat(u[1].xyz).zxy);
const float a = abs(asfloat(u[1].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.dxc.hlsl
index 3251692..505cd5e 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -14,19 +14,19 @@
void d(float f_1) {
}
-float3x3 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-typedef float3x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x3 arr[4] = (float3x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 48u)));
+ arr[i] = u_load_1((offset + (i * 48u)));
}
}
return arr;
@@ -34,8 +34,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 48u));
+ a(u_load(0u));
+ b(u_load_1(48u));
c(asfloat(u[3].xyz).zxy);
d(asfloat(u[3].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.fxc.hlsl
index 3251692..505cd5e 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -14,19 +14,19 @@
void d(float f_1) {
}
-float3x3 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-typedef float3x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x3 arr[4] = (float3x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 48u)));
+ arr[i] = u_load_1((offset + (i * 48u)));
}
}
return arr;
@@ -34,8 +34,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 48u));
+ a(u_load(0u));
+ b(u_load_1(48u));
c(asfloat(u[3].xyz).zxy);
d(asfloat(u[3].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.dxc.hlsl
index 4bf04e7..b717990 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,19 +3,19 @@
};
static float3x3 p[4] = (float3x3[4])0;
-float3x3 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-typedef float3x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x3 arr[4] = (float3x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 48u)));
+ arr[i] = u_load_1((offset + (i * 48u)));
}
}
return arr;
@@ -23,8 +23,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 96u);
+ p = u_load(0u);
+ p[1] = u_load_1(96u);
p[1][0] = asfloat(u[1].xyz).zxy;
p[1][0].x = asfloat(u[1].x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.fxc.hlsl
index 4bf04e7..b717990 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,19 +3,19 @@
};
static float3x3 p[4] = (float3x3[4])0;
-float3x3 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-typedef float3x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x3 arr[4] = (float3x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 48u)));
+ arr[i] = u_load_1((offset + (i * 48u)));
}
}
return arr;
@@ -23,8 +23,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 96u);
+ p = u_load(0u);
+ p[1] = u_load_1(96u);
p[1][0] = asfloat(u[1].xyz).zxy;
p[1][0].x = asfloat(u[1].x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.dxc.hlsl
index 563ec2e..da597a8 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,34 +3,34 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+void s_store_1(uint offset, float3x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
+ s.Store3((offset + 32u), asuint(value[2u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float3x3 value[4]) {
+void s_store(uint offset, float3x3 value[4]) {
float3x3 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 48u)), array_1[i]);
+ s_store_1((offset + (i * 48u)), array_1[i]);
}
}
}
-float3x3 tint_symbol_4(uint4 buffer[12], uint offset) {
+float3x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-typedef float3x3 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[12], uint offset) {
+typedef float3x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x3 arr[4] = (float3x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 48u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 48u)));
}
}
return arr;
@@ -38,8 +38,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 48u, tint_symbol_4(u, 96u));
+ s_store(0u, u_load(0u));
+ s_store_1(48u, u_load_1(96u));
s.Store3(48u, asuint(asfloat(u[1].xyz).zxy));
s.Store(48u, asuint(asfloat(u[1].x)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.fxc.hlsl
index 563ec2e..da597a8 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,34 +3,34 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+void s_store_1(uint offset, float3x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
+ s.Store3((offset + 32u), asuint(value[2u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float3x3 value[4]) {
+void s_store(uint offset, float3x3 value[4]) {
float3x3 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 48u)), array_1[i]);
+ s_store_1((offset + (i * 48u)), array_1[i]);
}
}
}
-float3x3 tint_symbol_4(uint4 buffer[12], uint offset) {
+float3x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-typedef float3x3 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[12], uint offset) {
+typedef float3x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x3 arr[4] = (float3x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 48u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 48u)));
}
}
return arr;
@@ -38,8 +38,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 48u, tint_symbol_4(u, 96u));
+ s_store(0u, u_load(0u));
+ s_store_1(48u, u_load_1(96u));
s.Store3(48u, asuint(asfloat(u[1].xyz).zxy));
s.Store(48u, asuint(asfloat(u[1].x)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 1751886..2845665 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,19 +7,19 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x3 tint_symbol_3(uint4 buffer[12], uint offset) {
+float3x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-typedef float3x3 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[12], uint offset) {
+typedef float3x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x3 arr[4] = (float3x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 48u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 48u)));
}
}
return arr;
@@ -33,8 +33,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 96u);
+ w = u_load(0u);
+ w[1] = u_load_1(96u);
w[1][0] = asfloat(u[1].xyz).zxy;
w[1][0].x = asfloat(u[1].x);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 1751886..2845665 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,19 +7,19 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x3 tint_symbol_3(uint4 buffer[12], uint offset) {
+float3x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-typedef float3x3 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[12], uint offset) {
+typedef float3x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x3 arr[4] = (float3x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 48u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 48u)));
}
}
return arr;
@@ -33,8 +33,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 96u);
+ w = u_load(0u);
+ w[1] = u_load_1(96u);
w[1][0] = asfloat(u[1].xyz).zxy;
w[1][0].x = asfloat(u[1].x);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 89cb90f..a3b59fa 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,19 +8,19 @@
return counter;
}
-float3x4 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x4 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]));
}
-typedef float3x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x4 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float3x4 arr[4] = (float3x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 48u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 48u)));
}
}
return arr;
@@ -30,8 +30,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float3x4 l_a[4] = tint_symbol(a, 0u);
- const float3x4 l_a_i = tint_symbol_1(a, (48u * uint(p_a_i_save)));
+ const float3x4 l_a[4] = a_load(0u);
+ const float3x4 l_a_i = a_load_1((48u * uint(p_a_i_save)));
const uint scalar_offset_3 = (((48u * uint(p_a_i_save)) + (16u * uint(p_a_i_i_save)))) / 4;
const float4 l_a_i_i = asfloat(a[scalar_offset_3 / 4]);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 89cb90f..a3b59fa 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,19 +8,19 @@
return counter;
}
-float3x4 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x4 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]));
}
-typedef float3x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x4 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float3x4 arr[4] = (float3x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 48u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 48u)));
}
}
return arr;
@@ -30,8 +30,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float3x4 l_a[4] = tint_symbol(a, 0u);
- const float3x4 l_a_i = tint_symbol_1(a, (48u * uint(p_a_i_save)));
+ const float3x4 l_a[4] = a_load(0u);
+ const float3x4 l_a_i = a_load_1((48u * uint(p_a_i_save)));
const uint scalar_offset_3 = (((48u * uint(p_a_i_save)) + (16u * uint(p_a_i_i_save)))) / 4;
const float4 l_a_i_i = asfloat(a[scalar_offset_3 / 4]);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index ebb5252..1a0a032 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -2,19 +2,19 @@
uint4 a[12];
};
-float3x4 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x4 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]));
}
-typedef float3x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x4 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float3x4 arr[4] = (float3x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 48u)));
+ arr[i] = a_load_1((offset + (i * 48u)));
}
}
return arr;
@@ -22,8 +22,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float3x4 l_a[4] = tint_symbol(a, 0u);
- const float3x4 l_a_i = tint_symbol_1(a, 96u);
+ const float3x4 l_a[4] = a_load(0u);
+ const float3x4 l_a_i = a_load_1(96u);
const float4 l_a_i_i = asfloat(a[7]);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index ebb5252..1a0a032 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -2,19 +2,19 @@
uint4 a[12];
};
-float3x4 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x4 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]));
}
-typedef float3x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x4 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float3x4 arr[4] = (float3x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 48u)));
+ arr[i] = a_load_1((offset + (i * 48u)));
}
}
return arr;
@@ -22,8 +22,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float3x4 l_a[4] = tint_symbol(a, 0u);
- const float3x4 l_a_i = tint_symbol_1(a, 96u);
+ const float3x4 l_a[4] = a_load(0u);
+ const float3x4 l_a_i = a_load_1(96u);
const float4 l_a_i_i = asfloat(a[7]);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.dxc.hlsl
index e9ab804..79024c9 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[12];
};
-float3x4 tint_symbol(uint4 buffer[12], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x3 t = transpose(tint_symbol(u, 96u));
+ const float4x3 t = transpose(u_load(96u));
const float l = length(asfloat(u[1]).ywxz);
const float a = abs(asfloat(u[1]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.fxc.hlsl
index e9ab804..79024c9 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[12];
};
-float3x4 tint_symbol(uint4 buffer[12], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x3 t = transpose(tint_symbol(u, 96u));
+ const float4x3 t = transpose(u_load(96u));
const float l = length(asfloat(u[1]).ywxz);
const float a = abs(asfloat(u[1]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.dxc.hlsl
index a16dec7..f0e3f34 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -14,19 +14,19 @@
void d(float f_1) {
}
-float3x4 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-typedef float3x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x4 arr[4] = (float3x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 48u)));
+ arr[i] = u_load_1((offset + (i * 48u)));
}
}
return arr;
@@ -34,8 +34,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 48u));
+ a(u_load(0u));
+ b(u_load_1(48u));
c(asfloat(u[3]).ywxz);
d(asfloat(u[3]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.fxc.hlsl
index a16dec7..f0e3f34 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -14,19 +14,19 @@
void d(float f_1) {
}
-float3x4 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-typedef float3x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x4 arr[4] = (float3x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 48u)));
+ arr[i] = u_load_1((offset + (i * 48u)));
}
}
return arr;
@@ -34,8 +34,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 48u));
+ a(u_load(0u));
+ b(u_load_1(48u));
c(asfloat(u[3]).ywxz);
d(asfloat(u[3]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.dxc.hlsl
index b708074..3eb8b4f 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,19 +3,19 @@
};
static float3x4 p[4] = (float3x4[4])0;
-float3x4 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-typedef float3x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x4 arr[4] = (float3x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 48u)));
+ arr[i] = u_load_1((offset + (i * 48u)));
}
}
return arr;
@@ -23,8 +23,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 96u);
+ p = u_load(0u);
+ p[1] = u_load_1(96u);
p[1][0] = asfloat(u[1]).ywxz;
p[1][0].x = asfloat(u[1].x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.fxc.hlsl
index b708074..3eb8b4f 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,19 +3,19 @@
};
static float3x4 p[4] = (float3x4[4])0;
-float3x4 tint_symbol_1(uint4 buffer[12], uint offset) {
+float3x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-typedef float3x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[12], uint offset) {
+typedef float3x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x4 arr[4] = (float3x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 48u)));
+ arr[i] = u_load_1((offset + (i * 48u)));
}
}
return arr;
@@ -23,8 +23,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 96u);
+ p = u_load(0u);
+ p[1] = u_load_1(96u);
p[1][0] = asfloat(u[1]).ywxz;
p[1][0].x = asfloat(u[1].x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.dxc.hlsl
index b6ecb13..f1ed40f 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,34 +3,34 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+void s_store_1(uint offset, float3x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
+ s.Store4((offset + 32u), asuint(value[2u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float3x4 value[4]) {
+void s_store(uint offset, float3x4 value[4]) {
float3x4 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 48u)), array_1[i]);
+ s_store_1((offset + (i * 48u)), array_1[i]);
}
}
}
-float3x4 tint_symbol_4(uint4 buffer[12], uint offset) {
+float3x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-typedef float3x4 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[12], uint offset) {
+typedef float3x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x4 arr[4] = (float3x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 48u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 48u)));
}
}
return arr;
@@ -38,8 +38,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 48u, tint_symbol_4(u, 96u));
+ s_store(0u, u_load(0u));
+ s_store_1(48u, u_load_1(96u));
s.Store4(48u, asuint(asfloat(u[1]).ywxz));
s.Store(48u, asuint(asfloat(u[1].x)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.fxc.hlsl
index b6ecb13..f1ed40f 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,34 +3,34 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+void s_store_1(uint offset, float3x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
+ s.Store4((offset + 32u), asuint(value[2u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float3x4 value[4]) {
+void s_store(uint offset, float3x4 value[4]) {
float3x4 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 48u)), array_1[i]);
+ s_store_1((offset + (i * 48u)), array_1[i]);
}
}
}
-float3x4 tint_symbol_4(uint4 buffer[12], uint offset) {
+float3x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-typedef float3x4 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[12], uint offset) {
+typedef float3x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x4 arr[4] = (float3x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 48u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 48u)));
}
}
return arr;
@@ -38,8 +38,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 48u, tint_symbol_4(u, 96u));
+ s_store(0u, u_load(0u));
+ s_store_1(48u, u_load_1(96u));
s.Store4(48u, asuint(asfloat(u[1]).ywxz));
s.Store(48u, asuint(asfloat(u[1].x)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
index b27032e..4572abf 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,19 +7,19 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
+float3x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-typedef float3x4 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[12], uint offset) {
+typedef float3x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x4 arr[4] = (float3x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 48u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 48u)));
}
}
return arr;
@@ -33,8 +33,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 96u);
+ w = u_load(0u);
+ w[1] = u_load_1(96u);
w[1][0] = asfloat(u[1]).ywxz;
w[1][0].x = asfloat(u[1].x);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
index b27032e..4572abf 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,19 +7,19 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
+float3x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-typedef float3x4 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[12], uint offset) {
+typedef float3x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float3x4 arr[4] = (float3x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 48u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 48u)));
}
}
return arr;
@@ -33,8 +33,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 96u);
+ w = u_load(0u);
+ w[1] = u_load_1(96u);
w[1][0] = asfloat(u[1]).ywxz;
w[1][0].x = asfloat(u[1].x);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index c5d26b1..abab0b3 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,24 +8,24 @@
return counter;
}
-matrix<float16_t, 4, 2> tint_symbol_1(uint4 buffer[4], uint offset) {
+matrix<float16_t, 4, 2> a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = a[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = a[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = a[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = a[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
-typedef matrix<float16_t, 4, 2> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 4, 2> a_load_ret[4];
+a_load_ret a_load(uint offset) {
matrix<float16_t, 4, 2> arr[4] = (matrix<float16_t, 4, 2>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -35,8 +35,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const matrix<float16_t, 4, 2> l_a[4] = tint_symbol(a, 0u);
- const matrix<float16_t, 4, 2> l_a_i = tint_symbol_1(a, (16u * uint(p_a_i_save)));
+ const matrix<float16_t, 4, 2> l_a[4] = a_load(0u);
+ const matrix<float16_t, 4, 2> l_a_i = a_load_1((16u * uint(p_a_i_save)));
const uint scalar_offset_4 = (((16u * uint(p_a_i_save)) + (4u * uint(p_a_i_i_save)))) / 4;
uint ubo_load_4 = a[scalar_offset_4 / 4][scalar_offset_4 % 4];
const vector<float16_t, 2> l_a_i_i = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16)));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 0ffe38c..7d328a5 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -2,24 +2,24 @@
uint4 a[4];
};
-matrix<float16_t, 4, 2> tint_symbol_1(uint4 buffer[4], uint offset) {
+matrix<float16_t, 4, 2> a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = a[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = a[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = a[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = a[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
-typedef matrix<float16_t, 4, 2> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 4, 2> a_load_ret[4];
+a_load_ret a_load(uint offset) {
matrix<float16_t, 4, 2> arr[4] = (matrix<float16_t, 4, 2>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = a_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -27,8 +27,8 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 4, 2> l_a[4] = tint_symbol(a, 0u);
- const matrix<float16_t, 4, 2> l_a_i = tint_symbol_1(a, 32u);
+ const matrix<float16_t, 4, 2> l_a[4] = a_load(0u);
+ const matrix<float16_t, 4, 2> l_a_i = a_load_1(32u);
uint ubo_load_4 = a[2].y;
const vector<float16_t, 2> l_a_i_i = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_builtin.wgsl.expected.dxc.hlsl
index cddeb05..69578b7 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,21 +2,21 @@
uint4 u[4];
};
-matrix<float16_t, 4, 2> tint_symbol(uint4 buffer[4], uint offset) {
+matrix<float16_t, 4, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 2, 4> t = transpose(tint_symbol(u, 32u));
+ const matrix<float16_t, 2, 4> t = transpose(u_load(32u));
uint ubo_load_4 = u[0].y;
const float16_t l = length(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16))).yx);
uint ubo_load_5 = u[0].y;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_fn.wgsl.expected.dxc.hlsl
index 3895e31..a1d7bb4 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -14,24 +14,24 @@
void d(float16_t f_1) {
}
-matrix<float16_t, 4, 2> tint_symbol_1(uint4 buffer[4], uint offset) {
+matrix<float16_t, 4, 2> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
-typedef matrix<float16_t, 4, 2> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 4, 2> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 4, 2> arr[4] = (matrix<float16_t, 4, 2>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = u_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -39,8 +39,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 16u));
+ a(u_load(0u));
+ b(u_load_1(16u));
uint ubo_load_4 = u[1].x;
c(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16))).yx);
uint ubo_load_5 = u[1].x;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.dxc.hlsl
index f9a1fc80..d2752fb 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.dxc.hlsl
@@ -3,24 +3,24 @@
};
static matrix<float16_t, 4, 2> p[4] = (matrix<float16_t, 4, 2>[4])0;
-matrix<float16_t, 4, 2> tint_symbol_1(uint4 buffer[4], uint offset) {
+matrix<float16_t, 4, 2> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
-typedef matrix<float16_t, 4, 2> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 4, 2> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 4, 2> arr[4] = (matrix<float16_t, 4, 2>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 16u)));
+ arr[i] = u_load_1((offset + (i * 16u)));
}
}
return arr;
@@ -28,8 +28,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 32u);
+ p = u_load(0u);
+ p[1] = u_load_1(32u);
uint ubo_load_4 = u[0].y;
p[1][0] = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16))).yx;
p[1][0].x = float16_t(f16tof32(((u[0].y) & 0xFFFF)));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_storage.wgsl.expected.dxc.hlsl
index 4580024..dce8224 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -3,40 +3,40 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
- buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
- buffer.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
+void s_store_1(uint offset, matrix<float16_t, 4, 2> value) {
+ s.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+ s.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
+ s.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value[4]) {
+void s_store(uint offset, matrix<float16_t, 4, 2> value[4]) {
matrix<float16_t, 4, 2> array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 16u)), array_1[i]);
+ s_store_1((offset + (i * 16u)), array_1[i]);
}
}
}
-matrix<float16_t, 4, 2> tint_symbol_4(uint4 buffer[4], uint offset) {
+matrix<float16_t, 4, 2> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
-typedef matrix<float16_t, 4, 2> tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 4, 2> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 4, 2> arr[4] = (matrix<float16_t, 4, 2>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -44,8 +44,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 16u, tint_symbol_4(u, 32u));
+ s_store(0u, u_load(0u));
+ s_store_1(16u, u_load_1(32u));
uint ubo_load_4 = u[0].y;
s.Store<vector<float16_t, 2> >(16u, vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16))).yx);
s.Store<float16_t>(16u, float16_t(f16tof32(((u[0].y) & 0xFFFF))));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
index f67e431..c4fc7be 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,24 +7,24 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 4, 2> tint_symbol_3(uint4 buffer[4], uint offset) {
+matrix<float16_t, 4, 2> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
-typedef matrix<float16_t, 4, 2> tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
+typedef matrix<float16_t, 4, 2> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 4, 2> arr[4] = (matrix<float16_t, 4, 2>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 16u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 16u)));
}
}
return arr;
@@ -38,8 +38,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 32u);
+ w = u_load(0u);
+ w[1] = u_load_1(32u);
uint ubo_load_4 = u[0].y;
w[1][0] = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16))).yx;
w[1][0].x = float16_t(f16tof32(((u[0].y) & 0xFFFF)));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 2b7d52a..8005281 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,24 +8,24 @@
return counter;
}
-float4x2 tint_symbol_1(uint4 buffer[8], uint offset) {
+float4x2 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = a[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-typedef float4x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float4x2 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float4x2 arr[4] = (float4x2[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -35,8 +35,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float4x2 l_a[4] = tint_symbol(a, 0u);
- const float4x2 l_a_i = tint_symbol_1(a, (32u * uint(p_a_i_save)));
+ const float4x2 l_a[4] = a_load(0u);
+ const float4x2 l_a_i = a_load_1((32u * uint(p_a_i_save)));
const uint scalar_offset_4 = (((32u * uint(p_a_i_save)) + (8u * uint(p_a_i_i_save)))) / 4;
uint4 ubo_load_4 = a[scalar_offset_4 / 4];
const float2 l_a_i_i = asfloat(((scalar_offset_4 & 2) ? ubo_load_4.zw : ubo_load_4.xy));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 2b7d52a..8005281 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,24 +8,24 @@
return counter;
}
-float4x2 tint_symbol_1(uint4 buffer[8], uint offset) {
+float4x2 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = a[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-typedef float4x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float4x2 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float4x2 arr[4] = (float4x2[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -35,8 +35,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float4x2 l_a[4] = tint_symbol(a, 0u);
- const float4x2 l_a_i = tint_symbol_1(a, (32u * uint(p_a_i_save)));
+ const float4x2 l_a[4] = a_load(0u);
+ const float4x2 l_a_i = a_load_1((32u * uint(p_a_i_save)));
const uint scalar_offset_4 = (((32u * uint(p_a_i_save)) + (8u * uint(p_a_i_i_save)))) / 4;
uint4 ubo_load_4 = a[scalar_offset_4 / 4];
const float2 l_a_i_i = asfloat(((scalar_offset_4 & 2) ? ubo_load_4.zw : ubo_load_4.xy));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 8b8b235..7c02f6c 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -2,24 +2,24 @@
uint4 a[8];
};
-float4x2 tint_symbol_1(uint4 buffer[8], uint offset) {
+float4x2 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = a[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-typedef float4x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float4x2 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float4x2 arr[4] = (float4x2[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = a_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -27,8 +27,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float4x2 l_a[4] = tint_symbol(a, 0u);
- const float4x2 l_a_i = tint_symbol_1(a, 64u);
+ const float4x2 l_a[4] = a_load(0u);
+ const float4x2 l_a_i = a_load_1(64u);
const float2 l_a_i_i = asfloat(a[4].zw);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index 8b8b235..7c02f6c 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -2,24 +2,24 @@
uint4 a[8];
};
-float4x2 tint_symbol_1(uint4 buffer[8], uint offset) {
+float4x2 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = a[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-typedef float4x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float4x2 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float4x2 arr[4] = (float4x2[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = a_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -27,8 +27,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float4x2 l_a[4] = tint_symbol(a, 0u);
- const float4x2 l_a_i = tint_symbol_1(a, 64u);
+ const float4x2 l_a[4] = a_load(0u);
+ const float4x2 l_a_i = a_load_1(64u);
const float2 l_a_i_i = asfloat(a[4].zw);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_builtin.wgsl.expected.dxc.hlsl
index 2e395ab..c16ba4f 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,21 +2,21 @@
uint4 u[8];
};
-float4x2 tint_symbol(uint4 buffer[8], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x4 t = transpose(tint_symbol(u, 64u));
+ const float2x4 t = transpose(u_load(64u));
const float l = length(asfloat(u[0].zw).yx);
const float a = abs(asfloat(u[0].zw).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_builtin.wgsl.expected.fxc.hlsl
index 2e395ab..c16ba4f 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,21 +2,21 @@
uint4 u[8];
};
-float4x2 tint_symbol(uint4 buffer[8], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x4 t = transpose(tint_symbol(u, 64u));
+ const float2x4 t = transpose(u_load(64u));
const float l = length(asfloat(u[0].zw).yx);
const float a = abs(asfloat(u[0].zw).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.dxc.hlsl
index a0eba53..fbd8de9 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -14,24 +14,24 @@
void d(float f_1) {
}
-float4x2 tint_symbol_1(uint4 buffer[8], uint offset) {
+float4x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-typedef float4x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float4x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x2 arr[4] = (float4x2[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -39,8 +39,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 32u));
+ a(u_load(0u));
+ b(u_load_1(32u));
c(asfloat(u[2].xy).yx);
d(asfloat(u[2].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.fxc.hlsl
index a0eba53..fbd8de9 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -14,24 +14,24 @@
void d(float f_1) {
}
-float4x2 tint_symbol_1(uint4 buffer[8], uint offset) {
+float4x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-typedef float4x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float4x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x2 arr[4] = (float4x2[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -39,8 +39,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 32u));
+ a(u_load(0u));
+ b(u_load_1(32u));
c(asfloat(u[2].xy).yx);
d(asfloat(u[2].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.dxc.hlsl
index f33d735..08b6889 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,24 +3,24 @@
};
static float4x2 p[4] = (float4x2[4])0;
-float4x2 tint_symbol_1(uint4 buffer[8], uint offset) {
+float4x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-typedef float4x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float4x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x2 arr[4] = (float4x2[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -28,8 +28,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 64u);
+ p = u_load(0u);
+ p[1] = u_load_1(64u);
p[1][0] = asfloat(u[0].zw).yx;
p[1][0].x = asfloat(u[0].z);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.fxc.hlsl
index f33d735..08b6889 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,24 +3,24 @@
};
static float4x2 p[4] = (float4x2[4])0;
-float4x2 tint_symbol_1(uint4 buffer[8], uint offset) {
+float4x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-typedef float4x2 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef float4x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x2 arr[4] = (float4x2[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -28,8 +28,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 64u);
+ p = u_load(0u);
+ p[1] = u_load_1(64u);
p[1][0] = asfloat(u[0].zw).yx;
p[1][0].x = asfloat(u[0].z);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.dxc.hlsl
index 22f1ffe..4d9c46c 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,40 +3,40 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+void s_store_1(uint offset, float4x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
+ s.Store2((offset + 16u), asuint(value[2u]));
+ s.Store2((offset + 24u), asuint(value[3u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x2 value[4]) {
+void s_store(uint offset, float4x2 value[4]) {
float4x2 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 32u)), array_1[i]);
+ s_store_1((offset + (i * 32u)), array_1[i]);
}
}
}
-float4x2 tint_symbol_4(uint4 buffer[8], uint offset) {
+float4x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-typedef float4x2 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[8], uint offset) {
+typedef float4x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x2 arr[4] = (float4x2[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -44,8 +44,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 32u, tint_symbol_4(u, 64u));
+ s_store(0u, u_load(0u));
+ s_store_1(32u, u_load_1(64u));
s.Store2(32u, asuint(asfloat(u[0].zw).yx));
s.Store(32u, asuint(asfloat(u[0].z)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.fxc.hlsl
index 22f1ffe..4d9c46c 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,40 +3,40 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+void s_store_1(uint offset, float4x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
+ s.Store2((offset + 16u), asuint(value[2u]));
+ s.Store2((offset + 24u), asuint(value[3u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x2 value[4]) {
+void s_store(uint offset, float4x2 value[4]) {
float4x2 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 32u)), array_1[i]);
+ s_store_1((offset + (i * 32u)), array_1[i]);
}
}
}
-float4x2 tint_symbol_4(uint4 buffer[8], uint offset) {
+float4x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-typedef float4x2 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[8], uint offset) {
+typedef float4x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x2 arr[4] = (float4x2[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -44,8 +44,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 32u, tint_symbol_4(u, 64u));
+ s_store(0u, u_load(0u));
+ s_store_1(32u, u_load_1(64u));
s.Store2(32u, asuint(asfloat(u[0].zw).yx));
s.Store(32u, asuint(asfloat(u[0].z)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 0917dce..dc406a1 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,24 +7,24 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x2 tint_symbol_3(uint4 buffer[8], uint offset) {
+float4x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-typedef float4x2 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[8], uint offset) {
+typedef float4x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x2 arr[4] = (float4x2[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -38,8 +38,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 64u);
+ w = u_load(0u);
+ w[1] = u_load_1(64u);
w[1][0] = asfloat(u[0].zw).yx;
w[1][0].x = asfloat(u[0].z);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 0917dce..dc406a1 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,24 +7,24 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x2 tint_symbol_3(uint4 buffer[8], uint offset) {
+float4x2 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-typedef float4x2 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[8], uint offset) {
+typedef float4x2 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x2 arr[4] = (float4x2[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -38,8 +38,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 64u);
+ w = u_load(0u);
+ w[1] = u_load_1(64u);
w[1][0] = asfloat(u[0].zw).yx;
w[1][0].x = asfloat(u[0].z);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 87b7680..d09e012 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,36 +8,36 @@
return counter;
}
-matrix<float16_t, 4, 3> tint_symbol_1(uint4 buffer[8], uint offset) {
+matrix<float16_t, 4, 3> a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = a[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
}
-typedef matrix<float16_t, 4, 3> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef matrix<float16_t, 4, 3> a_load_ret[4];
+a_load_ret a_load(uint offset) {
matrix<float16_t, 4, 3> arr[4] = (matrix<float16_t, 4, 3>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -47,8 +47,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const matrix<float16_t, 4, 3> l_a[4] = tint_symbol(a, 0u);
- const matrix<float16_t, 4, 3> l_a_i = tint_symbol_1(a, (32u * uint(p_a_i_save)));
+ const matrix<float16_t, 4, 3> l_a[4] = a_load(0u);
+ const matrix<float16_t, 4, 3> l_a_i = a_load_1((32u * uint(p_a_i_save)));
const uint scalar_offset_4 = (((32u * uint(p_a_i_save)) + (8u * uint(p_a_i_i_save)))) / 4;
uint4 ubo_load_9 = a[scalar_offset_4 / 4];
uint2 ubo_load_8 = ((scalar_offset_4 & 2) ? ubo_load_9.zw : ubo_load_9.xy);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 53dc367..dbbeace 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -2,36 +2,36 @@
uint4 a[8];
};
-matrix<float16_t, 4, 3> tint_symbol_1(uint4 buffer[8], uint offset) {
+matrix<float16_t, 4, 3> a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = a[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
}
-typedef matrix<float16_t, 4, 3> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef matrix<float16_t, 4, 3> a_load_ret[4];
+a_load_ret a_load(uint offset) {
matrix<float16_t, 4, 3> arr[4] = (matrix<float16_t, 4, 3>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = a_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -39,8 +39,8 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 4, 3> l_a[4] = tint_symbol(a, 0u);
- const matrix<float16_t, 4, 3> l_a_i = tint_symbol_1(a, 64u);
+ const matrix<float16_t, 4, 3> l_a[4] = a_load(0u);
+ const matrix<float16_t, 4, 3> l_a_i = a_load_1(64u);
uint2 ubo_load_8 = a[4].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_builtin.wgsl.expected.dxc.hlsl
index fe691e9..b3ba42f 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,24 +2,24 @@
uint4 u[8];
};
-matrix<float16_t, 4, 3> tint_symbol(uint4 buffer[8], uint offset) {
+matrix<float16_t, 4, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
@@ -28,7 +28,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 3, 4> t = transpose(tint_symbol(u, 64u));
+ const matrix<float16_t, 3, 4> t = transpose(u_load(64u));
uint2 ubo_load_8 = u[0].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_fn.wgsl.expected.dxc.hlsl
index 2768c99..46e3546 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -14,36 +14,36 @@
void d(float16_t f_1) {
}
-matrix<float16_t, 4, 3> tint_symbol_1(uint4 buffer[8], uint offset) {
+matrix<float16_t, 4, 3> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
}
-typedef matrix<float16_t, 4, 3> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef matrix<float16_t, 4, 3> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 4, 3> arr[4] = (matrix<float16_t, 4, 3>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -51,8 +51,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 32u));
+ a(u_load(0u));
+ b(u_load_1(32u));
uint2 ubo_load_8 = u[2].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.dxc.hlsl
index 4b50702..5b7bb16 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.dxc.hlsl
@@ -3,36 +3,36 @@
};
static matrix<float16_t, 4, 3> p[4] = (matrix<float16_t, 4, 3>[4])0;
-matrix<float16_t, 4, 3> tint_symbol_1(uint4 buffer[8], uint offset) {
+matrix<float16_t, 4, 3> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
}
-typedef matrix<float16_t, 4, 3> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef matrix<float16_t, 4, 3> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 4, 3> arr[4] = (matrix<float16_t, 4, 3>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -40,8 +40,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 64u);
+ p = u_load(0u);
+ p[1] = u_load_1(64u);
uint2 ubo_load_8 = u[0].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_storage.wgsl.expected.dxc.hlsl
index 8039a70..8b8f883 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -3,52 +3,52 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
- buffer.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
+void s_store_1(uint offset, matrix<float16_t, 4, 3> value) {
+ s.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+ s.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
+ s.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 3> value[4]) {
+void s_store(uint offset, matrix<float16_t, 4, 3> value[4]) {
matrix<float16_t, 4, 3> array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 32u)), array_1[i]);
+ s_store_1((offset + (i * 32u)), array_1[i]);
}
}
}
-matrix<float16_t, 4, 3> tint_symbol_4(uint4 buffer[8], uint offset) {
+matrix<float16_t, 4, 3> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
}
-typedef matrix<float16_t, 4, 3> tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[8], uint offset) {
+typedef matrix<float16_t, 4, 3> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 4, 3> arr[4] = (matrix<float16_t, 4, 3>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -56,8 +56,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 32u, tint_symbol_4(u, 64u));
+ s_store(0u, u_load(0u));
+ s_store_1(32u, u_load_1(64u));
uint2 ubo_load_8 = u[0].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 6024dea..115d880 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,36 +7,36 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 4, 3> tint_symbol_3(uint4 buffer[8], uint offset) {
+matrix<float16_t, 4, 3> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
}
-typedef matrix<float16_t, 4, 3> tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[8], uint offset) {
+typedef matrix<float16_t, 4, 3> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 4, 3> arr[4] = (matrix<float16_t, 4, 3>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -50,8 +50,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 64u);
+ w = u_load(0u);
+ w[1] = u_load_1(64u);
uint2 ubo_load_8 = u[0].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 0d9daa8..ae93236 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,20 +8,20 @@
return counter;
}
-float4x3 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x3 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz), asfloat(a[scalar_offset_3 / 4].xyz));
}
-typedef float4x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x3 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float4x3 arr[4] = (float4x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 64u)));
}
}
return arr;
@@ -31,8 +31,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float4x3 l_a[4] = tint_symbol(a, 0u);
- const float4x3 l_a_i = tint_symbol_1(a, (64u * uint(p_a_i_save)));
+ const float4x3 l_a[4] = a_load(0u);
+ const float4x3 l_a_i = a_load_1((64u * uint(p_a_i_save)));
const uint scalar_offset_4 = (((64u * uint(p_a_i_save)) + (16u * uint(p_a_i_i_save)))) / 4;
const float3 l_a_i_i = asfloat(a[scalar_offset_4 / 4].xyz);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 0d9daa8..ae93236 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,20 +8,20 @@
return counter;
}
-float4x3 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x3 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz), asfloat(a[scalar_offset_3 / 4].xyz));
}
-typedef float4x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x3 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float4x3 arr[4] = (float4x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 64u)));
}
}
return arr;
@@ -31,8 +31,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float4x3 l_a[4] = tint_symbol(a, 0u);
- const float4x3 l_a_i = tint_symbol_1(a, (64u * uint(p_a_i_save)));
+ const float4x3 l_a[4] = a_load(0u);
+ const float4x3 l_a_i = a_load_1((64u * uint(p_a_i_save)));
const uint scalar_offset_4 = (((64u * uint(p_a_i_save)) + (16u * uint(p_a_i_i_save)))) / 4;
const float3 l_a_i_i = asfloat(a[scalar_offset_4 / 4].xyz);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 7b865c6..a870d11 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -2,20 +2,20 @@
uint4 a[16];
};
-float4x3 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x3 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz), asfloat(a[scalar_offset_3 / 4].xyz));
}
-typedef float4x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x3 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float4x3 arr[4] = (float4x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_1((offset + (i * 64u)));
}
}
return arr;
@@ -23,8 +23,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float4x3 l_a[4] = tint_symbol(a, 0u);
- const float4x3 l_a_i = tint_symbol_1(a, 128u);
+ const float4x3 l_a[4] = a_load(0u);
+ const float4x3 l_a_i = a_load_1(128u);
const float3 l_a_i_i = asfloat(a[9].xyz);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index 7b865c6..a870d11 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -2,20 +2,20 @@
uint4 a[16];
};
-float4x3 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x3 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz), asfloat(a[scalar_offset_3 / 4].xyz));
}
-typedef float4x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x3 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float4x3 arr[4] = (float4x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_1((offset + (i * 64u)));
}
}
return arr;
@@ -23,8 +23,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float4x3 l_a[4] = tint_symbol(a, 0u);
- const float4x3 l_a_i = tint_symbol_1(a, 128u);
+ const float4x3 l_a[4] = a_load(0u);
+ const float4x3 l_a_i = a_load_1(128u);
const float3 l_a_i_i = asfloat(a[9].xyz);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.dxc.hlsl
index f398365..f888288 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[16];
};
-float4x3 tint_symbol(uint4 buffer[16], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x4 t = transpose(tint_symbol(u, 128u));
+ const float3x4 t = transpose(u_load(128u));
const float l = length(asfloat(u[1].xyz).zxy);
const float a = abs(asfloat(u[1].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.fxc.hlsl
index f398365..f888288 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[16];
};
-float4x3 tint_symbol(uint4 buffer[16], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x4 t = transpose(tint_symbol(u, 128u));
+ const float3x4 t = transpose(u_load(128u));
const float l = length(asfloat(u[1].xyz).zxy);
const float a = abs(asfloat(u[1].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.dxc.hlsl
index c1ac4a6..74614d7 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -14,20 +14,20 @@
void d(float f_1) {
}
-float4x3 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-typedef float4x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x3 arr[4] = (float4x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 64u)));
+ arr[i] = u_load_1((offset + (i * 64u)));
}
}
return arr;
@@ -35,8 +35,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 64u));
+ a(u_load(0u));
+ b(u_load_1(64u));
c(asfloat(u[4].xyz).zxy);
d(asfloat(u[4].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.fxc.hlsl
index c1ac4a6..74614d7 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -14,20 +14,20 @@
void d(float f_1) {
}
-float4x3 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-typedef float4x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x3 arr[4] = (float4x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 64u)));
+ arr[i] = u_load_1((offset + (i * 64u)));
}
}
return arr;
@@ -35,8 +35,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 64u));
+ a(u_load(0u));
+ b(u_load_1(64u));
c(asfloat(u[4].xyz).zxy);
d(asfloat(u[4].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.dxc.hlsl
index 5236d8f..45924d8 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,20 +3,20 @@
};
static float4x3 p[4] = (float4x3[4])0;
-float4x3 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-typedef float4x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x3 arr[4] = (float4x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 64u)));
+ arr[i] = u_load_1((offset + (i * 64u)));
}
}
return arr;
@@ -24,8 +24,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 128u);
+ p = u_load(0u);
+ p[1] = u_load_1(128u);
p[1][0] = asfloat(u[1].xyz).zxy;
p[1][0].x = asfloat(u[1].x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.fxc.hlsl
index 5236d8f..45924d8 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,20 +3,20 @@
};
static float4x3 p[4] = (float4x3[4])0;
-float4x3 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-typedef float4x3 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x3 arr[4] = (float4x3[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 64u)));
+ arr[i] = u_load_1((offset + (i * 64u)));
}
}
return arr;
@@ -24,8 +24,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 128u);
+ p = u_load(0u);
+ p[1] = u_load_1(128u);
p[1][0] = asfloat(u[1].xyz).zxy;
p[1][0].x = asfloat(u[1].x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.dxc.hlsl
index 6d83315..a9a3075 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,36 +3,36 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+void s_store_1(uint offset, float4x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
+ s.Store3((offset + 32u), asuint(value[2u]));
+ s.Store3((offset + 48u), asuint(value[3u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x3 value[4]) {
+void s_store(uint offset, float4x3 value[4]) {
float4x3 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 64u)), array_1[i]);
+ s_store_1((offset + (i * 64u)), array_1[i]);
}
}
}
-float4x3 tint_symbol_4(uint4 buffer[16], uint offset) {
+float4x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-typedef float4x3 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[16], uint offset) {
+typedef float4x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x3 arr[4] = (float4x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 64u)));
}
}
return arr;
@@ -40,8 +40,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 64u, tint_symbol_4(u, 128u));
+ s_store(0u, u_load(0u));
+ s_store_1(64u, u_load_1(128u));
s.Store3(64u, asuint(asfloat(u[1].xyz).zxy));
s.Store(64u, asuint(asfloat(u[1].x)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.fxc.hlsl
index 6d83315..a9a3075 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,36 +3,36 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+void s_store_1(uint offset, float4x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
+ s.Store3((offset + 32u), asuint(value[2u]));
+ s.Store3((offset + 48u), asuint(value[3u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x3 value[4]) {
+void s_store(uint offset, float4x3 value[4]) {
float4x3 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 64u)), array_1[i]);
+ s_store_1((offset + (i * 64u)), array_1[i]);
}
}
}
-float4x3 tint_symbol_4(uint4 buffer[16], uint offset) {
+float4x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-typedef float4x3 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[16], uint offset) {
+typedef float4x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x3 arr[4] = (float4x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 64u)));
}
}
return arr;
@@ -40,8 +40,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 64u, tint_symbol_4(u, 128u));
+ s_store(0u, u_load(0u));
+ s_store_1(64u, u_load_1(128u));
s.Store3(64u, asuint(asfloat(u[1].xyz).zxy));
s.Store(64u, asuint(asfloat(u[1].x)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 1c1745a..ce142b0 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,20 +7,20 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x3 tint_symbol_3(uint4 buffer[16], uint offset) {
+float4x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-typedef float4x3 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[16], uint offset) {
+typedef float4x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x3 arr[4] = (float4x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 64u)));
}
}
return arr;
@@ -34,8 +34,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 128u);
+ w = u_load(0u);
+ w[1] = u_load_1(128u);
w[1][0] = asfloat(u[1].xyz).zxy;
w[1][0].x = asfloat(u[1].x);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 1c1745a..ce142b0 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,20 +7,20 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x3 tint_symbol_3(uint4 buffer[16], uint offset) {
+float4x3 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-typedef float4x3 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[16], uint offset) {
+typedef float4x3 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x3 arr[4] = (float4x3[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 64u)));
}
}
return arr;
@@ -34,8 +34,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 128u);
+ w = u_load(0u);
+ w[1] = u_load_1(128u);
w[1][0] = asfloat(u[1].xyz).zxy;
w[1][0].x = asfloat(u[1].x);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 59fae52..a7ff9ec 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,36 +8,36 @@
return counter;
}
-matrix<float16_t, 4, 4> tint_symbol_1(uint4 buffer[8], uint offset) {
+matrix<float16_t, 4, 4> a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = a[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]), vector<float16_t, 4>(ubo_load_6_xz[0], ubo_load_6_yw[0], ubo_load_6_xz[1], ubo_load_6_yw[1]));
}
-typedef matrix<float16_t, 4, 4> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef matrix<float16_t, 4, 4> a_load_ret[4];
+a_load_ret a_load(uint offset) {
matrix<float16_t, 4, 4> arr[4] = (matrix<float16_t, 4, 4>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -47,8 +47,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const matrix<float16_t, 4, 4> l_a[4] = tint_symbol(a, 0u);
- const matrix<float16_t, 4, 4> l_a_i = tint_symbol_1(a, (32u * uint(p_a_i_save)));
+ const matrix<float16_t, 4, 4> l_a[4] = a_load(0u);
+ const matrix<float16_t, 4, 4> l_a_i = a_load_1((32u * uint(p_a_i_save)));
const uint scalar_offset_4 = (((32u * uint(p_a_i_save)) + (8u * uint(p_a_i_i_save)))) / 4;
uint4 ubo_load_9 = a[scalar_offset_4 / 4];
uint2 ubo_load_8 = ((scalar_offset_4 & 2) ? ubo_load_9.zw : ubo_load_9.xy);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 0413807..7798842 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -2,36 +2,36 @@
uint4 a[8];
};
-matrix<float16_t, 4, 4> tint_symbol_1(uint4 buffer[8], uint offset) {
+matrix<float16_t, 4, 4> a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = a[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]), vector<float16_t, 4>(ubo_load_6_xz[0], ubo_load_6_yw[0], ubo_load_6_xz[1], ubo_load_6_yw[1]));
}
-typedef matrix<float16_t, 4, 4> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef matrix<float16_t, 4, 4> a_load_ret[4];
+a_load_ret a_load(uint offset) {
matrix<float16_t, 4, 4> arr[4] = (matrix<float16_t, 4, 4>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = a_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -39,8 +39,8 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 4, 4> l_a[4] = tint_symbol(a, 0u);
- const matrix<float16_t, 4, 4> l_a_i = tint_symbol_1(a, 64u);
+ const matrix<float16_t, 4, 4> l_a[4] = a_load(0u);
+ const matrix<float16_t, 4, 4> l_a_i = a_load_1(64u);
uint2 ubo_load_8 = a[4].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_builtin.wgsl.expected.dxc.hlsl
index 3db7f37..94f5ad1 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,24 +2,24 @@
uint4 u[8];
};
-matrix<float16_t, 4, 4> tint_symbol(uint4 buffer[8], uint offset) {
+matrix<float16_t, 4, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
@@ -28,7 +28,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 4, 4> t = transpose(tint_symbol(u, 64u));
+ const matrix<float16_t, 4, 4> t = transpose(u_load(64u));
uint2 ubo_load_8 = u[0].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_fn.wgsl.expected.dxc.hlsl
index 99d2802..fd3ef0b 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -14,36 +14,36 @@
void d(float16_t f_1) {
}
-matrix<float16_t, 4, 4> tint_symbol_1(uint4 buffer[8], uint offset) {
+matrix<float16_t, 4, 4> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]), vector<float16_t, 4>(ubo_load_6_xz[0], ubo_load_6_yw[0], ubo_load_6_xz[1], ubo_load_6_yw[1]));
}
-typedef matrix<float16_t, 4, 4> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef matrix<float16_t, 4, 4> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 4, 4> arr[4] = (matrix<float16_t, 4, 4>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -51,8 +51,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 32u));
+ a(u_load(0u));
+ b(u_load_1(32u));
uint2 ubo_load_8 = u[2].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.dxc.hlsl
index d5fc3e3..ea68e0b 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.dxc.hlsl
@@ -3,36 +3,36 @@
};
static matrix<float16_t, 4, 4> p[4] = (matrix<float16_t, 4, 4>[4])0;
-matrix<float16_t, 4, 4> tint_symbol_1(uint4 buffer[8], uint offset) {
+matrix<float16_t, 4, 4> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]), vector<float16_t, 4>(ubo_load_6_xz[0], ubo_load_6_yw[0], ubo_load_6_xz[1], ubo_load_6_yw[1]));
}
-typedef matrix<float16_t, 4, 4> tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[8], uint offset) {
+typedef matrix<float16_t, 4, 4> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 4, 4> arr[4] = (matrix<float16_t, 4, 4>[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 32u)));
+ arr[i] = u_load_1((offset + (i * 32u)));
}
}
return arr;
@@ -40,8 +40,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 64u);
+ p = u_load(0u);
+ p[1] = u_load_1(64u);
uint2 ubo_load_8 = u[0].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_storage.wgsl.expected.dxc.hlsl
index 9e8d1ec..453390c 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -3,52 +3,52 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
- buffer.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
+void s_store_1(uint offset, matrix<float16_t, 4, 4> value) {
+ s.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+ s.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
+ s.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 4> value[4]) {
+void s_store(uint offset, matrix<float16_t, 4, 4> value[4]) {
matrix<float16_t, 4, 4> array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 32u)), array_1[i]);
+ s_store_1((offset + (i * 32u)), array_1[i]);
}
}
}
-matrix<float16_t, 4, 4> tint_symbol_4(uint4 buffer[8], uint offset) {
+matrix<float16_t, 4, 4> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]), vector<float16_t, 4>(ubo_load_6_xz[0], ubo_load_6_yw[0], ubo_load_6_xz[1], ubo_load_6_yw[1]));
}
-typedef matrix<float16_t, 4, 4> tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[8], uint offset) {
+typedef matrix<float16_t, 4, 4> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 4, 4> arr[4] = (matrix<float16_t, 4, 4>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -56,8 +56,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 32u, tint_symbol_4(u, 64u));
+ s_store(0u, u_load(0u));
+ s_store_1(32u, u_load_1(64u));
uint2 ubo_load_8 = u[0].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 94db3c4..6c2142d 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,36 +7,36 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 4, 4> tint_symbol_3(uint4 buffer[8], uint offset) {
+matrix<float16_t, 4, 4> u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]), vector<float16_t, 4>(ubo_load_6_xz[0], ubo_load_6_yw[0], ubo_load_6_xz[1], ubo_load_6_yw[1]));
}
-typedef matrix<float16_t, 4, 4> tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[8], uint offset) {
+typedef matrix<float16_t, 4, 4> u_load_ret[4];
+u_load_ret u_load(uint offset) {
matrix<float16_t, 4, 4> arr[4] = (matrix<float16_t, 4, 4>[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 32u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 32u)));
}
}
return arr;
@@ -50,8 +50,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 64u);
+ w = u_load(0u);
+ w[1] = u_load_1(64u);
uint2 ubo_load_8 = u[0].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index cfb9ecf..5543cec 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,20 +8,20 @@
return counter;
}
-float4x4 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x4 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]), asfloat(a[scalar_offset_3 / 4]));
}
-typedef float4x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x4 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float4x4 arr[4] = (float4x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 64u)));
}
}
return arr;
@@ -31,8 +31,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float4x4 l_a[4] = tint_symbol(a, 0u);
- const float4x4 l_a_i = tint_symbol_1(a, (64u * uint(p_a_i_save)));
+ const float4x4 l_a[4] = a_load(0u);
+ const float4x4 l_a_i = a_load_1((64u * uint(p_a_i_save)));
const uint scalar_offset_4 = (((64u * uint(p_a_i_save)) + (16u * uint(p_a_i_i_save)))) / 4;
const float4 l_a_i_i = asfloat(a[scalar_offset_4 / 4]);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index cfb9ecf..5543cec 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,20 +8,20 @@
return counter;
}
-float4x4 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x4 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]), asfloat(a[scalar_offset_3 / 4]));
}
-typedef float4x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x4 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float4x4 arr[4] = (float4x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_1((offset + (i_1 * 64u)));
}
}
return arr;
@@ -31,8 +31,8 @@
void f() {
const int p_a_i_save = i();
const int p_a_i_i_save = i();
- const float4x4 l_a[4] = tint_symbol(a, 0u);
- const float4x4 l_a_i = tint_symbol_1(a, (64u * uint(p_a_i_save)));
+ const float4x4 l_a[4] = a_load(0u);
+ const float4x4 l_a_i = a_load_1((64u * uint(p_a_i_save)));
const uint scalar_offset_4 = (((64u * uint(p_a_i_save)) + (16u * uint(p_a_i_i_save)))) / 4;
const float4 l_a_i_i = asfloat(a[scalar_offset_4 / 4]);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index ac24f04..2873c7e 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -2,20 +2,20 @@
uint4 a[16];
};
-float4x4 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x4 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]), asfloat(a[scalar_offset_3 / 4]));
}
-typedef float4x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x4 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float4x4 arr[4] = (float4x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_1((offset + (i * 64u)));
}
}
return arr;
@@ -23,8 +23,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float4x4 l_a[4] = tint_symbol(a, 0u);
- const float4x4 l_a_i = tint_symbol_1(a, 128u);
+ const float4x4 l_a[4] = a_load(0u);
+ const float4x4 l_a_i = a_load_1(128u);
const float4 l_a_i_i = asfloat(a[9]);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index ac24f04..2873c7e 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -2,20 +2,20 @@
uint4 a[16];
};
-float4x4 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x4 a_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]), asfloat(a[scalar_offset_3 / 4]));
}
-typedef float4x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x4 a_load_ret[4];
+a_load_ret a_load(uint offset) {
float4x4 arr[4] = (float4x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_1((offset + (i * 64u)));
}
}
return arr;
@@ -23,8 +23,8 @@
[numthreads(1, 1, 1)]
void f() {
- const float4x4 l_a[4] = tint_symbol(a, 0u);
- const float4x4 l_a_i = tint_symbol_1(a, 128u);
+ const float4x4 l_a[4] = a_load(0u);
+ const float4x4 l_a_i = a_load_1(128u);
const float4 l_a_i_i = asfloat(a[9]);
return;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.dxc.hlsl
index bb637b6..a0c4736 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[16];
};
-float4x4 tint_symbol(uint4 buffer[16], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x4 t = transpose(tint_symbol(u, 128u));
+ const float4x4 t = transpose(u_load(128u));
const float l = length(asfloat(u[1]).ywxz);
const float a = abs(asfloat(u[1]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.fxc.hlsl
index bb637b6..a0c4736 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[16];
};
-float4x4 tint_symbol(uint4 buffer[16], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x4 t = transpose(tint_symbol(u, 128u));
+ const float4x4 t = transpose(u_load(128u));
const float l = length(asfloat(u[1]).ywxz);
const float a = abs(asfloat(u[1]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.dxc.hlsl
index c6389d9..40c53b3 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -14,20 +14,20 @@
void d(float f_1) {
}
-float4x4 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-typedef float4x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x4 arr[4] = (float4x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 64u)));
+ arr[i] = u_load_1((offset + (i * 64u)));
}
}
return arr;
@@ -35,8 +35,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 64u));
+ a(u_load(0u));
+ b(u_load_1(64u));
c(asfloat(u[4]).ywxz);
d(asfloat(u[4]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.fxc.hlsl
index c6389d9..40c53b3 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -14,20 +14,20 @@
void d(float f_1) {
}
-float4x4 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-typedef float4x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x4 arr[4] = (float4x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 64u)));
+ arr[i] = u_load_1((offset + (i * 64u)));
}
}
return arr;
@@ -35,8 +35,8 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 64u));
+ a(u_load(0u));
+ b(u_load_1(64u));
c(asfloat(u[4]).ywxz);
d(asfloat(u[4]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.dxc.hlsl
index faaf6bb..2d73f21 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,20 +3,20 @@
};
static float4x4 p[4] = (float4x4[4])0;
-float4x4 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-typedef float4x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x4 arr[4] = (float4x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 64u)));
+ arr[i] = u_load_1((offset + (i * 64u)));
}
}
return arr;
@@ -24,8 +24,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 128u);
+ p = u_load(0u);
+ p[1] = u_load_1(128u);
p[1][0] = asfloat(u[1]).ywxz;
p[1][0].x = asfloat(u[1].x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.fxc.hlsl
index faaf6bb..2d73f21 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,20 +3,20 @@
};
static float4x4 p[4] = (float4x4[4])0;
-float4x4 tint_symbol_1(uint4 buffer[16], uint offset) {
+float4x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-typedef float4x4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[16], uint offset) {
+typedef float4x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x4 arr[4] = (float4x4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 64u)));
+ arr[i] = u_load_1((offset + (i * 64u)));
}
}
return arr;
@@ -24,8 +24,8 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 128u);
+ p = u_load(0u);
+ p[1] = u_load_1(128u);
p[1][0] = asfloat(u[1]).ywxz;
p[1][0].x = asfloat(u[1].x);
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.dxc.hlsl
index fce4827..b1685e1 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,36 +3,36 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void s_store_1(uint offset, float4x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
+ s.Store4((offset + 32u), asuint(value[2u]));
+ s.Store4((offset + 48u), asuint(value[3u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x4 value[4]) {
+void s_store(uint offset, float4x4 value[4]) {
float4x4 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 64u)), array_1[i]);
+ s_store_1((offset + (i * 64u)), array_1[i]);
}
}
}
-float4x4 tint_symbol_4(uint4 buffer[16], uint offset) {
+float4x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-typedef float4x4 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[16], uint offset) {
+typedef float4x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x4 arr[4] = (float4x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 64u)));
}
}
return arr;
@@ -40,8 +40,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 64u, tint_symbol_4(u, 128u));
+ s_store(0u, u_load(0u));
+ s_store_1(64u, u_load_1(128u));
s.Store4(64u, asuint(asfloat(u[1]).ywxz));
s.Store(64u, asuint(asfloat(u[1].x)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.fxc.hlsl
index fce4827..b1685e1 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,36 +3,36 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void s_store_1(uint offset, float4x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
+ s.Store4((offset + 32u), asuint(value[2u]));
+ s.Store4((offset + 48u), asuint(value[3u]));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x4 value[4]) {
+void s_store(uint offset, float4x4 value[4]) {
float4x4 array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 64u)), array_1[i]);
+ s_store_1((offset + (i * 64u)), array_1[i]);
}
}
}
-float4x4 tint_symbol_4(uint4 buffer[16], uint offset) {
+float4x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-typedef float4x4 tint_symbol_3_ret[4];
-tint_symbol_3_ret tint_symbol_3(uint4 buffer[16], uint offset) {
+typedef float4x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x4 arr[4] = (float4x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_4(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 64u)));
}
}
return arr;
@@ -40,8 +40,8 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_3(u, 0u));
- tint_symbol_1(s, 64u, tint_symbol_4(u, 128u));
+ s_store(0u, u_load(0u));
+ s_store_1(64u, u_load_1(128u));
s.Store4(64u, asuint(asfloat(u[1]).ywxz));
s.Store(64u, asuint(asfloat(u[1].x)));
return;
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 312730e..6a62ead 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,20 +7,20 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x4 tint_symbol_3(uint4 buffer[16], uint offset) {
+float4x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-typedef float4x4 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[16], uint offset) {
+typedef float4x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x4 arr[4] = (float4x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 64u)));
}
}
return arr;
@@ -34,8 +34,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 128u);
+ w = u_load(0u);
+ w[1] = u_load_1(128u);
w[1][0] = asfloat(u[1]).ywxz;
w[1][0].x = asfloat(u[1].x);
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 312730e..6a62ead 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,20 +7,20 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x4 tint_symbol_3(uint4 buffer[16], uint offset) {
+float4x4 u_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-typedef float4x4 tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[16], uint offset) {
+typedef float4x4 u_load_ret[4];
+u_load_ret u_load(uint offset) {
float4x4 arr[4] = (float4x4[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 64u)));
}
}
return arr;
@@ -34,8 +34,8 @@
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 128u);
+ w = u_load(0u);
+ w[1] = u_load_1(128u);
w[1][0] = asfloat(u[1]).ywxz;
w[1][0].x = asfloat(u[1].x);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 6fdfa27..11720b4 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,41 +15,41 @@
return counter;
}
-matrix<float16_t, 2, 2> tint_symbol_8(uint4 buffer[64], uint offset) {
+matrix<float16_t, 2, 2> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = a[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = a[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -60,11 +60,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const matrix<float16_t, 2, 2> l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const matrix<float16_t, 2, 2> l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_2 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (4u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint ubo_load_2 = a[scalar_offset_2 / 4][scalar_offset_2 % 4];
const vector<float16_t, 2> l_a_i_a_i_m_i = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16)));
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index fa6940d..9bf3935 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,41 +9,41 @@
uint4 a[64];
};
-matrix<float16_t, 2, 2> tint_symbol_4(uint4 buffer[64], uint offset) {
+matrix<float16_t, 2, 2> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = a[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = a[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -51,11 +51,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const matrix<float16_t, 2, 2> l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const matrix<float16_t, 2, 2> l_a_3_a_2_m = a_load_4(896u);
uint ubo_load_2 = a[56].y;
const vector<float16_t, 2> l_a_3_a_2_m_1 = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16)));
const float16_t l_a_3_a_2_m_1_0 = float16_t(f16tof32(((a[56].y) & 0xFFFF)));
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_builtin.wgsl.expected.dxc.hlsl
index bb82c5d..3035627 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[32];
};
-matrix<float16_t, 2, 2> tint_symbol(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 2, 2> t = transpose(tint_symbol(u, 260u));
+ const matrix<float16_t, 2, 2> t = transpose(u_load(260u));
uint ubo_load_2 = u[0].z;
const float16_t l = length(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))).yx);
uint ubo_load_3 = u[0].z;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.dxc.hlsl
index 03670a0..ed52fa7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -23,27 +23,27 @@
void e(float16_t f_1) {
}
-matrix<float16_t, 2, 2> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 2> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 4u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 4u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -51,9 +51,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 260u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(260u));
uint ubo_load_2 = u[0].z;
d(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))).yx);
uint ubo_load_3 = u[0].z;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.dxc.hlsl
index 5ff5a75..2afb4e2 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.dxc.hlsl
@@ -9,27 +9,27 @@
};
static S p[4] = (S[4])0;
-matrix<float16_t, 2, 2> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 2> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 4u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 4u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -37,9 +37,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 260u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(260u);
uint ubo_load_2 = u[0].z;
p[1].m[0] = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))).yx;
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.dxc.hlsl
index c2951f1..05f1e2f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -9,47 +9,47 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+void s_store_3(uint offset, matrix<float16_t, 2, 2> value) {
+ s.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 4u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 4u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-matrix<float16_t, 2, 2> tint_symbol_8(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 2> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_8(buffer, (offset + 4u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 4u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -57,9 +57,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 388u, tint_symbol_8(u, 260u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(388u, u_load_3(260u));
uint ubo_load_2 = u[0].z;
s.Store<vector<float16_t, 2> >(132u, vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))).yx);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 15c8322..44af793 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,27 +13,27 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 2, 2> tint_symbol_5(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 2> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_5(buffer, (offset + 4u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 4u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -43,14 +43,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 260u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(260u);
uint ubo_load_2 = u[0].z;
w[1].m[0] = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))).yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index e08f4d5..c20e4a7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,41 +15,41 @@
return counter;
}
-float2x2 tint_symbol_8(uint4 buffer[64], uint offset) {
+float2x2 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -60,11 +60,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float2x2 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float2x2 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_2 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (8u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint4 ubo_load_2 = a[scalar_offset_2 / 4];
const float2 l_a_i_a_i_m_i = asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy));
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index e08f4d5..c20e4a7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -15,41 +15,41 @@
return counter;
}
-float2x2 tint_symbol_8(uint4 buffer[64], uint offset) {
+float2x2 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -60,11 +60,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float2x2 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float2x2 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_2 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (8u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint4 ubo_load_2 = a[scalar_offset_2 / 4];
const float2 l_a_i_a_i_m_i = asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy));
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index e732e83..4a66459 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,41 +9,41 @@
uint4 a[64];
};
-float2x2 tint_symbol_4(uint4 buffer[64], uint offset) {
+float2x2 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -51,11 +51,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float2x2 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float2x2 l_a_3_a_2_m = a_load_4(896u);
const float2 l_a_3_a_2_m_1 = asfloat(a[56].zw);
const float l_a_3_a_2_m_1_0 = asfloat(a[56].z);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index e732e83..4a66459 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -9,41 +9,41 @@
uint4 a[64];
};
-float2x2 tint_symbol_4(uint4 buffer[64], uint offset) {
+float2x2 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -51,11 +51,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float2x2 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float2x2 l_a_3_a_2_m = a_load_4(896u);
const float2 l_a_3_a_2_m_1 = asfloat(a[56].zw);
const float l_a_3_a_2_m_1_0 = asfloat(a[56].z);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_builtin.wgsl.expected.dxc.hlsl
index a6813b0..8a0a271 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[32];
};
-float2x2 tint_symbol(uint4 buffer[32], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x2 t = transpose(tint_symbol(u, 264u));
+ const float2x2 t = transpose(u_load(264u));
const float l = length(asfloat(u[1].xy).yx);
const float a = abs(asfloat(u[1].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_builtin.wgsl.expected.fxc.hlsl
index a6813b0..8a0a271 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[32];
};
-float2x2 tint_symbol(uint4 buffer[32], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x2 t = transpose(tint_symbol(u, 264u));
+ const float2x2 t = transpose(u_load(264u));
const float l = length(asfloat(u[1].xy).yx);
const float a = abs(asfloat(u[1].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.dxc.hlsl
index e8f7c79..c5f6fd4 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -23,27 +23,27 @@
void e(float f_1) {
}
-float2x2 tint_symbol_3(uint4 buffer[32], uint offset) {
+float2x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -51,9 +51,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 264u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(264u));
d(asfloat(u[1].xy).yx);
e(asfloat(u[1].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.fxc.hlsl
index e8f7c79..c5f6fd4 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -23,27 +23,27 @@
void e(float f_1) {
}
-float2x2 tint_symbol_3(uint4 buffer[32], uint offset) {
+float2x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -51,9 +51,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 264u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(264u));
d(asfloat(u[1].xy).yx);
e(asfloat(u[1].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.dxc.hlsl
index be509ec..f36adfe 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.dxc.hlsl
@@ -9,27 +9,27 @@
};
static S p[4] = (S[4])0;
-float2x2 tint_symbol_3(uint4 buffer[32], uint offset) {
+float2x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -37,9 +37,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 264u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(264u);
p[1].m[0] = asfloat(u[1].xy).yx;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.fxc.hlsl
index be509ec..f36adfe 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.fxc.hlsl
@@ -9,27 +9,27 @@
};
static S p[4] = (S[4])0;
-float2x2 tint_symbol_3(uint4 buffer[32], uint offset) {
+float2x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -37,9 +37,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 264u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(264u);
p[1].m[0] = asfloat(u[1].xy).yx;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.dxc.hlsl
index de4e979..d088b6a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -9,47 +9,47 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void s_store_3(uint offset, float2x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 8u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 8u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-float2x2 tint_symbol_8(uint4 buffer[32], uint offset) {
+float2x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_8(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -57,9 +57,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 392u, tint_symbol_8(u, 264u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(392u, u_load_3(264u));
s.Store2(136u, asuint(asfloat(u[1].xy).yx));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.fxc.hlsl
index de4e979..d088b6a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -9,47 +9,47 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void s_store_3(uint offset, float2x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 8u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 8u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-float2x2 tint_symbol_8(uint4 buffer[32], uint offset) {
+float2x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_8(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -57,9 +57,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 392u, tint_symbol_8(u, 264u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(392u, u_load_3(264u));
s.Store2(136u, asuint(asfloat(u[1].xy).yx));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
index c0c70b3..16e1a76 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,27 +13,27 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x2 tint_symbol_5(uint4 buffer[32], uint offset) {
+float2x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_5(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -43,14 +43,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 264u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(264u);
w[1].m[0] = asfloat(u[1].xy).yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
index c0c70b3..16e1a76 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -13,27 +13,27 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x2 tint_symbol_5(uint4 buffer[32], uint offset) {
+float2x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_5(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -43,14 +43,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 264u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(264u);
w[1].m[0] = asfloat(u[1].xy).yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 63633dc..e4d8e56 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,47 +15,47 @@
return counter;
}
-matrix<float16_t, 2, 3> tint_symbol_8(uint4 buffer[64], uint offset) {
+matrix<float16_t, 2, 3> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -66,11 +66,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const matrix<float16_t, 2, 3> l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const matrix<float16_t, 2, 3> l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_2 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (8u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index eca3eed..703862f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,47 +9,47 @@
uint4 a[64];
};
-matrix<float16_t, 2, 3> tint_symbol_4(uint4 buffer[64], uint offset) {
+matrix<float16_t, 2, 3> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -57,11 +57,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const matrix<float16_t, 2, 3> l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const matrix<float16_t, 2, 3> l_a_3_a_2_m = a_load_4(896u);
uint2 ubo_load_4 = a[56].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_builtin.wgsl.expected.dxc.hlsl
index fbcd74f..735d0bb 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,14 +2,14 @@
uint4 u[32];
};
-matrix<float16_t, 2, 3> tint_symbol(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
@@ -18,7 +18,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 3, 2> t = transpose(tint_symbol(u, 264u));
+ const matrix<float16_t, 3, 2> t = transpose(u_load(264u));
uint2 ubo_load_4 = u[1].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.dxc.hlsl
index 0e799ce..753c0b5 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -23,33 +23,33 @@
void e(float16_t f_1) {
}
-matrix<float16_t, 2, 3> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 3> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -57,9 +57,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 264u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(264u));
uint2 ubo_load_4 = u[1].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.dxc.hlsl
index 918efe0..42e3393 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.dxc.hlsl
@@ -9,33 +9,33 @@
};
static S p[4] = (S[4])0;
-matrix<float16_t, 2, 3> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 3> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -43,9 +43,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 264u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(264u);
uint2 ubo_load_4 = u[1].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.dxc.hlsl
index 6f680d2..353fff7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -9,53 +9,53 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+void s_store_3(uint offset, matrix<float16_t, 2, 3> value) {
+ s.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 8u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 8u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-matrix<float16_t, 2, 3> tint_symbol_8(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 3> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_8(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -63,9 +63,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 392u, tint_symbol_8(u, 264u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(392u, u_load_3(264u));
uint2 ubo_load_4 = u[1].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 3ddda98..4c76afb 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,33 +13,33 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 2, 3> tint_symbol_5(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 3> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
return matrix<float16_t, 2, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_5(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -49,14 +49,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 264u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(264u);
uint2 ubo_load_4 = u[1].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 553de51..b19fb59 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,39 +15,39 @@
return counter;
}
-float2x3 tint_symbol_8(uint4 buffer[64], uint offset) {
+float2x3 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -58,11 +58,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float2x3 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float2x3 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_2 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (16u * uint(p_a_i_a_i_m_i_save)))) / 4;
const float3 l_a_i_a_i_m_i = asfloat(a[scalar_offset_2 / 4].xyz);
const int tint_symbol = p_a_i_save;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 553de51..b19fb59 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -15,39 +15,39 @@
return counter;
}
-float2x3 tint_symbol_8(uint4 buffer[64], uint offset) {
+float2x3 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -58,11 +58,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float2x3 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float2x3 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_2 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (16u * uint(p_a_i_a_i_m_i_save)))) / 4;
const float3 l_a_i_a_i_m_i = asfloat(a[scalar_offset_2 / 4].xyz);
const int tint_symbol = p_a_i_save;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 2273b9f..7a61a4a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,39 +9,39 @@
uint4 a[64];
};
-float2x3 tint_symbol_4(uint4 buffer[64], uint offset) {
+float2x3 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -49,11 +49,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float2x3 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float2x3 l_a_3_a_2_m = a_load_4(896u);
const float3 l_a_3_a_2_m_1 = asfloat(a[57].xyz);
const float l_a_3_a_2_m_1_0 = asfloat(a[57].x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index 2273b9f..7a61a4a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -9,39 +9,39 @@
uint4 a[64];
};
-float2x3 tint_symbol_4(uint4 buffer[64], uint offset) {
+float2x3 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -49,11 +49,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float2x3 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float2x3 l_a_3_a_2_m = a_load_4(896u);
const float3 l_a_3_a_2_m_1 = asfloat(a[57].xyz);
const float l_a_3_a_2_m_1_0 = asfloat(a[57].x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.dxc.hlsl
index 158973f..90c1782 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[32];
};
-float2x3 tint_symbol(uint4 buffer[32], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x2 t = transpose(tint_symbol(u, 272u));
+ const float3x2 t = transpose(u_load(272u));
const float l = length(asfloat(u[2].xyz).zxy);
const float a = abs(asfloat(u[2].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.fxc.hlsl
index 158973f..90c1782 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[32];
};
-float2x3 tint_symbol(uint4 buffer[32], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x2 t = transpose(tint_symbol(u, 272u));
+ const float3x2 t = transpose(u_load(272u));
const float l = length(asfloat(u[2].xyz).zxy);
const float a = abs(asfloat(u[2].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.dxc.hlsl
index c48f877..20d98b6 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -23,25 +23,25 @@
void e(float f_1) {
}
-float2x3 tint_symbol_3(uint4 buffer[32], uint offset) {
+float2x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -49,9 +49,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 272u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(272u));
d(asfloat(u[2].xyz).zxy);
e(asfloat(u[2].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.fxc.hlsl
index c48f877..20d98b6 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -23,25 +23,25 @@
void e(float f_1) {
}
-float2x3 tint_symbol_3(uint4 buffer[32], uint offset) {
+float2x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -49,9 +49,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 272u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(272u));
d(asfloat(u[2].xyz).zxy);
e(asfloat(u[2].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.dxc.hlsl
index 08aa42f..3b38250 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.dxc.hlsl
@@ -9,25 +9,25 @@
};
static S p[4] = (S[4])0;
-float2x3 tint_symbol_3(uint4 buffer[32], uint offset) {
+float2x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -35,9 +35,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 272u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(272u);
p[1].m[0] = asfloat(u[2].xyz).zxy;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.fxc.hlsl
index 08aa42f..3b38250 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.fxc.hlsl
@@ -9,25 +9,25 @@
};
static S p[4] = (S[4])0;
-float2x3 tint_symbol_3(uint4 buffer[32], uint offset) {
+float2x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -35,9 +35,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 272u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(272u);
p[1].m[0] = asfloat(u[2].xyz).zxy;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.dxc.hlsl
index 257e965..a89fd41 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -9,45 +9,45 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void s_store_3(uint offset, float2x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 16u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 16u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-float2x3 tint_symbol_8(uint4 buffer[32], uint offset) {
+float2x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_8(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -55,9 +55,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 400u, tint_symbol_8(u, 272u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(400u, u_load_3(272u));
s.Store3(144u, asuint(asfloat(u[2].xyz).zxy));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.fxc.hlsl
index 257e965..a89fd41 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -9,45 +9,45 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void s_store_3(uint offset, float2x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 16u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 16u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-float2x3 tint_symbol_8(uint4 buffer[32], uint offset) {
+float2x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_8(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -55,9 +55,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 400u, tint_symbol_8(u, 272u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(400u, u_load_3(272u));
s.Store3(144u, asuint(asfloat(u[2].xyz).zxy));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
index e2fb38a..f4ad942 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,25 +13,25 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x3 tint_symbol_5(uint4 buffer[32], uint offset) {
+float2x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_5(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -41,14 +41,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 272u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(272u);
w[1].m[0] = asfloat(u[2].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
index e2fb38a..f4ad942 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -13,25 +13,25 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x3 tint_symbol_5(uint4 buffer[32], uint offset) {
+float2x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_5(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -41,14 +41,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 272u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(272u);
w[1].m[0] = asfloat(u[2].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 2bad103..0095460 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,47 +15,47 @@
return counter;
}
-matrix<float16_t, 2, 4> tint_symbol_8(uint4 buffer[64], uint offset) {
+matrix<float16_t, 2, 4> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -66,11 +66,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const matrix<float16_t, 2, 4> l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const matrix<float16_t, 2, 4> l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_2 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (8u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 03120f7..b310f83 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,47 +9,47 @@
uint4 a[64];
};
-matrix<float16_t, 2, 4> tint_symbol_4(uint4 buffer[64], uint offset) {
+matrix<float16_t, 2, 4> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -57,11 +57,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const matrix<float16_t, 2, 4> l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const matrix<float16_t, 2, 4> l_a_3_a_2_m = a_load_4(896u);
uint2 ubo_load_4 = a[56].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_builtin.wgsl.expected.dxc.hlsl
index 2244be6..decda0c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,14 +2,14 @@
uint4 u[32];
};
-matrix<float16_t, 2, 4> tint_symbol(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
@@ -18,7 +18,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 4, 2> t = transpose(tint_symbol(u, 264u));
+ const matrix<float16_t, 4, 2> t = transpose(u_load(264u));
uint2 ubo_load_4 = u[1].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.dxc.hlsl
index 8c5270f..3079e31 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -23,33 +23,33 @@
void e(float16_t f_1) {
}
-matrix<float16_t, 2, 4> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 4> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -57,9 +57,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 264u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(264u));
uint2 ubo_load_4 = u[1].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.dxc.hlsl
index e1907c3..ca7c7a2 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.dxc.hlsl
@@ -9,33 +9,33 @@
};
static S p[4] = (S[4])0;
-matrix<float16_t, 2, 4> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 4> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -43,9 +43,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 264u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(264u);
uint2 ubo_load_4 = u[1].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.dxc.hlsl
index daa5fd7..33c8e28 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -9,53 +9,53 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+void s_store_3(uint offset, matrix<float16_t, 2, 4> value) {
+ s.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 8u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 8u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-matrix<float16_t, 2, 4> tint_symbol_8(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 4> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_8(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -63,9 +63,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 392u, tint_symbol_8(u, 264u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(392u, u_load_3(264u));
uint2 ubo_load_4 = u[1].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
index e57c69b..22c32b0 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,33 +13,33 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 2, 4> tint_symbol_5(uint4 buffer[32], uint offset) {
+matrix<float16_t, 2, 4> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_5(buffer, (offset + 8u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -49,14 +49,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 264u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(264u);
uint2 ubo_load_4 = u[1].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 0d53f5d..bd90fc4 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,39 +15,39 @@
return counter;
}
-float2x4 tint_symbol_8(uint4 buffer[64], uint offset) {
+float2x4 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -58,11 +58,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float2x4 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float2x4 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_2 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (16u * uint(p_a_i_a_i_m_i_save)))) / 4;
const float4 l_a_i_a_i_m_i = asfloat(a[scalar_offset_2 / 4]);
const int tint_symbol = p_a_i_save;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 0d53f5d..bd90fc4 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -15,39 +15,39 @@
return counter;
}
-float2x4 tint_symbol_8(uint4 buffer[64], uint offset) {
+float2x4 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -58,11 +58,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float2x4 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float2x4 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_2 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (16u * uint(p_a_i_a_i_m_i_save)))) / 4;
const float4 l_a_i_a_i_m_i = asfloat(a[scalar_offset_2 / 4]);
const int tint_symbol = p_a_i_save;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 9b489d1..ff16e40 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,39 +9,39 @@
uint4 a[64];
};
-float2x4 tint_symbol_4(uint4 buffer[64], uint offset) {
+float2x4 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -49,11 +49,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float2x4 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float2x4 l_a_3_a_2_m = a_load_4(896u);
const float4 l_a_3_a_2_m_1 = asfloat(a[57]);
const float l_a_3_a_2_m_1_0 = asfloat(a[57].x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index 9b489d1..ff16e40 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -9,39 +9,39 @@
uint4 a[64];
};
-float2x4 tint_symbol_4(uint4 buffer[64], uint offset) {
+float2x4 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -49,11 +49,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float2x4 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float2x4 l_a_3_a_2_m = a_load_4(896u);
const float4 l_a_3_a_2_m_1 = asfloat(a[57]);
const float l_a_3_a_2_m_1_0 = asfloat(a[57].x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.dxc.hlsl
index c7ea341..6393ebe 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[32];
};
-float2x4 tint_symbol(uint4 buffer[32], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x2 t = transpose(tint_symbol(u, 272u));
+ const float4x2 t = transpose(u_load(272u));
const float l = length(asfloat(u[2]).ywxz);
const float a = abs(asfloat(u[2]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.fxc.hlsl
index c7ea341..6393ebe 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[32];
};
-float2x4 tint_symbol(uint4 buffer[32], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x2 t = transpose(tint_symbol(u, 272u));
+ const float4x2 t = transpose(u_load(272u));
const float l = length(asfloat(u[2]).ywxz);
const float a = abs(asfloat(u[2]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.dxc.hlsl
index c3c6996..18b3e71 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -23,25 +23,25 @@
void e(float f_1) {
}
-float2x4 tint_symbol_3(uint4 buffer[32], uint offset) {
+float2x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -49,9 +49,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 272u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(272u));
d(asfloat(u[2]).ywxz);
e(asfloat(u[2]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.fxc.hlsl
index c3c6996..18b3e71 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -23,25 +23,25 @@
void e(float f_1) {
}
-float2x4 tint_symbol_3(uint4 buffer[32], uint offset) {
+float2x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -49,9 +49,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 272u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(272u));
d(asfloat(u[2]).ywxz);
e(asfloat(u[2]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.dxc.hlsl
index 55acd61..e68fec1 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.dxc.hlsl
@@ -9,25 +9,25 @@
};
static S p[4] = (S[4])0;
-float2x4 tint_symbol_3(uint4 buffer[32], uint offset) {
+float2x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -35,9 +35,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 272u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(272u);
p[1].m[0] = asfloat(u[2]).ywxz;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.fxc.hlsl
index 55acd61..e68fec1 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.fxc.hlsl
@@ -9,25 +9,25 @@
};
static S p[4] = (S[4])0;
-float2x4 tint_symbol_3(uint4 buffer[32], uint offset) {
+float2x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -35,9 +35,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 272u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(272u);
p[1].m[0] = asfloat(u[2]).ywxz;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.dxc.hlsl
index 425d179..bd34bd7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -9,45 +9,45 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void s_store_3(uint offset, float2x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 16u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 16u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-float2x4 tint_symbol_8(uint4 buffer[32], uint offset) {
+float2x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_8(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -55,9 +55,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 400u, tint_symbol_8(u, 272u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(400u, u_load_3(272u));
s.Store4(144u, asuint(asfloat(u[2]).ywxz));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.fxc.hlsl
index 425d179..bd34bd7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -9,45 +9,45 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void s_store_3(uint offset, float2x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 16u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 16u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-float2x4 tint_symbol_8(uint4 buffer[32], uint offset) {
+float2x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_8(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -55,9 +55,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 400u, tint_symbol_8(u, 272u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(400u, u_load_3(272u));
s.Store4(144u, asuint(asfloat(u[2]).ywxz));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 9f23bf3..f453ee3 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,25 +13,25 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x4 tint_symbol_5(uint4 buffer[32], uint offset) {
+float2x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_5(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -41,14 +41,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 272u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(272u);
w[1].m[0] = asfloat(u[2]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 9f23bf3..f453ee3 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -13,25 +13,25 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x4 tint_symbol_5(uint4 buffer[32], uint offset) {
+float2x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), tint_symbol_5(buffer, (offset + 16u)), asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -41,14 +41,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 272u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(272u);
w[1].m[0] = asfloat(u[2]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 33c5e7a..4be38a3 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,43 +15,43 @@
return counter;
}
-matrix<float16_t, 3, 2> tint_symbol_8(uint4 buffer[64], uint offset) {
+matrix<float16_t, 3, 2> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = a[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = a[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = a[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -62,11 +62,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const matrix<float16_t, 3, 2> l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const matrix<float16_t, 3, 2> l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_3 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (4u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint ubo_load_3 = a[scalar_offset_3 / 4][scalar_offset_3 % 4];
const vector<float16_t, 2> l_a_i_a_i_m_i = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16)));
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 551b533..a9ec7c5 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,43 +9,43 @@
uint4 a[64];
};
-matrix<float16_t, 3, 2> tint_symbol_4(uint4 buffer[64], uint offset) {
+matrix<float16_t, 3, 2> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = a[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = a[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = a[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -53,11 +53,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const matrix<float16_t, 3, 2> l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const matrix<float16_t, 3, 2> l_a_3_a_2_m = a_load_4(896u);
uint ubo_load_3 = a[56].y;
const vector<float16_t, 2> l_a_3_a_2_m_1 = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16)));
const float16_t l_a_3_a_2_m_1_0 = float16_t(f16tof32(((a[56].y) & 0xFFFF)));
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_builtin.wgsl.expected.dxc.hlsl
index 3dfa58d..6d30e52 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,19 +2,19 @@
uint4 u[32];
};
-matrix<float16_t, 3, 2> tint_symbol(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 2, 3> t = transpose(tint_symbol(u, 260u));
+ const matrix<float16_t, 2, 3> t = transpose(u_load(260u));
uint ubo_load_3 = u[0].z;
const float16_t l = length(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))).yx);
uint ubo_load_4 = u[0].z;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.dxc.hlsl
index b0b76cc..c816402 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -23,29 +23,29 @@
void e(float16_t f_1) {
}
-matrix<float16_t, 3, 2> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 2> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 4u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 4u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -53,9 +53,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 260u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(260u));
uint ubo_load_3 = u[0].z;
d(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))).yx);
uint ubo_load_4 = u[0].z;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.dxc.hlsl
index ebcb896..848a395 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.dxc.hlsl
@@ -9,29 +9,29 @@
};
static S p[4] = (S[4])0;
-matrix<float16_t, 3, 2> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 2> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 4u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 4u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -39,9 +39,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 260u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(260u);
uint ubo_load_3 = u[0].z;
p[1].m[0] = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))).yx;
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.dxc.hlsl
index 2a90973..e1fb4d8 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -9,50 +9,50 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
- buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
+void s_store_3(uint offset, matrix<float16_t, 3, 2> value) {
+ s.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+ s.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 4u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 4u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-matrix<float16_t, 3, 2> tint_symbol_8(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 2> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_8(buffer, (offset + 4u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 4u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -60,9 +60,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 388u, tint_symbol_8(u, 260u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(388u, u_load_3(260u));
uint ubo_load_3 = u[0].z;
s.Store<vector<float16_t, 2> >(132u, vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))).yx);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 9b84706..1d00b5b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,29 +13,29 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 3, 2> tint_symbol_5(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 2> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_5(buffer, (offset + 4u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 4u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -45,14 +45,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 260u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(260u);
uint ubo_load_3 = u[0].z;
w[1].m[0] = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))).yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 0860619..6bd1f7f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,43 +15,43 @@
return counter;
}
-float3x2 tint_symbol_8(uint4 buffer[64], uint offset) {
+float3x2 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = a[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -62,11 +62,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float3x2 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float3x2 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_3 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (8u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint4 ubo_load_3 = a[scalar_offset_3 / 4];
const float2 l_a_i_a_i_m_i = asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy));
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 0860619..6bd1f7f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -15,43 +15,43 @@
return counter;
}
-float3x2 tint_symbol_8(uint4 buffer[64], uint offset) {
+float3x2 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = a[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -62,11 +62,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float3x2 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float3x2 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_3 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (8u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint4 ubo_load_3 = a[scalar_offset_3 / 4];
const float2 l_a_i_a_i_m_i = asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy));
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 1dbefd7..4164f82 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,43 +9,43 @@
uint4 a[64];
};
-float3x2 tint_symbol_4(uint4 buffer[64], uint offset) {
+float3x2 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = a[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -53,11 +53,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float3x2 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float3x2 l_a_3_a_2_m = a_load_4(896u);
const float2 l_a_3_a_2_m_1 = asfloat(a[56].zw);
const float l_a_3_a_2_m_1_0 = asfloat(a[56].z);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index 1dbefd7..4164f82 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -9,43 +9,43 @@
uint4 a[64];
};
-float3x2 tint_symbol_4(uint4 buffer[64], uint offset) {
+float3x2 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = a[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -53,11 +53,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float3x2 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float3x2 l_a_3_a_2_m = a_load_4(896u);
const float2 l_a_3_a_2_m_1 = asfloat(a[56].zw);
const float l_a_3_a_2_m_1_0 = asfloat(a[56].z);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_builtin.wgsl.expected.dxc.hlsl
index 2f2a028..996ef20 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,19 +2,19 @@
uint4 u[32];
};
-float3x2 tint_symbol(uint4 buffer[32], uint offset) {
+float3x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x3 t = transpose(tint_symbol(u, 264u));
+ const float2x3 t = transpose(u_load(264u));
const float l = length(asfloat(u[1].xy).yx);
const float a = abs(asfloat(u[1].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_builtin.wgsl.expected.fxc.hlsl
index 2f2a028..996ef20 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,19 +2,19 @@
uint4 u[32];
};
-float3x2 tint_symbol(uint4 buffer[32], uint offset) {
+float3x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x3 t = transpose(tint_symbol(u, 264u));
+ const float2x3 t = transpose(u_load(264u));
const float l = length(asfloat(u[1].xy).yx);
const float a = abs(asfloat(u[1].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.dxc.hlsl
index 0e79198..a0d0b7a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -23,29 +23,29 @@
void e(float f_1) {
}
-float3x2 tint_symbol_3(uint4 buffer[32], uint offset) {
+float3x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -53,9 +53,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 264u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(264u));
d(asfloat(u[1].xy).yx);
e(asfloat(u[1].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.fxc.hlsl
index 0e79198..a0d0b7a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -23,29 +23,29 @@
void e(float f_1) {
}
-float3x2 tint_symbol_3(uint4 buffer[32], uint offset) {
+float3x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -53,9 +53,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 264u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(264u));
d(asfloat(u[1].xy).yx);
e(asfloat(u[1].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.dxc.hlsl
index 5a5e8b1..63c530a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.dxc.hlsl
@@ -9,29 +9,29 @@
};
static S p[4] = (S[4])0;
-float3x2 tint_symbol_3(uint4 buffer[32], uint offset) {
+float3x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -39,9 +39,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 264u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(264u);
p[1].m[0] = asfloat(u[1].xy).yx;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.fxc.hlsl
index 5a5e8b1..63c530a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.fxc.hlsl
@@ -9,29 +9,29 @@
};
static S p[4] = (S[4])0;
-float3x2 tint_symbol_3(uint4 buffer[32], uint offset) {
+float3x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -39,9 +39,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 264u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(264u);
p[1].m[0] = asfloat(u[1].xy).yx;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.dxc.hlsl
index 50eb6e7..0178d89 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -9,50 +9,50 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
+void s_store_3(uint offset, float3x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
+ s.Store2((offset + 16u), asuint(value[2u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 8u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 8u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-float3x2 tint_symbol_8(uint4 buffer[32], uint offset) {
+float3x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_8(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -60,9 +60,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 392u, tint_symbol_8(u, 264u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(392u, u_load_3(264u));
s.Store2(136u, asuint(asfloat(u[1].xy).yx));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.fxc.hlsl
index 50eb6e7..0178d89 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -9,50 +9,50 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
+void s_store_3(uint offset, float3x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
+ s.Store2((offset + 16u), asuint(value[2u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 8u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 8u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-float3x2 tint_symbol_8(uint4 buffer[32], uint offset) {
+float3x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_8(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -60,9 +60,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 392u, tint_symbol_8(u, 264u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(392u, u_load_3(264u));
s.Store2(136u, asuint(asfloat(u[1].xy).yx));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 35c2670..69aa657 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,29 +13,29 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x2 tint_symbol_5(uint4 buffer[32], uint offset) {
+float3x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_5(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -45,14 +45,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 264u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(264u);
w[1].m[0] = asfloat(u[1].xy).yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 35c2670..69aa657 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -13,29 +13,29 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x2 tint_symbol_5(uint4 buffer[32], uint offset) {
+float3x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_5(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -45,14 +45,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 264u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(264u);
w[1].m[0] = asfloat(u[1].xy).yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index ef9e0c4..7d20776 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,52 +15,52 @@
return counter;
}
-matrix<float16_t, 3, 3> tint_symbol_8(uint4 buffer[64], uint offset) {
+matrix<float16_t, 3, 3> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
return matrix<float16_t, 3, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -71,11 +71,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const matrix<float16_t, 3, 3> l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const matrix<float16_t, 3, 3> l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_3 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (8u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint4 ubo_load_7 = a[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index ed02e03..9c68d90 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,52 +9,52 @@
uint4 a[64];
};
-matrix<float16_t, 3, 3> tint_symbol_4(uint4 buffer[64], uint offset) {
+matrix<float16_t, 3, 3> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
return matrix<float16_t, 3, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -62,11 +62,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const matrix<float16_t, 3, 3> l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const matrix<float16_t, 3, 3> l_a_3_a_2_m = a_load_4(896u);
uint2 ubo_load_6 = a[56].zw;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_builtin.wgsl.expected.dxc.hlsl
index f79425f..b945e55 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,19 +2,19 @@
uint4 u[32];
};
-matrix<float16_t, 3, 3> tint_symbol(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
@@ -23,7 +23,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 3, 3> t = transpose(tint_symbol(u, 264u));
+ const matrix<float16_t, 3, 3> t = transpose(u_load(264u));
uint2 ubo_load_6 = u[1].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.dxc.hlsl
index 08bbf31..d53b848 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -23,38 +23,38 @@
void e(float16_t f_1) {
}
-matrix<float16_t, 3, 3> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 3> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
return matrix<float16_t, 3, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -62,9 +62,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 264u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(264u));
uint2 ubo_load_6 = u[1].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.dxc.hlsl
index dffe336..8b46a3d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.dxc.hlsl
@@ -9,38 +9,38 @@
};
static S p[4] = (S[4])0;
-matrix<float16_t, 3, 3> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 3> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
return matrix<float16_t, 3, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -48,9 +48,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 264u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(264u);
uint2 ubo_load_6 = u[1].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.dxc.hlsl
index 35a1a17..fb8fe54 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -9,59 +9,59 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
+void s_store_3(uint offset, matrix<float16_t, 3, 3> value) {
+ s.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+ s.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 8u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 8u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-matrix<float16_t, 3, 3> tint_symbol_8(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 3> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
return matrix<float16_t, 3, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_8(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -69,9 +69,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 392u, tint_symbol_8(u, 264u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(392u, u_load_3(264u));
uint2 ubo_load_6 = u[1].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 10d0d09..da7bd70 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,38 +13,38 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 3, 3> tint_symbol_5(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 3> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
return matrix<float16_t, 3, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_5(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -54,14 +54,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 264u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(264u);
uint2 ubo_load_6 = u[1].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index debcd3f..3150091 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,40 +15,40 @@
return counter;
}
-float3x3 tint_symbol_8(uint4 buffer[64], uint offset) {
+float3x3 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -59,11 +59,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float3x3 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float3x3 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_3 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (16u * uint(p_a_i_a_i_m_i_save)))) / 4;
const float3 l_a_i_a_i_m_i = asfloat(a[scalar_offset_3 / 4].xyz);
const int tint_symbol = p_a_i_save;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index debcd3f..3150091 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -15,40 +15,40 @@
return counter;
}
-float3x3 tint_symbol_8(uint4 buffer[64], uint offset) {
+float3x3 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -59,11 +59,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float3x3 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float3x3 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_3 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (16u * uint(p_a_i_a_i_m_i_save)))) / 4;
const float3 l_a_i_a_i_m_i = asfloat(a[scalar_offset_3 / 4].xyz);
const int tint_symbol = p_a_i_save;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 13f6480..8a440a7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,40 +9,40 @@
uint4 a[64];
};
-float3x3 tint_symbol_4(uint4 buffer[64], uint offset) {
+float3x3 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -50,11 +50,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float3x3 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float3x3 l_a_3_a_2_m = a_load_4(896u);
const float3 l_a_3_a_2_m_1 = asfloat(a[57].xyz);
const float l_a_3_a_2_m_1_0 = asfloat(a[57].x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index 13f6480..8a440a7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -9,40 +9,40 @@
uint4 a[64];
};
-float3x3 tint_symbol_4(uint4 buffer[64], uint offset) {
+float3x3 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -50,11 +50,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float3x3 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float3x3 l_a_3_a_2_m = a_load_4(896u);
const float3 l_a_3_a_2_m_1 = asfloat(a[57].xyz);
const float l_a_3_a_2_m_1_0 = asfloat(a[57].x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.dxc.hlsl
index 55e12dd..2acaa50 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[32];
};
-float3x3 tint_symbol(uint4 buffer[32], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x3 t = transpose(tint_symbol(u, 272u));
+ const float3x3 t = transpose(u_load(272u));
const float l = length(asfloat(u[2].xyz).zxy);
const float a = abs(asfloat(u[2].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.fxc.hlsl
index 55e12dd..2acaa50 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[32];
};
-float3x3 tint_symbol(uint4 buffer[32], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x3 t = transpose(tint_symbol(u, 272u));
+ const float3x3 t = transpose(u_load(272u));
const float l = length(asfloat(u[2].xyz).zxy);
const float a = abs(asfloat(u[2].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.dxc.hlsl
index 112cec2..ea6921b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -23,26 +23,26 @@
void e(float f_1) {
}
-float3x3 tint_symbol_3(uint4 buffer[32], uint offset) {
+float3x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -50,9 +50,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 272u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(272u));
d(asfloat(u[2].xyz).zxy);
e(asfloat(u[2].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.fxc.hlsl
index 112cec2..ea6921b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -23,26 +23,26 @@
void e(float f_1) {
}
-float3x3 tint_symbol_3(uint4 buffer[32], uint offset) {
+float3x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -50,9 +50,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 272u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(272u));
d(asfloat(u[2].xyz).zxy);
e(asfloat(u[2].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.dxc.hlsl
index 1645513..e59e9fc 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.dxc.hlsl
@@ -9,26 +9,26 @@
};
static S p[4] = (S[4])0;
-float3x3 tint_symbol_3(uint4 buffer[32], uint offset) {
+float3x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -36,9 +36,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 272u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(272u);
p[1].m[0] = asfloat(u[2].xyz).zxy;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.fxc.hlsl
index 1645513..e59e9fc 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.fxc.hlsl
@@ -9,26 +9,26 @@
};
static S p[4] = (S[4])0;
-float3x3 tint_symbol_3(uint4 buffer[32], uint offset) {
+float3x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -36,9 +36,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 272u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(272u);
p[1].m[0] = asfloat(u[2].xyz).zxy;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.dxc.hlsl
index c27c393..c3ff00e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -9,47 +9,47 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+void s_store_3(uint offset, float3x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
+ s.Store3((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 16u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 16u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-float3x3 tint_symbol_8(uint4 buffer[32], uint offset) {
+float3x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_8(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -57,9 +57,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 400u, tint_symbol_8(u, 272u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(400u, u_load_3(272u));
s.Store3(144u, asuint(asfloat(u[2].xyz).zxy));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.fxc.hlsl
index c27c393..c3ff00e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -9,47 +9,47 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+void s_store_3(uint offset, float3x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
+ s.Store3((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 16u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 16u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-float3x3 tint_symbol_8(uint4 buffer[32], uint offset) {
+float3x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_8(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -57,9 +57,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 400u, tint_symbol_8(u, 272u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(400u, u_load_3(272u));
s.Store3(144u, asuint(asfloat(u[2].xyz).zxy));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
index e50deb1..137fcc4 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,26 +13,26 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x3 tint_symbol_5(uint4 buffer[32], uint offset) {
+float3x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_5(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -42,14 +42,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 272u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(272u);
w[1].m[0] = asfloat(u[2].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
index e50deb1..137fcc4 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -13,26 +13,26 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x3 tint_symbol_5(uint4 buffer[32], uint offset) {
+float3x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_5(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -42,14 +42,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 272u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(272u);
w[1].m[0] = asfloat(u[2].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 7487aeb..4da33a1 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,52 +15,52 @@
return counter;
}
-matrix<float16_t, 3, 4> tint_symbol_8(uint4 buffer[64], uint offset) {
+matrix<float16_t, 3, 4> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
return matrix<float16_t, 3, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -71,11 +71,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const matrix<float16_t, 3, 4> l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const matrix<float16_t, 3, 4> l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_3 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (8u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint4 ubo_load_7 = a[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 356bff3..6f58a61 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,52 +9,52 @@
uint4 a[64];
};
-matrix<float16_t, 3, 4> tint_symbol_4(uint4 buffer[64], uint offset) {
+matrix<float16_t, 3, 4> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
return matrix<float16_t, 3, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -62,11 +62,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const matrix<float16_t, 3, 4> l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const matrix<float16_t, 3, 4> l_a_3_a_2_m = a_load_4(896u);
uint2 ubo_load_6 = a[56].zw;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_builtin.wgsl.expected.dxc.hlsl
index b0b62a9..49bc7aa 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,19 +2,19 @@
uint4 u[32];
};
-matrix<float16_t, 3, 4> tint_symbol(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
@@ -23,7 +23,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 4, 3> t = transpose(tint_symbol(u, 264u));
+ const matrix<float16_t, 4, 3> t = transpose(u_load(264u));
uint2 ubo_load_6 = u[1].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.dxc.hlsl
index a190fc0..9d1eebc 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -23,38 +23,38 @@
void e(float16_t f_1) {
}
-matrix<float16_t, 3, 4> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 4> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
return matrix<float16_t, 3, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -62,9 +62,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 264u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(264u));
uint2 ubo_load_6 = u[1].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.dxc.hlsl
index 60c2c7a..cf17cbe 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.dxc.hlsl
@@ -9,38 +9,38 @@
};
static S p[4] = (S[4])0;
-matrix<float16_t, 3, 4> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 4> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
return matrix<float16_t, 3, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -48,9 +48,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 264u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(264u);
uint2 ubo_load_6 = u[1].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.dxc.hlsl
index 994f4fc..d8f48aa 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -9,59 +9,59 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
+void s_store_3(uint offset, matrix<float16_t, 3, 4> value) {
+ s.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+ s.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 8u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 8u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-matrix<float16_t, 3, 4> tint_symbol_8(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 4> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
return matrix<float16_t, 3, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_8(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -69,9 +69,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 392u, tint_symbol_8(u, 264u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(392u, u_load_3(264u));
uint2 ubo_load_6 = u[1].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
index e0f83f8..e15cddc 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,38 +13,38 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 3, 4> tint_symbol_5(uint4 buffer[32], uint offset) {
+matrix<float16_t, 3, 4> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
return matrix<float16_t, 3, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_5(buffer, (offset + 8u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -54,14 +54,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 264u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(264u);
uint2 ubo_load_6 = u[1].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 2e5ba64..efb46e7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,40 +15,40 @@
return counter;
}
-float3x4 tint_symbol_8(uint4 buffer[64], uint offset) {
+float3x4 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -59,11 +59,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float3x4 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float3x4 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_3 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (16u * uint(p_a_i_a_i_m_i_save)))) / 4;
const float4 l_a_i_a_i_m_i = asfloat(a[scalar_offset_3 / 4]);
const int tint_symbol = p_a_i_save;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 2e5ba64..efb46e7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -15,40 +15,40 @@
return counter;
}
-float3x4 tint_symbol_8(uint4 buffer[64], uint offset) {
+float3x4 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -59,11 +59,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float3x4 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float3x4 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_3 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (16u * uint(p_a_i_a_i_m_i_save)))) / 4;
const float4 l_a_i_a_i_m_i = asfloat(a[scalar_offset_3 / 4]);
const int tint_symbol = p_a_i_save;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 26a9369..e71e977 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,40 +9,40 @@
uint4 a[64];
};
-float3x4 tint_symbol_4(uint4 buffer[64], uint offset) {
+float3x4 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -50,11 +50,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float3x4 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float3x4 l_a_3_a_2_m = a_load_4(896u);
const float4 l_a_3_a_2_m_1 = asfloat(a[57]);
const float l_a_3_a_2_m_1_0 = asfloat(a[57].x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index 26a9369..e71e977 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -9,40 +9,40 @@
uint4 a[64];
};
-float3x4 tint_symbol_4(uint4 buffer[64], uint offset) {
+float3x4 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -50,11 +50,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float3x4 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float3x4 l_a_3_a_2_m = a_load_4(896u);
const float4 l_a_3_a_2_m_1 = asfloat(a[57]);
const float l_a_3_a_2_m_1_0 = asfloat(a[57].x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.dxc.hlsl
index 0826949..5db4bf5 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[32];
};
-float3x4 tint_symbol(uint4 buffer[32], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x3 t = transpose(tint_symbol(u, 272u));
+ const float4x3 t = transpose(u_load(272u));
const float l = length(asfloat(u[2]).ywxz);
const float a = abs(asfloat(u[2]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.fxc.hlsl
index 0826949..5db4bf5 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[32];
};
-float3x4 tint_symbol(uint4 buffer[32], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x3 t = transpose(tint_symbol(u, 272u));
+ const float4x3 t = transpose(u_load(272u));
const float l = length(asfloat(u[2]).ywxz);
const float a = abs(asfloat(u[2]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.dxc.hlsl
index 0bc1c2f..413584c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -23,26 +23,26 @@
void e(float f_1) {
}
-float3x4 tint_symbol_3(uint4 buffer[32], uint offset) {
+float3x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -50,9 +50,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 272u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(272u));
d(asfloat(u[2]).ywxz);
e(asfloat(u[2]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.fxc.hlsl
index 0bc1c2f..413584c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -23,26 +23,26 @@
void e(float f_1) {
}
-float3x4 tint_symbol_3(uint4 buffer[32], uint offset) {
+float3x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -50,9 +50,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 272u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(272u));
d(asfloat(u[2]).ywxz);
e(asfloat(u[2]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.dxc.hlsl
index d7e58d4..9020119 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.dxc.hlsl
@@ -9,26 +9,26 @@
};
static S p[4] = (S[4])0;
-float3x4 tint_symbol_3(uint4 buffer[32], uint offset) {
+float3x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -36,9 +36,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 272u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(272u);
p[1].m[0] = asfloat(u[2]).ywxz;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.fxc.hlsl
index d7e58d4..9020119 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.fxc.hlsl
@@ -9,26 +9,26 @@
};
static S p[4] = (S[4])0;
-float3x4 tint_symbol_3(uint4 buffer[32], uint offset) {
+float3x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -36,9 +36,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 272u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(272u);
p[1].m[0] = asfloat(u[2]).ywxz;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.dxc.hlsl
index ce77d82..66eb7ed 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -9,47 +9,47 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+void s_store_3(uint offset, float3x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
+ s.Store4((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 16u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 16u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-float3x4 tint_symbol_8(uint4 buffer[32], uint offset) {
+float3x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_8(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -57,9 +57,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 400u, tint_symbol_8(u, 272u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(400u, u_load_3(272u));
s.Store4(144u, asuint(asfloat(u[2]).ywxz));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.fxc.hlsl
index ce77d82..66eb7ed 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -9,47 +9,47 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+void s_store_3(uint offset, float3x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
+ s.Store4((offset + 32u), asuint(value[2u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 16u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 16u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-float3x4 tint_symbol_8(uint4 buffer[32], uint offset) {
+float3x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_8(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -57,9 +57,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 400u, tint_symbol_8(u, 272u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(400u, u_load_3(272u));
s.Store4(144u, asuint(asfloat(u[2]).ywxz));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 2188035..7f2417b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,26 +13,26 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x4 tint_symbol_5(uint4 buffer[32], uint offset) {
+float3x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_5(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -42,14 +42,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 272u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(272u);
w[1].m[0] = asfloat(u[2]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 2188035..7f2417b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -13,26 +13,26 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x4 tint_symbol_5(uint4 buffer[32], uint offset) {
+float3x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), tint_symbol_5(buffer, (offset + 16u)), asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_3 / 4][scalar_offset_3 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -42,14 +42,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 272u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(272u);
w[1].m[0] = asfloat(u[2]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 2b3b666..8f0ff8a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,45 +15,45 @@
return counter;
}
-matrix<float16_t, 4, 2> tint_symbol_8(uint4 buffer[64], uint offset) {
+matrix<float16_t, 4, 2> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = a[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = a[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = a[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = a[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -64,11 +64,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const matrix<float16_t, 4, 2> l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const matrix<float16_t, 4, 2> l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_4 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (4u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint ubo_load_4 = a[scalar_offset_4 / 4][scalar_offset_4 % 4];
const vector<float16_t, 2> l_a_i_a_i_m_i = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16)));
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 5da92cb..9e901ac 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,45 +9,45 @@
uint4 a[64];
};
-matrix<float16_t, 4, 2> tint_symbol_4(uint4 buffer[64], uint offset) {
+matrix<float16_t, 4, 2> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = a[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = a[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = a[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = a[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -55,11 +55,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const matrix<float16_t, 4, 2> l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const matrix<float16_t, 4, 2> l_a_3_a_2_m = a_load_4(896u);
uint ubo_load_4 = a[56].y;
const vector<float16_t, 2> l_a_3_a_2_m_1 = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16)));
const float16_t l_a_3_a_2_m_1_0 = float16_t(f16tof32(((a[56].y) & 0xFFFF)));
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_builtin.wgsl.expected.dxc.hlsl
index 81cfbc4..a713b66 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,21 +2,21 @@
uint4 u[32];
};
-matrix<float16_t, 4, 2> tint_symbol(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 2, 4> t = transpose(tint_symbol(u, 260u));
+ const matrix<float16_t, 2, 4> t = transpose(u_load(260u));
uint ubo_load_4 = u[0].z;
const float16_t l = length(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16))).yx);
uint ubo_load_5 = u[0].z;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.dxc.hlsl
index 7620fd9..bee10d2 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -23,31 +23,31 @@
void e(float16_t f_1) {
}
-matrix<float16_t, 4, 2> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 2> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 4u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 4u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -55,9 +55,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 260u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(260u));
uint ubo_load_4 = u[0].z;
d(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16))).yx);
uint ubo_load_5 = u[0].z;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.dxc.hlsl
index 717e390..b10d3d0 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.dxc.hlsl
@@ -9,31 +9,31 @@
};
static S p[4] = (S[4])0;
-matrix<float16_t, 4, 2> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 2> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 4u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 4u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -41,9 +41,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 260u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(260u);
uint ubo_load_4 = u[0].z;
p[1].m[0] = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16))).yx;
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.dxc.hlsl
index 651a533..aa6f599 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -9,53 +9,53 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
- buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
- buffer.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
+void s_store_3(uint offset, matrix<float16_t, 4, 2> value) {
+ s.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+ s.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
+ s.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 4u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 4u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-matrix<float16_t, 4, 2> tint_symbol_8(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 2> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_8(buffer, (offset + 4u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 4u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -63,9 +63,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 388u, tint_symbol_8(u, 260u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(388u, u_load_3(260u));
uint ubo_load_4 = u[0].z;
s.Store<vector<float16_t, 2> >(132u, vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16))).yx);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 334fe1e..711625c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,31 +13,31 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 4, 2> tint_symbol_5(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 2> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_5(buffer, (offset + 4u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 4u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -47,14 +47,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 260u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(260u);
uint ubo_load_4 = u[0].z;
w[1].m[0] = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16))).yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 0554769..485a529 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,45 +15,45 @@
return counter;
}
-float4x2 tint_symbol_8(uint4 buffer[64], uint offset) {
+float4x2 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = a[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -64,11 +64,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float4x2 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float4x2 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_4 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (8u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint4 ubo_load_4 = a[scalar_offset_4 / 4];
const float2 l_a_i_a_i_m_i = asfloat(((scalar_offset_4 & 2) ? ubo_load_4.zw : ubo_load_4.xy));
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 0554769..485a529 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -15,45 +15,45 @@
return counter;
}
-float4x2 tint_symbol_8(uint4 buffer[64], uint offset) {
+float4x2 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = a[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -64,11 +64,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float4x2 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float4x2 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_4 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (8u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint4 ubo_load_4 = a[scalar_offset_4 / 4];
const float2 l_a_i_a_i_m_i = asfloat(((scalar_offset_4 & 2) ? ubo_load_4.zw : ubo_load_4.xy));
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index ec07ff8..bb1caaf 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,45 +9,45 @@
uint4 a[64];
};
-float4x2 tint_symbol_4(uint4 buffer[64], uint offset) {
+float4x2 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = a[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -55,11 +55,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float4x2 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float4x2 l_a_3_a_2_m = a_load_4(896u);
const float2 l_a_3_a_2_m_1 = asfloat(a[56].zw);
const float l_a_3_a_2_m_1_0 = asfloat(a[56].z);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index ec07ff8..bb1caaf 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -9,45 +9,45 @@
uint4 a[64];
};
-float4x2 tint_symbol_4(uint4 buffer[64], uint offset) {
+float4x2 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = a[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = a[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = a[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -55,11 +55,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float4x2 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float4x2 l_a_3_a_2_m = a_load_4(896u);
const float2 l_a_3_a_2_m_1 = asfloat(a[56].zw);
const float l_a_3_a_2_m_1_0 = asfloat(a[56].z);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_builtin.wgsl.expected.dxc.hlsl
index 2d53757..3b899df 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,21 +2,21 @@
uint4 u[32];
};
-float4x2 tint_symbol(uint4 buffer[32], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x4 t = transpose(tint_symbol(u, 264u));
+ const float2x4 t = transpose(u_load(264u));
const float l = length(asfloat(u[1].xy).yx);
const float a = abs(asfloat(u[1].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_builtin.wgsl.expected.fxc.hlsl
index 2d53757..3b899df 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,21 +2,21 @@
uint4 u[32];
};
-float4x2 tint_symbol(uint4 buffer[32], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x4 t = transpose(tint_symbol(u, 264u));
+ const float2x4 t = transpose(u_load(264u));
const float l = length(asfloat(u[1].xy).yx);
const float a = abs(asfloat(u[1].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.dxc.hlsl
index 393469d..75b5e33 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -23,31 +23,31 @@
void e(float f_1) {
}
-float4x2 tint_symbol_3(uint4 buffer[32], uint offset) {
+float4x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -55,9 +55,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 264u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(264u));
d(asfloat(u[1].xy).yx);
e(asfloat(u[1].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.fxc.hlsl
index 393469d..75b5e33 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -23,31 +23,31 @@
void e(float f_1) {
}
-float4x2 tint_symbol_3(uint4 buffer[32], uint offset) {
+float4x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -55,9 +55,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 264u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(264u));
d(asfloat(u[1].xy).yx);
e(asfloat(u[1].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.dxc.hlsl
index 60c112b..e52cbbd 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.dxc.hlsl
@@ -9,31 +9,31 @@
};
static S p[4] = (S[4])0;
-float4x2 tint_symbol_3(uint4 buffer[32], uint offset) {
+float4x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -41,9 +41,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 264u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(264u);
p[1].m[0] = asfloat(u[1].xy).yx;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.fxc.hlsl
index 60c112b..e52cbbd 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.fxc.hlsl
@@ -9,31 +9,31 @@
};
static S p[4] = (S[4])0;
-float4x2 tint_symbol_3(uint4 buffer[32], uint offset) {
+float4x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -41,9 +41,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 264u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(264u);
p[1].m[0] = asfloat(u[1].xy).yx;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.dxc.hlsl
index bfc91ab..81fa703 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -9,53 +9,53 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+void s_store_3(uint offset, float4x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
+ s.Store2((offset + 16u), asuint(value[2u]));
+ s.Store2((offset + 24u), asuint(value[3u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 8u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 8u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-float4x2 tint_symbol_8(uint4 buffer[32], uint offset) {
+float4x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_8(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -63,9 +63,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 392u, tint_symbol_8(u, 264u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(392u, u_load_3(264u));
s.Store2(136u, asuint(asfloat(u[1].xy).yx));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.fxc.hlsl
index bfc91ab..81fa703 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -9,53 +9,53 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+void s_store_3(uint offset, float4x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
+ s.Store2((offset + 16u), asuint(value[2u]));
+ s.Store2((offset + 24u), asuint(value[3u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 8u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 8u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-float4x2 tint_symbol_8(uint4 buffer[32], uint offset) {
+float4x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_8(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -63,9 +63,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 392u, tint_symbol_8(u, 264u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(392u, u_load_3(264u));
s.Store2(136u, asuint(asfloat(u[1].xy).yx));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 94f8f11..4960ff3 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,31 +13,31 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x2 tint_symbol_5(uint4 buffer[32], uint offset) {
+float4x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_5(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -47,14 +47,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 264u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(264u);
w[1].m[0] = asfloat(u[1].xy).yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 94f8f11..4960ff3 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -13,31 +13,31 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x2 tint_symbol_5(uint4 buffer[32], uint offset) {
+float4x2 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_5(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -47,14 +47,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 264u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(264u);
w[1].m[0] = asfloat(u[1].xy).yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 96d9ebc..5bc50ff 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,57 +15,57 @@
return counter;
}
-matrix<float16_t, 4, 3> tint_symbol_8(uint4 buffer[64], uint offset) {
+matrix<float16_t, 4, 3> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = a[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -76,11 +76,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const matrix<float16_t, 4, 3> l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const matrix<float16_t, 4, 3> l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_4 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (8u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint4 ubo_load_9 = a[scalar_offset_4 / 4];
uint2 ubo_load_8 = ((scalar_offset_4 & 2) ? ubo_load_9.zw : ubo_load_9.xy);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 7397fe3..35dc20c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,57 +9,57 @@
uint4 a[64];
};
-matrix<float16_t, 4, 3> tint_symbol_4(uint4 buffer[64], uint offset) {
+matrix<float16_t, 4, 3> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = a[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -67,11 +67,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const matrix<float16_t, 4, 3> l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const matrix<float16_t, 4, 3> l_a_3_a_2_m = a_load_4(896u);
uint2 ubo_load_8 = a[56].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_builtin.wgsl.expected.dxc.hlsl
index 3123f10..8a21954 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,24 +2,24 @@
uint4 u[32];
};
-matrix<float16_t, 4, 3> tint_symbol(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
@@ -28,7 +28,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 3, 4> t = transpose(tint_symbol(u, 264u));
+ const matrix<float16_t, 3, 4> t = transpose(u_load(264u));
uint2 ubo_load_8 = u[1].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.dxc.hlsl
index ef7574b..22f98b3 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -23,43 +23,43 @@
void e(float16_t f_1) {
}
-matrix<float16_t, 4, 3> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 3> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -67,9 +67,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 264u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(264u));
uint2 ubo_load_8 = u[1].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.dxc.hlsl
index d2aacee..4d0072f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.dxc.hlsl
@@ -9,43 +9,43 @@
};
static S p[4] = (S[4])0;
-matrix<float16_t, 4, 3> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 3> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -53,9 +53,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 264u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(264u);
uint2 ubo_load_8 = u[1].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.dxc.hlsl
index f4e10ac..8bc864e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -9,65 +9,65 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
- buffer.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
+void s_store_3(uint offset, matrix<float16_t, 4, 3> value) {
+ s.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+ s.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
+ s.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 8u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 8u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-matrix<float16_t, 4, 3> tint_symbol_8(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 3> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_8(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -75,9 +75,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 392u, tint_symbol_8(u, 264u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(392u, u_load_3(264u));
uint2 ubo_load_8 = u[1].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
index c660740..034f243 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,43 +13,43 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 4, 3> tint_symbol_5(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 3> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
return matrix<float16_t, 4, 3>(vector<float16_t, 3>(ubo_load_xz[0], ubo_load_y, ubo_load_xz[1]), vector<float16_t, 3>(ubo_load_2_xz[0], ubo_load_2_y, ubo_load_2_xz[1]), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_5(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -59,14 +59,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 264u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(264u);
uint2 ubo_load_8 = u[1].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 907314e..c8e4d7a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,41 +15,41 @@
return counter;
}
-float4x3 tint_symbol_8(uint4 buffer[64], uint offset) {
+float4x3 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz), asfloat(a[scalar_offset_3 / 4].xyz));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -60,11 +60,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float4x3 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float4x3 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_4 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (16u * uint(p_a_i_a_i_m_i_save)))) / 4;
const float3 l_a_i_a_i_m_i = asfloat(a[scalar_offset_4 / 4].xyz);
const int tint_symbol = p_a_i_save;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 907314e..c8e4d7a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -15,41 +15,41 @@
return counter;
}
-float4x3 tint_symbol_8(uint4 buffer[64], uint offset) {
+float4x3 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz), asfloat(a[scalar_offset_3 / 4].xyz));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -60,11 +60,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float4x3 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float4x3 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_4 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (16u * uint(p_a_i_a_i_m_i_save)))) / 4;
const float3 l_a_i_a_i_m_i = asfloat(a[scalar_offset_4 / 4].xyz);
const int tint_symbol = p_a_i_save;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index a678c85..9813d97b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,41 +9,41 @@
uint4 a[64];
};
-float4x3 tint_symbol_4(uint4 buffer[64], uint offset) {
+float4x3 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz), asfloat(a[scalar_offset_3 / 4].xyz));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -51,11 +51,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float4x3 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float4x3 l_a_3_a_2_m = a_load_4(896u);
const float3 l_a_3_a_2_m_1 = asfloat(a[57].xyz);
const float l_a_3_a_2_m_1_0 = asfloat(a[57].x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index a678c85..9813d97b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -9,41 +9,41 @@
uint4 a[64];
};
-float4x3 tint_symbol_4(uint4 buffer[64], uint offset) {
+float4x3 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(a[scalar_offset / 4].xyz), asfloat(a[scalar_offset_1 / 4].xyz), asfloat(a[scalar_offset_2 / 4].xyz), asfloat(a[scalar_offset_3 / 4].xyz));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -51,11 +51,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float4x3 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float4x3 l_a_3_a_2_m = a_load_4(896u);
const float3 l_a_3_a_2_m_1 = asfloat(a[57].xyz);
const float l_a_3_a_2_m_1_0 = asfloat(a[57].x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.dxc.hlsl
index 37cf503..14506b1 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[48];
};
-float4x3 tint_symbol(uint4 buffer[48], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x4 t = transpose(tint_symbol(u, 400u));
+ const float3x4 t = transpose(u_load(400u));
const float l = length(asfloat(u[2].xyz).zxy);
const float a = abs(asfloat(u[2].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.fxc.hlsl
index 37cf503..14506b1 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[48];
};
-float4x3 tint_symbol(uint4 buffer[48], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x4 t = transpose(tint_symbol(u, 400u));
+ const float3x4 t = transpose(u_load(400u));
const float l = length(asfloat(u[2].xyz).zxy);
const float a = abs(asfloat(u[2].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.dxc.hlsl
index 2fadcff..a1a374c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -23,27 +23,27 @@
void e(float f_1) {
}
-float4x3 tint_symbol_3(uint4 buffer[48], uint offset) {
+float4x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-S tint_symbol_1(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 192u)));
+ arr[i] = u_load_1((offset + (i * 192u)));
}
}
return arr;
@@ -51,9 +51,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 384u));
- c(tint_symbol_3(u, 400u));
+ a(u_load(0u));
+ b(u_load_1(384u));
+ c(u_load_3(400u));
d(asfloat(u[2].xyz).zxy);
e(asfloat(u[2].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.fxc.hlsl
index 2fadcff..a1a374c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -23,27 +23,27 @@
void e(float f_1) {
}
-float4x3 tint_symbol_3(uint4 buffer[48], uint offset) {
+float4x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-S tint_symbol_1(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 192u)));
+ arr[i] = u_load_1((offset + (i * 192u)));
}
}
return arr;
@@ -51,9 +51,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 384u));
- c(tint_symbol_3(u, 400u));
+ a(u_load(0u));
+ b(u_load_1(384u));
+ c(u_load_3(400u));
d(asfloat(u[2].xyz).zxy);
e(asfloat(u[2].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.dxc.hlsl
index 5426bb4..c4d3042 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.dxc.hlsl
@@ -9,27 +9,27 @@
};
static S p[4] = (S[4])0;
-float4x3 tint_symbol_3(uint4 buffer[48], uint offset) {
+float4x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-S tint_symbol_1(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 192u)));
+ arr[i] = u_load_1((offset + (i * 192u)));
}
}
return arr;
@@ -37,9 +37,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 384u);
- p[3].m = tint_symbol_3(u, 400u);
+ p = u_load(0u);
+ p[1] = u_load_1(384u);
+ p[3].m = u_load_3(400u);
p[1].m[0] = asfloat(u[2].xyz).zxy;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.fxc.hlsl
index 5426bb4..c4d3042 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.fxc.hlsl
@@ -9,27 +9,27 @@
};
static S p[4] = (S[4])0;
-float4x3 tint_symbol_3(uint4 buffer[48], uint offset) {
+float4x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-S tint_symbol_1(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 192u)));
+ arr[i] = u_load_1((offset + (i * 192u)));
}
}
return arr;
@@ -37,9 +37,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 384u);
- p[3].m = tint_symbol_3(u, 400u);
+ p = u_load(0u);
+ p[1] = u_load_1(384u);
+ p[3].m = u_load_3(400u);
p[1].m[0] = asfloat(u[2].xyz).zxy;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.dxc.hlsl
index 9f86bd8..df60f51 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -9,49 +9,49 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+void s_store_3(uint offset, float4x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
+ s.Store3((offset + 32u), asuint(value[2u]));
+ s.Store3((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 16u), value.m);
- buffer.Store((offset + 128u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 16u), value.m);
+ s.Store((offset + 128u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 192u)), array_1[i]);
+ s_store_1((offset + (i * 192u)), array_1[i]);
}
}
}
-float4x3 tint_symbol_8(uint4 buffer[48], uint offset) {
+float4x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-S tint_symbol_6(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_8(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 192u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 192u)));
}
}
return arr;
@@ -59,9 +59,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 192u, tint_symbol_6(u, 384u));
- tint_symbol_3(s, 592u, tint_symbol_8(u, 400u));
+ s_store(0u, u_load(0u));
+ s_store_1(192u, u_load_1(384u));
+ s_store_3(592u, u_load_3(400u));
s.Store3(208u, asuint(asfloat(u[2].xyz).zxy));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.fxc.hlsl
index 9f86bd8..df60f51 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -9,49 +9,49 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+void s_store_3(uint offset, float4x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
+ s.Store3((offset + 32u), asuint(value[2u]));
+ s.Store3((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 16u), value.m);
- buffer.Store((offset + 128u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 16u), value.m);
+ s.Store((offset + 128u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 192u)), array_1[i]);
+ s_store_1((offset + (i * 192u)), array_1[i]);
}
}
}
-float4x3 tint_symbol_8(uint4 buffer[48], uint offset) {
+float4x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-S tint_symbol_6(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_8(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 192u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 192u)));
}
}
return arr;
@@ -59,9 +59,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 192u, tint_symbol_6(u, 384u));
- tint_symbol_3(s, 592u, tint_symbol_8(u, 400u));
+ s_store(0u, u_load(0u));
+ s_store_1(192u, u_load_1(384u));
+ s_store_3(592u, u_load_3(400u));
s.Store3(208u, asuint(asfloat(u[2].xyz).zxy));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 11ebf40..c75730b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,27 +13,27 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x3 tint_symbol_5(uint4 buffer[48], uint offset) {
+float4x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-S tint_symbol_3(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_5(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 192u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 192u)));
}
}
return arr;
@@ -43,14 +43,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 384u);
- w[3].m = tint_symbol_5(u, 400u);
+ w = u_load(0u);
+ w[1] = u_load_1(384u);
+ w[3].m = u_load_3(400u);
w[1].m[0] = asfloat(u[2].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 11ebf40..c75730b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -13,27 +13,27 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x3 tint_symbol_5(uint4 buffer[48], uint offset) {
+float4x3 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
-S tint_symbol_3(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_5(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 192u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 192u)));
}
}
return arr;
@@ -43,14 +43,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 384u);
- w[3].m = tint_symbol_5(u, 400u);
+ w = u_load(0u);
+ w[1] = u_load_1(384u);
+ w[3].m = u_load_3(400u);
w[1].m[0] = asfloat(u[2].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index c0fa0aa..5693c96 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,57 +15,57 @@
return counter;
}
-matrix<float16_t, 4, 4> tint_symbol_8(uint4 buffer[64], uint offset) {
+matrix<float16_t, 4, 4> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = a[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]), vector<float16_t, 4>(ubo_load_6_xz[0], ubo_load_6_yw[0], ubo_load_6_xz[1], ubo_load_6_yw[1]));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -76,11 +76,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const matrix<float16_t, 4, 4> l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const matrix<float16_t, 4, 4> l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_4 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (8u * uint(p_a_i_a_i_m_i_save)))) / 4;
uint4 ubo_load_9 = a[scalar_offset_4 / 4];
uint2 ubo_load_8 = ((scalar_offset_4 & 2) ? ubo_load_9.zw : ubo_load_9.xy);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 5af54cf..a4113d0 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,57 +9,57 @@
uint4 a[64];
};
-matrix<float16_t, 4, 4> tint_symbol_4(uint4 buffer[64], uint offset) {
+matrix<float16_t, 4, 4> a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = a[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = a[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = a[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = a[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]), vector<float16_t, 4>(ubo_load_6_xz[0], ubo_load_6_yw[0], ubo_load_6_xz[1], ubo_load_6_yw[1]));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -67,11 +67,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const matrix<float16_t, 4, 4> l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const matrix<float16_t, 4, 4> l_a_3_a_2_m = a_load_4(896u);
uint2 ubo_load_8 = a[56].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_builtin.wgsl.expected.dxc.hlsl
index fdce8e0..0862cbb 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,24 +2,24 @@
uint4 u[32];
};
-matrix<float16_t, 4, 4> tint_symbol(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
@@ -28,7 +28,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 4, 4> t = transpose(tint_symbol(u, 264u));
+ const matrix<float16_t, 4, 4> t = transpose(u_load(264u));
uint2 ubo_load_8 = u[1].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.dxc.hlsl
index 9b871b4..d2a32b0 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -23,43 +23,43 @@
void e(float16_t f_1) {
}
-matrix<float16_t, 4, 4> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 4> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]), vector<float16_t, 4>(ubo_load_6_xz[0], ubo_load_6_yw[0], ubo_load_6_xz[1], ubo_load_6_yw[1]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -67,9 +67,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 256u));
- c(tint_symbol_3(u, 264u));
+ a(u_load(0u));
+ b(u_load_1(256u));
+ c(u_load_3(264u));
uint2 ubo_load_8 = u[1].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.dxc.hlsl
index 8b11bb5..dab85ac 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.dxc.hlsl
@@ -9,43 +9,43 @@
};
static S p[4] = (S[4])0;
-matrix<float16_t, 4, 4> tint_symbol_3(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 4> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]), vector<float16_t, 4>(ubo_load_6_xz[0], ubo_load_6_yw[0], ubo_load_6_xz[1], ubo_load_6_yw[1]));
}
-S tint_symbol_1(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 128u)));
+ arr[i] = u_load_1((offset + (i * 128u)));
}
}
return arr;
@@ -53,9 +53,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 256u);
- p[3].m = tint_symbol_3(u, 264u);
+ p = u_load(0u);
+ p[1] = u_load_1(256u);
+ p[3].m = u_load_3(264u);
uint2 ubo_load_8 = u[1].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.dxc.hlsl
index 4ec616b..5f4c7bb 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -9,65 +9,65 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
- buffer.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
+void s_store_3(uint offset, matrix<float16_t, 4, 4> value) {
+ s.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+ s.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
+ s.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 8u), value.m);
- buffer.Store((offset + 64u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 8u), value.m);
+ s.Store((offset + 64u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 128u)), array_1[i]);
+ s_store_1((offset + (i * 128u)), array_1[i]);
}
}
}
-matrix<float16_t, 4, 4> tint_symbol_8(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 4> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]), vector<float16_t, 4>(ubo_load_6_xz[0], ubo_load_6_yw[0], ubo_load_6_xz[1], ubo_load_6_yw[1]));
}
-S tint_symbol_6(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_8(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -75,9 +75,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 128u, tint_symbol_6(u, 256u));
- tint_symbol_3(s, 392u, tint_symbol_8(u, 264u));
+ s_store(0u, u_load(0u));
+ s_store_1(128u, u_load_1(256u));
+ s_store_3(392u, u_load_3(264u));
uint2 ubo_load_8 = u[1].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 45f86b8..89c43ae 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,43 +13,43 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 4, 4> tint_symbol_5(uint4 buffer[32], uint offset) {
+matrix<float16_t, 4, 4> u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
return matrix<float16_t, 4, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]), vector<float16_t, 4>(ubo_load_4_xz[0], ubo_load_4_yw[0], ubo_load_4_xz[1], ubo_load_4_yw[1]), vector<float16_t, 4>(ubo_load_6_xz[0], ubo_load_6_yw[0], ubo_load_6_xz[1], ubo_load_6_yw[1]));
}
-S tint_symbol_3(uint4 buffer[32], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 64u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_5(buffer, (offset + 8u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 8u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[32], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 128u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 128u)));
}
}
return arr;
@@ -59,14 +59,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 256u);
- w[3].m = tint_symbol_5(u, 264u);
+ w = u_load(0u);
+ w[1] = u_load_1(256u);
+ w[3].m = u_load_3(264u);
uint2 ubo_load_8 = u[1].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 0029647..98da6df 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -15,41 +15,41 @@
return counter;
}
-float4x4 tint_symbol_8(uint4 buffer[64], uint offset) {
+float4x4 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]), asfloat(a[scalar_offset_3 / 4]));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -60,11 +60,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float4x4 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float4x4 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_4 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (16u * uint(p_a_i_a_i_m_i_save)))) / 4;
const float4 l_a_i_a_i_m_i = asfloat(a[scalar_offset_4 / 4]);
const int tint_symbol = p_a_i_save;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 0029647..98da6df 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -15,41 +15,41 @@
return counter;
}
-float4x4 tint_symbol_8(uint4 buffer[64], uint offset) {
+float4x4 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]), asfloat(a[scalar_offset_3 / 4]));
}
-Inner tint_symbol_7(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_11 = {tint_symbol_8(buffer, (offset + 0u))};
- return tint_symbol_11;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol_4 = {a_load_4((offset + 0u))};
+ return tint_symbol_4;
}
-typedef Inner tint_symbol_6_ret[4];
-tint_symbol_6_ret tint_symbol_6(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_7(buffer, (offset + (i_1 * 64u)));
+ arr[i_1] = a_load_3((offset + (i_1 * 64u)));
}
}
return arr;
}
-Outer tint_symbol_5(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_12 = {tint_symbol_6(buffer, (offset + 0u))};
- return tint_symbol_12;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_5 = {a_load_2((offset + 0u))};
+ return tint_symbol_5;
}
-typedef Outer tint_symbol_4_ret[4];
-tint_symbol_4_ret tint_symbol_4(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
- arr_1[i_2] = tint_symbol_5(buffer, (offset + (i_2 * 256u)));
+ arr_1[i_2] = a_load_1((offset + (i_2 * 256u)));
}
}
return arr_1;
@@ -60,11 +60,11 @@
const int p_a_i_save = i();
const int p_a_i_a_i_save = i();
const int p_a_i_a_i_m_i_save = i();
- const Outer l_a[4] = tint_symbol_4(a, 0u);
- const Outer l_a_i = tint_symbol_5(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a[4] = tint_symbol_6(a, (256u * uint(p_a_i_save)));
- const Inner l_a_i_a_i = tint_symbol_7(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
- const float4x4 l_a_i_a_i_m = tint_symbol_8(a, ((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_i = a_load_1((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a[4] = a_load_2((256u * uint(p_a_i_save)));
+ const Inner l_a_i_a_i = a_load_3(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
+ const float4x4 l_a_i_a_i_m = a_load_4(((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))));
const uint scalar_offset_4 = ((((256u * uint(p_a_i_save)) + (64u * uint(p_a_i_a_i_save))) + (16u * uint(p_a_i_a_i_m_i_save)))) / 4;
const float4 l_a_i_a_i_m_i = asfloat(a[scalar_offset_4 / 4]);
const int tint_symbol = p_a_i_save;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 045c9d3..87c51a7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -9,41 +9,41 @@
uint4 a[64];
};
-float4x4 tint_symbol_4(uint4 buffer[64], uint offset) {
+float4x4 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]), asfloat(a[scalar_offset_3 / 4]));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -51,11 +51,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float4x4 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float4x4 l_a_3_a_2_m = a_load_4(896u);
const float4 l_a_3_a_2_m_1 = asfloat(a[57]);
const float l_a_3_a_2_m_1_0 = asfloat(a[57].x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index 045c9d3..87c51a7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -9,41 +9,41 @@
uint4 a[64];
};
-float4x4 tint_symbol_4(uint4 buffer[64], uint offset) {
+float4x4 a_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(a[scalar_offset / 4]), asfloat(a[scalar_offset_1 / 4]), asfloat(a[scalar_offset_2 / 4]), asfloat(a[scalar_offset_3 / 4]));
}
-Inner tint_symbol_3(uint4 buffer[64], uint offset) {
- const Inner tint_symbol_7 = {tint_symbol_4(buffer, (offset + 0u))};
- return tint_symbol_7;
+Inner a_load_3(uint offset) {
+ const Inner tint_symbol = {a_load_4((offset + 0u))};
+ return tint_symbol;
}
-typedef Inner tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[64], uint offset) {
+typedef Inner a_load_2_ret[4];
+a_load_2_ret a_load_2(uint offset) {
Inner arr[4] = (Inner[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_3(buffer, (offset + (i * 64u)));
+ arr[i] = a_load_3((offset + (i * 64u)));
}
}
return arr;
}
-Outer tint_symbol_1(uint4 buffer[64], uint offset) {
- const Outer tint_symbol_8 = {tint_symbol_2(buffer, (offset + 0u))};
- return tint_symbol_8;
+Outer a_load_1(uint offset) {
+ const Outer tint_symbol_1 = {a_load_2((offset + 0u))};
+ return tint_symbol_1;
}
-typedef Outer tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[64], uint offset) {
+typedef Outer a_load_ret[4];
+a_load_ret a_load(uint offset) {
Outer arr_1[4] = (Outer[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr_1[i_1] = tint_symbol_1(buffer, (offset + (i_1 * 256u)));
+ arr_1[i_1] = a_load_1((offset + (i_1 * 256u)));
}
}
return arr_1;
@@ -51,11 +51,11 @@
[numthreads(1, 1, 1)]
void f() {
- const Outer l_a[4] = tint_symbol(a, 0u);
- const Outer l_a_3 = tint_symbol_1(a, 768u);
- const Inner l_a_3_a[4] = tint_symbol_2(a, 768u);
- const Inner l_a_3_a_2 = tint_symbol_3(a, 896u);
- const float4x4 l_a_3_a_2_m = tint_symbol_4(a, 896u);
+ const Outer l_a[4] = a_load(0u);
+ const Outer l_a_3 = a_load_1(768u);
+ const Inner l_a_3_a[4] = a_load_2(768u);
+ const Inner l_a_3_a_2 = a_load_3(896u);
+ const float4x4 l_a_3_a_2_m = a_load_4(896u);
const float4 l_a_3_a_2_m_1 = asfloat(a[57]);
const float l_a_3_a_2_m_1_0 = asfloat(a[57].x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.dxc.hlsl
index 8748244..eea3459 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[48];
};
-float4x4 tint_symbol(uint4 buffer[48], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x4 t = transpose(tint_symbol(u, 400u));
+ const float4x4 t = transpose(u_load(400u));
const float l = length(asfloat(u[2]).ywxz);
const float a = abs(asfloat(u[2]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.fxc.hlsl
index 8748244..eea3459 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[48];
};
-float4x4 tint_symbol(uint4 buffer[48], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x4 t = transpose(tint_symbol(u, 400u));
+ const float4x4 t = transpose(u_load(400u));
const float l = length(asfloat(u[2]).ywxz);
const float a = abs(asfloat(u[2]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.dxc.hlsl
index 4aaff71..a722da6 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -23,27 +23,27 @@
void e(float f_1) {
}
-float4x4 tint_symbol_3(uint4 buffer[48], uint offset) {
+float4x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-S tint_symbol_1(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 192u)));
+ arr[i] = u_load_1((offset + (i * 192u)));
}
}
return arr;
@@ -51,9 +51,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 384u));
- c(tint_symbol_3(u, 400u));
+ a(u_load(0u));
+ b(u_load_1(384u));
+ c(u_load_3(400u));
d(asfloat(u[2]).ywxz);
e(asfloat(u[2]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.fxc.hlsl
index 4aaff71..a722da6 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -23,27 +23,27 @@
void e(float f_1) {
}
-float4x4 tint_symbol_3(uint4 buffer[48], uint offset) {
+float4x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-S tint_symbol_1(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 192u)));
+ arr[i] = u_load_1((offset + (i * 192u)));
}
}
return arr;
@@ -51,9 +51,9 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
- b(tint_symbol_1(u, 384u));
- c(tint_symbol_3(u, 400u));
+ a(u_load(0u));
+ b(u_load_1(384u));
+ c(u_load_3(400u));
d(asfloat(u[2]).ywxz);
e(asfloat(u[2]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.dxc.hlsl
index be13120..86eea24 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.dxc.hlsl
@@ -9,27 +9,27 @@
};
static S p[4] = (S[4])0;
-float4x4 tint_symbol_3(uint4 buffer[48], uint offset) {
+float4x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-S tint_symbol_1(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 192u)));
+ arr[i] = u_load_1((offset + (i * 192u)));
}
}
return arr;
@@ -37,9 +37,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 384u);
- p[3].m = tint_symbol_3(u, 400u);
+ p = u_load(0u);
+ p[1] = u_load_1(384u);
+ p[3].m = u_load_3(400u);
p[1].m[0] = asfloat(u[2]).ywxz;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.fxc.hlsl
index be13120..86eea24 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.fxc.hlsl
@@ -9,27 +9,27 @@
};
static S p[4] = (S[4])0;
-float4x4 tint_symbol_3(uint4 buffer[48], uint offset) {
+float4x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-S tint_symbol_1(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_5 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_3(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_5;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr[i] = tint_symbol_1(buffer, (offset + (i * 192u)));
+ arr[i] = u_load_1((offset + (i * 192u)));
}
}
return arr;
@@ -37,9 +37,9 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
- p[1] = tint_symbol_1(u, 384u);
- p[3].m = tint_symbol_3(u, 400u);
+ p = u_load(0u);
+ p[1] = u_load_1(384u);
+ p[3].m = u_load_3(400u);
p[1].m[0] = asfloat(u[2]).ywxz;
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.dxc.hlsl
index 9f194ab..c88e221 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -9,49 +9,49 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void s_store_3(uint offset, float4x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
+ s.Store4((offset + 32u), asuint(value[2u]));
+ s.Store4((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 16u), value.m);
- buffer.Store((offset + 128u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 16u), value.m);
+ s.Store((offset + 128u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 192u)), array_1[i]);
+ s_store_1((offset + (i * 192u)), array_1[i]);
}
}
}
-float4x4 tint_symbol_8(uint4 buffer[48], uint offset) {
+float4x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-S tint_symbol_6(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_8(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 192u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 192u)));
}
}
return arr;
@@ -59,9 +59,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 192u, tint_symbol_6(u, 384u));
- tint_symbol_3(s, 592u, tint_symbol_8(u, 400u));
+ s_store(0u, u_load(0u));
+ s_store_1(192u, u_load_1(384u));
+ s_store_3(592u, u_load_3(400u));
s.Store4(208u, asuint(asfloat(u[2]).ywxz));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.fxc.hlsl
index 9f194ab..c88e221 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -9,49 +9,49 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void s_store_3(uint offset, float4x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
+ s.Store4((offset + 32u), asuint(value[2u]));
+ s.Store4((offset + 48u), asuint(value[3u]));
}
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.before));
- tint_symbol_3(buffer, (offset + 16u), value.m);
- buffer.Store((offset + 128u), asuint(value.after));
+void s_store_1(uint offset, S value) {
+ s.Store((offset + 0u), asuint(value.before));
+ s_store_3((offset + 16u), value.m);
+ s.Store((offset + 128u), asuint(value.after));
}
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, S value[4]) {
+void s_store(uint offset, S value[4]) {
S array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- tint_symbol_1(buffer, (offset + (i * 192u)), array_1[i]);
+ s_store_1((offset + (i * 192u)), array_1[i]);
}
}
}
-float4x4 tint_symbol_8(uint4 buffer[48], uint offset) {
+float4x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-S tint_symbol_6(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_10 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_8(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_10;
+ const S tint_symbol = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol;
}
-typedef S tint_symbol_5_ret[4];
-tint_symbol_5_ret tint_symbol_5(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_6(buffer, (offset + (i_1 * 192u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 192u)));
}
}
return arr;
@@ -59,9 +59,9 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_5(u, 0u));
- tint_symbol_1(s, 192u, tint_symbol_6(u, 384u));
- tint_symbol_3(s, 592u, tint_symbol_8(u, 400u));
+ s_store(0u, u_load(0u));
+ s_store_1(192u, u_load_1(384u));
+ s_store_3(592u, u_load_3(400u));
s.Store4(208u, asuint(asfloat(u[2]).ywxz));
return;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 5bf6274..14e015d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -13,27 +13,27 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x4 tint_symbol_5(uint4 buffer[48], uint offset) {
+float4x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-S tint_symbol_3(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_5(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 192u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 192u)));
}
}
return arr;
@@ -43,14 +43,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 384u);
- w[3].m = tint_symbol_5(u, 400u);
+ w = u_load(0u);
+ w[1] = u_load_1(384u);
+ w[3].m = u_load_3(400u);
w[1].m[0] = asfloat(u[2]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 5bf6274..14e015d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -13,27 +13,27 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x4 tint_symbol_5(uint4 buffer[48], uint offset) {
+float4x4 u_load_3(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
-S tint_symbol_3(uint4 buffer[48], uint offset) {
+S u_load_1(uint offset) {
const uint scalar_offset_4 = ((offset + 0u)) / 4;
const uint scalar_offset_5 = ((offset + 128u)) / 4;
- const S tint_symbol_8 = {asint(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), tint_symbol_5(buffer, (offset + 16u)), asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
- return tint_symbol_8;
+ const S tint_symbol_3 = {asint(u[scalar_offset_4 / 4][scalar_offset_4 % 4]), u_load_3((offset + 16u)), asint(u[scalar_offset_5 / 4][scalar_offset_5 % 4])};
+ return tint_symbol_3;
}
-typedef S tint_symbol_2_ret[4];
-tint_symbol_2_ret tint_symbol_2(uint4 buffer[48], uint offset) {
+typedef S u_load_ret[4];
+u_load_ret u_load(uint offset) {
S arr[4] = (S[4])0;
{
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
- arr[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 192u)));
+ arr[i_1] = u_load_1((offset + (i_1 * 192u)));
}
}
return arr;
@@ -43,14 +43,14 @@
{
for(uint idx = local_invocation_index; (idx < 4u); idx = (idx + 1u)) {
const uint i = idx;
- const S tint_symbol_7 = (S)0;
- w[i] = tint_symbol_7;
+ const S tint_symbol_2 = (S)0;
+ w[i] = tint_symbol_2;
}
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
- w[1] = tint_symbol_3(u, 384u);
- w[3].m = tint_symbol_5(u, 400u);
+ w = u_load(0u);
+ w[1] = u_load_1(384u);
+ w[3].m = u_load_3(400u);
w[1].m[0] = asfloat(u[2]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 5dc66f6..1e95708 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,18 +8,18 @@
return counter;
}
-matrix<float16_t, 2, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 2> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = m[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = m[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const matrix<float16_t, 2, 2> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 2, 2> l_m = m_load(0u);
const uint scalar_offset_2 = ((4u * uint(p_m_i_save))) / 4;
uint ubo_load_2 = m[scalar_offset_2 / 4][scalar_offset_2 % 4];
const vector<float16_t, 2> l_m_i = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index b381bd2..2f18f9d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,17 +8,17 @@
return counter;
}
-matrix<float16_t, 2, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 2> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = m[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = m[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 2, 2> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 2, 2> l_m = m_load(0u);
uint ubo_load_2 = m[0].y;
const vector<float16_t, 2> l_m_1 = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16)));
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_builtin.wgsl.expected.dxc.hlsl
index 7946311..3fa79e9 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[1];
};
-matrix<float16_t, 2, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 2, 2> t = transpose(tint_symbol(u, 0u));
+ const matrix<float16_t, 2, 2> t = transpose(u_load(0u));
uint ubo_load_2 = u[0].y;
const float16_t l = length(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
uint ubo_load_3 = u[0].x;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_fn.wgsl.expected.dxc.hlsl
index 6e0c6f2..08379bc 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -11,17 +11,17 @@
void c(float16_t f_1) {
}
-matrix<float16_t, 2, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
uint ubo_load_2 = u[0].y;
b(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
uint ubo_load_3 = u[0].y;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.dxc.hlsl
index 649090f..1f4594b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.dxc.hlsl
@@ -3,17 +3,17 @@
};
static matrix<float16_t, 2, 2> p = matrix<float16_t, 2, 2>(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
-matrix<float16_t, 2, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
uint ubo_load_2 = u[0].x;
p[1] = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16)));
uint ubo_load_3 = u[0].x;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_storage.wgsl.expected.dxc.hlsl
index 365c3b2..761a254 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -3,22 +3,22 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+void s_store(uint offset, matrix<float16_t, 2, 2> value) {
+ s.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
}
-matrix<float16_t, 2, 2> tint_symbol_2(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
uint ubo_load_2 = u[0].x;
s.Store<vector<float16_t, 2> >(4u, vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
uint ubo_load_3 = u[0].x;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 3bf9f07..fd7ef27 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,11 +7,11 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 2, 2> tint_symbol_2(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
@@ -20,7 +20,7 @@
w = matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
uint ubo_load_2 = u[0].x;
w[1] = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16)));
uint ubo_load_3 = u[0].x;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 4eeea70..1cdcf59 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,18 +8,18 @@
return counter;
}
-float2x2 tint_symbol(uint4 buffer[1], uint offset) {
+float2x2 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = m[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = m[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float2x2 l_m = tint_symbol(m, 0u);
+ const float2x2 l_m = m_load(0u);
const uint scalar_offset_2 = ((8u * uint(p_m_i_save))) / 4;
uint4 ubo_load_2 = m[scalar_offset_2 / 4];
const float2 l_m_i = asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 4eeea70..1cdcf59 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,18 +8,18 @@
return counter;
}
-float2x2 tint_symbol(uint4 buffer[1], uint offset) {
+float2x2 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = m[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = m[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float2x2 l_m = tint_symbol(m, 0u);
+ const float2x2 l_m = m_load(0u);
const uint scalar_offset_2 = ((8u * uint(p_m_i_save))) / 4;
uint4 ubo_load_2 = m[scalar_offset_2 / 4];
const float2 l_m_i = asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 1193c5a..485ba3d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,17 +8,17 @@
return counter;
}
-float2x2 tint_symbol(uint4 buffer[1], uint offset) {
+float2x2 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = m[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = m[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x2 l_m = tint_symbol(m, 0u);
+ const float2x2 l_m = m_load(0u);
const float2 l_m_1 = asfloat(m[0].zw);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index 1193c5a..485ba3d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,17 +8,17 @@
return counter;
}
-float2x2 tint_symbol(uint4 buffer[1], uint offset) {
+float2x2 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = m[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = m[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x2 l_m = tint_symbol(m, 0u);
+ const float2x2 l_m = m_load(0u);
const float2 l_m_1 = asfloat(m[0].zw);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_builtin.wgsl.expected.dxc.hlsl
index 693985f..e3db60b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[1];
};
-float2x2 tint_symbol(uint4 buffer[1], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x2 t = transpose(tint_symbol(u, 0u));
+ const float2x2 t = transpose(u_load(0u));
const float l = length(asfloat(u[0].zw));
const float a = abs(asfloat(u[0].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_builtin.wgsl.expected.fxc.hlsl
index 693985f..e3db60b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[1];
};
-float2x2 tint_symbol(uint4 buffer[1], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x2 t = transpose(tint_symbol(u, 0u));
+ const float2x2 t = transpose(u_load(0u));
const float l = length(asfloat(u[0].zw));
const float a = abs(asfloat(u[0].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.dxc.hlsl
index 0f4581e..d127d16 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -11,17 +11,17 @@
void c(float f_1) {
}
-float2x2 tint_symbol(uint4 buffer[1], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[0].zw));
b(asfloat(u[0].zw).yx);
c(asfloat(u[0].z));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.fxc.hlsl
index 0f4581e..d127d16 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -11,17 +11,17 @@
void c(float f_1) {
}
-float2x2 tint_symbol(uint4 buffer[1], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[0].zw));
b(asfloat(u[0].zw).yx);
c(asfloat(u[0].z));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.dxc.hlsl
index daa1db4..eed39f4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,17 +3,17 @@
};
static float2x2 p = float2x2(0.0f, 0.0f, 0.0f, 0.0f);
-float2x2 tint_symbol(uint4 buffer[1], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0].xy);
p[1] = asfloat(u[0].xy).yx;
p[0][1] = asfloat(u[0].z);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.fxc.hlsl
index daa1db4..eed39f4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,17 +3,17 @@
};
static float2x2 p = float2x2(0.0f, 0.0f, 0.0f, 0.0f);
-float2x2 tint_symbol(uint4 buffer[1], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0].xy);
p[1] = asfloat(u[0].xy).yx;
p[0][1] = asfloat(u[0].z);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.dxc.hlsl
index 9457624..8192601 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,22 +3,22 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void s_store(uint offset, float2x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
}
-float2x2 tint_symbol_2(uint4 buffer[1], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store2(8u, asuint(asfloat(u[0].xy)));
s.Store2(8u, asuint(asfloat(u[0].xy).yx));
s.Store(4u, asuint(asfloat(u[0].z)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.fxc.hlsl
index 9457624..8192601 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,22 +3,22 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void s_store(uint offset, float2x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
}
-float2x2 tint_symbol_2(uint4 buffer[1], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store2(8u, asuint(asfloat(u[0].xy)));
s.Store2(8u, asuint(asfloat(u[0].xy).yx));
s.Store(4u, asuint(asfloat(u[0].z)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
index fe32b58..cefd072 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,11 +7,11 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x2 tint_symbol_2(uint4 buffer[1], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
@@ -20,7 +20,7 @@
w = float2x2((0.0f).xx, (0.0f).xx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0].xy);
w[1] = asfloat(u[0].xy).yx;
w[0][1] = asfloat(u[0].z);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
index fe32b58..cefd072 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,11 +7,11 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x2 tint_symbol_2(uint4 buffer[1], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
@@ -20,7 +20,7 @@
w = float2x2((0.0f).xx, (0.0f).xx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0].xy);
w[1] = asfloat(u[0].xy).yx;
w[0][1] = asfloat(u[0].z);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index c493360..a5ed659 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,14 +8,14 @@
return counter;
}
-matrix<float16_t, 2, 3> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 3> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = m[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
@@ -25,7 +25,7 @@
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const matrix<float16_t, 2, 3> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 2, 3> l_m = m_load(0u);
const uint scalar_offset_2 = ((8u * uint(p_m_i_save))) / 4;
uint4 ubo_load_5 = m[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 994033f..cfc15e9 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,14 +8,14 @@
return counter;
}
-matrix<float16_t, 2, 3> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 3> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = m[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
@@ -24,7 +24,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 2, 3> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 2, 3> l_m = m_load(0u);
uint2 ubo_load_4 = m[0].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_builtin.wgsl.expected.dxc.hlsl
index c3d1652..0b5ddc1 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,14 +2,14 @@
uint4 u[1];
};
-matrix<float16_t, 2, 3> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
@@ -18,7 +18,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 3, 2> t = transpose(tint_symbol(u, 0u));
+ const matrix<float16_t, 3, 2> t = transpose(u_load(0u));
uint2 ubo_load_4 = u[0].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_fn.wgsl.expected.dxc.hlsl
index 4003a4e..01a0ae3 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -11,14 +11,14 @@
void c(float16_t f_1) {
}
-matrix<float16_t, 2, 3> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
@@ -27,7 +27,7 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
uint2 ubo_load_4 = u[0].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.dxc.hlsl
index 5cec9ae..fcf95b9 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.dxc.hlsl
@@ -3,14 +3,14 @@
};
static matrix<float16_t, 2, 3> p = matrix<float16_t, 2, 3>(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
-matrix<float16_t, 2, 3> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
@@ -19,7 +19,7 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
uint2 ubo_load_4 = u[0].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.dxc.hlsl
index 4655996..fc9f130 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -3,19 +3,19 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+void s_store(uint offset, matrix<float16_t, 2, 3> value) {
+ s.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
}
-matrix<float16_t, 2, 3> tint_symbol_2(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
@@ -24,7 +24,7 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
uint2 ubo_load_4 = u[0].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 5826664..9dff33a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,14 +7,14 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 2, 3> tint_symbol_2(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
@@ -26,7 +26,7 @@
w = matrix<float16_t, 2, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
uint2 ubo_load_4 = u[0].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 0cf7edc..f5e5567 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,16 +8,16 @@
return counter;
}
-float2x3 tint_symbol(uint4 buffer[2], uint offset) {
+float2x3 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(m[scalar_offset / 4].xyz), asfloat(m[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float2x3 l_m = tint_symbol(m, 0u);
+ const float2x3 l_m = m_load(0u);
const uint scalar_offset_2 = ((16u * uint(p_m_i_save))) / 4;
const float3 l_m_i = asfloat(m[scalar_offset_2 / 4].xyz);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 0cf7edc..f5e5567 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,16 +8,16 @@
return counter;
}
-float2x3 tint_symbol(uint4 buffer[2], uint offset) {
+float2x3 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(m[scalar_offset / 4].xyz), asfloat(m[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float2x3 l_m = tint_symbol(m, 0u);
+ const float2x3 l_m = m_load(0u);
const uint scalar_offset_2 = ((16u * uint(p_m_i_save))) / 4;
const float3 l_m_i = asfloat(m[scalar_offset_2 / 4].xyz);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index e43ed37..cd58305 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,15 +8,15 @@
return counter;
}
-float2x3 tint_symbol(uint4 buffer[2], uint offset) {
+float2x3 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(m[scalar_offset / 4].xyz), asfloat(m[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x3 l_m = tint_symbol(m, 0u);
+ const float2x3 l_m = m_load(0u);
const float3 l_m_1 = asfloat(m[1].xyz);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index e43ed37..cd58305 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,15 +8,15 @@
return counter;
}
-float2x3 tint_symbol(uint4 buffer[2], uint offset) {
+float2x3 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(m[scalar_offset / 4].xyz), asfloat(m[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x3 l_m = tint_symbol(m, 0u);
+ const float2x3 l_m = m_load(0u);
const float3 l_m_1 = asfloat(m[1].xyz);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.dxc.hlsl
index 8f85f93..8e3d214 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[2];
};
-float2x3 tint_symbol(uint4 buffer[2], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x2 t = transpose(tint_symbol(u, 0u));
+ const float3x2 t = transpose(u_load(0u));
const float l = length(asfloat(u[1].xyz));
const float a = abs(asfloat(u[0].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.fxc.hlsl
index 8f85f93..8e3d214 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[2];
};
-float2x3 tint_symbol(uint4 buffer[2], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x2 t = transpose(tint_symbol(u, 0u));
+ const float3x2 t = transpose(u_load(0u));
const float l = length(asfloat(u[1].xyz));
const float a = abs(asfloat(u[0].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.dxc.hlsl
index 1fc478d..88a6667 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -11,15 +11,15 @@
void c(float f_1) {
}
-float2x3 tint_symbol(uint4 buffer[2], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[1].xyz));
b(asfloat(u[1].xyz).zxy);
c(asfloat(u[1].x));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.fxc.hlsl
index 1fc478d..88a6667 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -11,15 +11,15 @@
void c(float f_1) {
}
-float2x3 tint_symbol(uint4 buffer[2], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[1].xyz));
b(asfloat(u[1].xyz).zxy);
c(asfloat(u[1].x));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.dxc.hlsl
index 568d66f..34f88b4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,15 +3,15 @@
};
static float2x3 p = float2x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float2x3 tint_symbol(uint4 buffer[2], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0].xyz);
p[1] = asfloat(u[0].xyz).zxy;
p[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.fxc.hlsl
index 568d66f..34f88b4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,15 +3,15 @@
};
static float2x3 p = float2x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float2x3 tint_symbol(uint4 buffer[2], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0].xyz);
p[1] = asfloat(u[0].xyz).zxy;
p[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.dxc.hlsl
index c3906dd..f6eeff6 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,20 +3,20 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void s_store(uint offset, float2x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
}
-float2x3 tint_symbol_2(uint4 buffer[2], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store3(16u, asuint(asfloat(u[0].xyz)));
s.Store3(16u, asuint(asfloat(u[0].xyz).zxy));
s.Store(4u, asuint(asfloat(u[1].x)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.fxc.hlsl
index c3906dd..f6eeff6 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,20 +3,20 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
+void s_store(uint offset, float2x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
}
-float2x3 tint_symbol_2(uint4 buffer[2], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store3(16u, asuint(asfloat(u[0].xyz)));
s.Store3(16u, asuint(asfloat(u[0].xyz).zxy));
s.Store(4u, asuint(asfloat(u[1].x)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
index bdc3667..354b1de 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,10 +7,10 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x3 tint_symbol_2(uint4 buffer[2], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
void f_inner(uint local_invocation_index) {
@@ -18,7 +18,7 @@
w = float2x3((0.0f).xxx, (0.0f).xxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0].xyz);
w[1] = asfloat(u[0].xyz).zxy;
w[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
index bdc3667..354b1de 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,10 +7,10 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x3 tint_symbol_2(uint4 buffer[2], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
void f_inner(uint local_invocation_index) {
@@ -18,7 +18,7 @@
w = float2x3((0.0f).xxx, (0.0f).xxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0].xyz);
w[1] = asfloat(u[0].xyz).zxy;
w[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index aafb4cc..15d9445 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,14 +8,14 @@
return counter;
}
-matrix<float16_t, 2, 4> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 4> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = m[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
@@ -25,7 +25,7 @@
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const matrix<float16_t, 2, 4> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 2, 4> l_m = m_load(0u);
const uint scalar_offset_2 = ((8u * uint(p_m_i_save))) / 4;
uint4 ubo_load_5 = m[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 26c4533..8e0eff7 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,14 +8,14 @@
return counter;
}
-matrix<float16_t, 2, 4> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 4> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = m[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
@@ -24,7 +24,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 2, 4> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 2, 4> l_m = m_load(0u);
uint2 ubo_load_4 = m[0].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_builtin.wgsl.expected.dxc.hlsl
index 8fc92b1..25814a4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,14 +2,14 @@
uint4 u[1];
};
-matrix<float16_t, 2, 4> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
@@ -18,7 +18,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 4, 2> t = transpose(tint_symbol(u, 0u));
+ const matrix<float16_t, 4, 2> t = transpose(u_load(0u));
uint2 ubo_load_4 = u[0].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_fn.wgsl.expected.dxc.hlsl
index 82bbdcc..7da7108 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -11,14 +11,14 @@
void c(float16_t f_1) {
}
-matrix<float16_t, 2, 4> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
@@ -27,7 +27,7 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
uint2 ubo_load_4 = u[0].zw;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.dxc.hlsl
index 9781a40..273f324 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.dxc.hlsl
@@ -3,14 +3,14 @@
};
static matrix<float16_t, 2, 4> p = matrix<float16_t, 2, 4>(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
-matrix<float16_t, 2, 4> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
@@ -19,7 +19,7 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
uint2 ubo_load_4 = u[0].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_storage.wgsl.expected.dxc.hlsl
index bd96423..24e5e87 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -3,19 +3,19 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 2, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+void s_store(uint offset, matrix<float16_t, 2, 4> value) {
+ s.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
}
-matrix<float16_t, 2, 4> tint_symbol_2(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
@@ -24,7 +24,7 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
uint2 ubo_load_4 = u[0].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
index dc8da4d..74fb7986 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,14 +7,14 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 2, 4> tint_symbol_2(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
@@ -26,7 +26,7 @@
w = matrix<float16_t, 2, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
uint2 ubo_load_4 = u[0].xy;
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index c31f9b9..a43b55b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,16 +8,16 @@
return counter;
}
-float2x4 tint_symbol(uint4 buffer[2], uint offset) {
+float2x4 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(m[scalar_offset / 4]), asfloat(m[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float2x4 l_m = tint_symbol(m, 0u);
+ const float2x4 l_m = m_load(0u);
const uint scalar_offset_2 = ((16u * uint(p_m_i_save))) / 4;
const float4 l_m_i = asfloat(m[scalar_offset_2 / 4]);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index c31f9b9..a43b55b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,16 +8,16 @@
return counter;
}
-float2x4 tint_symbol(uint4 buffer[2], uint offset) {
+float2x4 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(m[scalar_offset / 4]), asfloat(m[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float2x4 l_m = tint_symbol(m, 0u);
+ const float2x4 l_m = m_load(0u);
const uint scalar_offset_2 = ((16u * uint(p_m_i_save))) / 4;
const float4 l_m_i = asfloat(m[scalar_offset_2 / 4]);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 5f5a358..91ca51d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,15 +8,15 @@
return counter;
}
-float2x4 tint_symbol(uint4 buffer[2], uint offset) {
+float2x4 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(m[scalar_offset / 4]), asfloat(m[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x4 l_m = tint_symbol(m, 0u);
+ const float2x4 l_m = m_load(0u);
const float4 l_m_1 = asfloat(m[1]);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index 5f5a358..91ca51d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,15 +8,15 @@
return counter;
}
-float2x4 tint_symbol(uint4 buffer[2], uint offset) {
+float2x4 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(m[scalar_offset / 4]), asfloat(m[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x4 l_m = tint_symbol(m, 0u);
+ const float2x4 l_m = m_load(0u);
const float4 l_m_1 = asfloat(m[1]);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.dxc.hlsl
index 77df7cf..e3d1bd3 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[2];
};
-float2x4 tint_symbol(uint4 buffer[2], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x2 t = transpose(tint_symbol(u, 0u));
+ const float4x2 t = transpose(u_load(0u));
const float l = length(asfloat(u[1]));
const float a = abs(asfloat(u[0]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.fxc.hlsl
index 77df7cf..e3d1bd3 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[2];
};
-float2x4 tint_symbol(uint4 buffer[2], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x2 t = transpose(tint_symbol(u, 0u));
+ const float4x2 t = transpose(u_load(0u));
const float l = length(asfloat(u[1]));
const float a = abs(asfloat(u[0]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.dxc.hlsl
index 5f64389..a9cf737 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -11,15 +11,15 @@
void c(float f_1) {
}
-float2x4 tint_symbol(uint4 buffer[2], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[1]));
b(asfloat(u[1]).ywxz);
c(asfloat(u[1].x));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.fxc.hlsl
index 5f64389..a9cf737 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -11,15 +11,15 @@
void c(float f_1) {
}
-float2x4 tint_symbol(uint4 buffer[2], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[1]));
b(asfloat(u[1]).ywxz);
c(asfloat(u[1].x));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.dxc.hlsl
index c81f694..f65cd34 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,15 +3,15 @@
};
static float2x4 p = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float2x4 tint_symbol(uint4 buffer[2], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0]);
p[1] = asfloat(u[0]).ywxz;
p[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.fxc.hlsl
index c81f694..f65cd34 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,15 +3,15 @@
};
static float2x4 p = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float2x4 tint_symbol(uint4 buffer[2], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0]);
p[1] = asfloat(u[0]).ywxz;
p[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.dxc.hlsl
index 8bc830a..1f27b2f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,20 +3,20 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void s_store(uint offset, float2x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
}
-float2x4 tint_symbol_2(uint4 buffer[2], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store4(16u, asuint(asfloat(u[0])));
s.Store4(16u, asuint(asfloat(u[0]).ywxz));
s.Store(4u, asuint(asfloat(u[1].x)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.fxc.hlsl
index 8bc830a..1f27b2f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,20 +3,20 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float2x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
+void s_store(uint offset, float2x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
}
-float2x4 tint_symbol_2(uint4 buffer[2], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store4(16u, asuint(asfloat(u[0])));
s.Store4(16u, asuint(asfloat(u[0]).ywxz));
s.Store(4u, asuint(asfloat(u[1].x)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 23c91dd..91fa59d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,10 +7,10 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x4 tint_symbol_2(uint4 buffer[2], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
void f_inner(uint local_invocation_index) {
@@ -18,7 +18,7 @@
w = float2x4((0.0f).xxxx, (0.0f).xxxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0]);
w[1] = asfloat(u[0]).ywxz;
w[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 23c91dd..91fa59d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,10 +7,10 @@
uint local_invocation_index : SV_GroupIndex;
};
-float2x4 tint_symbol_2(uint4 buffer[2], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
void f_inner(uint local_invocation_index) {
@@ -18,7 +18,7 @@
w = float2x4((0.0f).xxxx, (0.0f).xxxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0]);
w[1] = asfloat(u[0]).ywxz;
w[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 710277f..4a24013 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,20 +8,20 @@
return counter;
}
-matrix<float16_t, 3, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 3, 2> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = m[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = m[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = m[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const matrix<float16_t, 3, 2> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 3, 2> l_m = m_load(0u);
const uint scalar_offset_3 = ((4u * uint(p_m_i_save))) / 4;
uint ubo_load_3 = m[scalar_offset_3 / 4][scalar_offset_3 % 4];
const vector<float16_t, 2> l_m_i = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index c5bbdca..16eec73 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,19 +8,19 @@
return counter;
}
-matrix<float16_t, 3, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 3, 2> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = m[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = m[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = m[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 3, 2> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 3, 2> l_m = m_load(0u);
uint ubo_load_3 = m[0].y;
const vector<float16_t, 2> l_m_1 = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16)));
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_builtin.wgsl.expected.dxc.hlsl
index c099203..90576a1 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,19 +2,19 @@
uint4 u[1];
};
-matrix<float16_t, 3, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 3, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 2, 3> t = transpose(tint_symbol(u, 0u));
+ const matrix<float16_t, 2, 3> t = transpose(u_load(0u));
uint ubo_load_3 = u[0].y;
const float16_t l = length(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
uint ubo_load_4 = u[0].x;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_fn.wgsl.expected.dxc.hlsl
index 0de6e6d..d72a11a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -11,19 +11,19 @@
void c(float16_t f_1) {
}
-matrix<float16_t, 3, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 3, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
uint ubo_load_3 = u[0].y;
b(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
uint ubo_load_4 = u[0].y;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.dxc.hlsl
index ae2fee4..2f58709 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.dxc.hlsl
@@ -3,19 +3,19 @@
};
static matrix<float16_t, 3, 2> p = matrix<float16_t, 3, 2>(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
-matrix<float16_t, 3, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 3, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
uint ubo_load_3 = u[0].x;
p[1] = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16)));
uint ubo_load_4 = u[0].x;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_storage.wgsl.expected.dxc.hlsl
index ad86e04..8f1abd2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -3,25 +3,25 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
- buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
+void s_store(uint offset, matrix<float16_t, 3, 2> value) {
+ s.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+ s.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
}
-matrix<float16_t, 3, 2> tint_symbol_2(uint4 buffer[1], uint offset) {
+matrix<float16_t, 3, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
uint ubo_load_3 = u[0].x;
s.Store<vector<float16_t, 2> >(4u, vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
uint ubo_load_4 = u[0].x;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 2b66c9a..81aeb39 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,13 +7,13 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 3, 2> tint_symbol_2(uint4 buffer[1], uint offset) {
+matrix<float16_t, 3, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
@@ -22,7 +22,7 @@
w = matrix<float16_t, 3, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
uint ubo_load_3 = u[0].x;
w[1] = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16)));
uint ubo_load_4 = u[0].x;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 4e7e2c6..ab3a9ec 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,20 +8,20 @@
return counter;
}
-float3x2 tint_symbol(uint4 buffer[2], uint offset) {
+float3x2 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = m[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = m[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = m[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float3x2 l_m = tint_symbol(m, 0u);
+ const float3x2 l_m = m_load(0u);
const uint scalar_offset_3 = ((8u * uint(p_m_i_save))) / 4;
uint4 ubo_load_3 = m[scalar_offset_3 / 4];
const float2 l_m_i = asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 4e7e2c6..ab3a9ec 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,20 +8,20 @@
return counter;
}
-float3x2 tint_symbol(uint4 buffer[2], uint offset) {
+float3x2 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = m[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = m[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = m[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float3x2 l_m = tint_symbol(m, 0u);
+ const float3x2 l_m = m_load(0u);
const uint scalar_offset_3 = ((8u * uint(p_m_i_save))) / 4;
uint4 ubo_load_3 = m[scalar_offset_3 / 4];
const float2 l_m_i = asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index fb5623c..8542e5b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,19 +8,19 @@
return counter;
}
-float3x2 tint_symbol(uint4 buffer[2], uint offset) {
+float3x2 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = m[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = m[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = m[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x2 l_m = tint_symbol(m, 0u);
+ const float3x2 l_m = m_load(0u);
const float2 l_m_1 = asfloat(m[0].zw);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index fb5623c..8542e5b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,19 +8,19 @@
return counter;
}
-float3x2 tint_symbol(uint4 buffer[2], uint offset) {
+float3x2 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = m[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = m[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = m[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x2 l_m = tint_symbol(m, 0u);
+ const float3x2 l_m = m_load(0u);
const float2 l_m_1 = asfloat(m[0].zw);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_builtin.wgsl.expected.dxc.hlsl
index b94dd86..eb1b631 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,19 +2,19 @@
uint4 u[2];
};
-float3x2 tint_symbol(uint4 buffer[2], uint offset) {
+float3x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x3 t = transpose(tint_symbol(u, 0u));
+ const float2x3 t = transpose(u_load(0u));
const float l = length(asfloat(u[0].zw));
const float a = abs(asfloat(u[0].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_builtin.wgsl.expected.fxc.hlsl
index b94dd86..eb1b631 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,19 +2,19 @@
uint4 u[2];
};
-float3x2 tint_symbol(uint4 buffer[2], uint offset) {
+float3x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x3 t = transpose(tint_symbol(u, 0u));
+ const float2x3 t = transpose(u_load(0u));
const float l = length(asfloat(u[0].zw));
const float a = abs(asfloat(u[0].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.dxc.hlsl
index 029fe0a..58bfbc5 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -11,19 +11,19 @@
void c(float f_1) {
}
-float3x2 tint_symbol(uint4 buffer[2], uint offset) {
+float3x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[0].zw));
b(asfloat(u[0].zw).yx);
c(asfloat(u[0].z));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.fxc.hlsl
index 029fe0a..58bfbc5 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -11,19 +11,19 @@
void c(float f_1) {
}
-float3x2 tint_symbol(uint4 buffer[2], uint offset) {
+float3x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[0].zw));
b(asfloat(u[0].zw).yx);
c(asfloat(u[0].z));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.dxc.hlsl
index 7915694..918d899 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,19 +3,19 @@
};
static float3x2 p = float3x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float3x2 tint_symbol(uint4 buffer[2], uint offset) {
+float3x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0].xy);
p[1] = asfloat(u[0].xy).yx;
p[0][1] = asfloat(u[0].z);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.fxc.hlsl
index 7915694..918d899 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,19 +3,19 @@
};
static float3x2 p = float3x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float3x2 tint_symbol(uint4 buffer[2], uint offset) {
+float3x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0].xy);
p[1] = asfloat(u[0].xy).yx;
p[0][1] = asfloat(u[0].z);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.dxc.hlsl
index f469a95..c722d94 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,25 +3,25 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
+void s_store(uint offset, float3x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
+ s.Store2((offset + 16u), asuint(value[2u]));
}
-float3x2 tint_symbol_2(uint4 buffer[2], uint offset) {
+float3x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store2(8u, asuint(asfloat(u[0].xy)));
s.Store2(8u, asuint(asfloat(u[0].xy).yx));
s.Store(4u, asuint(asfloat(u[0].z)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.fxc.hlsl
index f469a95..c722d94 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,25 +3,25 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
+void s_store(uint offset, float3x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
+ s.Store2((offset + 16u), asuint(value[2u]));
}
-float3x2 tint_symbol_2(uint4 buffer[2], uint offset) {
+float3x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store2(8u, asuint(asfloat(u[0].xy)));
s.Store2(8u, asuint(asfloat(u[0].xy).yx));
s.Store(4u, asuint(asfloat(u[0].z)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 745a646..a752f25 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,13 +7,13 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x2 tint_symbol_2(uint4 buffer[2], uint offset) {
+float3x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
@@ -22,7 +22,7 @@
w = float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0].xy);
w[1] = asfloat(u[0].xy).yx;
w[0][1] = asfloat(u[0].z);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 745a646..a752f25 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,13 +7,13 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x2 tint_symbol_2(uint4 buffer[2], uint offset) {
+float3x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
@@ -22,7 +22,7 @@
w = float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0].xy);
w[1] = asfloat(u[0].xy).yx;
w[0][1] = asfloat(u[0].z);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 9e97415..85e9fd4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,19 +8,19 @@
return counter;
}
-matrix<float16_t, 3, 3> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 3> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = m[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = m[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
@@ -30,7 +30,7 @@
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const matrix<float16_t, 3, 3> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 3, 3> l_m = m_load(0u);
const uint scalar_offset_3 = ((8u * uint(p_m_i_save))) / 4;
uint4 ubo_load_7 = m[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index f1b227c..42b3ef9 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,19 +8,19 @@
return counter;
}
-matrix<float16_t, 3, 3> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 3> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = m[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = m[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
@@ -29,7 +29,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 3, 3> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 3, 3> l_m = m_load(0u);
uint2 ubo_load_6 = m[0].zw;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_builtin.wgsl.expected.dxc.hlsl
index 437c9aa..3891c4d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,19 +2,19 @@
uint4 u[2];
};
-matrix<float16_t, 3, 3> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
@@ -23,7 +23,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 3, 3> t = transpose(tint_symbol(u, 0u));
+ const matrix<float16_t, 3, 3> t = transpose(u_load(0u));
uint2 ubo_load_6 = u[0].zw;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_fn.wgsl.expected.dxc.hlsl
index a6528bd..d73bcdb 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -11,19 +11,19 @@
void c(float16_t f_1) {
}
-matrix<float16_t, 3, 3> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
@@ -32,7 +32,7 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
uint2 ubo_load_6 = u[0].zw;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.dxc.hlsl
index fe3d739..95145ae 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.dxc.hlsl
@@ -3,19 +3,19 @@
};
static matrix<float16_t, 3, 3> p = matrix<float16_t, 3, 3>(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
-matrix<float16_t, 3, 3> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
@@ -24,7 +24,7 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
uint2 ubo_load_6 = u[0].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.dxc.hlsl
index 2a2db34..83865b7 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -3,25 +3,25 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
+void s_store(uint offset, matrix<float16_t, 3, 3> value) {
+ s.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+ s.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
}
-matrix<float16_t, 3, 3> tint_symbol_2(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
@@ -30,7 +30,7 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
uint2 ubo_load_6 = u[0].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
index b6830ac..e5e9a62 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,19 +7,19 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 3, 3> tint_symbol_2(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
@@ -31,7 +31,7 @@
w = matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
uint2 ubo_load_6 = u[0].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index ee3d2c3..03e472a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,17 +8,17 @@
return counter;
}
-float3x3 tint_symbol(uint4 buffer[3], uint offset) {
+float3x3 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(m[scalar_offset / 4].xyz), asfloat(m[scalar_offset_1 / 4].xyz), asfloat(m[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float3x3 l_m = tint_symbol(m, 0u);
+ const float3x3 l_m = m_load(0u);
const uint scalar_offset_3 = ((16u * uint(p_m_i_save))) / 4;
const float3 l_m_i = asfloat(m[scalar_offset_3 / 4].xyz);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index ee3d2c3..03e472a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,17 +8,17 @@
return counter;
}
-float3x3 tint_symbol(uint4 buffer[3], uint offset) {
+float3x3 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(m[scalar_offset / 4].xyz), asfloat(m[scalar_offset_1 / 4].xyz), asfloat(m[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float3x3 l_m = tint_symbol(m, 0u);
+ const float3x3 l_m = m_load(0u);
const uint scalar_offset_3 = ((16u * uint(p_m_i_save))) / 4;
const float3 l_m_i = asfloat(m[scalar_offset_3 / 4].xyz);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index bc49773..8eeb774 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,16 +8,16 @@
return counter;
}
-float3x3 tint_symbol(uint4 buffer[3], uint offset) {
+float3x3 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(m[scalar_offset / 4].xyz), asfloat(m[scalar_offset_1 / 4].xyz), asfloat(m[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x3 l_m = tint_symbol(m, 0u);
+ const float3x3 l_m = m_load(0u);
const float3 l_m_1 = asfloat(m[1].xyz);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index bc49773..8eeb774 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,16 +8,16 @@
return counter;
}
-float3x3 tint_symbol(uint4 buffer[3], uint offset) {
+float3x3 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(m[scalar_offset / 4].xyz), asfloat(m[scalar_offset_1 / 4].xyz), asfloat(m[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x3 l_m = tint_symbol(m, 0u);
+ const float3x3 l_m = m_load(0u);
const float3 l_m_1 = asfloat(m[1].xyz);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.dxc.hlsl
index 47e86de..cb5a604 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[3];
};
-float3x3 tint_symbol(uint4 buffer[3], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x3 t = transpose(tint_symbol(u, 0u));
+ const float3x3 t = transpose(u_load(0u));
const float l = length(asfloat(u[1].xyz));
const float a = abs(asfloat(u[0].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.fxc.hlsl
index 47e86de..cb5a604 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[3];
};
-float3x3 tint_symbol(uint4 buffer[3], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x3 t = transpose(tint_symbol(u, 0u));
+ const float3x3 t = transpose(u_load(0u));
const float l = length(asfloat(u[1].xyz));
const float a = abs(asfloat(u[0].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.dxc.hlsl
index e871bd0..84429e6 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -11,16 +11,16 @@
void c(float f_1) {
}
-float3x3 tint_symbol(uint4 buffer[3], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[1].xyz));
b(asfloat(u[1].xyz).zxy);
c(asfloat(u[1].x));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.fxc.hlsl
index e871bd0..84429e6 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -11,16 +11,16 @@
void c(float f_1) {
}
-float3x3 tint_symbol(uint4 buffer[3], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[1].xyz));
b(asfloat(u[1].xyz).zxy);
c(asfloat(u[1].x));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.dxc.hlsl
index 0d4ad6d..d9ef708 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,16 +3,16 @@
};
static float3x3 p = float3x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float3x3 tint_symbol(uint4 buffer[3], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0].xyz);
p[1] = asfloat(u[0].xyz).zxy;
p[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.fxc.hlsl
index 0d4ad6d..d9ef708 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,16 +3,16 @@
};
static float3x3 p = float3x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float3x3 tint_symbol(uint4 buffer[3], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0].xyz);
p[1] = asfloat(u[0].xyz).zxy;
p[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.dxc.hlsl
index 6b28dd2..b33d3d3 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,22 +3,22 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+void s_store(uint offset, float3x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
+ s.Store3((offset + 32u), asuint(value[2u]));
}
-float3x3 tint_symbol_2(uint4 buffer[3], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store3(16u, asuint(asfloat(u[0].xyz)));
s.Store3(16u, asuint(asfloat(u[0].xyz).zxy));
s.Store(4u, asuint(asfloat(u[1].x)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.fxc.hlsl
index 6b28dd2..b33d3d3 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,22 +3,22 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float3x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
+void s_store(uint offset, float3x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
+ s.Store3((offset + 32u), asuint(value[2u]));
}
-float3x3 tint_symbol_2(uint4 buffer[3], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store3(16u, asuint(asfloat(u[0].xyz)));
s.Store3(16u, asuint(asfloat(u[0].xyz).zxy));
s.Store(4u, asuint(asfloat(u[1].x)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
index b51cc7d..93b9072 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,11 +7,11 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x3 tint_symbol_2(uint4 buffer[3], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
void f_inner(uint local_invocation_index) {
@@ -19,7 +19,7 @@
w = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0].xyz);
w[1] = asfloat(u[0].xyz).zxy;
w[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
index b51cc7d..93b9072 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,11 +7,11 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x3 tint_symbol_2(uint4 buffer[3], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
void f_inner(uint local_invocation_index) {
@@ -19,7 +19,7 @@
w = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0].xyz);
w[1] = asfloat(u[0].xyz).zxy;
w[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 6373d70..6912190 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,19 +8,19 @@
return counter;
}
-matrix<float16_t, 3, 4> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 4> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = m[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = m[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
@@ -30,7 +30,7 @@
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const matrix<float16_t, 3, 4> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 3, 4> l_m = m_load(0u);
const uint scalar_offset_3 = ((8u * uint(p_m_i_save))) / 4;
uint4 ubo_load_7 = m[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index cfc99ea..51b67f4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,19 +8,19 @@
return counter;
}
-matrix<float16_t, 3, 4> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 4> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = m[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = m[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
@@ -29,7 +29,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 3, 4> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 3, 4> l_m = m_load(0u);
uint2 ubo_load_6 = m[0].zw;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_builtin.wgsl.expected.dxc.hlsl
index 80a685f..6f26e4e 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,19 +2,19 @@
uint4 u[2];
};
-matrix<float16_t, 3, 4> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
@@ -23,7 +23,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 4, 3> t = transpose(tint_symbol(u, 0u));
+ const matrix<float16_t, 4, 3> t = transpose(u_load(0u));
uint2 ubo_load_6 = u[0].zw;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_fn.wgsl.expected.dxc.hlsl
index e92c783..898279f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -11,19 +11,19 @@
void c(float16_t f_1) {
}
-matrix<float16_t, 3, 4> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
@@ -32,7 +32,7 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
uint2 ubo_load_6 = u[0].zw;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.dxc.hlsl
index 1d40f2b..6fadd34 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.dxc.hlsl
@@ -3,19 +3,19 @@
};
static matrix<float16_t, 3, 4> p = matrix<float16_t, 3, 4>(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
-matrix<float16_t, 3, 4> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
@@ -24,7 +24,7 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
uint2 ubo_load_6 = u[0].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_storage.wgsl.expected.dxc.hlsl
index a4c97e9..62dbf46 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -3,25 +3,25 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 3, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
+void s_store(uint offset, matrix<float16_t, 3, 4> value) {
+ s.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+ s.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
}
-matrix<float16_t, 3, 4> tint_symbol_2(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
@@ -30,7 +30,7 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
uint2 ubo_load_6 = u[0].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 5dd6888..068f1f8 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,19 +7,19 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 3, 4> tint_symbol_2(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
@@ -31,7 +31,7 @@
w = matrix<float16_t, 3, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
uint2 ubo_load_6 = u[0].xy;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 4fad9a2..94382d6 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,17 +8,17 @@
return counter;
}
-float3x4 tint_symbol(uint4 buffer[3], uint offset) {
+float3x4 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(m[scalar_offset / 4]), asfloat(m[scalar_offset_1 / 4]), asfloat(m[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float3x4 l_m = tint_symbol(m, 0u);
+ const float3x4 l_m = m_load(0u);
const uint scalar_offset_3 = ((16u * uint(p_m_i_save))) / 4;
const float4 l_m_i = asfloat(m[scalar_offset_3 / 4]);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 4fad9a2..94382d6 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,17 +8,17 @@
return counter;
}
-float3x4 tint_symbol(uint4 buffer[3], uint offset) {
+float3x4 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(m[scalar_offset / 4]), asfloat(m[scalar_offset_1 / 4]), asfloat(m[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float3x4 l_m = tint_symbol(m, 0u);
+ const float3x4 l_m = m_load(0u);
const uint scalar_offset_3 = ((16u * uint(p_m_i_save))) / 4;
const float4 l_m_i = asfloat(m[scalar_offset_3 / 4]);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index c45de93..0894f80 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,16 +8,16 @@
return counter;
}
-float3x4 tint_symbol(uint4 buffer[3], uint offset) {
+float3x4 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(m[scalar_offset / 4]), asfloat(m[scalar_offset_1 / 4]), asfloat(m[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x4 l_m = tint_symbol(m, 0u);
+ const float3x4 l_m = m_load(0u);
const float4 l_m_1 = asfloat(m[1]);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index c45de93..0894f80 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,16 +8,16 @@
return counter;
}
-float3x4 tint_symbol(uint4 buffer[3], uint offset) {
+float3x4 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(m[scalar_offset / 4]), asfloat(m[scalar_offset_1 / 4]), asfloat(m[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x4 l_m = tint_symbol(m, 0u);
+ const float3x4 l_m = m_load(0u);
const float4 l_m_1 = asfloat(m[1]);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.dxc.hlsl
index 619729e..487a656 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[3];
};
-float3x4 tint_symbol(uint4 buffer[3], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x3 t = transpose(tint_symbol(u, 0u));
+ const float4x3 t = transpose(u_load(0u));
const float l = length(asfloat(u[1]));
const float a = abs(asfloat(u[0]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.fxc.hlsl
index 619729e..487a656 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[3];
};
-float3x4 tint_symbol(uint4 buffer[3], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x3 t = transpose(tint_symbol(u, 0u));
+ const float4x3 t = transpose(u_load(0u));
const float l = length(asfloat(u[1]));
const float a = abs(asfloat(u[0]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.dxc.hlsl
index 697aafc..50197df 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -11,16 +11,16 @@
void c(float f_1) {
}
-float3x4 tint_symbol(uint4 buffer[3], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[1]));
b(asfloat(u[1]).ywxz);
c(asfloat(u[1].x));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.fxc.hlsl
index 697aafc..50197df 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -11,16 +11,16 @@
void c(float f_1) {
}
-float3x4 tint_symbol(uint4 buffer[3], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[1]));
b(asfloat(u[1]).ywxz);
c(asfloat(u[1].x));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.dxc.hlsl
index f6518d9..cb7c954 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,16 +3,16 @@
};
static float3x4 p = float3x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float3x4 tint_symbol(uint4 buffer[3], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0]);
p[1] = asfloat(u[0]).ywxz;
p[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.fxc.hlsl
index f6518d9..cb7c954 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,16 +3,16 @@
};
static float3x4 p = float3x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float3x4 tint_symbol(uint4 buffer[3], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0]);
p[1] = asfloat(u[0]).ywxz;
p[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.dxc.hlsl
index 7891cea..68fca84 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,22 +3,22 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+void s_store(uint offset, float3x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
+ s.Store4((offset + 32u), asuint(value[2u]));
}
-float3x4 tint_symbol_2(uint4 buffer[3], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store4(16u, asuint(asfloat(u[0])));
s.Store4(16u, asuint(asfloat(u[0]).ywxz));
s.Store(4u, asuint(asfloat(u[1].x)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.fxc.hlsl
index 7891cea..68fca84 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,22 +3,22 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float3x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
+void s_store(uint offset, float3x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
+ s.Store4((offset + 32u), asuint(value[2u]));
}
-float3x4 tint_symbol_2(uint4 buffer[3], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store4(16u, asuint(asfloat(u[0])));
s.Store4(16u, asuint(asfloat(u[0]).ywxz));
s.Store(4u, asuint(asfloat(u[1].x)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
index 84b835f..cca92d7 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,11 +7,11 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x4 tint_symbol_2(uint4 buffer[3], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
void f_inner(uint local_invocation_index) {
@@ -19,7 +19,7 @@
w = float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0]);
w[1] = asfloat(u[0]).ywxz;
w[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
index 84b835f..cca92d7 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,11 +7,11 @@
uint local_invocation_index : SV_GroupIndex;
};
-float3x4 tint_symbol_2(uint4 buffer[3], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
void f_inner(uint local_invocation_index) {
@@ -19,7 +19,7 @@
w = float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0]);
w[1] = asfloat(u[0]).ywxz;
w[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index fe97f69..9cf4954 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,22 +8,22 @@
return counter;
}
-matrix<float16_t, 4, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 4, 2> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = m[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = m[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = m[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = m[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const matrix<float16_t, 4, 2> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 4, 2> l_m = m_load(0u);
const uint scalar_offset_4 = ((4u * uint(p_m_i_save))) / 4;
uint ubo_load_4 = m[scalar_offset_4 / 4][scalar_offset_4 % 4];
const vector<float16_t, 2> l_m_i = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index e56d25a..7851588 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,21 +8,21 @@
return counter;
}
-matrix<float16_t, 4, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 4, 2> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = m[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = m[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = m[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = m[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 4, 2> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 4, 2> l_m = m_load(0u);
uint ubo_load_4 = m[0].y;
const vector<float16_t, 2> l_m_1 = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16)));
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_builtin.wgsl.expected.dxc.hlsl
index 1c208e2..cf953cb 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,21 +2,21 @@
uint4 u[1];
};
-matrix<float16_t, 4, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 4, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 2, 4> t = transpose(tint_symbol(u, 0u));
+ const matrix<float16_t, 2, 4> t = transpose(u_load(0u));
uint ubo_load_4 = u[0].y;
const float16_t l = length(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16))));
uint ubo_load_5 = u[0].x;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_fn.wgsl.expected.dxc.hlsl
index a5ffec0..7bac854 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -11,21 +11,21 @@
void c(float16_t f_1) {
}
-matrix<float16_t, 4, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 4, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
uint ubo_load_4 = u[0].y;
b(vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16))));
uint ubo_load_5 = u[0].y;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.dxc.hlsl
index bbd9415..8bc2c9c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.dxc.hlsl
@@ -3,21 +3,21 @@
};
static matrix<float16_t, 4, 2> p = matrix<float16_t, 4, 2>(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
-matrix<float16_t, 4, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 4, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
uint ubo_load_4 = u[0].x;
p[1] = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16)));
uint ubo_load_5 = u[0].x;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_storage.wgsl.expected.dxc.hlsl
index df857d0..af7729d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -3,28 +3,28 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 2> value) {
- buffer.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
- buffer.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
- buffer.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
+void s_store(uint offset, matrix<float16_t, 4, 2> value) {
+ s.Store<vector<float16_t, 2> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 2> >((offset + 4u), value[1u]);
+ s.Store<vector<float16_t, 2> >((offset + 8u), value[2u]);
+ s.Store<vector<float16_t, 2> >((offset + 12u), value[3u]);
}
-matrix<float16_t, 4, 2> tint_symbol_2(uint4 buffer[1], uint offset) {
+matrix<float16_t, 4, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
uint ubo_load_4 = u[0].x;
s.Store<vector<float16_t, 2> >(4u, vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16))));
uint ubo_load_5 = u[0].x;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
index a3baa30..bff7ee9 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,15 +7,15 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 4, 2> tint_symbol_2(uint4 buffer[1], uint offset) {
+matrix<float16_t, 4, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
@@ -24,7 +24,7 @@
w = matrix<float16_t, 4, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
uint ubo_load_4 = u[0].x;
w[1] = vector<float16_t, 2>(float16_t(f16tof32(ubo_load_4 & 0xFFFF)), float16_t(f16tof32(ubo_load_4 >> 16)));
uint ubo_load_5 = u[0].x;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 1f128d5..842b37d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,22 +8,22 @@
return counter;
}
-float4x2 tint_symbol(uint4 buffer[2], uint offset) {
+float4x2 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = m[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = m[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = m[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float4x2 l_m = tint_symbol(m, 0u);
+ const float4x2 l_m = m_load(0u);
const uint scalar_offset_4 = ((8u * uint(p_m_i_save))) / 4;
uint4 ubo_load_4 = m[scalar_offset_4 / 4];
const float2 l_m_i = asfloat(((scalar_offset_4 & 2) ? ubo_load_4.zw : ubo_load_4.xy));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 1f128d5..842b37d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,22 +8,22 @@
return counter;
}
-float4x2 tint_symbol(uint4 buffer[2], uint offset) {
+float4x2 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = m[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = m[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = m[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float4x2 l_m = tint_symbol(m, 0u);
+ const float4x2 l_m = m_load(0u);
const uint scalar_offset_4 = ((8u * uint(p_m_i_save))) / 4;
uint4 ubo_load_4 = m[scalar_offset_4 / 4];
const float2 l_m_i = asfloat(((scalar_offset_4 & 2) ? ubo_load_4.zw : ubo_load_4.xy));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index db46be5..2b44d30 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,21 +8,21 @@
return counter;
}
-float4x2 tint_symbol(uint4 buffer[2], uint offset) {
+float4x2 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = m[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = m[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = m[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x2 l_m = tint_symbol(m, 0u);
+ const float4x2 l_m = m_load(0u);
const float2 l_m_1 = asfloat(m[0].zw);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index db46be5..2b44d30 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,21 +8,21 @@
return counter;
}
-float4x2 tint_symbol(uint4 buffer[2], uint offset) {
+float4x2 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = m[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = m[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = m[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x2 l_m = tint_symbol(m, 0u);
+ const float4x2 l_m = m_load(0u);
const float2 l_m_1 = asfloat(m[0].zw);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_builtin.wgsl.expected.dxc.hlsl
index 051e093..d2d9b67 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,21 +2,21 @@
uint4 u[2];
};
-float4x2 tint_symbol(uint4 buffer[2], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x4 t = transpose(tint_symbol(u, 0u));
+ const float2x4 t = transpose(u_load(0u));
const float l = length(asfloat(u[0].zw));
const float a = abs(asfloat(u[0].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_builtin.wgsl.expected.fxc.hlsl
index 051e093..d2d9b67 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,21 +2,21 @@
uint4 u[2];
};
-float4x2 tint_symbol(uint4 buffer[2], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x4 t = transpose(tint_symbol(u, 0u));
+ const float2x4 t = transpose(u_load(0u));
const float l = length(asfloat(u[0].zw));
const float a = abs(asfloat(u[0].xy).yx.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.dxc.hlsl
index 9629f1d..c227887 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -11,21 +11,21 @@
void c(float f_1) {
}
-float4x2 tint_symbol(uint4 buffer[2], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[0].zw));
b(asfloat(u[0].zw).yx);
c(asfloat(u[0].z));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.fxc.hlsl
index 9629f1d..c227887 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -11,21 +11,21 @@
void c(float f_1) {
}
-float4x2 tint_symbol(uint4 buffer[2], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[0].zw));
b(asfloat(u[0].zw).yx);
c(asfloat(u[0].z));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.dxc.hlsl
index 15f91ac..baf2ecd 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,21 +3,21 @@
};
static float4x2 p = float4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float4x2 tint_symbol(uint4 buffer[2], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0].xy);
p[1] = asfloat(u[0].xy).yx;
p[0][1] = asfloat(u[0].z);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.fxc.hlsl
index 15f91ac..baf2ecd 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,21 +3,21 @@
};
static float4x2 p = float4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float4x2 tint_symbol(uint4 buffer[2], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0].xy);
p[1] = asfloat(u[0].xy).yx;
p[0][1] = asfloat(u[0].z);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.dxc.hlsl
index 466fdc4..27501dc 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,28 +3,28 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+void s_store(uint offset, float4x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
+ s.Store2((offset + 16u), asuint(value[2u]));
+ s.Store2((offset + 24u), asuint(value[3u]));
}
-float4x2 tint_symbol_2(uint4 buffer[2], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store2(8u, asuint(asfloat(u[0].xy)));
s.Store2(8u, asuint(asfloat(u[0].xy).yx));
s.Store(4u, asuint(asfloat(u[0].z)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.fxc.hlsl
index 466fdc4..27501dc 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,28 +3,28 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
- buffer.Store2((offset + 16u), asuint(value[2u]));
- buffer.Store2((offset + 24u), asuint(value[3u]));
+void s_store(uint offset, float4x2 value) {
+ s.Store2((offset + 0u), asuint(value[0u]));
+ s.Store2((offset + 8u), asuint(value[1u]));
+ s.Store2((offset + 16u), asuint(value[2u]));
+ s.Store2((offset + 24u), asuint(value[3u]));
}
-float4x2 tint_symbol_2(uint4 buffer[2], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store2(8u, asuint(asfloat(u[0].xy)));
s.Store2(8u, asuint(asfloat(u[0].xy).yx));
s.Store(4u, asuint(asfloat(u[0].z)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
index f665fb4..9bc0649 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,15 +7,15 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x2 tint_symbol_2(uint4 buffer[2], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
@@ -24,7 +24,7 @@
w = float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0].xy);
w[1] = asfloat(u[0].xy).yx;
w[0][1] = asfloat(u[0].z);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
index f665fb4..9bc0649 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,15 +7,15 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x2 tint_symbol_2(uint4 buffer[2], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
@@ -24,7 +24,7 @@
w = float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0].xy);
w[1] = asfloat(u[0].xy).yx;
w[0][1] = asfloat(u[0].z);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index d4f64e3..6fe595e 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,24 +8,24 @@
return counter;
}
-matrix<float16_t, 4, 3> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 3> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = m[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = m[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = m[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
@@ -35,7 +35,7 @@
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const matrix<float16_t, 4, 3> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 4, 3> l_m = m_load(0u);
const uint scalar_offset_4 = ((8u * uint(p_m_i_save))) / 4;
uint4 ubo_load_9 = m[scalar_offset_4 / 4];
uint2 ubo_load_8 = ((scalar_offset_4 & 2) ? ubo_load_9.zw : ubo_load_9.xy);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 46a10de..82ea699 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,24 +8,24 @@
return counter;
}
-matrix<float16_t, 4, 3> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 3> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = m[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = m[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = m[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
@@ -34,7 +34,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 4, 3> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 4, 3> l_m = m_load(0u);
uint2 ubo_load_8 = m[0].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_builtin.wgsl.expected.dxc.hlsl
index 34e0598..22bca79 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,24 +2,24 @@
uint4 u[2];
};
-matrix<float16_t, 4, 3> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
@@ -28,7 +28,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 3, 4> t = transpose(tint_symbol(u, 0u));
+ const matrix<float16_t, 3, 4> t = transpose(u_load(0u));
uint2 ubo_load_8 = u[0].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_fn.wgsl.expected.dxc.hlsl
index 778064a..6175c09 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -11,24 +11,24 @@
void c(float16_t f_1) {
}
-matrix<float16_t, 4, 3> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
@@ -37,7 +37,7 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
uint2 ubo_load_8 = u[0].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.dxc.hlsl
index a448fe7..dd68d22 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.dxc.hlsl
@@ -3,24 +3,24 @@
};
static matrix<float16_t, 4, 3> p = matrix<float16_t, 4, 3>(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
-matrix<float16_t, 4, 3> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
@@ -29,7 +29,7 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
uint2 ubo_load_8 = u[0].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.dxc.hlsl
index 7d09ac6..4002ca7 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -3,31 +3,31 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 3> value) {
- buffer.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
- buffer.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
+void s_store(uint offset, matrix<float16_t, 4, 3> value) {
+ s.Store<vector<float16_t, 3> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 3> >((offset + 8u), value[1u]);
+ s.Store<vector<float16_t, 3> >((offset + 16u), value[2u]);
+ s.Store<vector<float16_t, 3> >((offset + 24u), value[3u]);
}
-matrix<float16_t, 4, 3> tint_symbol_2(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
@@ -36,7 +36,7 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
uint2 ubo_load_8 = u[0].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
index d577f14..5d6a5bf 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,24 +7,24 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 4, 3> tint_symbol_2(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
@@ -36,7 +36,7 @@
w = matrix<float16_t, 4, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
uint2 ubo_load_8 = u[0].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 4816aa7..2e25171 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,18 +8,18 @@
return counter;
}
-float4x3 tint_symbol(uint4 buffer[4], uint offset) {
+float4x3 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(m[scalar_offset / 4].xyz), asfloat(m[scalar_offset_1 / 4].xyz), asfloat(m[scalar_offset_2 / 4].xyz), asfloat(m[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float4x3 l_m = tint_symbol(m, 0u);
+ const float4x3 l_m = m_load(0u);
const uint scalar_offset_4 = ((16u * uint(p_m_i_save))) / 4;
const float3 l_m_i = asfloat(m[scalar_offset_4 / 4].xyz);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index 4816aa7..2e25171 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,18 +8,18 @@
return counter;
}
-float4x3 tint_symbol(uint4 buffer[4], uint offset) {
+float4x3 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(m[scalar_offset / 4].xyz), asfloat(m[scalar_offset_1 / 4].xyz), asfloat(m[scalar_offset_2 / 4].xyz), asfloat(m[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float4x3 l_m = tint_symbol(m, 0u);
+ const float4x3 l_m = m_load(0u);
const uint scalar_offset_4 = ((16u * uint(p_m_i_save))) / 4;
const float3 l_m_i = asfloat(m[scalar_offset_4 / 4].xyz);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 8492882..0d9c690 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,17 +8,17 @@
return counter;
}
-float4x3 tint_symbol(uint4 buffer[4], uint offset) {
+float4x3 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(m[scalar_offset / 4].xyz), asfloat(m[scalar_offset_1 / 4].xyz), asfloat(m[scalar_offset_2 / 4].xyz), asfloat(m[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x3 l_m = tint_symbol(m, 0u);
+ const float4x3 l_m = m_load(0u);
const float3 l_m_1 = asfloat(m[1].xyz);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index 8492882..0d9c690 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,17 +8,17 @@
return counter;
}
-float4x3 tint_symbol(uint4 buffer[4], uint offset) {
+float4x3 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(m[scalar_offset / 4].xyz), asfloat(m[scalar_offset_1 / 4].xyz), asfloat(m[scalar_offset_2 / 4].xyz), asfloat(m[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x3 l_m = tint_symbol(m, 0u);
+ const float4x3 l_m = m_load(0u);
const float3 l_m_1 = asfloat(m[1].xyz);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.dxc.hlsl
index 9e00a15..60b08a2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[4];
};
-float4x3 tint_symbol(uint4 buffer[4], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x4 t = transpose(tint_symbol(u, 0u));
+ const float3x4 t = transpose(u_load(0u));
const float l = length(asfloat(u[1].xyz));
const float a = abs(asfloat(u[0].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.fxc.hlsl
index 9e00a15..60b08a2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[4];
};
-float4x3 tint_symbol(uint4 buffer[4], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- const float3x4 t = transpose(tint_symbol(u, 0u));
+ const float3x4 t = transpose(u_load(0u));
const float l = length(asfloat(u[1].xyz));
const float a = abs(asfloat(u[0].xyz).zxy.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.dxc.hlsl
index 67c4557..6011452 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -11,17 +11,17 @@
void c(float f_1) {
}
-float4x3 tint_symbol(uint4 buffer[4], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[1].xyz));
b(asfloat(u[1].xyz).zxy);
c(asfloat(u[1].x));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.fxc.hlsl
index 67c4557..6011452 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -11,17 +11,17 @@
void c(float f_1) {
}
-float4x3 tint_symbol(uint4 buffer[4], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[1].xyz));
b(asfloat(u[1].xyz).zxy);
c(asfloat(u[1].x));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.dxc.hlsl
index e0bec97..bce8be2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,17 +3,17 @@
};
static float4x3 p = float4x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float4x3 tint_symbol(uint4 buffer[4], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0].xyz);
p[1] = asfloat(u[0].xyz).zxy;
p[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.fxc.hlsl
index e0bec97..bce8be2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,17 +3,17 @@
};
static float4x3 p = float4x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float4x3 tint_symbol(uint4 buffer[4], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0].xyz);
p[1] = asfloat(u[0].xyz).zxy;
p[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.dxc.hlsl
index 372d7c0..9e87f90 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,24 +3,24 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+void s_store(uint offset, float4x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
+ s.Store3((offset + 32u), asuint(value[2u]));
+ s.Store3((offset + 48u), asuint(value[3u]));
}
-float4x3 tint_symbol_2(uint4 buffer[4], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store3(16u, asuint(asfloat(u[0].xyz)));
s.Store3(16u, asuint(asfloat(u[0].xyz).zxy));
s.Store(4u, asuint(asfloat(u[1].x)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.fxc.hlsl
index 372d7c0..9e87f90 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,24 +3,24 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x3 value) {
- buffer.Store3((offset + 0u), asuint(value[0u]));
- buffer.Store3((offset + 16u), asuint(value[1u]));
- buffer.Store3((offset + 32u), asuint(value[2u]));
- buffer.Store3((offset + 48u), asuint(value[3u]));
+void s_store(uint offset, float4x3 value) {
+ s.Store3((offset + 0u), asuint(value[0u]));
+ s.Store3((offset + 16u), asuint(value[1u]));
+ s.Store3((offset + 32u), asuint(value[2u]));
+ s.Store3((offset + 48u), asuint(value[3u]));
}
-float4x3 tint_symbol_2(uint4 buffer[4], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store3(16u, asuint(asfloat(u[0].xyz)));
s.Store3(16u, asuint(asfloat(u[0].xyz).zxy));
s.Store(4u, asuint(asfloat(u[1].x)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
index fab699a..4116f83 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,12 +7,12 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x3 tint_symbol_2(uint4 buffer[4], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
void f_inner(uint local_invocation_index) {
@@ -20,7 +20,7 @@
w = float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0].xyz);
w[1] = asfloat(u[0].xyz).zxy;
w[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
index fab699a..4116f83 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,12 +7,12 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x3 tint_symbol_2(uint4 buffer[4], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
void f_inner(uint local_invocation_index) {
@@ -20,7 +20,7 @@
w = float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0].xyz);
w[1] = asfloat(u[0].xyz).zxy;
w[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index 16e4c4f..bfbdeed 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,24 +8,24 @@
return counter;
}
-matrix<float16_t, 4, 4> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 4> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = m[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = m[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = m[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
@@ -35,7 +35,7 @@
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const matrix<float16_t, 4, 4> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 4, 4> l_m = m_load(0u);
const uint scalar_offset_4 = ((8u * uint(p_m_i_save))) / 4;
uint4 ubo_load_9 = m[scalar_offset_4 / 4];
uint2 ubo_load_8 = ((scalar_offset_4 & 2) ? ubo_load_9.zw : ubo_load_9.xy);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
index a841311..0088668 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,24 +8,24 @@
return counter;
}
-matrix<float16_t, 4, 4> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 4> m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = m[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = m[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = m[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = m[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
@@ -34,7 +34,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 4, 4> l_m = tint_symbol(m, 0u);
+ const matrix<float16_t, 4, 4> l_m = m_load(0u);
uint2 ubo_load_8 = m[0].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_builtin.wgsl.expected.dxc.hlsl
index cd3f135..c1ac9f0 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,24 +2,24 @@
uint4 u[2];
};
-matrix<float16_t, 4, 4> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
@@ -28,7 +28,7 @@
[numthreads(1, 1, 1)]
void f() {
- const matrix<float16_t, 4, 4> t = transpose(tint_symbol(u, 0u));
+ const matrix<float16_t, 4, 4> t = transpose(u_load(0u));
uint2 ubo_load_8 = u[0].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_fn.wgsl.expected.dxc.hlsl
index 01d30aef..18ee3e8 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_fn.wgsl.expected.dxc.hlsl
@@ -11,24 +11,24 @@
void c(float16_t f_1) {
}
-matrix<float16_t, 4, 4> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
@@ -37,7 +37,7 @@
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
uint2 ubo_load_8 = u[0].zw;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.dxc.hlsl
index 686f794..b8ec6be 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.dxc.hlsl
@@ -3,24 +3,24 @@
};
static matrix<float16_t, 4, 4> p = matrix<float16_t, 4, 4>(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
-matrix<float16_t, 4, 4> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
@@ -29,7 +29,7 @@
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
uint2 ubo_load_8 = u[0].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_storage.wgsl.expected.dxc.hlsl
index ab84a62..a7d77f5 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_storage.wgsl.expected.dxc.hlsl
@@ -3,31 +3,31 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, matrix<float16_t, 4, 4> value) {
- buffer.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
- buffer.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
- buffer.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
- buffer.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
+void s_store(uint offset, matrix<float16_t, 4, 4> value) {
+ s.Store<vector<float16_t, 4> >((offset + 0u), value[0u]);
+ s.Store<vector<float16_t, 4> >((offset + 8u), value[1u]);
+ s.Store<vector<float16_t, 4> >((offset + 16u), value[2u]);
+ s.Store<vector<float16_t, 4> >((offset + 24u), value[3u]);
}
-matrix<float16_t, 4, 4> tint_symbol_2(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
@@ -36,7 +36,7 @@
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
uint2 ubo_load_8 = u[0].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
index 3cf441e..b800a38 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,24 +7,24 @@
uint local_invocation_index : SV_GroupIndex;
};
-matrix<float16_t, 4, 4> tint_symbol_2(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
@@ -36,7 +36,7 @@
w = matrix<float16_t, 4, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
uint2 ubo_load_8 = u[0].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
vector<float16_t, 2> ubo_load_8_yw = vector<float16_t, 2>(f16tof32(ubo_load_8 >> 16));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
index ea3e8b8..9f7ce78 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,18 +8,18 @@
return counter;
}
-float4x4 tint_symbol(uint4 buffer[4], uint offset) {
+float4x4 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(m[scalar_offset / 4]), asfloat(m[scalar_offset_1 / 4]), asfloat(m[scalar_offset_2 / 4]), asfloat(m[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float4x4 l_m = tint_symbol(m, 0u);
+ const float4x4 l_m = m_load(0u);
const uint scalar_offset_4 = ((16u * uint(p_m_i_save))) / 4;
const float4 l_m_i = asfloat(m[scalar_offset_4 / 4]);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
index ea3e8b8..9f7ce78 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,18 +8,18 @@
return counter;
}
-float4x4 tint_symbol(uint4 buffer[4], uint offset) {
+float4x4 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(m[scalar_offset / 4]), asfloat(m[scalar_offset_1 / 4]), asfloat(m[scalar_offset_2 / 4]), asfloat(m[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
const int p_m_i_save = i();
- const float4x4 l_m = tint_symbol(m, 0u);
+ const float4x4 l_m = m_load(0u);
const uint scalar_offset_4 = ((16u * uint(p_m_i_save))) / 4;
const float4 l_m_i = asfloat(m[scalar_offset_4 / 4]);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
index 8ae2c10..fc2d7b9 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.dxc.hlsl
@@ -8,17 +8,17 @@
return counter;
}
-float4x4 tint_symbol(uint4 buffer[4], uint offset) {
+float4x4 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(m[scalar_offset / 4]), asfloat(m[scalar_offset_1 / 4]), asfloat(m[scalar_offset_2 / 4]), asfloat(m[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x4 l_m = tint_symbol(m, 0u);
+ const float4x4 l_m = m_load(0u);
const float4 l_m_1 = asfloat(m[1]);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
index 8ae2c10..fc2d7b9 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.fxc.hlsl
@@ -8,17 +8,17 @@
return counter;
}
-float4x4 tint_symbol(uint4 buffer[4], uint offset) {
+float4x4 m_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(m[scalar_offset / 4]), asfloat(m[scalar_offset_1 / 4]), asfloat(m[scalar_offset_2 / 4]), asfloat(m[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x4 l_m = tint_symbol(m, 0u);
+ const float4x4 l_m = m_load(0u);
const float4 l_m_1 = asfloat(m[1]);
return;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.dxc.hlsl
index 7642211..e095f4c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.dxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[4];
};
-float4x4 tint_symbol(uint4 buffer[4], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x4 t = transpose(tint_symbol(u, 0u));
+ const float4x4 t = transpose(u_load(0u));
const float l = length(asfloat(u[1]));
const float a = abs(asfloat(u[0]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.fxc.hlsl
index 7642211..e095f4c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.fxc.hlsl
@@ -2,17 +2,17 @@
uint4 u[4];
};
-float4x4 tint_symbol(uint4 buffer[4], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- const float4x4 t = transpose(tint_symbol(u, 0u));
+ const float4x4 t = transpose(u_load(0u));
const float l = length(asfloat(u[1]));
const float a = abs(asfloat(u[0]).ywxz.x);
return;
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.dxc.hlsl
index b70e101..8191a58 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.dxc.hlsl
@@ -11,17 +11,17 @@
void c(float f_1) {
}
-float4x4 tint_symbol(uint4 buffer[4], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[1]));
b(asfloat(u[1]).ywxz);
c(asfloat(u[1].x));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.fxc.hlsl
index b70e101..8191a58 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.fxc.hlsl
@@ -11,17 +11,17 @@
void c(float f_1) {
}
-float4x4 tint_symbol(uint4 buffer[4], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- a(tint_symbol(u, 0u));
+ a(u_load(0u));
b(asfloat(u[1]));
b(asfloat(u[1]).ywxz);
c(asfloat(u[1].x));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.dxc.hlsl
index 7679686..bcfed6a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.dxc.hlsl
@@ -3,17 +3,17 @@
};
static float4x4 p = float4x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float4x4 tint_symbol(uint4 buffer[4], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0]);
p[1] = asfloat(u[0]).ywxz;
p[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.fxc.hlsl
index 7679686..bcfed6a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.fxc.hlsl
@@ -3,17 +3,17 @@
};
static float4x4 p = float4x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-float4x4 tint_symbol(uint4 buffer[4], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- p = tint_symbol(u, 0u);
+ p = u_load(0u);
p[1] = asfloat(u[0]);
p[1] = asfloat(u[0]).ywxz;
p[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.dxc.hlsl
index cd27df0..9ace430 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.dxc.hlsl
@@ -3,24 +3,24 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void s_store(uint offset, float4x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
+ s.Store4((offset + 32u), asuint(value[2u]));
+ s.Store4((offset + 48u), asuint(value[3u]));
}
-float4x4 tint_symbol_2(uint4 buffer[4], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store4(16u, asuint(asfloat(u[0])));
s.Store4(16u, asuint(asfloat(u[0]).ywxz));
s.Store(4u, asuint(asfloat(u[1].x)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.fxc.hlsl
index cd27df0..9ace430 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.fxc.hlsl
@@ -3,24 +3,24 @@
};
RWByteAddressBuffer s : register(u1, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void s_store(uint offset, float4x4 value) {
+ s.Store4((offset + 0u), asuint(value[0u]));
+ s.Store4((offset + 16u), asuint(value[1u]));
+ s.Store4((offset + 32u), asuint(value[2u]));
+ s.Store4((offset + 48u), asuint(value[3u]));
}
-float4x4 tint_symbol_2(uint4 buffer[4], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void f() {
- tint_symbol(s, 0u, tint_symbol_2(u, 0u));
+ s_store(0u, u_load(0u));
s.Store4(16u, asuint(asfloat(u[0])));
s.Store4(16u, asuint(asfloat(u[0]).ywxz));
s.Store(4u, asuint(asfloat(u[1].x)));
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
index eb1a4f3..c7aa6a4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.dxc.hlsl
@@ -7,12 +7,12 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x4 tint_symbol_2(uint4 buffer[4], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
void f_inner(uint local_invocation_index) {
@@ -20,7 +20,7 @@
w = float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0]);
w[1] = asfloat(u[0]).ywxz;
w[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
index eb1a4f3..c7aa6a4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.fxc.hlsl
@@ -7,12 +7,12 @@
uint local_invocation_index : SV_GroupIndex;
};
-float4x4 tint_symbol_2(uint4 buffer[4], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
void f_inner(uint local_invocation_index) {
@@ -20,7 +20,7 @@
w = float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
}
GroupMemoryBarrierWithGroupSync();
- w = tint_symbol_2(u, 0u);
+ w = u_load(0u);
w[1] = asfloat(u[0]);
w[1] = asfloat(u[0]).ywxz;
w[0][1] = asfloat(u[1].x);
diff --git a/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.dxc.hlsl
index cb72d73..1631138 100644
--- a/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.dxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[1];
};
-matrix<float16_t, 2, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
return matrix<float16_t, 2, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))));
}
[numthreads(1, 1, 1)]
void main() {
- const matrix<float16_t, 2, 2> x = tint_symbol(u, 0u);
+ const matrix<float16_t, 2, 2> x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.dxc.hlsl
index c34b4c5..6c08178 100644
--- a/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.dxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[1];
};
-float2x2 tint_symbol(uint4 buffer[1], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void main() {
- const float2x2 x = tint_symbol(u, 0u);
+ const float2x2 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.fxc.hlsl
index c34b4c5..6c08178 100644
--- a/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.fxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[1];
};
-float2x2 tint_symbol(uint4 buffer[1], uint offset) {
+float2x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
[numthreads(1, 1, 1)]
void main() {
- const float2x2 x = tint_symbol(u, 0u);
+ const float2x2 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.dxc.hlsl
index ee623a0..45f4476 100644
--- a/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.dxc.hlsl
@@ -2,14 +2,14 @@
uint4 u[1];
};
-matrix<float16_t, 2, 3> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
@@ -18,6 +18,6 @@
[numthreads(1, 1, 1)]
void main() {
- const matrix<float16_t, 2, 3> x = tint_symbol(u, 0u);
+ const matrix<float16_t, 2, 3> x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.dxc.hlsl
index e92e916..bf4719b 100644
--- a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.dxc.hlsl
@@ -2,14 +2,14 @@
uint4 u[2];
};
-float2x3 tint_symbol(uint4 buffer[2], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void main() {
- const float2x3 x = tint_symbol(u, 0u);
+ const float2x3 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.fxc.hlsl
index e92e916..bf4719b 100644
--- a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.fxc.hlsl
@@ -2,14 +2,14 @@
uint4 u[2];
};
-float2x3 tint_symbol(uint4 buffer[2], uint offset) {
+float2x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
+ return float2x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz));
}
[numthreads(1, 1, 1)]
void main() {
- const float2x3 x = tint_symbol(u, 0u);
+ const float2x3 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.dxc.hlsl
index c891507..8e16c69 100644
--- a/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.dxc.hlsl
@@ -2,14 +2,14 @@
uint4 u[1];
};
-matrix<float16_t, 2, 4> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 2, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
@@ -18,6 +18,6 @@
[numthreads(1, 1, 1)]
void main() {
- const matrix<float16_t, 2, 4> x = tint_symbol(u, 0u);
+ const matrix<float16_t, 2, 4> x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.dxc.hlsl
index cead0e2..71fba3d 100644
--- a/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.dxc.hlsl
@@ -2,14 +2,14 @@
uint4 u[2];
};
-float2x4 tint_symbol(uint4 buffer[2], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void main() {
- const float2x4 x = tint_symbol(u, 0u);
+ const float2x4 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.fxc.hlsl
index cead0e2..71fba3d 100644
--- a/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.fxc.hlsl
@@ -2,14 +2,14 @@
uint4 u[2];
};
-float2x4 tint_symbol(uint4 buffer[2], uint offset) {
+float2x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
[numthreads(1, 1, 1)]
void main() {
- const float2x4 x = tint_symbol(u, 0u);
+ const float2x4 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.dxc.hlsl
index 704945f..aa80e18 100644
--- a/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.dxc.hlsl
@@ -2,18 +2,18 @@
uint4 u[1];
};
-matrix<float16_t, 3, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 3, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
[numthreads(1, 1, 1)]
void main() {
- const matrix<float16_t, 3, 2> x = tint_symbol(u, 0u);
+ const matrix<float16_t, 3, 2> x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.dxc.hlsl
index 44f2aa4..989e9b0 100644
--- a/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.dxc.hlsl
@@ -2,18 +2,18 @@
uint4 u[2];
};
-float3x2 tint_symbol(uint4 buffer[2], uint offset) {
+float3x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void main() {
- const float3x2 x = tint_symbol(u, 0u);
+ const float3x2 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.fxc.hlsl
index 44f2aa4..989e9b0 100644
--- a/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.fxc.hlsl
@@ -2,18 +2,18 @@
uint4 u[2];
};
-float3x2 tint_symbol(uint4 buffer[2], uint offset) {
+float3x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
[numthreads(1, 1, 1)]
void main() {
- const float3x2 x = tint_symbol(u, 0u);
+ const float3x2 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.dxc.hlsl
index 04db7e6..5d0fd8e 100644
--- a/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.dxc.hlsl
@@ -2,19 +2,19 @@
uint4 u[2];
};
-matrix<float16_t, 3, 3> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
@@ -23,6 +23,6 @@
[numthreads(1, 1, 1)]
void main() {
- const matrix<float16_t, 3, 3> x = tint_symbol(u, 0u);
+ const matrix<float16_t, 3, 3> x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.dxc.hlsl
index 310ff04..1a62cb3 100644
--- a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.dxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[3];
};
-float3x3 tint_symbol(uint4 buffer[3], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void main() {
- const float3x3 x = tint_symbol(u, 0u);
+ const float3x3 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.fxc.hlsl
index 310ff04..1a62cb3 100644
--- a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.fxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[3];
};
-float3x3 tint_symbol(uint4 buffer[3], uint offset) {
+float3x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz));
}
[numthreads(1, 1, 1)]
void main() {
- const float3x3 x = tint_symbol(u, 0u);
+ const float3x3 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.dxc.hlsl
index a13d689..8ac7c6c 100644
--- a/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.dxc.hlsl
@@ -2,19 +2,19 @@
uint4 u[2];
};
-matrix<float16_t, 3, 4> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
@@ -23,6 +23,6 @@
[numthreads(1, 1, 1)]
void main() {
- const matrix<float16_t, 3, 4> x = tint_symbol(u, 0u);
+ const matrix<float16_t, 3, 4> x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.dxc.hlsl
index 4a409e5..326ed64 100644
--- a/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.dxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[3];
};
-float3x4 tint_symbol(uint4 buffer[3], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void main() {
- const float3x4 x = tint_symbol(u, 0u);
+ const float3x4 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.fxc.hlsl
index 4a409e5..326ed64 100644
--- a/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.fxc.hlsl
@@ -2,15 +2,15 @@
uint4 u[3];
};
-float3x4 tint_symbol(uint4 buffer[3], uint offset) {
+float3x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]));
}
[numthreads(1, 1, 1)]
void main() {
- const float3x4 x = tint_symbol(u, 0u);
+ const float3x4 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.dxc.hlsl
index 4f03c89..4b3c780 100644
--- a/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.dxc.hlsl
@@ -2,20 +2,20 @@
uint4 u[1];
};
-matrix<float16_t, 4, 2> tint_symbol(uint4 buffer[1], uint offset) {
+matrix<float16_t, 4, 2> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = u[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = u[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = u[scalar_offset_2 / 4][scalar_offset_2 % 4];
const uint scalar_offset_3 = ((offset + 12u)) / 4;
- uint ubo_load_3 = buffer[scalar_offset_3 / 4][scalar_offset_3 % 4];
+ uint ubo_load_3 = u[scalar_offset_3 / 4][scalar_offset_3 % 4];
return matrix<float16_t, 4, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_3 & 0xFFFF)), float16_t(f16tof32(ubo_load_3 >> 16))));
}
[numthreads(1, 1, 1)]
void main() {
- const matrix<float16_t, 4, 2> x = tint_symbol(u, 0u);
+ const matrix<float16_t, 4, 2> x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.dxc.hlsl
index a6278e9..1d094f3 100644
--- a/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.dxc.hlsl
@@ -2,20 +2,20 @@
uint4 u[2];
};
-float4x2 tint_symbol(uint4 buffer[2], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void main() {
- const float4x2 x = tint_symbol(u, 0u);
+ const float4x2 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.fxc.hlsl
index a6278e9..1d094f3 100644
--- a/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.fxc.hlsl
@@ -2,20 +2,20 @@
uint4 u[2];
};
-float4x2 tint_symbol(uint4 buffer[2], uint offset) {
+float4x2 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = u[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = u[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = u[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_3 / 4];
return float4x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
[numthreads(1, 1, 1)]
void main() {
- const float4x2 x = tint_symbol(u, 0u);
+ const float4x2 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.dxc.hlsl
index 5acbef9..80b31cf 100644
--- a/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.dxc.hlsl
@@ -2,24 +2,24 @@
uint4 u[2];
};
-matrix<float16_t, 4, 3> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 3> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
@@ -28,6 +28,6 @@
[numthreads(1, 1, 1)]
void main() {
- const matrix<float16_t, 4, 3> x = tint_symbol(u, 0u);
+ const matrix<float16_t, 4, 3> x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.dxc.hlsl
index 044877c..449a553 100644
--- a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.dxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[4];
};
-float4x3 tint_symbol(uint4 buffer[4], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void main() {
- const float4x3 x = tint_symbol(u, 0u);
+ const float4x3 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.fxc.hlsl
index 044877c..449a553 100644
--- a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.fxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[4];
};
-float4x3 tint_symbol(uint4 buffer[4], uint offset) {
+float4x3 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(u[scalar_offset / 4].xyz), asfloat(u[scalar_offset_1 / 4].xyz), asfloat(u[scalar_offset_2 / 4].xyz), asfloat(u[scalar_offset_3 / 4].xyz));
}
[numthreads(1, 1, 1)]
void main() {
- const float4x3 x = tint_symbol(u, 0u);
+ const float4x3 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.dxc.hlsl
index a0e9f1b5..4739745 100644
--- a/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.dxc.hlsl
@@ -2,24 +2,24 @@
uint4 u[2];
};
-matrix<float16_t, 4, 4> tint_symbol(uint4 buffer[2], uint offset) {
+matrix<float16_t, 4, 4> u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
vector<float16_t, 2> ubo_load_4_yw = vector<float16_t, 2>(f16tof32(ubo_load_4 >> 16));
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = u[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
vector<float16_t, 2> ubo_load_6_yw = vector<float16_t, 2>(f16tof32(ubo_load_6 >> 16));
@@ -28,6 +28,6 @@
[numthreads(1, 1, 1)]
void main() {
- const matrix<float16_t, 4, 4> x = tint_symbol(u, 0u);
+ const matrix<float16_t, 4, 4> x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.dxc.hlsl
index 0b14de0..7a4201f 100644
--- a/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.dxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[4];
};
-float4x4 tint_symbol(uint4 buffer[4], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void main() {
- const float4x4 x = tint_symbol(u, 0u);
+ const float4x4 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.fxc.hlsl
index 0b14de0..7a4201f 100644
--- a/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.fxc.hlsl
@@ -2,16 +2,16 @@
uint4 u[4];
};
-float4x4 tint_symbol(uint4 buffer[4], uint offset) {
+float4x4 u_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]), asfloat(u[scalar_offset_2 / 4]), asfloat(u[scalar_offset_3 / 4]));
}
[numthreads(1, 1, 1)]
void main() {
- const float4x4 x = tint_symbol(u, 0u);
+ const float4x4 x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.dxc.hlsl
index 0ee746e..f6b094a 100644
--- a/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.dxc.hlsl
@@ -11,39 +11,39 @@
uint4 u[2];
};
-matrix<float16_t, 2, 4> tint_symbol_4(uint4 buffer[2], uint offset) {
+matrix<float16_t, 2, 4> u_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = u[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
vector<float16_t, 2> ubo_load_yw = vector<float16_t, 2>(f16tof32(ubo_load >> 16));
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = u[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
vector<float16_t, 2> ubo_load_2_yw = vector<float16_t, 2>(f16tof32(ubo_load_2 >> 16));
return matrix<float16_t, 2, 4>(vector<float16_t, 4>(ubo_load_xz[0], ubo_load_yw[0], ubo_load_xz[1], ubo_load_yw[1]), vector<float16_t, 4>(ubo_load_2_xz[0], ubo_load_2_yw[0], ubo_load_2_xz[1], ubo_load_2_yw[1]));
}
-Inner tint_symbol_1(uint4 buffer[2], uint offset) {
+Inner u_load_1(uint offset) {
const uint scalar_offset_bytes = ((offset + 0u));
const uint scalar_offset_index = scalar_offset_bytes / 4;
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = u[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
- const Inner tint_symbol_6 = {float16_t(f16tof32(((buffer[scalar_offset_index / 4][scalar_offset_index % 4] >> (scalar_offset_bytes % 4 == 0 ? 0 : 16)) & 0xFFFF))), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), tint_symbol_4(buffer, (offset + 16u))};
- return tint_symbol_6;
+ const Inner tint_symbol = {float16_t(f16tof32(((u[scalar_offset_index / 4][scalar_offset_index % 4] >> (scalar_offset_bytes % 4 == 0 ? 0 : 16)) & 0xFFFF))), vector<float16_t, 3>(ubo_load_4_xz[0], ubo_load_4_y, ubo_load_4_xz[1]), u_load_4((offset + 16u))};
+ return tint_symbol;
}
-S tint_symbol(uint4 buffer[2], uint offset) {
- const S tint_symbol_7 = {tint_symbol_1(buffer, (offset + 0u))};
- return tint_symbol_7;
+S u_load(uint offset) {
+ const S tint_symbol_1 = {u_load_1((offset + 0u))};
+ return tint_symbol_1;
}
[numthreads(1, 1, 1)]
void main() {
- const S x = tint_symbol(u, 0u);
+ const S x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.dxc.hlsl b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.dxc.hlsl
index c6a6891..ee09fc9 100644
--- a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.dxc.hlsl
@@ -11,26 +11,26 @@
uint4 u[4];
};
-float2x4 tint_symbol_4(uint4 buffer[4], uint offset) {
+float2x4 u_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-Inner tint_symbol_1(uint4 buffer[4], uint offset) {
+Inner u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 16u)) / 4;
- const Inner tint_symbol_6 = {asfloat(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), asfloat(buffer[scalar_offset_3 / 4].xyz), tint_symbol_4(buffer, (offset + 32u))};
- return tint_symbol_6;
+ const Inner tint_symbol = {asfloat(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), asfloat(u[scalar_offset_3 / 4].xyz), u_load_4((offset + 32u))};
+ return tint_symbol;
}
-S tint_symbol(uint4 buffer[4], uint offset) {
- const S tint_symbol_7 = {tint_symbol_1(buffer, (offset + 0u))};
- return tint_symbol_7;
+S u_load(uint offset) {
+ const S tint_symbol_1 = {u_load_1((offset + 0u))};
+ return tint_symbol_1;
}
[numthreads(1, 1, 1)]
void main() {
- const S x = tint_symbol(u, 0u);
+ const S x = u_load(0u);
return;
}
diff --git a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.fxc.hlsl b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.fxc.hlsl
index c6a6891..ee09fc9 100644
--- a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.fxc.hlsl
@@ -11,26 +11,26 @@
uint4 u[4];
};
-float2x4 tint_symbol_4(uint4 buffer[4], uint offset) {
+float2x4 u_load_4(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
- return float2x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]));
+ return float2x4(asfloat(u[scalar_offset / 4]), asfloat(u[scalar_offset_1 / 4]));
}
-Inner tint_symbol_1(uint4 buffer[4], uint offset) {
+Inner u_load_1(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
const uint scalar_offset_3 = ((offset + 16u)) / 4;
- const Inner tint_symbol_6 = {asfloat(buffer[scalar_offset_2 / 4][scalar_offset_2 % 4]), asfloat(buffer[scalar_offset_3 / 4].xyz), tint_symbol_4(buffer, (offset + 32u))};
- return tint_symbol_6;
+ const Inner tint_symbol = {asfloat(u[scalar_offset_2 / 4][scalar_offset_2 % 4]), asfloat(u[scalar_offset_3 / 4].xyz), u_load_4((offset + 32u))};
+ return tint_symbol;
}
-S tint_symbol(uint4 buffer[4], uint offset) {
- const S tint_symbol_7 = {tint_symbol_1(buffer, (offset + 0u))};
- return tint_symbol_7;
+S u_load(uint offset) {
+ const S tint_symbol_1 = {u_load_1((offset + 0u))};
+ return tint_symbol_1;
}
[numthreads(1, 1, 1)]
void main() {
- const S x = tint_symbol(u, 0u);
+ const S x = u_load(0u);
return;
}
diff --git a/test/tint/bug/chromium/1273230.wgsl.expected.dxc.hlsl b/test/tint/bug/chromium/1273230.wgsl.expected.dxc.hlsl
index c29e7d6..a7e3f1a 100644
--- a/test/tint/bug/chromium/1273230.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/chromium/1273230.wgsl.expected.dxc.hlsl
@@ -47,16 +47,16 @@
return position;
}
-uint tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+uint countersatomicLoad(uint offset) {
uint value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ counters.InterlockedOr(offset, 0, value);
return value;
}
-int tint_atomicLoad_1(RWByteAddressBuffer buffer, uint offset) {
+int LUTatomicLoad(uint offset) {
int value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ LUT.InterlockedOr(offset, 0, value);
return value;
}
@@ -64,19 +64,19 @@
void doIgnore() {
uint g43 = uniforms[0].x;
uint kj6 = dbg.Load(20u);
- uint b53 = tint_atomicLoad(counters, 0u);
+ uint b53 = countersatomicLoad(0u);
uint rwg = indices.Load(0u);
float rb5 = asfloat(positions.Load(0u));
- int g55 = tint_atomicLoad_1(LUT, 0u);
+ int g55 = LUTatomicLoad(0u);
}
struct tint_symbol_1 {
uint3 GlobalInvocationID : SV_DispatchThreadID;
};
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int LUTatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ LUT.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -96,7 +96,7 @@
float3 center = (((p0 + p2) + p1) / 3.0f);
float3 voxelPos = toVoxelPos(p1);
uint lIndex = toIndex1D(uniforms[0].y, p0);
- int triangleOffset = tint_atomicAdd(LUT, (4u * i1), 1);
+ int triangleOffset = LUTatomicAdd((4u * i1), 1);
}
[numthreads(128, 1, 1)]
diff --git a/test/tint/bug/chromium/1273230.wgsl.expected.fxc.hlsl b/test/tint/bug/chromium/1273230.wgsl.expected.fxc.hlsl
index c29e7d6..a7e3f1a 100644
--- a/test/tint/bug/chromium/1273230.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/chromium/1273230.wgsl.expected.fxc.hlsl
@@ -47,16 +47,16 @@
return position;
}
-uint tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+uint countersatomicLoad(uint offset) {
uint value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ counters.InterlockedOr(offset, 0, value);
return value;
}
-int tint_atomicLoad_1(RWByteAddressBuffer buffer, uint offset) {
+int LUTatomicLoad(uint offset) {
int value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ LUT.InterlockedOr(offset, 0, value);
return value;
}
@@ -64,19 +64,19 @@
void doIgnore() {
uint g43 = uniforms[0].x;
uint kj6 = dbg.Load(20u);
- uint b53 = tint_atomicLoad(counters, 0u);
+ uint b53 = countersatomicLoad(0u);
uint rwg = indices.Load(0u);
float rb5 = asfloat(positions.Load(0u));
- int g55 = tint_atomicLoad_1(LUT, 0u);
+ int g55 = LUTatomicLoad(0u);
}
struct tint_symbol_1 {
uint3 GlobalInvocationID : SV_DispatchThreadID;
};
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int LUTatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ LUT.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -96,7 +96,7 @@
float3 center = (((p0 + p2) + p1) / 3.0f);
float3 voxelPos = toVoxelPos(p1);
uint lIndex = toIndex1D(uniforms[0].y, p0);
- int triangleOffset = tint_atomicAdd(LUT, (4u * i1), 1);
+ int triangleOffset = LUTatomicAdd((4u * i1), 1);
}
[numthreads(128, 1, 1)]
diff --git a/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.dxc.hlsl b/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.dxc.hlsl
index e76d9bd..a9c5167 100644
--- a/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.dxc.hlsl
@@ -10,25 +10,25 @@
uint4 sim[1];
};
-typedef float3 tint_symbol_3_ret[8];
-tint_symbol_3_ret tint_symbol_3(ByteAddressBuffer buffer, uint offset) {
+typedef float3 particles_load_1_ret[8];
+particles_load_1_ret particles_load_1(uint offset) {
float3 arr[8] = (float3[8])0;
{
for(uint i_1 = 0u; (i_1 < 8u); i_1 = (i_1 + 1u)) {
- arr[i_1] = asfloat(buffer.Load3((offset + (i_1 * 16u))));
+ arr[i_1] = asfloat(particles.Load3((offset + (i_1 * 16u))));
}
}
return arr;
}
-Particle tint_symbol_2(ByteAddressBuffer buffer, uint offset) {
- const Particle tint_symbol_8 = {tint_symbol_3(buffer, (offset + 0u)), asfloat(buffer.Load((offset + 128u))), asfloat(buffer.Load4((offset + 144u))), asfloat(buffer.Load3((offset + 160u)))};
- return tint_symbol_8;
+Particle particles_load(uint offset) {
+ const Particle tint_symbol_2 = {particles_load_1((offset + 0u)), asfloat(particles.Load((offset + 128u))), asfloat(particles.Load4((offset + 144u))), asfloat(particles.Load3((offset + 160u)))};
+ return tint_symbol_2;
}
[numthreads(1, 1, 1)]
void main() {
- Particle particle = tint_symbol_2(particles, 0u);
+ Particle particle = particles_load(0u);
{
float3 tint_symbol_1[8] = particle.position;
tint_symbol_1[sim[0].x] = particle.position[sim[0].x];
diff --git a/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.fxc.hlsl b/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.fxc.hlsl
index e76d9bd..a9c5167 100644
--- a/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.fxc.hlsl
@@ -10,25 +10,25 @@
uint4 sim[1];
};
-typedef float3 tint_symbol_3_ret[8];
-tint_symbol_3_ret tint_symbol_3(ByteAddressBuffer buffer, uint offset) {
+typedef float3 particles_load_1_ret[8];
+particles_load_1_ret particles_load_1(uint offset) {
float3 arr[8] = (float3[8])0;
{
for(uint i_1 = 0u; (i_1 < 8u); i_1 = (i_1 + 1u)) {
- arr[i_1] = asfloat(buffer.Load3((offset + (i_1 * 16u))));
+ arr[i_1] = asfloat(particles.Load3((offset + (i_1 * 16u))));
}
}
return arr;
}
-Particle tint_symbol_2(ByteAddressBuffer buffer, uint offset) {
- const Particle tint_symbol_8 = {tint_symbol_3(buffer, (offset + 0u)), asfloat(buffer.Load((offset + 128u))), asfloat(buffer.Load4((offset + 144u))), asfloat(buffer.Load3((offset + 160u)))};
- return tint_symbol_8;
+Particle particles_load(uint offset) {
+ const Particle tint_symbol_2 = {particles_load_1((offset + 0u)), asfloat(particles.Load((offset + 128u))), asfloat(particles.Load4((offset + 144u))), asfloat(particles.Load3((offset + 160u)))};
+ return tint_symbol_2;
}
[numthreads(1, 1, 1)]
void main() {
- Particle particle = tint_symbol_2(particles, 0u);
+ Particle particle = particles_load(0u);
{
float3 tint_symbol_1[8] = particle.position;
tint_symbol_1[sim[0].x] = particle.position[sim[0].x];
diff --git a/test/tint/bug/tint/1046.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/1046.wgsl.expected.dxc.hlsl
index e3e7204..0938bcc 100644
--- a/test/tint/bug/tint/1046.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1046.wgsl.expected.dxc.hlsl
@@ -55,8 +55,8 @@
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
- const FragmentInput tint_symbol_5 = {tint_symbol.position, tint_symbol.view_position, tint_symbol.normal, tint_symbol.uv, tint_symbol.color};
- const FragmentOutput inner_result = main_inner(tint_symbol_5);
+ const FragmentInput tint_symbol_3 = {tint_symbol.position, tint_symbol.view_position, tint_symbol.normal, tint_symbol.uv, tint_symbol.color};
+ const FragmentOutput inner_result = main_inner(tint_symbol_3);
tint_symbol_2 wrapper_result = (tint_symbol_2)0;
wrapper_result.color = inner_result.color;
return wrapper_result;
diff --git a/test/tint/bug/tint/1046.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/1046.wgsl.expected.fxc.hlsl
index e3e7204..0938bcc 100644
--- a/test/tint/bug/tint/1046.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1046.wgsl.expected.fxc.hlsl
@@ -55,8 +55,8 @@
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
- const FragmentInput tint_symbol_5 = {tint_symbol.position, tint_symbol.view_position, tint_symbol.normal, tint_symbol.uv, tint_symbol.color};
- const FragmentOutput inner_result = main_inner(tint_symbol_5);
+ const FragmentInput tint_symbol_3 = {tint_symbol.position, tint_symbol.view_position, tint_symbol.normal, tint_symbol.uv, tint_symbol.color};
+ const FragmentOutput inner_result = main_inner(tint_symbol_3);
tint_symbol_2 wrapper_result = (tint_symbol_2)0;
wrapper_result.color = inner_result.color;
return wrapper_result;
diff --git a/test/tint/bug/tint/1061.spvasm.expected.dxc.hlsl b/test/tint/bug/tint/1061.spvasm.expected.dxc.hlsl
index 319b7c3..e4d1fbd 100644
--- a/test/tint/bug/tint/1061.spvasm.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1061.spvasm.expected.dxc.hlsl
@@ -31,8 +31,8 @@
main_out main_inner() {
main_1();
- const main_out tint_symbol_2 = {x_GLF_color};
- return tint_symbol_2;
+ const main_out tint_symbol_1 = {x_GLF_color};
+ return tint_symbol_1;
}
tint_symbol main() {
diff --git a/test/tint/bug/tint/1061.spvasm.expected.fxc.hlsl b/test/tint/bug/tint/1061.spvasm.expected.fxc.hlsl
index 319b7c3..e4d1fbd 100644
--- a/test/tint/bug/tint/1061.spvasm.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1061.spvasm.expected.fxc.hlsl
@@ -31,8 +31,8 @@
main_out main_inner() {
main_1();
- const main_out tint_symbol_2 = {x_GLF_color};
- return tint_symbol_2;
+ const main_out tint_symbol_1 = {x_GLF_color};
+ return tint_symbol_1;
}
tint_symbol main() {
diff --git a/test/tint/bug/tint/1088.spvasm.expected.dxc.hlsl b/test/tint/bug/tint/1088.spvasm.expected.dxc.hlsl
index 1588b26..4884747 100644
--- a/test/tint/bug/tint/1088.spvasm.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1088.spvasm.expected.dxc.hlsl
@@ -7,12 +7,12 @@
static float3 normal = float3(0.0f, 0.0f, 0.0f);
static float4 gl_Position = float4(0.0f, 0.0f, 0.0f, 0.0f);
-float4x4 tint_symbol_4(uint4 buffer[17], uint offset) {
+float4x4 x_14_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(x_14[scalar_offset / 4]), asfloat(x_14[scalar_offset_1 / 4]), asfloat(x_14[scalar_offset_2 / 4]), asfloat(x_14[scalar_offset_3 / 4]));
}
void main_1() {
@@ -30,7 +30,7 @@
const float x_55 = p.y;
const float x_57 = asfloat(x_14[4].x);
p.y = (x_55 + sin((x_57 + 4.0f)));
- const float4x4 x_69 = tint_symbol_4(x_14, 0u);
+ const float4x4 x_69 = x_14_load_1(0u);
const float3 x_70 = p;
gl_Position = mul(float4(x_70.x, x_70.y, x_70.z, 1.0f), x_69);
const float2 x_83 = uv;
@@ -59,8 +59,8 @@
uv = uv_param;
normal = normal_param;
main_1();
- const main_out tint_symbol_6 = {gl_Position, vUV};
- return tint_symbol_6;
+ const main_out tint_symbol_3 = {gl_Position, vUV};
+ return tint_symbol_3;
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
diff --git a/test/tint/bug/tint/1088.spvasm.expected.fxc.hlsl b/test/tint/bug/tint/1088.spvasm.expected.fxc.hlsl
index 1588b26..4884747 100644
--- a/test/tint/bug/tint/1088.spvasm.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1088.spvasm.expected.fxc.hlsl
@@ -7,12 +7,12 @@
static float3 normal = float3(0.0f, 0.0f, 0.0f);
static float4 gl_Position = float4(0.0f, 0.0f, 0.0f, 0.0f);
-float4x4 tint_symbol_4(uint4 buffer[17], uint offset) {
+float4x4 x_14_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(x_14[scalar_offset / 4]), asfloat(x_14[scalar_offset_1 / 4]), asfloat(x_14[scalar_offset_2 / 4]), asfloat(x_14[scalar_offset_3 / 4]));
}
void main_1() {
@@ -30,7 +30,7 @@
const float x_55 = p.y;
const float x_57 = asfloat(x_14[4].x);
p.y = (x_55 + sin((x_57 + 4.0f)));
- const float4x4 x_69 = tint_symbol_4(x_14, 0u);
+ const float4x4 x_69 = x_14_load_1(0u);
const float3 x_70 = p;
gl_Position = mul(float4(x_70.x, x_70.y, x_70.z, 1.0f), x_69);
const float2 x_83 = uv;
@@ -59,8 +59,8 @@
uv = uv_param;
normal = normal_param;
main_1();
- const main_out tint_symbol_6 = {gl_Position, vUV};
- return tint_symbol_6;
+ const main_out tint_symbol_3 = {gl_Position, vUV};
+ return tint_symbol_3;
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
diff --git a/test/tint/bug/tint/1113.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/1113.wgsl.expected.dxc.hlsl
index 25be8e4..e6e0b7a 100644
--- a/test/tint/bug/tint/1113.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1113.wgsl.expected.dxc.hlsl
@@ -44,16 +44,16 @@
return position;
}
-uint tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+uint countersatomicLoad(uint offset) {
uint value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ counters.InterlockedOr(offset, 0, value);
return value;
}
-int tint_atomicLoad_1(RWByteAddressBuffer buffer, uint offset) {
+int LUTatomicLoad(uint offset) {
int value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ LUT.InterlockedOr(offset, 0, value);
return value;
}
@@ -61,19 +61,19 @@
void doIgnore() {
uint g42 = uniforms[0].x;
uint kj6 = dbg.Load(20u);
- uint b53 = tint_atomicLoad(counters, 0u);
+ uint b53 = countersatomicLoad(0u);
uint rwg = indices.Load(0u);
float rb5 = asfloat(positions.Load(0u));
- int g55 = tint_atomicLoad_1(LUT, 0u);
+ int g55 = LUTatomicLoad(0u);
}
struct tint_symbol_1 {
uint3 GlobalInvocationID : SV_DispatchThreadID;
};
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint countersatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ counters.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -93,7 +93,7 @@
float3 center = (((p0 + p1) + p2) / 3.0f);
float3 voxelPos = toVoxelPos(center);
uint voxelIndex = toIndex1D(uniforms[0].y, voxelPos);
- uint acefg = tint_atomicAdd(counters, (4u * voxelIndex), 1u);
+ uint acefg = countersatomicAdd((4u * voxelIndex), 1u);
if ((triangleIndex == 0u)) {
dbg.Store(16u, asuint(uniforms[0].y));
dbg.Store(32u, asuint(center.x));
@@ -112,16 +112,16 @@
uint3 GlobalInvocationID : SV_DispatchThreadID;
};
-uint tint_atomicAdd_1(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint dbgatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ dbg.InterlockedAdd(offset, value, original_value);
return original_value;
}
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, int value) {
+void LUTatomicStore(uint offset, int value) {
int ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ LUT.InterlockedExchange(offset, value, ignored);
}
@@ -132,13 +132,13 @@
if ((voxelIndex >= maxVoxels)) {
return;
}
- uint numTriangles = tint_atomicLoad(counters, (4u * voxelIndex));
+ uint numTriangles = countersatomicLoad((4u * voxelIndex));
int offset = -1;
if ((numTriangles > 0u)) {
- const uint tint_symbol_6 = tint_atomicAdd_1(dbg, 0u, numTriangles);
+ const uint tint_symbol_6 = dbgatomicAdd(0u, numTriangles);
offset = int(tint_symbol_6);
}
- tint_atomicStore(LUT, (4u * voxelIndex), offset);
+ LUTatomicStore((4u * voxelIndex), offset);
}
[numthreads(128, 1, 1)]
@@ -151,9 +151,9 @@
uint3 GlobalInvocationID : SV_DispatchThreadID;
};
-int tint_atomicAdd_2(RWByteAddressBuffer buffer, uint offset, int value) {
+int LUTatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ LUT.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -173,7 +173,7 @@
float3 center = (((p0 + p1) + p2) / 3.0f);
float3 voxelPos = toVoxelPos(center);
uint voxelIndex = toIndex1D(uniforms[0].y, voxelPos);
- int triangleOffset = tint_atomicAdd_2(LUT, (4u * voxelIndex), 1);
+ int triangleOffset = LUTatomicAdd((4u * voxelIndex), 1);
}
[numthreads(128, 1, 1)]
diff --git a/test/tint/bug/tint/1113.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/1113.wgsl.expected.fxc.hlsl
index 25be8e4..e6e0b7a 100644
--- a/test/tint/bug/tint/1113.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1113.wgsl.expected.fxc.hlsl
@@ -44,16 +44,16 @@
return position;
}
-uint tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+uint countersatomicLoad(uint offset) {
uint value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ counters.InterlockedOr(offset, 0, value);
return value;
}
-int tint_atomicLoad_1(RWByteAddressBuffer buffer, uint offset) {
+int LUTatomicLoad(uint offset) {
int value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ LUT.InterlockedOr(offset, 0, value);
return value;
}
@@ -61,19 +61,19 @@
void doIgnore() {
uint g42 = uniforms[0].x;
uint kj6 = dbg.Load(20u);
- uint b53 = tint_atomicLoad(counters, 0u);
+ uint b53 = countersatomicLoad(0u);
uint rwg = indices.Load(0u);
float rb5 = asfloat(positions.Load(0u));
- int g55 = tint_atomicLoad_1(LUT, 0u);
+ int g55 = LUTatomicLoad(0u);
}
struct tint_symbol_1 {
uint3 GlobalInvocationID : SV_DispatchThreadID;
};
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint countersatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ counters.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -93,7 +93,7 @@
float3 center = (((p0 + p1) + p2) / 3.0f);
float3 voxelPos = toVoxelPos(center);
uint voxelIndex = toIndex1D(uniforms[0].y, voxelPos);
- uint acefg = tint_atomicAdd(counters, (4u * voxelIndex), 1u);
+ uint acefg = countersatomicAdd((4u * voxelIndex), 1u);
if ((triangleIndex == 0u)) {
dbg.Store(16u, asuint(uniforms[0].y));
dbg.Store(32u, asuint(center.x));
@@ -112,16 +112,16 @@
uint3 GlobalInvocationID : SV_DispatchThreadID;
};
-uint tint_atomicAdd_1(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint dbgatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ dbg.InterlockedAdd(offset, value, original_value);
return original_value;
}
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, int value) {
+void LUTatomicStore(uint offset, int value) {
int ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ LUT.InterlockedExchange(offset, value, ignored);
}
@@ -132,13 +132,13 @@
if ((voxelIndex >= maxVoxels)) {
return;
}
- uint numTriangles = tint_atomicLoad(counters, (4u * voxelIndex));
+ uint numTriangles = countersatomicLoad((4u * voxelIndex));
int offset = -1;
if ((numTriangles > 0u)) {
- const uint tint_symbol_6 = tint_atomicAdd_1(dbg, 0u, numTriangles);
+ const uint tint_symbol_6 = dbgatomicAdd(0u, numTriangles);
offset = int(tint_symbol_6);
}
- tint_atomicStore(LUT, (4u * voxelIndex), offset);
+ LUTatomicStore((4u * voxelIndex), offset);
}
[numthreads(128, 1, 1)]
@@ -151,9 +151,9 @@
uint3 GlobalInvocationID : SV_DispatchThreadID;
};
-int tint_atomicAdd_2(RWByteAddressBuffer buffer, uint offset, int value) {
+int LUTatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ LUT.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -173,7 +173,7 @@
float3 center = (((p0 + p1) + p2) / 3.0f);
float3 voxelPos = toVoxelPos(center);
uint voxelIndex = toIndex1D(uniforms[0].y, voxelPos);
- int triangleOffset = tint_atomicAdd_2(LUT, (4u * voxelIndex), 1);
+ int triangleOffset = LUTatomicAdd((4u * voxelIndex), 1);
}
[numthreads(128, 1, 1)]
diff --git a/test/tint/bug/tint/1118.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/1118.wgsl.expected.dxc.hlsl
index 9b18484..66f08eb 100644
--- a/test/tint/bug/tint/1118.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1118.wgsl.expected.dxc.hlsl
@@ -104,8 +104,8 @@
fClipDistance3 = fClipDistance3_param;
fClipDistance4 = fClipDistance4_param;
main_1();
- const main_out tint_symbol_8 = {glFragColor};
- return tint_symbol_8;
+ const main_out tint_symbol_3 = {glFragColor};
+ return tint_symbol_3;
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
diff --git a/test/tint/bug/tint/1118.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/1118.wgsl.expected.fxc.hlsl
index 9b18484..66f08eb 100644
--- a/test/tint/bug/tint/1118.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1118.wgsl.expected.fxc.hlsl
@@ -104,8 +104,8 @@
fClipDistance3 = fClipDistance3_param;
fClipDistance4 = fClipDistance4_param;
main_1();
- const main_out tint_symbol_8 = {glFragColor};
- return tint_symbol_8;
+ const main_out tint_symbol_3 = {glFragColor};
+ return tint_symbol_3;
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
diff --git a/test/tint/bug/tint/1121.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/1121.wgsl.expected.dxc.hlsl
index 5dee593..db16cb0 100644
--- a/test/tint/bug/tint/1121.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1121.wgsl.expected.dxc.hlsl
@@ -14,17 +14,17 @@
uint3 GlobalInvocationID : SV_DispatchThreadID;
};
-float4x4 tint_symbol_6(uint4 buffer[11], uint offset) {
+float4x4 uniforms_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(uniforms[scalar_offset / 4]), asfloat(uniforms[scalar_offset_1 / 4]), asfloat(uniforms[scalar_offset_2 / 4]), asfloat(uniforms[scalar_offset_3 / 4]));
}
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint tileLightIdatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ tileLightId.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -38,11 +38,11 @@
if ((asfloat(lightsBuffer.Load(((32u * index) + 4u))) < asfloat(uniforms[0].y))) {
lightsBuffer.Store(((32u * index) + 4u), asuint(asfloat(uniforms[1].y)));
}
- float4x4 M = tint_symbol_6(uniforms, 96u);
+ float4x4 M = uniforms_load_1(96u);
float viewNear = (-(M[3][2]) / (-1.0f + M[2][2]));
float viewFar = (-(M[3][2]) / (1.0f + M[2][2]));
float4 lightPos = asfloat(lightsBuffer.Load4((32u * index)));
- lightPos = mul(lightPos, tint_symbol_6(uniforms, 32u));
+ lightPos = mul(lightPos, uniforms_load_1(32u));
lightPos = (lightPos / lightPos.w);
float lightRadius = asfloat(lightsBuffer.Load(((32u * index) + 28u)));
float4 boxMin = (lightPos - float4(float3((lightRadius).xxx), 0.0f));
@@ -98,7 +98,7 @@
if ((tint_tmp)) {
continue;
}
- uint offset = tint_atomicAdd(tileLightId, (260u * tileId), 1u);
+ uint offset = tileLightIdatomicAdd((260u * tileId), 1u);
if ((offset >= config[1].x)) {
continue;
}
diff --git a/test/tint/bug/tint/1121.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/1121.wgsl.expected.fxc.hlsl
index 5dee593..db16cb0 100644
--- a/test/tint/bug/tint/1121.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1121.wgsl.expected.fxc.hlsl
@@ -14,17 +14,17 @@
uint3 GlobalInvocationID : SV_DispatchThreadID;
};
-float4x4 tint_symbol_6(uint4 buffer[11], uint offset) {
+float4x4 uniforms_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(uniforms[scalar_offset / 4]), asfloat(uniforms[scalar_offset_1 / 4]), asfloat(uniforms[scalar_offset_2 / 4]), asfloat(uniforms[scalar_offset_3 / 4]));
}
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint tileLightIdatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ tileLightId.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -38,11 +38,11 @@
if ((asfloat(lightsBuffer.Load(((32u * index) + 4u))) < asfloat(uniforms[0].y))) {
lightsBuffer.Store(((32u * index) + 4u), asuint(asfloat(uniforms[1].y)));
}
- float4x4 M = tint_symbol_6(uniforms, 96u);
+ float4x4 M = uniforms_load_1(96u);
float viewNear = (-(M[3][2]) / (-1.0f + M[2][2]));
float viewFar = (-(M[3][2]) / (1.0f + M[2][2]));
float4 lightPos = asfloat(lightsBuffer.Load4((32u * index)));
- lightPos = mul(lightPos, tint_symbol_6(uniforms, 32u));
+ lightPos = mul(lightPos, uniforms_load_1(32u));
lightPos = (lightPos / lightPos.w);
float lightRadius = asfloat(lightsBuffer.Load(((32u * index) + 28u)));
float4 boxMin = (lightPos - float4(float3((lightRadius).xxx), 0.0f));
@@ -98,7 +98,7 @@
if ((tint_tmp)) {
continue;
}
- uint offset = tint_atomicAdd(tileLightId, (260u * tileId), 1u);
+ uint offset = tileLightIdatomicAdd((260u * tileId), 1u);
if ((offset >= config[1].x)) {
continue;
}
diff --git a/test/tint/bug/tint/1520.spvasm.expected.dxc.hlsl b/test/tint/bug/tint/1520.spvasm.expected.dxc.hlsl
index 06255d0..fbfa52c 100644
--- a/test/tint/bug/tint/1520.spvasm.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1520.spvasm.expected.dxc.hlsl
@@ -152,8 +152,8 @@
sk_Clockwise = sk_Clockwise_param;
vcolor_S0 = vcolor_S0_param;
main_1();
- const main_out tint_symbol_6 = {sk_FragColor};
- return tint_symbol_6;
+ const main_out tint_symbol_4 = {sk_FragColor};
+ return tint_symbol_4;
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
diff --git a/test/tint/bug/tint/1520.spvasm.expected.fxc.hlsl b/test/tint/bug/tint/1520.spvasm.expected.fxc.hlsl
index 06255d0..fbfa52c 100644
--- a/test/tint/bug/tint/1520.spvasm.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1520.spvasm.expected.fxc.hlsl
@@ -152,8 +152,8 @@
sk_Clockwise = sk_Clockwise_param;
vcolor_S0 = vcolor_S0_param;
main_1();
- const main_out tint_symbol_6 = {sk_FragColor};
- return tint_symbol_6;
+ const main_out tint_symbol_4 = {sk_FragColor};
+ return tint_symbol_4;
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
diff --git a/test/tint/bug/tint/1573.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/1573.wgsl.expected.dxc.hlsl
index a19a580..3cb873c 100644
--- a/test/tint/bug/tint/1573.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1573.wgsl.expected.dxc.hlsl
@@ -5,9 +5,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, uint compare, uint value) {
+atomic_compare_exchange_weak_ret_type aatomicCompareExchangeWeak(uint offset, uint compare, uint value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ a.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -16,6 +16,6 @@
[numthreads(16, 1, 1)]
void main() {
uint value = 42u;
- const atomic_compare_exchange_weak_ret_type result = tint_atomicCompareExchangeWeak(a, 0u, 0u, value);
+ const atomic_compare_exchange_weak_ret_type result = aatomicCompareExchangeWeak(0u, 0u, value);
return;
}
diff --git a/test/tint/bug/tint/1573.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/1573.wgsl.expected.fxc.hlsl
index a19a580..3cb873c 100644
--- a/test/tint/bug/tint/1573.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1573.wgsl.expected.fxc.hlsl
@@ -5,9 +5,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, uint compare, uint value) {
+atomic_compare_exchange_weak_ret_type aatomicCompareExchangeWeak(uint offset, uint compare, uint value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ a.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -16,6 +16,6 @@
[numthreads(16, 1, 1)]
void main() {
uint value = 42u;
- const atomic_compare_exchange_weak_ret_type result = tint_atomicCompareExchangeWeak(a, 0u, 0u, value);
+ const atomic_compare_exchange_weak_ret_type result = aatomicCompareExchangeWeak(0u, 0u, value);
return;
}
diff --git a/test/tint/bug/tint/1574.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/1574.wgsl.expected.dxc.hlsl
index aad4961..3e0f55a 100644
--- a/test/tint/bug/tint/1574.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1574.wgsl.expected.dxc.hlsl
@@ -19,9 +19,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, uint compare, uint value) {
+atomic_compare_exchange_weak_ret_type a_u32atomicCompareExchangeWeak(uint offset, uint compare, uint value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ a_u32.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -32,9 +32,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type_1 tint_atomicCompareExchangeWeak_1(RWByteAddressBuffer buffer, uint offset, int compare, int value) {
+atomic_compare_exchange_weak_ret_type_1 a_i32atomicCompareExchangeWeak(uint offset, int compare, int value) {
atomic_compare_exchange_weak_ret_type_1 result=(atomic_compare_exchange_weak_ret_type_1)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ a_i32.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -50,15 +50,15 @@
GroupMemoryBarrierWithGroupSync();
{
uint value = 42u;
- const atomic_compare_exchange_weak_ret_type r1 = tint_atomicCompareExchangeWeak(a_u32, 0u, 0u, value);
- const atomic_compare_exchange_weak_ret_type r2 = tint_atomicCompareExchangeWeak(a_u32, 0u, 0u, value);
- const atomic_compare_exchange_weak_ret_type r3 = tint_atomicCompareExchangeWeak(a_u32, 0u, 0u, value);
+ const atomic_compare_exchange_weak_ret_type r1 = a_u32atomicCompareExchangeWeak(0u, 0u, value);
+ const atomic_compare_exchange_weak_ret_type r2 = a_u32atomicCompareExchangeWeak(0u, 0u, value);
+ const atomic_compare_exchange_weak_ret_type r3 = a_u32atomicCompareExchangeWeak(0u, 0u, value);
}
{
int value = 42;
- const atomic_compare_exchange_weak_ret_type_1 r1 = tint_atomicCompareExchangeWeak_1(a_i32, 0u, 0, value);
- const atomic_compare_exchange_weak_ret_type_1 r2 = tint_atomicCompareExchangeWeak_1(a_i32, 0u, 0, value);
- const atomic_compare_exchange_weak_ret_type_1 r3 = tint_atomicCompareExchangeWeak_1(a_i32, 0u, 0, value);
+ const atomic_compare_exchange_weak_ret_type_1 r1 = a_i32atomicCompareExchangeWeak(0u, 0, value);
+ const atomic_compare_exchange_weak_ret_type_1 r2 = a_i32atomicCompareExchangeWeak(0u, 0, value);
+ const atomic_compare_exchange_weak_ret_type_1 r3 = a_i32atomicCompareExchangeWeak(0u, 0, value);
}
{
uint value = 42u;
diff --git a/test/tint/bug/tint/1574.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/1574.wgsl.expected.fxc.hlsl
index aad4961..3e0f55a 100644
--- a/test/tint/bug/tint/1574.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1574.wgsl.expected.fxc.hlsl
@@ -19,9 +19,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, uint compare, uint value) {
+atomic_compare_exchange_weak_ret_type a_u32atomicCompareExchangeWeak(uint offset, uint compare, uint value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ a_u32.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -32,9 +32,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type_1 tint_atomicCompareExchangeWeak_1(RWByteAddressBuffer buffer, uint offset, int compare, int value) {
+atomic_compare_exchange_weak_ret_type_1 a_i32atomicCompareExchangeWeak(uint offset, int compare, int value) {
atomic_compare_exchange_weak_ret_type_1 result=(atomic_compare_exchange_weak_ret_type_1)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ a_i32.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -50,15 +50,15 @@
GroupMemoryBarrierWithGroupSync();
{
uint value = 42u;
- const atomic_compare_exchange_weak_ret_type r1 = tint_atomicCompareExchangeWeak(a_u32, 0u, 0u, value);
- const atomic_compare_exchange_weak_ret_type r2 = tint_atomicCompareExchangeWeak(a_u32, 0u, 0u, value);
- const atomic_compare_exchange_weak_ret_type r3 = tint_atomicCompareExchangeWeak(a_u32, 0u, 0u, value);
+ const atomic_compare_exchange_weak_ret_type r1 = a_u32atomicCompareExchangeWeak(0u, 0u, value);
+ const atomic_compare_exchange_weak_ret_type r2 = a_u32atomicCompareExchangeWeak(0u, 0u, value);
+ const atomic_compare_exchange_weak_ret_type r3 = a_u32atomicCompareExchangeWeak(0u, 0u, value);
}
{
int value = 42;
- const atomic_compare_exchange_weak_ret_type_1 r1 = tint_atomicCompareExchangeWeak_1(a_i32, 0u, 0, value);
- const atomic_compare_exchange_weak_ret_type_1 r2 = tint_atomicCompareExchangeWeak_1(a_i32, 0u, 0, value);
- const atomic_compare_exchange_weak_ret_type_1 r3 = tint_atomicCompareExchangeWeak_1(a_i32, 0u, 0, value);
+ const atomic_compare_exchange_weak_ret_type_1 r1 = a_i32atomicCompareExchangeWeak(0u, 0, value);
+ const atomic_compare_exchange_weak_ret_type_1 r2 = a_i32atomicCompareExchangeWeak(0u, 0, value);
+ const atomic_compare_exchange_weak_ret_type_1 r3 = a_i32atomicCompareExchangeWeak(0u, 0, value);
}
{
uint value = 42u;
diff --git a/test/tint/bug/tint/1725.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/1725.wgsl.expected.dxc.hlsl
index cea26ec..d35f698 100644
--- a/test/tint/bug/tint/1725.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1725.wgsl.expected.dxc.hlsl
@@ -5,13 +5,13 @@
};
void tint_symbol_1_inner(uint tint_symbol_2) {
- uint tint_symbol_11 = 0u;
- tint_symbol.GetDimensions(tint_symbol_11);
- const uint tint_symbol_12 = (tint_symbol_11 / 4u);
+ uint tint_symbol_10 = 0u;
+ tint_symbol.GetDimensions(tint_symbol_10);
+ const uint tint_symbol_11 = (tint_symbol_10 / 4u);
const int tint_symbol_3 = 0;
const int tint_symbol_4 = 0;
const int tint_symbol_5 = 0;
- const uint tint_symbol_6 = tint_symbol.Load((4u * min(tint_symbol_2, (tint_symbol_12 - 1u))));
+ const uint tint_symbol_6 = tint_symbol.Load((4u * min(tint_symbol_2, (tint_symbol_11 - 1u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/bug/tint/1725.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/1725.wgsl.expected.fxc.hlsl
index cea26ec..d35f698 100644
--- a/test/tint/bug/tint/1725.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1725.wgsl.expected.fxc.hlsl
@@ -5,13 +5,13 @@
};
void tint_symbol_1_inner(uint tint_symbol_2) {
- uint tint_symbol_11 = 0u;
- tint_symbol.GetDimensions(tint_symbol_11);
- const uint tint_symbol_12 = (tint_symbol_11 / 4u);
+ uint tint_symbol_10 = 0u;
+ tint_symbol.GetDimensions(tint_symbol_10);
+ const uint tint_symbol_11 = (tint_symbol_10 / 4u);
const int tint_symbol_3 = 0;
const int tint_symbol_4 = 0;
const int tint_symbol_5 = 0;
- const uint tint_symbol_6 = tint_symbol.Load((4u * min(tint_symbol_2, (tint_symbol_12 - 1u))));
+ const uint tint_symbol_6 = tint_symbol.Load((4u * min(tint_symbol_2, (tint_symbol_11 - 1u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/bug/tint/1735.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/1735.wgsl.expected.dxc.hlsl
index 0843539..6bc1377 100644
--- a/test/tint/bug/tint/1735.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1735.wgsl.expected.dxc.hlsl
@@ -5,17 +5,17 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.f));
+void tint_symbol_1_store(uint offset, S value) {
+ tint_symbol_1.Store((offset + 0u), asuint(value.f));
}
-S tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- const S tint_symbol_6 = {asfloat(buffer.Load((offset + 0u)))};
- return tint_symbol_6;
+S tint_symbol_load(uint offset) {
+ const S tint_symbol_2 = {asfloat(tint_symbol.Load((offset + 0u)))};
+ return tint_symbol_2;
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/bug/tint/1735.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/1735.wgsl.expected.fxc.hlsl
index 0843539..6bc1377 100644
--- a/test/tint/bug/tint/1735.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1735.wgsl.expected.fxc.hlsl
@@ -5,17 +5,17 @@
ByteAddressBuffer tint_symbol : register(t0, space0);
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.f));
+void tint_symbol_1_store(uint offset, S value) {
+ tint_symbol_1.Store((offset + 0u), asuint(value.f));
}
-S tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
- const S tint_symbol_6 = {asfloat(buffer.Load((offset + 0u)))};
- return tint_symbol_6;
+S tint_symbol_load(uint offset) {
+ const S tint_symbol_2 = {asfloat(tint_symbol.Load((offset + 0u)))};
+ return tint_symbol_2;
}
[numthreads(1, 1, 1)]
void main() {
- tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
+ tint_symbol_1_store(0u, tint_symbol_load(0u));
return;
}
diff --git a/test/tint/bug/tint/1739.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/1739.wgsl.expected.dxc.hlsl
index d403968..1d22d68 100644
--- a/test/tint/bug/tint/1739.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1739.wgsl.expected.dxc.hlsl
@@ -52,14 +52,14 @@
return float4(color, 1.0f);
}
-float3x4 tint_symbol_6(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_8(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -68,32 +68,32 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_14 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_14;
+ const GammaTransferParams tint_symbol_4 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_4;
}
-float3x3 tint_symbol_10(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_12(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_4(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_15 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_6(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 64u)), tint_symbol_8(buffer, (offset + 96u)), tint_symbol_10(buffer, (offset + 128u)), tint_symbol_12(buffer, (offset + 176u))};
- return tint_symbol_15;
+ const ExternalTextureParams tint_symbol_5 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_5;
}
[numthreads(1, 1, 1)]
@@ -101,7 +101,7 @@
int2 tint_tmp;
t.GetDimensions(tint_tmp.x, tint_tmp.y);
const int2 tint_symbol = tint_clamp((10).xx, (0).xx, int2((uint2(tint_tmp) - (1u).xx)));
- float4 red = textureLoadExternal(t, ext_tex_plane_1, tint_symbol, tint_symbol_4(ext_tex_params, 0u));
+ float4 red = textureLoadExternal(t, ext_tex_plane_1, tint_symbol, ext_tex_params_load(0u));
int2 tint_tmp_1;
outImage.GetDimensions(tint_tmp_1.x, tint_tmp_1.y);
const int2 tint_symbol_1 = tint_clamp((0).xx, (0).xx, int2((uint2(tint_tmp_1) - (1u).xx)));
@@ -109,7 +109,7 @@
int2 tint_tmp_2;
t.GetDimensions(tint_tmp_2.x, tint_tmp_2.y);
const int2 tint_symbol_2 = tint_clamp(int2(70, 118), (0).xx, int2((uint2(tint_tmp_2) - (1u).xx)));
- float4 green = textureLoadExternal(t, ext_tex_plane_1, tint_symbol_2, tint_symbol_4(ext_tex_params, 0u));
+ float4 green = textureLoadExternal(t, ext_tex_plane_1, tint_symbol_2, ext_tex_params_load(0u));
int2 tint_tmp_3;
outImage.GetDimensions(tint_tmp_3.x, tint_tmp_3.y);
const int2 tint_symbol_3 = tint_clamp(int2(1, 0), (0).xx, int2((uint2(tint_tmp_3) - (1u).xx)));
diff --git a/test/tint/bug/tint/1739.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/1739.wgsl.expected.fxc.hlsl
index d403968..1d22d68 100644
--- a/test/tint/bug/tint/1739.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1739.wgsl.expected.fxc.hlsl
@@ -52,14 +52,14 @@
return float4(color, 1.0f);
}
-float3x4 tint_symbol_6(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_8(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -68,32 +68,32 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_14 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_14;
+ const GammaTransferParams tint_symbol_4 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_4;
}
-float3x3 tint_symbol_10(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_12(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_4(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_15 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_6(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 64u)), tint_symbol_8(buffer, (offset + 96u)), tint_symbol_10(buffer, (offset + 128u)), tint_symbol_12(buffer, (offset + 176u))};
- return tint_symbol_15;
+ const ExternalTextureParams tint_symbol_5 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_5;
}
[numthreads(1, 1, 1)]
@@ -101,7 +101,7 @@
int2 tint_tmp;
t.GetDimensions(tint_tmp.x, tint_tmp.y);
const int2 tint_symbol = tint_clamp((10).xx, (0).xx, int2((uint2(tint_tmp) - (1u).xx)));
- float4 red = textureLoadExternal(t, ext_tex_plane_1, tint_symbol, tint_symbol_4(ext_tex_params, 0u));
+ float4 red = textureLoadExternal(t, ext_tex_plane_1, tint_symbol, ext_tex_params_load(0u));
int2 tint_tmp_1;
outImage.GetDimensions(tint_tmp_1.x, tint_tmp_1.y);
const int2 tint_symbol_1 = tint_clamp((0).xx, (0).xx, int2((uint2(tint_tmp_1) - (1u).xx)));
@@ -109,7 +109,7 @@
int2 tint_tmp_2;
t.GetDimensions(tint_tmp_2.x, tint_tmp_2.y);
const int2 tint_symbol_2 = tint_clamp(int2(70, 118), (0).xx, int2((uint2(tint_tmp_2) - (1u).xx)));
- float4 green = textureLoadExternal(t, ext_tex_plane_1, tint_symbol_2, tint_symbol_4(ext_tex_params, 0u));
+ float4 green = textureLoadExternal(t, ext_tex_plane_1, tint_symbol_2, ext_tex_params_load(0u));
int2 tint_tmp_3;
outImage.GetDimensions(tint_tmp_3.x, tint_tmp_3.y);
const int2 tint_symbol_3 = tint_clamp(int2(1, 0), (0).xx, int2((uint2(tint_tmp_3) - (1u).xx)));
diff --git a/test/tint/bug/tint/1776.spvasm.expected.dxc.hlsl b/test/tint/bug/tint/1776.spvasm.expected.dxc.hlsl
index 1cd2986..f0a9375 100644
--- a/test/tint/bug/tint/1776.spvasm.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1776.spvasm.expected.dxc.hlsl
@@ -5,13 +5,13 @@
RWByteAddressBuffer sb : register(u0, space0);
-S tint_symbol(RWByteAddressBuffer buffer, uint offset) {
- const S tint_symbol_3 = {asfloat(buffer.Load4((offset + 0u))), asint(buffer.Load((offset + 16u)))};
- return tint_symbol_3;
+S sb_load(uint offset) {
+ const S tint_symbol = {asfloat(sb.Load4((offset + 0u))), asint(sb.Load((offset + 16u)))};
+ return tint_symbol;
}
void main_1() {
- const S x_18 = tint_symbol(sb, 32u);
+ const S x_18 = sb_load(32u);
return;
}
diff --git a/test/tint/bug/tint/1776.spvasm.expected.fxc.hlsl b/test/tint/bug/tint/1776.spvasm.expected.fxc.hlsl
index 1cd2986..f0a9375 100644
--- a/test/tint/bug/tint/1776.spvasm.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1776.spvasm.expected.fxc.hlsl
@@ -5,13 +5,13 @@
RWByteAddressBuffer sb : register(u0, space0);
-S tint_symbol(RWByteAddressBuffer buffer, uint offset) {
- const S tint_symbol_3 = {asfloat(buffer.Load4((offset + 0u))), asint(buffer.Load((offset + 16u)))};
- return tint_symbol_3;
+S sb_load(uint offset) {
+ const S tint_symbol = {asfloat(sb.Load4((offset + 0u))), asint(sb.Load((offset + 16u)))};
+ return tint_symbol;
}
void main_1() {
- const S x_18 = tint_symbol(sb, 32u);
+ const S x_18 = sb_load(32u);
return;
}
diff --git a/test/tint/bug/tint/1776.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/1776.wgsl.expected.dxc.hlsl
index 36f87a7..7251bee 100644
--- a/test/tint/bug/tint/1776.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1776.wgsl.expected.dxc.hlsl
@@ -5,13 +5,13 @@
ByteAddressBuffer sb : register(t0, space0);
-S tint_symbol(ByteAddressBuffer buffer, uint offset) {
- const S tint_symbol_3 = {asfloat(buffer.Load4((offset + 0u))), asint(buffer.Load((offset + 16u)))};
- return tint_symbol_3;
+S sb_load(uint offset) {
+ const S tint_symbol = {asfloat(sb.Load4((offset + 0u))), asint(sb.Load((offset + 16u)))};
+ return tint_symbol;
}
[numthreads(1, 1, 1)]
void main() {
- const S x = tint_symbol(sb, 32u);
+ const S x = sb_load(32u);
return;
}
diff --git a/test/tint/bug/tint/1776.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/1776.wgsl.expected.fxc.hlsl
index 36f87a7..7251bee 100644
--- a/test/tint/bug/tint/1776.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1776.wgsl.expected.fxc.hlsl
@@ -5,13 +5,13 @@
ByteAddressBuffer sb : register(t0, space0);
-S tint_symbol(ByteAddressBuffer buffer, uint offset) {
- const S tint_symbol_3 = {asfloat(buffer.Load4((offset + 0u))), asint(buffer.Load((offset + 16u)))};
- return tint_symbol_3;
+S sb_load(uint offset) {
+ const S tint_symbol = {asfloat(sb.Load4((offset + 0u))), asint(sb.Load((offset + 16u)))};
+ return tint_symbol;
}
[numthreads(1, 1, 1)]
void main() {
- const S x = tint_symbol(sb, 32u);
+ const S x = sb_load(32u);
return;
}
diff --git a/test/tint/bug/tint/403.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/403.wgsl.expected.dxc.hlsl
index de76d9e..dc91d1f 100644
--- a/test/tint/bug/tint/403.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/403.wgsl.expected.dxc.hlsl
@@ -12,29 +12,29 @@
float4 value : SV_Position;
};
-float2x2 tint_symbol_3(uint4 buffer[1], uint offset) {
+float2x2 x_20_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = x_20[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = x_20[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-float2x2 tint_symbol_5(uint4 buffer[1], uint offset) {
+float2x2 x_26_load(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = x_26[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = x_26[scalar_offset_3 / 4];
return float2x2(asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
float4 main_inner(uint gl_VertexIndex) {
float2 indexable[3] = (float2[3])0;
- const float2x2 x_23 = tint_symbol_3(x_20, 0u);
- const float2x2 x_28 = tint_symbol_5(x_26, 0u);
+ const float2x2 x_23 = x_20_load(0u);
+ const float2x2 x_28 = x_26_load(0u);
const uint x_46 = gl_VertexIndex;
- const float2 tint_symbol_7[3] = {float2(-1.0f, 1.0f), (1.0f).xx, (-1.0f).xx};
- indexable = tint_symbol_7;
+ const float2 tint_symbol_3[3] = {float2(-1.0f, 1.0f), (1.0f).xx, (-1.0f).xx};
+ indexable = tint_symbol_3;
const float2 x_51 = indexable[x_46];
const float2 x_52 = mul(x_51, float2x2((x_23[0u] + x_28[0u]), (x_23[1u] + x_28[1u])));
return float4(x_52.x, x_52.y, 0.0f, 1.0f);
diff --git a/test/tint/bug/tint/403.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/403.wgsl.expected.fxc.hlsl
index de76d9e..dc91d1f 100644
--- a/test/tint/bug/tint/403.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/403.wgsl.expected.fxc.hlsl
@@ -12,29 +12,29 @@
float4 value : SV_Position;
};
-float2x2 tint_symbol_3(uint4 buffer[1], uint offset) {
+float2x2 x_20_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = x_20[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = x_20[scalar_offset_1 / 4];
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
}
-float2x2 tint_symbol_5(uint4 buffer[1], uint offset) {
+float2x2 x_26_load(uint offset) {
const uint scalar_offset_2 = ((offset + 0u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = x_26[scalar_offset_2 / 4];
const uint scalar_offset_3 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_3 = x_26[scalar_offset_3 / 4];
return float2x2(asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_3.zw : ubo_load_3.xy)));
}
float4 main_inner(uint gl_VertexIndex) {
float2 indexable[3] = (float2[3])0;
- const float2x2 x_23 = tint_symbol_3(x_20, 0u);
- const float2x2 x_28 = tint_symbol_5(x_26, 0u);
+ const float2x2 x_23 = x_20_load(0u);
+ const float2x2 x_28 = x_26_load(0u);
const uint x_46 = gl_VertexIndex;
- const float2 tint_symbol_7[3] = {float2(-1.0f, 1.0f), (1.0f).xx, (-1.0f).xx};
- indexable = tint_symbol_7;
+ const float2 tint_symbol_3[3] = {float2(-1.0f, 1.0f), (1.0f).xx, (-1.0f).xx};
+ indexable = tint_symbol_3;
const float2 x_51 = indexable[x_46];
const float2 x_52 = mul(x_51, float2x2((x_23[0u] + x_28[0u]), (x_23[1u] + x_28[1u])));
return float4(x_52.x, x_52.y, 0.0f, 1.0f);
diff --git a/test/tint/bug/tint/870.spvasm.expected.dxc.hlsl b/test/tint/bug/tint/870.spvasm.expected.dxc.hlsl
index db19a18..413725e 100644
--- a/test/tint/bug/tint/870.spvasm.expected.dxc.hlsl
+++ b/test/tint/bug/tint/870.spvasm.expected.dxc.hlsl
@@ -1,11 +1,11 @@
ByteAddressBuffer sspp962805860buildInformation : register(t2, space0);
-typedef int tint_symbol_ret[6];
-tint_symbol_ret tint_symbol(ByteAddressBuffer buffer, uint offset) {
+typedef int sspp962805860buildInformation_load_ret[6];
+sspp962805860buildInformation_load_ret sspp962805860buildInformation_load(uint offset) {
int arr[6] = (int[6])0;
{
for(uint i = 0u; (i < 6u); i = (i + 1u)) {
- arr[i] = asint(buffer.Load((offset + (i * 4u))));
+ arr[i] = asint(sspp962805860buildInformation.Load((offset + (i * 4u))));
}
}
return arr;
@@ -13,7 +13,7 @@
void main_1() {
int orientation[6] = (int[6])0;
- const int x_23[6] = tint_symbol(sspp962805860buildInformation, 36u);
+ const int x_23[6] = sspp962805860buildInformation_load(36u);
orientation[0] = x_23[0u];
orientation[1] = x_23[1u];
orientation[2] = x_23[2u];
diff --git a/test/tint/bug/tint/870.spvasm.expected.fxc.hlsl b/test/tint/bug/tint/870.spvasm.expected.fxc.hlsl
index db19a18..413725e 100644
--- a/test/tint/bug/tint/870.spvasm.expected.fxc.hlsl
+++ b/test/tint/bug/tint/870.spvasm.expected.fxc.hlsl
@@ -1,11 +1,11 @@
ByteAddressBuffer sspp962805860buildInformation : register(t2, space0);
-typedef int tint_symbol_ret[6];
-tint_symbol_ret tint_symbol(ByteAddressBuffer buffer, uint offset) {
+typedef int sspp962805860buildInformation_load_ret[6];
+sspp962805860buildInformation_load_ret sspp962805860buildInformation_load(uint offset) {
int arr[6] = (int[6])0;
{
for(uint i = 0u; (i < 6u); i = (i + 1u)) {
- arr[i] = asint(buffer.Load((offset + (i * 4u))));
+ arr[i] = asint(sspp962805860buildInformation.Load((offset + (i * 4u))));
}
}
return arr;
@@ -13,7 +13,7 @@
void main_1() {
int orientation[6] = (int[6])0;
- const int x_23[6] = tint_symbol(sspp962805860buildInformation, 36u);
+ const int x_23[6] = sspp962805860buildInformation_load(36u);
orientation[0] = x_23[0u];
orientation[1] = x_23[1u];
orientation[2] = x_23[2u];
diff --git a/test/tint/bug/tint/922.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/922.wgsl.expected.dxc.hlsl
index c57e915..ff0591f 100644
--- a/test/tint/bug/tint/922.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/922.wgsl.expected.dxc.hlsl
@@ -209,35 +209,35 @@
return x_e12;
}
-Mat4x3_ tint_symbol_3(uint4 buffer[96], uint offset) {
+Mat4x3_ global2_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- const Mat4x3_ tint_symbol_9 = {asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4])};
- return tint_symbol_9;
+ const Mat4x3_ tint_symbol_3 = {asfloat(global2[scalar_offset / 4]), asfloat(global2[scalar_offset_1 / 4]), asfloat(global2[scalar_offset_2 / 4])};
+ return tint_symbol_3;
}
-Mat4x4_ tint_symbol_5(uint4 buffer[4], uint offset) {
+Mat4x4_ global_load(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 16u)) / 4;
const uint scalar_offset_5 = ((offset + 32u)) / 4;
const uint scalar_offset_6 = ((offset + 48u)) / 4;
- const Mat4x4_ tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4]), asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]), asfloat(buffer[scalar_offset_6 / 4])};
- return tint_symbol_10;
+ const Mat4x4_ tint_symbol_4 = {asfloat(global[scalar_offset_3 / 4]), asfloat(global[scalar_offset_4 / 4]), asfloat(global[scalar_offset_5 / 4]), asfloat(global[scalar_offset_6 / 4])};
+ return tint_symbol_4;
}
-Mat4x2_ tint_symbol_8(uint4 buffer[3], uint offset) {
+Mat4x2_ global1_load_1(uint offset) {
const uint scalar_offset_7 = ((offset + 0u)) / 4;
const uint scalar_offset_8 = ((offset + 16u)) / 4;
- const Mat4x2_ tint_symbol_11 = {asfloat(buffer[scalar_offset_7 / 4]), asfloat(buffer[scalar_offset_8 / 4])};
- return tint_symbol_11;
+ const Mat4x2_ tint_symbol_5 = {asfloat(global1[scalar_offset_7 / 4]), asfloat(global1[scalar_offset_8 / 4])};
+ return tint_symbol_5;
}
void main1() {
Mat4x3_ t_PosMtx = (Mat4x3_)0;
float2 t_TexSpaceCoord = float2(0.0f, 0.0f);
const float x_e15 = a_PosMtxIdx1;
- const Mat4x3_ x_e18 = tint_symbol_3(global2, (48u * uint(int(x_e15))));
+ const Mat4x3_ x_e18 = global2_load((48u * uint(int(x_e15))));
t_PosMtx = x_e18;
const Mat4x3_ x_e23 = t_PosMtx;
const Mat4x4_ x_e24 = x_Mat4x4_1(x_e23);
@@ -246,7 +246,7 @@
const Mat4x4_ x_e30 = x_Mat4x4_1(x_e29);
const float3 x_e31 = a_Position1;
const float4 x_e34 = Mul(x_e30, float4(x_e31, 1.0f));
- const Mat4x4_ x_e35 = tint_symbol_5(global, 0u);
+ const Mat4x4_ x_e35 = global_load(0u);
const Mat4x3_ x_e37 = t_PosMtx;
const Mat4x4_ x_e38 = x_Mat4x4_1(x_e37);
const float3 x_e39 = a_Position1;
@@ -262,7 +262,7 @@
if ((x_e52.x == 2.0f)) {
{
const float3 x_e59 = a_Normal1;
- const Mat4x2_ x_e64 = tint_symbol_8(global1, 0u);
+ const Mat4x2_ x_e64 = global1_load_1(0u);
const float3 x_e65 = a_Normal1;
const float2 x_e68 = Mul2(x_e64, float4(x_e65, 1.0f));
v_TexCoord = x_e68.xy;
@@ -271,7 +271,7 @@
} else {
{
const float2 x_e73 = a_UV1;
- const Mat4x2_ x_e79 = tint_symbol_8(global1, 0u);
+ const Mat4x2_ x_e79 = global1_load_1(0u);
const float2 x_e80 = a_UV1;
const float2 x_e84 = Mul2(x_e79, float4(x_e80, 1.0f, 1.0f));
v_TexCoord = x_e84.xy;
@@ -303,8 +303,8 @@
const float4 x_e11 = v_Color;
const float2 x_e13 = v_TexCoord;
const float4 x_e15 = gl_Position;
- const VertexOutput tint_symbol_12 = {x_e11, x_e13, x_e15};
- return tint_symbol_12;
+ const VertexOutput tint_symbol_6 = {x_e11, x_e13, x_e15};
+ return tint_symbol_6;
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
diff --git a/test/tint/bug/tint/922.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/922.wgsl.expected.fxc.hlsl
index c57e915..ff0591f 100644
--- a/test/tint/bug/tint/922.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/922.wgsl.expected.fxc.hlsl
@@ -209,35 +209,35 @@
return x_e12;
}
-Mat4x3_ tint_symbol_3(uint4 buffer[96], uint offset) {
+Mat4x3_ global2_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- const Mat4x3_ tint_symbol_9 = {asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4])};
- return tint_symbol_9;
+ const Mat4x3_ tint_symbol_3 = {asfloat(global2[scalar_offset / 4]), asfloat(global2[scalar_offset_1 / 4]), asfloat(global2[scalar_offset_2 / 4])};
+ return tint_symbol_3;
}
-Mat4x4_ tint_symbol_5(uint4 buffer[4], uint offset) {
+Mat4x4_ global_load(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 16u)) / 4;
const uint scalar_offset_5 = ((offset + 32u)) / 4;
const uint scalar_offset_6 = ((offset + 48u)) / 4;
- const Mat4x4_ tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4]), asfloat(buffer[scalar_offset_4 / 4]), asfloat(buffer[scalar_offset_5 / 4]), asfloat(buffer[scalar_offset_6 / 4])};
- return tint_symbol_10;
+ const Mat4x4_ tint_symbol_4 = {asfloat(global[scalar_offset_3 / 4]), asfloat(global[scalar_offset_4 / 4]), asfloat(global[scalar_offset_5 / 4]), asfloat(global[scalar_offset_6 / 4])};
+ return tint_symbol_4;
}
-Mat4x2_ tint_symbol_8(uint4 buffer[3], uint offset) {
+Mat4x2_ global1_load_1(uint offset) {
const uint scalar_offset_7 = ((offset + 0u)) / 4;
const uint scalar_offset_8 = ((offset + 16u)) / 4;
- const Mat4x2_ tint_symbol_11 = {asfloat(buffer[scalar_offset_7 / 4]), asfloat(buffer[scalar_offset_8 / 4])};
- return tint_symbol_11;
+ const Mat4x2_ tint_symbol_5 = {asfloat(global1[scalar_offset_7 / 4]), asfloat(global1[scalar_offset_8 / 4])};
+ return tint_symbol_5;
}
void main1() {
Mat4x3_ t_PosMtx = (Mat4x3_)0;
float2 t_TexSpaceCoord = float2(0.0f, 0.0f);
const float x_e15 = a_PosMtxIdx1;
- const Mat4x3_ x_e18 = tint_symbol_3(global2, (48u * uint(int(x_e15))));
+ const Mat4x3_ x_e18 = global2_load((48u * uint(int(x_e15))));
t_PosMtx = x_e18;
const Mat4x3_ x_e23 = t_PosMtx;
const Mat4x4_ x_e24 = x_Mat4x4_1(x_e23);
@@ -246,7 +246,7 @@
const Mat4x4_ x_e30 = x_Mat4x4_1(x_e29);
const float3 x_e31 = a_Position1;
const float4 x_e34 = Mul(x_e30, float4(x_e31, 1.0f));
- const Mat4x4_ x_e35 = tint_symbol_5(global, 0u);
+ const Mat4x4_ x_e35 = global_load(0u);
const Mat4x3_ x_e37 = t_PosMtx;
const Mat4x4_ x_e38 = x_Mat4x4_1(x_e37);
const float3 x_e39 = a_Position1;
@@ -262,7 +262,7 @@
if ((x_e52.x == 2.0f)) {
{
const float3 x_e59 = a_Normal1;
- const Mat4x2_ x_e64 = tint_symbol_8(global1, 0u);
+ const Mat4x2_ x_e64 = global1_load_1(0u);
const float3 x_e65 = a_Normal1;
const float2 x_e68 = Mul2(x_e64, float4(x_e65, 1.0f));
v_TexCoord = x_e68.xy;
@@ -271,7 +271,7 @@
} else {
{
const float2 x_e73 = a_UV1;
- const Mat4x2_ x_e79 = tint_symbol_8(global1, 0u);
+ const Mat4x2_ x_e79 = global1_load_1(0u);
const float2 x_e80 = a_UV1;
const float2 x_e84 = Mul2(x_e79, float4(x_e80, 1.0f, 1.0f));
v_TexCoord = x_e84.xy;
@@ -303,8 +303,8 @@
const float4 x_e11 = v_Color;
const float2 x_e13 = v_TexCoord;
const float4 x_e15 = gl_Position;
- const VertexOutput tint_symbol_12 = {x_e11, x_e13, x_e15};
- return tint_symbol_12;
+ const VertexOutput tint_symbol_6 = {x_e11, x_e13, x_e15};
+ return tint_symbol_6;
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
diff --git a/test/tint/bug/tint/926.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/926.wgsl.expected.dxc.hlsl
index f5ed4b6..fc0cd0f 100644
--- a/test/tint/bug/tint/926.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/926.wgsl.expected.dxc.hlsl
@@ -5,15 +5,15 @@
uint3 global_id : SV_DispatchThreadID;
};
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint drawOutatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ drawOut.InterlockedAdd(offset, value, original_value);
return original_value;
}
void computeMain_inner(uint3 global_id) {
- const uint firstVertex = tint_atomicAdd(drawOut, 0u, cubeVerts);
+ const uint firstVertex = drawOutatomicAdd(0u, cubeVerts);
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/bug/tint/926.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/926.wgsl.expected.fxc.hlsl
index f5ed4b6..fc0cd0f 100644
--- a/test/tint/bug/tint/926.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/926.wgsl.expected.fxc.hlsl
@@ -5,15 +5,15 @@
uint3 global_id : SV_DispatchThreadID;
};
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint drawOutatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ drawOut.InterlockedAdd(offset, value, original_value);
return original_value;
}
void computeMain_inner(uint3 global_id) {
- const uint firstVertex = tint_atomicAdd(drawOut, 0u, cubeVerts);
+ const uint firstVertex = drawOutatomicAdd(0u, cubeVerts);
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/bug/tint/948.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/948.wgsl.expected.dxc.hlsl
index 306658c..22b7bcf 100644
--- a/test/tint/bug/tint/948.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/948.wgsl.expected.dxc.hlsl
@@ -210,8 +210,8 @@
vPosition = vPosition_param;
vUV = vUV_param;
main_1();
- const main_out tint_symbol_6 = {glFragColor};
- return tint_symbol_6;
+ const main_out tint_symbol_3 = {glFragColor};
+ return tint_symbol_3;
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
diff --git a/test/tint/bug/tint/948.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/948.wgsl.expected.fxc.hlsl
index 306658c..22b7bcf 100644
--- a/test/tint/bug/tint/948.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/948.wgsl.expected.fxc.hlsl
@@ -210,8 +210,8 @@
vPosition = vPosition_param;
vUV = vUV_param;
main_1();
- const main_out tint_symbol_6 = {glFragColor};
- return tint_symbol_6;
+ const main_out tint_symbol_3 = {glFragColor};
+ return tint_symbol_3;
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
diff --git a/test/tint/bug/tint/949.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/949.wgsl.expected.dxc.hlsl
index 6a0b48d..fc77310 100644
--- a/test/tint/bug/tint/949.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/949.wgsl.expected.dxc.hlsl
@@ -419,8 +419,8 @@
v_uv = v_uv_param;
v_output2 = v_output2_param;
main_1();
- const main_out tint_symbol_8 = {glFragColor};
- return tint_symbol_8;
+ const main_out tint_symbol_3 = {glFragColor};
+ return tint_symbol_3;
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
diff --git a/test/tint/bug/tint/949.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/949.wgsl.expected.fxc.hlsl
index 6a0b48d..fc77310 100644
--- a/test/tint/bug/tint/949.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/949.wgsl.expected.fxc.hlsl
@@ -419,8 +419,8 @@
v_uv = v_uv_param;
v_output2 = v_output2_param;
main_1();
- const main_out tint_symbol_8 = {glFragColor};
- return tint_symbol_8;
+ const main_out tint_symbol_3 = {glFragColor};
+ return tint_symbol_3;
}
tint_symbol_2 main(tint_symbol_1 tint_symbol) {
diff --git a/test/tint/bug/tint/993.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/993.wgsl.expected.dxc.hlsl
index 6ec8aed..b08eb3f 100644
--- a/test/tint/bug/tint/993.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/993.wgsl.expected.dxc.hlsl
@@ -6,15 +6,15 @@
RWByteAddressBuffer s : register(u0, space0);
-int tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+int satomicLoad(uint offset) {
int value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ s.InterlockedOr(offset, 0, value);
return value;
}
int runTest() {
- return tint_atomicLoad(s, (4u * (0u + uint(constants[0].x))));
+ return satomicLoad((4u * (0u + uint(constants[0].x))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/bug/tint/993.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/993.wgsl.expected.fxc.hlsl
index 6ec8aed..b08eb3f 100644
--- a/test/tint/bug/tint/993.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/993.wgsl.expected.fxc.hlsl
@@ -6,15 +6,15 @@
RWByteAddressBuffer s : register(u0, space0);
-int tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+int satomicLoad(uint offset) {
int value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ s.InterlockedOr(offset, 0, value);
return value;
}
int runTest() {
- return tint_atomicLoad(s, (4u * (0u + uint(constants[0].x))));
+ return satomicLoad((4u * (0u + uint(constants[0].x))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_i32.spvasm.expected.dxc.hlsl
index 358487b..b367bec 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_d32fe4() {
int res = 0;
- const int x_9 = tint_atomicAdd(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicAdd(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_i32.spvasm.expected.fxc.hlsl
index 358487b..b367bec 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_d32fe4() {
int res = 0;
- const int x_9 = tint_atomicAdd(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicAdd(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_u32.spvasm.expected.dxc.hlsl
index bdc43b0..bc6bf1a 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_8a199a() {
uint res = 0u;
- const uint x_9 = tint_atomicAdd(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicAdd(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_u32.spvasm.expected.fxc.hlsl
index bdc43b0..bc6bf1a 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicAdd/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_8a199a() {
uint res = 0u;
- const uint x_9 = tint_atomicAdd(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicAdd(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_i32.spvasm.expected.dxc.hlsl
index 0cc23ee..aa78a4e 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAnd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
void atomicAnd_152966() {
int res = 0;
- const int x_9 = tint_atomicAnd(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicAnd(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_i32.spvasm.expected.fxc.hlsl
index 0cc23ee..aa78a4e 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAnd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
void atomicAnd_152966() {
int res = 0;
- const int x_9 = tint_atomicAnd(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicAnd(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_u32.spvasm.expected.dxc.hlsl
index 897165d..4c19fe5 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAnd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
void atomicAnd_85a8d9() {
uint res = 0u;
- const uint x_9 = tint_atomicAnd(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicAnd(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_u32.spvasm.expected.fxc.hlsl
index 897165d..4c19fe5 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicAnd/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAnd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
void atomicAnd_85a8d9() {
uint res = 0u;
- const uint x_9 = tint_atomicAnd(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicAnd(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.dxc.hlsl
index d818bce..39e134c 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.dxc.hlsl
@@ -10,9 +10,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, int compare, int value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, int compare, int value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -20,7 +20,7 @@
void atomicCompareExchangeWeak_1bd40a() {
x__atomic_compare_exchange_resulti32 res = (x__atomic_compare_exchange_resulti32)0;
- const atomic_compare_exchange_weak_ret_type tint_symbol = tint_atomicCompareExchangeWeak(sb_rw, 0u, 1, 1);
+ const atomic_compare_exchange_weak_ret_type tint_symbol = sb_rwatomicCompareExchangeWeak(0u, 1, 1);
const int old_value_1 = tint_symbol.old_value;
const int x_19 = old_value_1;
const x__atomic_compare_exchange_resulti32 tint_symbol_1 = {x_19, (x_19 == 1)};
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.fxc.hlsl
index d818bce..39e134c 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.fxc.hlsl
@@ -10,9 +10,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, int compare, int value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, int compare, int value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -20,7 +20,7 @@
void atomicCompareExchangeWeak_1bd40a() {
x__atomic_compare_exchange_resulti32 res = (x__atomic_compare_exchange_resulti32)0;
- const atomic_compare_exchange_weak_ret_type tint_symbol = tint_atomicCompareExchangeWeak(sb_rw, 0u, 1, 1);
+ const atomic_compare_exchange_weak_ret_type tint_symbol = sb_rwatomicCompareExchangeWeak(0u, 1, 1);
const int old_value_1 = tint_symbol.old_value;
const int x_19 = old_value_1;
const x__atomic_compare_exchange_resulti32 tint_symbol_1 = {x_19, (x_19 == 1)};
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.dxc.hlsl
index 5d1bfd6..227361b 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.dxc.hlsl
@@ -10,9 +10,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, uint compare, uint value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, uint compare, uint value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -20,7 +20,7 @@
void atomicCompareExchangeWeak_63d8e6() {
x__atomic_compare_exchange_resultu32 res = (x__atomic_compare_exchange_resultu32)0;
- const atomic_compare_exchange_weak_ret_type tint_symbol = tint_atomicCompareExchangeWeak(sb_rw, 0u, 1u, 1u);
+ const atomic_compare_exchange_weak_ret_type tint_symbol = sb_rwatomicCompareExchangeWeak(0u, 1u, 1u);
const uint old_value_1 = tint_symbol.old_value;
const uint x_17 = old_value_1;
const x__atomic_compare_exchange_resultu32 tint_symbol_1 = {x_17, (x_17 == 1u)};
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.fxc.hlsl
index 5d1bfd6..227361b 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.fxc.hlsl
@@ -10,9 +10,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, uint compare, uint value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, uint compare, uint value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -20,7 +20,7 @@
void atomicCompareExchangeWeak_63d8e6() {
x__atomic_compare_exchange_resultu32 res = (x__atomic_compare_exchange_resultu32)0;
- const atomic_compare_exchange_weak_ret_type tint_symbol = tint_atomicCompareExchangeWeak(sb_rw, 0u, 1u, 1u);
+ const atomic_compare_exchange_weak_ret_type tint_symbol = sb_rwatomicCompareExchangeWeak(0u, 1u, 1u);
const uint old_value_1 = tint_symbol.old_value;
const uint x_17 = old_value_1;
const x__atomic_compare_exchange_resultu32 tint_symbol_1 = {x_17, (x_17 == 1u)};
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_i32.spvasm.expected.dxc.hlsl
index deffe11..8bfa8d9 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicExchange(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
void atomicExchange_f2e22f() {
int res = 0;
- const int x_9 = tint_atomicExchange(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicExchange(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_i32.spvasm.expected.fxc.hlsl
index deffe11..8bfa8d9 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicExchange(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
void atomicExchange_f2e22f() {
int res = 0;
- const int x_9 = tint_atomicExchange(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicExchange(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_u32.spvasm.expected.dxc.hlsl
index 7b20c96..e5ff0d0 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicExchange(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
void atomicExchange_d59712() {
uint res = 0u;
- const uint x_9 = tint_atomicExchange(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicExchange(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_u32.spvasm.expected.fxc.hlsl
index 7b20c96..e5ff0d0 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicExchange/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicExchange(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
void atomicExchange_d59712() {
uint res = 0u;
- const uint x_9 = tint_atomicExchange(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicExchange(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_i32.spvasm.expected.dxc.hlsl
index 8ce9cf2..e26e9e6 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+int sb_rwatomicLoad(uint offset) {
int value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_0806ad() {
int res = 0;
- const int x_9 = tint_atomicLoad(sb_rw, 0u);
+ const int x_9 = sb_rwatomicLoad(0u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_i32.spvasm.expected.fxc.hlsl
index 8ce9cf2..e26e9e6 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+int sb_rwatomicLoad(uint offset) {
int value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_0806ad() {
int res = 0;
- const int x_9 = tint_atomicLoad(sb_rw, 0u);
+ const int x_9 = sb_rwatomicLoad(0u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_u32.spvasm.expected.dxc.hlsl
index 454ed3c..dd3bbf5 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+uint sb_rwatomicLoad(uint offset) {
uint value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_fe6cc3() {
uint res = 0u;
- const uint x_9 = tint_atomicLoad(sb_rw, 0u);
+ const uint x_9 = sb_rwatomicLoad(0u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_u32.spvasm.expected.fxc.hlsl
index 454ed3c..dd3bbf5 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicLoad/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+uint sb_rwatomicLoad(uint offset) {
uint value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_fe6cc3() {
uint res = 0u;
- const uint x_9 = tint_atomicLoad(sb_rw, 0u);
+ const uint x_9 = sb_rwatomicLoad(0u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_i32.spvasm.expected.dxc.hlsl
index 4fd3948..2fd2f17 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMax(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMax(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
void atomicMax_92aa72() {
int res = 0;
- const int x_9 = tint_atomicMax(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicMax(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_i32.spvasm.expected.fxc.hlsl
index 4fd3948..2fd2f17 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMax(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMax(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
void atomicMax_92aa72() {
int res = 0;
- const int x_9 = tint_atomicMax(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicMax(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_u32.spvasm.expected.dxc.hlsl
index 9934904..b9fb452 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMax(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMax(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
void atomicMax_51b9be() {
uint res = 0u;
- const uint x_9 = tint_atomicMax(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicMax(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_u32.spvasm.expected.fxc.hlsl
index 9934904..b9fb452 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicMax/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMax(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMax(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
void atomicMax_51b9be() {
uint res = 0u;
- const uint x_9 = tint_atomicMax(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicMax(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_i32.spvasm.expected.dxc.hlsl
index efe6471..d749f21 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMin(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMin(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
void atomicMin_8e38dc() {
int res = 0;
- const int x_9 = tint_atomicMin(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicMin(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_i32.spvasm.expected.fxc.hlsl
index efe6471..d749f21 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMin(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMin(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
void atomicMin_8e38dc() {
int res = 0;
- const int x_9 = tint_atomicMin(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicMin(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_u32.spvasm.expected.dxc.hlsl
index 1bb4ca0..03d2e51 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMin(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMin(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
void atomicMin_c67a74() {
uint res = 0u;
- const uint x_9 = tint_atomicMin(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicMin(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_u32.spvasm.expected.fxc.hlsl
index 1bb4ca0..03d2e51 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicMin/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMin(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMin(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
void atomicMin_c67a74() {
uint res = 0u;
- const uint x_9 = tint_atomicMin(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicMin(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_i32.spvasm.expected.dxc.hlsl
index f9e84d9..b99451d 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicOr(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicOr(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
void atomicOr_8d96a0() {
int res = 0;
- const int x_9 = tint_atomicOr(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicOr(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_i32.spvasm.expected.fxc.hlsl
index f9e84d9..b99451d 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicOr(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicOr(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
void atomicOr_8d96a0() {
int res = 0;
- const int x_9 = tint_atomicOr(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicOr(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_u32.spvasm.expected.dxc.hlsl
index b0ac7e6..53d57fa 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicOr(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicOr(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
void atomicOr_5e95d4() {
uint res = 0u;
- const uint x_9 = tint_atomicOr(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicOr(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_u32.spvasm.expected.fxc.hlsl
index b0ac7e6..53d57fa 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicOr/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicOr(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicOr(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
void atomicOr_5e95d4() {
uint res = 0u;
- const uint x_9 = tint_atomicOr(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicOr(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_i32.spvasm.expected.dxc.hlsl
index 5ef62c9..5e9f5ec 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,13 +1,13 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, int value) {
+void sb_rwatomicStore(uint offset, int value) {
int ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
void atomicStore_d1e9a6() {
- tint_atomicStore(sb_rw, 0u, 1);
+ sb_rwatomicStore(0u, 1);
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_i32.spvasm.expected.fxc.hlsl
index 5ef62c9..5e9f5ec 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,13 +1,13 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, int value) {
+void sb_rwatomicStore(uint offset, int value) {
int ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
void atomicStore_d1e9a6() {
- tint_atomicStore(sb_rw, 0u, 1);
+ sb_rwatomicStore(0u, 1);
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_u32.spvasm.expected.dxc.hlsl
index 259c472..3b823de 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,13 +1,13 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, uint value) {
+void sb_rwatomicStore(uint offset, uint value) {
uint ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
void atomicStore_cdc29e() {
- tint_atomicStore(sb_rw, 0u, 1u);
+ sb_rwatomicStore(0u, 1u);
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_u32.spvasm.expected.fxc.hlsl
index 259c472..3b823de 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicStore/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,13 +1,13 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, uint value) {
+void sb_rwatomicStore(uint offset, uint value) {
uint ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
void atomicStore_cdc29e() {
- tint_atomicStore(sb_rw, 0u, 1u);
+ sb_rwatomicStore(0u, 1u);
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_i32.spvasm.expected.dxc.hlsl
index 3624845..7bc33bf 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicSub(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicSub(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicSub_051100() {
int res = 0;
- const int x_9 = tint_atomicSub(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicSub(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_i32.spvasm.expected.fxc.hlsl
index 3624845..7bc33bf 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicSub(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicSub(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicSub_051100() {
int res = 0;
- const int x_9 = tint_atomicSub(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicSub(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_u32.spvasm.expected.dxc.hlsl
index 1bcbe09..0bcd892 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicSub(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicSub(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicSub_15bfc9() {
uint res = 0u;
- const uint x_9 = tint_atomicSub(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicSub(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_u32.spvasm.expected.fxc.hlsl
index 1bcbe09..0bcd892 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicSub/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicSub(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicSub(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicSub_15bfc9() {
uint res = 0u;
- const uint x_9 = tint_atomicSub(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicSub(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_i32.spvasm.expected.dxc.hlsl
index 605a4d7..d9c6d9b 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicXor(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicXor(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
void atomicXor_c1b78c() {
int res = 0;
- const int x_9 = tint_atomicXor(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicXor(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_i32.spvasm.expected.fxc.hlsl
index 605a4d7..d9c6d9b 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicXor(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicXor(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
void atomicXor_c1b78c() {
int res = 0;
- const int x_9 = tint_atomicXor(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicXor(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_u32.spvasm.expected.dxc.hlsl
index 3c2aad7..36e2a37 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicXor(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicXor(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
void atomicXor_54510e() {
uint res = 0u;
- const uint x_9 = tint_atomicXor(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicXor(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_u32.spvasm.expected.fxc.hlsl
index 3c2aad7..36e2a37 100644
--- a/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/atomicXor/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicXor(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicXor(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
void atomicXor_54510e() {
uint res = 0u;
- const uint x_9 = tint_atomicXor(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicXor(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_i32.spvasm.expected.dxc.hlsl
index ab2b1ee..a53e9e7 100644
--- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicSub(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicSub(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicAdd_d32fe4() {
int res = 0;
- const int x_9 = tint_atomicSub(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicSub(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_i32.spvasm.expected.fxc.hlsl
index ab2b1ee..a53e9e7 100644
--- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicSub(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicSub(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicAdd_d32fe4() {
int res = 0;
- const int x_9 = tint_atomicSub(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicSub(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_u32.spvasm.expected.dxc.hlsl
index 6f0bb19..208f037 100644
--- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicSub(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicSub(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicAdd_8a199a() {
uint res = 0u;
- const uint x_9 = tint_atomicSub(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicSub(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_u32.spvasm.expected.fxc.hlsl
index 6f0bb19..208f037 100644
--- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicDecrement/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicSub(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicSub(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicAdd_8a199a() {
uint res = 0u;
- const uint x_9 = tint_atomicSub(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicSub(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_i32.spvasm.expected.dxc.hlsl
index 358487b..b367bec 100644
--- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_d32fe4() {
int res = 0;
- const int x_9 = tint_atomicAdd(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicAdd(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_i32.spvasm.expected.fxc.hlsl
index 358487b..b367bec 100644
--- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_d32fe4() {
int res = 0;
- const int x_9 = tint_atomicAdd(sb_rw, 0u, 1);
+ const int x_9 = sb_rwatomicAdd(0u, 1);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_u32.spvasm.expected.dxc.hlsl
index bdc43b0..bc6bf1a 100644
--- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_8a199a() {
uint res = 0u;
- const uint x_9 = tint_atomicAdd(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicAdd(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_u32.spvasm.expected.fxc.hlsl
index bdc43b0..bc6bf1a 100644
--- a/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/literal/spvAtomicIncrement/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_8a199a() {
uint res = 0u;
- const uint x_9 = tint_atomicAdd(sb_rw, 0u, 1u);
+ const uint x_9 = sb_rwatomicAdd(0u, 1u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_i32.spvasm.expected.dxc.hlsl
index c8e31ae..f362145 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicAdd(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicAdd(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_i32.spvasm.expected.fxc.hlsl
index c8e31ae..f362145 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicAdd(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicAdd(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_u32.spvasm.expected.dxc.hlsl
index e655ec0..ae4f759 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicAdd(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicAdd(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_u32.spvasm.expected.fxc.hlsl
index e655ec0..ae4f759 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicAdd/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicAdd(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicAdd(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_i32.spvasm.expected.dxc.hlsl
index fc213fb..c72e4ed 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAnd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicAnd(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicAnd(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_i32.spvasm.expected.fxc.hlsl
index fc213fb..c72e4ed 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAnd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicAnd(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicAnd(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_u32.spvasm.expected.dxc.hlsl
index e8e9bef..07d19f6 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAnd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicAnd(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicAnd(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_u32.spvasm.expected.fxc.hlsl
index e8e9bef..07d19f6 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicAnd/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAnd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicAnd(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicAnd(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.dxc.hlsl
index 43cd8a8..b1a5ec8 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.dxc.hlsl
@@ -10,9 +10,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, int compare, int value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, int compare, int value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -26,7 +26,7 @@
arg_2 = 1;
const int x_23 = arg_2;
const int x_24 = arg_1;
- const atomic_compare_exchange_weak_ret_type tint_symbol = tint_atomicCompareExchangeWeak(sb_rw, 0u, x_24, x_23);
+ const atomic_compare_exchange_weak_ret_type tint_symbol = sb_rwatomicCompareExchangeWeak(0u, x_24, x_23);
const int old_value_1 = tint_symbol.old_value;
const int x_25 = old_value_1;
const x__atomic_compare_exchange_resulti32 tint_symbol_1 = {x_25, (x_25 == x_23)};
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.fxc.hlsl
index 43cd8a8..b1a5ec8 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.fxc.hlsl
@@ -10,9 +10,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, int compare, int value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, int compare, int value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -26,7 +26,7 @@
arg_2 = 1;
const int x_23 = arg_2;
const int x_24 = arg_1;
- const atomic_compare_exchange_weak_ret_type tint_symbol = tint_atomicCompareExchangeWeak(sb_rw, 0u, x_24, x_23);
+ const atomic_compare_exchange_weak_ret_type tint_symbol = sb_rwatomicCompareExchangeWeak(0u, x_24, x_23);
const int old_value_1 = tint_symbol.old_value;
const int x_25 = old_value_1;
const x__atomic_compare_exchange_resulti32 tint_symbol_1 = {x_25, (x_25 == x_23)};
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.dxc.hlsl
index c273046..d9703fa 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.dxc.hlsl
@@ -10,9 +10,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, uint compare, uint value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, uint compare, uint value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -26,7 +26,7 @@
arg_2 = 1u;
const uint x_21 = arg_2;
const uint x_22 = arg_1;
- const atomic_compare_exchange_weak_ret_type tint_symbol = tint_atomicCompareExchangeWeak(sb_rw, 0u, x_22, x_21);
+ const atomic_compare_exchange_weak_ret_type tint_symbol = sb_rwatomicCompareExchangeWeak(0u, x_22, x_21);
const uint old_value_1 = tint_symbol.old_value;
const uint x_23 = old_value_1;
const x__atomic_compare_exchange_resultu32 tint_symbol_1 = {x_23, (x_23 == x_21)};
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.fxc.hlsl
index c273046..d9703fa 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.fxc.hlsl
@@ -10,9 +10,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, uint compare, uint value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, uint compare, uint value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -26,7 +26,7 @@
arg_2 = 1u;
const uint x_21 = arg_2;
const uint x_22 = arg_1;
- const atomic_compare_exchange_weak_ret_type tint_symbol = tint_atomicCompareExchangeWeak(sb_rw, 0u, x_22, x_21);
+ const atomic_compare_exchange_weak_ret_type tint_symbol = sb_rwatomicCompareExchangeWeak(0u, x_22, x_21);
const uint old_value_1 = tint_symbol.old_value;
const uint x_23 = old_value_1;
const x__atomic_compare_exchange_resultu32 tint_symbol_1 = {x_23, (x_23 == x_21)};
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_i32.spvasm.expected.dxc.hlsl
index 2ad41c1..07bf675 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicExchange(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicExchange(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicExchange(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_i32.spvasm.expected.fxc.hlsl
index 2ad41c1..07bf675 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicExchange(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicExchange(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicExchange(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_u32.spvasm.expected.dxc.hlsl
index aa54a99..873c4ee 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicExchange(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicExchange(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicExchange(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_u32.spvasm.expected.fxc.hlsl
index aa54a99..873c4ee 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicExchange/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicExchange(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicExchange(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicExchange(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_i32.spvasm.expected.dxc.hlsl
index 8ce9cf2..e26e9e6 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+int sb_rwatomicLoad(uint offset) {
int value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_0806ad() {
int res = 0;
- const int x_9 = tint_atomicLoad(sb_rw, 0u);
+ const int x_9 = sb_rwatomicLoad(0u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_i32.spvasm.expected.fxc.hlsl
index 8ce9cf2..e26e9e6 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+int sb_rwatomicLoad(uint offset) {
int value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_0806ad() {
int res = 0;
- const int x_9 = tint_atomicLoad(sb_rw, 0u);
+ const int x_9 = sb_rwatomicLoad(0u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_u32.spvasm.expected.dxc.hlsl
index 454ed3c..dd3bbf5 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+uint sb_rwatomicLoad(uint offset) {
uint value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_fe6cc3() {
uint res = 0u;
- const uint x_9 = tint_atomicLoad(sb_rw, 0u);
+ const uint x_9 = sb_rwatomicLoad(0u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_u32.spvasm.expected.fxc.hlsl
index 454ed3c..dd3bbf5 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicLoad/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+uint sb_rwatomicLoad(uint offset) {
uint value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_fe6cc3() {
uint res = 0u;
- const uint x_9 = tint_atomicLoad(sb_rw, 0u);
+ const uint x_9 = sb_rwatomicLoad(0u);
res = x_9;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_i32.spvasm.expected.dxc.hlsl
index 6ae98c5..7b50181 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMax(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMax(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicMax(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicMax(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_i32.spvasm.expected.fxc.hlsl
index 6ae98c5..7b50181 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMax(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMax(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicMax(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicMax(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_u32.spvasm.expected.dxc.hlsl
index 209772a..9a493f2 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMax(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMax(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicMax(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicMax(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_u32.spvasm.expected.fxc.hlsl
index 209772a..9a493f2 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicMax/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMax(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMax(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicMax(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicMax(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_i32.spvasm.expected.dxc.hlsl
index b28650b..1c0f0a4 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMin(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMin(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicMin(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicMin(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_i32.spvasm.expected.fxc.hlsl
index b28650b..1c0f0a4 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMin(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMin(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicMin(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicMin(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_u32.spvasm.expected.dxc.hlsl
index d46a572..a59f8fc 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMin(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMin(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicMin(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicMin(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_u32.spvasm.expected.fxc.hlsl
index d46a572..a59f8fc 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicMin/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMin(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMin(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicMin(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicMin(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_i32.spvasm.expected.dxc.hlsl
index a937978..168488e 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicOr(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicOr(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicOr(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicOr(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_i32.spvasm.expected.fxc.hlsl
index a937978..168488e 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicOr(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicOr(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicOr(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicOr(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_u32.spvasm.expected.dxc.hlsl
index 781fb34..46c211f 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicOr(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicOr(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicOr(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicOr(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_u32.spvasm.expected.fxc.hlsl
index 781fb34..46c211f 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicOr/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicOr(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicOr(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicOr(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicOr(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_i32.spvasm.expected.dxc.hlsl
index 4cd4ba7..97fa7c1 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, int value) {
+void sb_rwatomicStore(uint offset, int value) {
int ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
@@ -10,7 +10,7 @@
int arg_1 = 0;
arg_1 = 1;
const int x_20 = arg_1;
- tint_atomicStore(sb_rw, 0u, x_20);
+ sb_rwatomicStore(0u, x_20);
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_i32.spvasm.expected.fxc.hlsl
index 4cd4ba7..97fa7c1 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, int value) {
+void sb_rwatomicStore(uint offset, int value) {
int ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
@@ -10,7 +10,7 @@
int arg_1 = 0;
arg_1 = 1;
const int x_20 = arg_1;
- tint_atomicStore(sb_rw, 0u, x_20);
+ sb_rwatomicStore(0u, x_20);
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_u32.spvasm.expected.dxc.hlsl
index f8b4de8..a015fd5 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, uint value) {
+void sb_rwatomicStore(uint offset, uint value) {
uint ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
@@ -10,7 +10,7 @@
uint arg_1 = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- tint_atomicStore(sb_rw, 0u, x_18);
+ sb_rwatomicStore(0u, x_18);
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_u32.spvasm.expected.fxc.hlsl
index f8b4de8..a015fd5 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicStore/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, uint value) {
+void sb_rwatomicStore(uint offset, uint value) {
uint ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
@@ -10,7 +10,7 @@
uint arg_1 = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- tint_atomicStore(sb_rw, 0u, x_18);
+ sb_rwatomicStore(0u, x_18);
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_i32.spvasm.expected.dxc.hlsl
index 791ca18..03fc19a 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicSub(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicSub(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicSub(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicSub(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_i32.spvasm.expected.fxc.hlsl
index 791ca18..03fc19a 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicSub(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicSub(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicSub(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicSub(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_u32.spvasm.expected.dxc.hlsl
index daceb1f..87d5286 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicSub(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicSub(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicSub(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicSub(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_u32.spvasm.expected.fxc.hlsl
index daceb1f..87d5286 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicSub/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicSub(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicSub(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicSub(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicSub(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_i32.spvasm.expected.dxc.hlsl
index 5560d57..f6a233d 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicXor(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicXor(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicXor(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicXor(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_i32.spvasm.expected.fxc.hlsl
index 5560d57..f6a233d 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicXor(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicXor(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
int res = 0;
arg_1 = 1;
const int x_20 = arg_1;
- const int x_13 = tint_atomicXor(sb_rw, 0u, x_20);
+ const int x_13 = sb_rwatomicXor(0u, x_20);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_u32.spvasm.expected.dxc.hlsl
index 664d5ba..c39b3ef 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicXor(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicXor(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicXor(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicXor(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_u32.spvasm.expected.fxc.hlsl
index 664d5ba..c39b3ef 100644
--- a/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/atomicXor/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicXor(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicXor(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
@@ -12,7 +12,7 @@
uint res = 0u;
arg_1 = 1u;
const uint x_18 = arg_1;
- const uint x_13 = tint_atomicXor(sb_rw, 0u, x_18);
+ const uint x_13 = sb_rwatomicXor(0u, x_18);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_i32.spvasm.expected.dxc.hlsl
index abf10b5..5b7ded4 100644
--- a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicSub(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicSub(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
@@ -11,7 +11,7 @@
int arg_1 = 0;
int res = 0;
arg_1 = 1;
- const int x_13 = tint_atomicSub(sb_rw, 0u, 1);
+ const int x_13 = sb_rwatomicSub(0u, 1);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_i32.spvasm.expected.fxc.hlsl
index abf10b5..5b7ded4 100644
--- a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicSub(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicSub(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
@@ -11,7 +11,7 @@
int arg_1 = 0;
int res = 0;
arg_1 = 1;
- const int x_13 = tint_atomicSub(sb_rw, 0u, 1);
+ const int x_13 = sb_rwatomicSub(0u, 1);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_u32.spvasm.expected.dxc.hlsl
index 4e6bb86..2c31dff 100644
--- a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicSub(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicSub(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
@@ -11,7 +11,7 @@
uint arg_1 = 0u;
uint res = 0u;
arg_1 = 1u;
- const uint x_13 = tint_atomicSub(sb_rw, 0u, 1u);
+ const uint x_13 = sb_rwatomicSub(0u, 1u);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_u32.spvasm.expected.fxc.hlsl
index 4e6bb86..2c31dff 100644
--- a/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicDecrement/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicSub(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicSub(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
@@ -11,7 +11,7 @@
uint arg_1 = 0u;
uint res = 0u;
arg_1 = 1u;
- const uint x_13 = tint_atomicSub(sb_rw, 0u, 1u);
+ const uint x_13 = sb_rwatomicSub(0u, 1u);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_i32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_i32.spvasm.expected.dxc.hlsl
index 9be7a9e..0d6d3d8 100644
--- a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_i32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_i32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -11,7 +11,7 @@
int arg_1 = 0;
int res = 0;
arg_1 = 1;
- const int x_13 = tint_atomicAdd(sb_rw, 0u, 1);
+ const int x_13 = sb_rwatomicAdd(0u, 1);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_i32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_i32.spvasm.expected.fxc.hlsl
index 9be7a9e..0d6d3d8 100644
--- a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_i32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_i32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -11,7 +11,7 @@
int arg_1 = 0;
int res = 0;
arg_1 = 1;
- const int x_13 = tint_atomicAdd(sb_rw, 0u, 1);
+ const int x_13 = sb_rwatomicAdd(0u, 1);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_u32.spvasm.expected.dxc.hlsl b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_u32.spvasm.expected.dxc.hlsl
index 442a1ff..c6369a0 100644
--- a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_u32.spvasm.expected.dxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_u32.spvasm.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -11,7 +11,7 @@
uint arg_1 = 0u;
uint res = 0u;
arg_1 = 1u;
- const uint x_13 = tint_atomicAdd(sb_rw, 0u, 1u);
+ const uint x_13 = sb_rwatomicAdd(0u, 1u);
res = x_13;
return;
}
diff --git a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_u32.spvasm.expected.fxc.hlsl b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_u32.spvasm.expected.fxc.hlsl
index 442a1ff..c6369a0 100644
--- a/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_u32.spvasm.expected.fxc.hlsl
+++ b/test/tint/builtins/atomics/from_gen/var/spvAtomicIncrement/storage_u32.spvasm.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -11,7 +11,7 @@
uint arg_1 = 0u;
uint res = 0u;
arg_1 = 1u;
- const uint x_13 = tint_atomicAdd(sb_rw, 0u, 1u);
+ const uint x_13 = sb_rwatomicAdd(0u, 1u);
res = x_13;
return;
}
diff --git a/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.dxc.hlsl
index f31fb5c..21cb963 100644
--- a/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_8a199a() {
- uint res = tint_atomicAdd(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicAdd(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.fxc.hlsl
index f31fb5c..21cb963 100644
--- a/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicAdd/8a199a.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_8a199a() {
- uint res = tint_atomicAdd(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicAdd(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.dxc.hlsl
index 62ae701..9ce9c65 100644
--- a/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_d32fe4() {
- int res = tint_atomicAdd(sb_rw, 0u, 1);
+ int res = sb_rwatomicAdd(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.fxc.hlsl
index 62ae701..9ce9c65 100644
--- a/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicAdd/d32fe4.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_d32fe4() {
- int res = tint_atomicAdd(sb_rw, 0u, 1);
+ int res = sb_rwatomicAdd(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.dxc.hlsl
index 281ec13..c56fa04 100644
--- a/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAnd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
void atomicAnd_152966() {
- int res = tint_atomicAnd(sb_rw, 0u, 1);
+ int res = sb_rwatomicAnd(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.fxc.hlsl
index 281ec13..c56fa04 100644
--- a/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicAnd/152966.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAnd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
void atomicAnd_152966() {
- int res = tint_atomicAnd(sb_rw, 0u, 1);
+ int res = sb_rwatomicAnd(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.dxc.hlsl
index 1c89d14..b1e36ec 100644
--- a/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAnd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
void atomicAnd_85a8d9() {
- uint res = tint_atomicAnd(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicAnd(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.fxc.hlsl
index 1c89d14..b1e36ec 100644
--- a/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicAnd/85a8d9.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAnd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
void atomicAnd_85a8d9() {
- uint res = tint_atomicAnd(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicAnd(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/1bd40a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/1bd40a.wgsl.expected.dxc.hlsl
index b1e30e0..b0e68a9 100644
--- a/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/1bd40a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/1bd40a.wgsl.expected.dxc.hlsl
@@ -5,16 +5,16 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, int compare, int value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, int compare, int value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
void atomicCompareExchangeWeak_1bd40a() {
- atomic_compare_exchange_weak_ret_type res = tint_atomicCompareExchangeWeak(sb_rw, 0u, 1, 1);
+ atomic_compare_exchange_weak_ret_type res = sb_rwatomicCompareExchangeWeak(0u, 1, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/1bd40a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/1bd40a.wgsl.expected.fxc.hlsl
index b1e30e0..b0e68a9 100644
--- a/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/1bd40a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/1bd40a.wgsl.expected.fxc.hlsl
@@ -5,16 +5,16 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, int compare, int value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, int compare, int value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
void atomicCompareExchangeWeak_1bd40a() {
- atomic_compare_exchange_weak_ret_type res = tint_atomicCompareExchangeWeak(sb_rw, 0u, 1, 1);
+ atomic_compare_exchange_weak_ret_type res = sb_rwatomicCompareExchangeWeak(0u, 1, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/63d8e6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/63d8e6.wgsl.expected.dxc.hlsl
index 9dc72b3..ac69105 100644
--- a/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/63d8e6.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/63d8e6.wgsl.expected.dxc.hlsl
@@ -5,16 +5,16 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, uint compare, uint value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, uint compare, uint value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
void atomicCompareExchangeWeak_63d8e6() {
- atomic_compare_exchange_weak_ret_type res = tint_atomicCompareExchangeWeak(sb_rw, 0u, 1u, 1u);
+ atomic_compare_exchange_weak_ret_type res = sb_rwatomicCompareExchangeWeak(0u, 1u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/63d8e6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/63d8e6.wgsl.expected.fxc.hlsl
index 9dc72b3..ac69105 100644
--- a/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/63d8e6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicCompareExchangeWeak/63d8e6.wgsl.expected.fxc.hlsl
@@ -5,16 +5,16 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, uint compare, uint value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, uint compare, uint value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
void atomicCompareExchangeWeak_63d8e6() {
- atomic_compare_exchange_weak_ret_type res = tint_atomicCompareExchangeWeak(sb_rw, 0u, 1u, 1u);
+ atomic_compare_exchange_weak_ret_type res = sb_rwatomicCompareExchangeWeak(0u, 1u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.dxc.hlsl
index b40e146..59e08f0 100644
--- a/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicExchange(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
void atomicExchange_d59712() {
- uint res = tint_atomicExchange(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicExchange(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.fxc.hlsl
index b40e146..59e08f0 100644
--- a/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicExchange/d59712.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicExchange(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
void atomicExchange_d59712() {
- uint res = tint_atomicExchange(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicExchange(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.dxc.hlsl
index ea1abc5..f2492f0 100644
--- a/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicExchange(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
void atomicExchange_f2e22f() {
- int res = tint_atomicExchange(sb_rw, 0u, 1);
+ int res = sb_rwatomicExchange(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.fxc.hlsl
index ea1abc5..f2492f0 100644
--- a/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicExchange/f2e22f.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicExchange(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
void atomicExchange_f2e22f() {
- int res = tint_atomicExchange(sb_rw, 0u, 1);
+ int res = sb_rwatomicExchange(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.dxc.hlsl
index a278b2c..413dcf0 100644
--- a/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+int sb_rwatomicLoad(uint offset) {
int value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_0806ad() {
- int res = tint_atomicLoad(sb_rw, 0u);
+ int res = sb_rwatomicLoad(0u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.fxc.hlsl
index a278b2c..413dcf0 100644
--- a/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicLoad/0806ad.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+int sb_rwatomicLoad(uint offset) {
int value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_0806ad() {
- int res = tint_atomicLoad(sb_rw, 0u);
+ int res = sb_rwatomicLoad(0u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.dxc.hlsl
index 77edab3..d8fda75 100644
--- a/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+uint sb_rwatomicLoad(uint offset) {
uint value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_fe6cc3() {
- uint res = tint_atomicLoad(sb_rw, 0u);
+ uint res = sb_rwatomicLoad(0u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.fxc.hlsl
index 77edab3..d8fda75 100644
--- a/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicLoad/fe6cc3.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+uint sb_rwatomicLoad(uint offset) {
uint value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_fe6cc3() {
- uint res = tint_atomicLoad(sb_rw, 0u);
+ uint res = sb_rwatomicLoad(0u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.dxc.hlsl
index c8f0893..0c39796 100644
--- a/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMax(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMax(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
void atomicMax_51b9be() {
- uint res = tint_atomicMax(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicMax(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.fxc.hlsl
index c8f0893..0c39796 100644
--- a/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicMax/51b9be.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMax(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMax(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
void atomicMax_51b9be() {
- uint res = tint_atomicMax(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicMax(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.dxc.hlsl
index f3d398c..4f7dc69 100644
--- a/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMax(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMax(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
void atomicMax_92aa72() {
- int res = tint_atomicMax(sb_rw, 0u, 1);
+ int res = sb_rwatomicMax(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.fxc.hlsl
index f3d398c..4f7dc69 100644
--- a/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicMax/92aa72.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMax(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMax(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
void atomicMax_92aa72() {
- int res = tint_atomicMax(sb_rw, 0u, 1);
+ int res = sb_rwatomicMax(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.dxc.hlsl
index b8d48b8..6968993 100644
--- a/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMin(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMin(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
void atomicMin_8e38dc() {
- int res = tint_atomicMin(sb_rw, 0u, 1);
+ int res = sb_rwatomicMin(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.fxc.hlsl
index b8d48b8..6968993 100644
--- a/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicMin/8e38dc.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMin(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMin(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
void atomicMin_8e38dc() {
- int res = tint_atomicMin(sb_rw, 0u, 1);
+ int res = sb_rwatomicMin(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.dxc.hlsl
index 3ae5176..6f7cc8f 100644
--- a/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMin(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMin(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
void atomicMin_c67a74() {
- uint res = tint_atomicMin(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicMin(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.fxc.hlsl
index 3ae5176..6f7cc8f 100644
--- a/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicMin/c67a74.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMin(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMin(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
void atomicMin_c67a74() {
- uint res = tint_atomicMin(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicMin(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.dxc.hlsl
index 97883cb..457c4aa 100644
--- a/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicOr(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicOr(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
void atomicOr_5e95d4() {
- uint res = tint_atomicOr(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicOr(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.fxc.hlsl
index 97883cb..457c4aa 100644
--- a/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicOr/5e95d4.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicOr(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicOr(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
void atomicOr_5e95d4() {
- uint res = tint_atomicOr(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicOr(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.dxc.hlsl
index 04be9d7..cdd96dc 100644
--- a/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicOr(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicOr(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
void atomicOr_8d96a0() {
- int res = tint_atomicOr(sb_rw, 0u, 1);
+ int res = sb_rwatomicOr(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.fxc.hlsl
index 04be9d7..cdd96dc 100644
--- a/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicOr/8d96a0.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicOr(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicOr(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
void atomicOr_8d96a0() {
- int res = tint_atomicOr(sb_rw, 0u, 1);
+ int res = sb_rwatomicOr(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicStore/cdc29e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicStore/cdc29e.wgsl.expected.dxc.hlsl
index cb8cfdd..ba01817 100644
--- a/test/tint/builtins/gen/literal/atomicStore/cdc29e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicStore/cdc29e.wgsl.expected.dxc.hlsl
@@ -1,13 +1,13 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, uint value) {
+void sb_rwatomicStore(uint offset, uint value) {
uint ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
void atomicStore_cdc29e() {
- tint_atomicStore(sb_rw, 0u, 1u);
+ sb_rwatomicStore(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicStore/cdc29e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicStore/cdc29e.wgsl.expected.fxc.hlsl
index cb8cfdd..ba01817 100644
--- a/test/tint/builtins/gen/literal/atomicStore/cdc29e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicStore/cdc29e.wgsl.expected.fxc.hlsl
@@ -1,13 +1,13 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, uint value) {
+void sb_rwatomicStore(uint offset, uint value) {
uint ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
void atomicStore_cdc29e() {
- tint_atomicStore(sb_rw, 0u, 1u);
+ sb_rwatomicStore(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicStore/d1e9a6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicStore/d1e9a6.wgsl.expected.dxc.hlsl
index 599f575..37b3119 100644
--- a/test/tint/builtins/gen/literal/atomicStore/d1e9a6.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicStore/d1e9a6.wgsl.expected.dxc.hlsl
@@ -1,13 +1,13 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, int value) {
+void sb_rwatomicStore(uint offset, int value) {
int ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
void atomicStore_d1e9a6() {
- tint_atomicStore(sb_rw, 0u, 1);
+ sb_rwatomicStore(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicStore/d1e9a6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicStore/d1e9a6.wgsl.expected.fxc.hlsl
index 599f575..37b3119 100644
--- a/test/tint/builtins/gen/literal/atomicStore/d1e9a6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicStore/d1e9a6.wgsl.expected.fxc.hlsl
@@ -1,13 +1,13 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, int value) {
+void sb_rwatomicStore(uint offset, int value) {
int ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
void atomicStore_d1e9a6() {
- tint_atomicStore(sb_rw, 0u, 1);
+ sb_rwatomicStore(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.dxc.hlsl
index 29d8e04..88284ad 100644
--- a/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicSub(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicSub(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicSub_051100() {
- int res = tint_atomicSub(sb_rw, 0u, 1);
+ int res = sb_rwatomicSub(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.fxc.hlsl
index 29d8e04..88284ad 100644
--- a/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicSub/051100.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicSub(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicSub(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicSub_051100() {
- int res = tint_atomicSub(sb_rw, 0u, 1);
+ int res = sb_rwatomicSub(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.dxc.hlsl
index e5d0027..e343eec 100644
--- a/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicSub(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicSub(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicSub_15bfc9() {
- uint res = tint_atomicSub(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicSub(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.fxc.hlsl
index e5d0027..e343eec 100644
--- a/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicSub/15bfc9.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicSub(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicSub(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicSub_15bfc9() {
- uint res = tint_atomicSub(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicSub(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.dxc.hlsl
index 9ed582e..3bf3e8d 100644
--- a/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicXor(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicXor(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
void atomicXor_54510e() {
- uint res = tint_atomicXor(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicXor(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.fxc.hlsl
index 9ed582e..3bf3e8d 100644
--- a/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicXor/54510e.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicXor(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicXor(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
void atomicXor_54510e() {
- uint res = tint_atomicXor(sb_rw, 0u, 1u);
+ uint res = sb_rwatomicXor(0u, 1u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.dxc.hlsl
index bb38f42..43929d7 100644
--- a/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicXor(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicXor(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
void atomicXor_c1b78c() {
- int res = tint_atomicXor(sb_rw, 0u, 1);
+ int res = sb_rwatomicXor(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.fxc.hlsl
index bb38f42..43929d7 100644
--- a/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atomicXor/c1b78c.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicXor(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicXor(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
void atomicXor_c1b78c() {
- int res = tint_atomicXor(sb_rw, 0u, 1);
+ int res = sb_rwatomicXor(0u, 1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
index 1d6c1c1..17a7cd2 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
@@ -47,14 +47,14 @@
return float4(color, 1.0f);
}
-float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -63,36 +63,36 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_11;
+ const GammaTransferParams tint_symbol_1 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_1;
}
-float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
- return tint_symbol_12;
+ const ExternalTextureParams tint_symbol_2 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_2;
}
void textureLoad_1bfdfb() {
- float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1u).xx, tint_symbol_1(ext_tex_params, 0u));
+ float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1u).xx, ext_tex_params_load(0u));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
index 1d6c1c1..17a7cd2 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
@@ -47,14 +47,14 @@
return float4(color, 1.0f);
}
-float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -63,36 +63,36 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_11;
+ const GammaTransferParams tint_symbol_1 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_1;
}
-float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
- return tint_symbol_12;
+ const ExternalTextureParams tint_symbol_2 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_2;
}
void textureLoad_1bfdfb() {
- float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1u).xx, tint_symbol_1(ext_tex_params, 0u));
+ float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1u).xx, ext_tex_params_load(0u));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.dxc.hlsl
index c7f8206..7356d4e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.dxc.hlsl
@@ -47,14 +47,14 @@
return float4(color, 1.0f);
}
-float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -63,36 +63,36 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_11;
+ const GammaTransferParams tint_symbol_1 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_1;
}
-float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
- return tint_symbol_12;
+ const ExternalTextureParams tint_symbol_2 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_2;
}
void textureLoad_8acf41() {
- float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1).xx, tint_symbol_1(ext_tex_params, 0u));
+ float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1).xx, ext_tex_params_load(0u));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.fxc.hlsl
index c7f8206..7356d4e 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.fxc.hlsl
@@ -47,14 +47,14 @@
return float4(color, 1.0f);
}
-float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -63,36 +63,36 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_11;
+ const GammaTransferParams tint_symbol_1 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_1;
}
-float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
- return tint_symbol_12;
+ const ExternalTextureParams tint_symbol_2 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_2;
}
void textureLoad_8acf41() {
- float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1).xx, tint_symbol_1(ext_tex_params, 0u));
+ float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1).xx, ext_tex_params_load(0u));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl
index 6a15bfb..66a6236 100644
--- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl
@@ -58,14 +58,14 @@
return float4(color, 1.0f);
}
-float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -74,36 +74,36 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_11;
+ const GammaTransferParams tint_symbol_1 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_1;
}
-float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
- return tint_symbol_12;
+ const ExternalTextureParams tint_symbol_2 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_2;
}
void textureSampleBaseClampToEdge_7c04e6() {
- float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (1.0f).xx, tint_symbol_1(ext_tex_params, 0u));
+ float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (1.0f).xx, ext_tex_params_load(0u));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl
index 6a15bfb..66a6236 100644
--- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl
@@ -58,14 +58,14 @@
return float4(color, 1.0f);
}
-float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -74,36 +74,36 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_11;
+ const GammaTransferParams tint_symbol_1 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_1;
}
-float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
- return tint_symbol_12;
+ const ExternalTextureParams tint_symbol_2 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_2;
}
void textureSampleBaseClampToEdge_7c04e6() {
- float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (1.0f).xx, tint_symbol_1(ext_tex_params, 0u));
+ float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (1.0f).xx, ext_tex_params_load(0u));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.dxc.hlsl
index 1bf7c3e..d42be71 100644
--- a/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_8a199a() {
uint arg_1 = 1u;
- uint res = tint_atomicAdd(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicAdd(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.fxc.hlsl
index 1bf7c3e..d42be71 100644
--- a/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicAdd/8a199a.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAdd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_8a199a() {
uint arg_1 = 1u;
- uint res = tint_atomicAdd(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicAdd(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.dxc.hlsl
index 213221b..dd5ded7 100644
--- a/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_d32fe4() {
int arg_1 = 1;
- int res = tint_atomicAdd(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicAdd(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.fxc.hlsl
index 213221b..dd5ded7 100644
--- a/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicAdd/d32fe4.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ sb_rw.InterlockedAdd(offset, value, original_value);
return original_value;
}
void atomicAdd_d32fe4() {
int arg_1 = 1;
- int res = tint_atomicAdd(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicAdd(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.dxc.hlsl
index 4562edb..b7847a3 100644
--- a/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAnd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
void atomicAnd_152966() {
int arg_1 = 1;
- int res = tint_atomicAnd(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicAnd(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.fxc.hlsl
index 4562edb..b7847a3 100644
--- a/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicAnd/152966.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicAnd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
void atomicAnd_152966() {
int arg_1 = 1;
- int res = tint_atomicAnd(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicAnd(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.dxc.hlsl
index f2099cf..cab948c 100644
--- a/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAnd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
void atomicAnd_85a8d9() {
uint arg_1 = 1u;
- uint res = tint_atomicAnd(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicAnd(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.fxc.hlsl
index f2099cf..cab948c 100644
--- a/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicAnd/85a8d9.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicAnd(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicAnd(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAnd(offset, value, original_value);
+ sb_rw.InterlockedAnd(offset, value, original_value);
return original_value;
}
void atomicAnd_85a8d9() {
uint arg_1 = 1u;
- uint res = tint_atomicAnd(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicAnd(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicCompareExchangeWeak/1bd40a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicCompareExchangeWeak/1bd40a.wgsl.expected.dxc.hlsl
index 53a01c6..7261e5b 100644
--- a/test/tint/builtins/gen/var/atomicCompareExchangeWeak/1bd40a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicCompareExchangeWeak/1bd40a.wgsl.expected.dxc.hlsl
@@ -5,9 +5,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, int compare, int value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, int compare, int value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -16,7 +16,7 @@
void atomicCompareExchangeWeak_1bd40a() {
int arg_1 = 1;
int arg_2 = 1;
- atomic_compare_exchange_weak_ret_type res = tint_atomicCompareExchangeWeak(sb_rw, 0u, arg_1, arg_2);
+ atomic_compare_exchange_weak_ret_type res = sb_rwatomicCompareExchangeWeak(0u, arg_1, arg_2);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicCompareExchangeWeak/1bd40a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicCompareExchangeWeak/1bd40a.wgsl.expected.fxc.hlsl
index 53a01c6..7261e5b 100644
--- a/test/tint/builtins/gen/var/atomicCompareExchangeWeak/1bd40a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicCompareExchangeWeak/1bd40a.wgsl.expected.fxc.hlsl
@@ -5,9 +5,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, int compare, int value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, int compare, int value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -16,7 +16,7 @@
void atomicCompareExchangeWeak_1bd40a() {
int arg_1 = 1;
int arg_2 = 1;
- atomic_compare_exchange_weak_ret_type res = tint_atomicCompareExchangeWeak(sb_rw, 0u, arg_1, arg_2);
+ atomic_compare_exchange_weak_ret_type res = sb_rwatomicCompareExchangeWeak(0u, arg_1, arg_2);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicCompareExchangeWeak/63d8e6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicCompareExchangeWeak/63d8e6.wgsl.expected.dxc.hlsl
index 3c22dc7..82836fc 100644
--- a/test/tint/builtins/gen/var/atomicCompareExchangeWeak/63d8e6.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicCompareExchangeWeak/63d8e6.wgsl.expected.dxc.hlsl
@@ -5,9 +5,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, uint compare, uint value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, uint compare, uint value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -16,7 +16,7 @@
void atomicCompareExchangeWeak_63d8e6() {
uint arg_1 = 1u;
uint arg_2 = 1u;
- atomic_compare_exchange_weak_ret_type res = tint_atomicCompareExchangeWeak(sb_rw, 0u, arg_1, arg_2);
+ atomic_compare_exchange_weak_ret_type res = sb_rwatomicCompareExchangeWeak(0u, arg_1, arg_2);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicCompareExchangeWeak/63d8e6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicCompareExchangeWeak/63d8e6.wgsl.expected.fxc.hlsl
index 3c22dc7..82836fc 100644
--- a/test/tint/builtins/gen/var/atomicCompareExchangeWeak/63d8e6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicCompareExchangeWeak/63d8e6.wgsl.expected.fxc.hlsl
@@ -5,9 +5,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, uint compare, uint value) {
+atomic_compare_exchange_weak_ret_type sb_rwatomicCompareExchangeWeak(uint offset, uint compare, uint value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ sb_rw.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -16,7 +16,7 @@
void atomicCompareExchangeWeak_63d8e6() {
uint arg_1 = 1u;
uint arg_2 = 1u;
- atomic_compare_exchange_weak_ret_type res = tint_atomicCompareExchangeWeak(sb_rw, 0u, arg_1, arg_2);
+ atomic_compare_exchange_weak_ret_type res = sb_rwatomicCompareExchangeWeak(0u, arg_1, arg_2);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.dxc.hlsl
index cec9984..d31825d 100644
--- a/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicExchange(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
void atomicExchange_d59712() {
uint arg_1 = 1u;
- uint res = tint_atomicExchange(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicExchange(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.fxc.hlsl
index cec9984..d31825d 100644
--- a/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicExchange/d59712.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicExchange(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
void atomicExchange_d59712() {
uint arg_1 = 1u;
- uint res = tint_atomicExchange(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicExchange(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.dxc.hlsl
index 8c0fe23..d934c72 100644
--- a/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicExchange(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
void atomicExchange_f2e22f() {
int arg_1 = 1;
- int res = tint_atomicExchange(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicExchange(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.fxc.hlsl
index 8c0fe23..d934c72 100644
--- a/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicExchange/f2e22f.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicExchange(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicExchange(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedExchange(offset, value, original_value);
+ sb_rw.InterlockedExchange(offset, value, original_value);
return original_value;
}
void atomicExchange_f2e22f() {
int arg_1 = 1;
- int res = tint_atomicExchange(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicExchange(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.dxc.hlsl
index a278b2c..413dcf0 100644
--- a/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+int sb_rwatomicLoad(uint offset) {
int value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_0806ad() {
- int res = tint_atomicLoad(sb_rw, 0u);
+ int res = sb_rwatomicLoad(0u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.fxc.hlsl
index a278b2c..413dcf0 100644
--- a/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicLoad/0806ad.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+int sb_rwatomicLoad(uint offset) {
int value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_0806ad() {
- int res = tint_atomicLoad(sb_rw, 0u);
+ int res = sb_rwatomicLoad(0u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.dxc.hlsl
index 77edab3..d8fda75 100644
--- a/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+uint sb_rwatomicLoad(uint offset) {
uint value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_fe6cc3() {
- uint res = tint_atomicLoad(sb_rw, 0u);
+ uint res = sb_rwatomicLoad(0u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.fxc.hlsl
index 77edab3..d8fda75 100644
--- a/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicLoad/fe6cc3.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicLoad(RWByteAddressBuffer buffer, uint offset) {
+uint sb_rwatomicLoad(uint offset) {
uint value = 0;
- buffer.InterlockedOr(offset, 0, value);
+ sb_rw.InterlockedOr(offset, 0, value);
return value;
}
void atomicLoad_fe6cc3() {
- uint res = tint_atomicLoad(sb_rw, 0u);
+ uint res = sb_rwatomicLoad(0u);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.dxc.hlsl
index 174521d..4b961bf 100644
--- a/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMax(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMax(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
void atomicMax_51b9be() {
uint arg_1 = 1u;
- uint res = tint_atomicMax(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicMax(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.fxc.hlsl
index 174521d..4b961bf 100644
--- a/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicMax/51b9be.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMax(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMax(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
void atomicMax_51b9be() {
uint arg_1 = 1u;
- uint res = tint_atomicMax(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicMax(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.dxc.hlsl
index a649f98..5284265 100644
--- a/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMax(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMax(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
void atomicMax_92aa72() {
int arg_1 = 1;
- int res = tint_atomicMax(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicMax(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.fxc.hlsl
index a649f98..5284265 100644
--- a/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicMax/92aa72.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMax(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMax(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMax(offset, value, original_value);
+ sb_rw.InterlockedMax(offset, value, original_value);
return original_value;
}
void atomicMax_92aa72() {
int arg_1 = 1;
- int res = tint_atomicMax(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicMax(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.dxc.hlsl
index ff4793b..daf622d 100644
--- a/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMin(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMin(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
void atomicMin_8e38dc() {
int arg_1 = 1;
- int res = tint_atomicMin(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicMin(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.fxc.hlsl
index ff4793b..daf622d 100644
--- a/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicMin/8e38dc.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicMin(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicMin(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
void atomicMin_8e38dc() {
int arg_1 = 1;
- int res = tint_atomicMin(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicMin(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.dxc.hlsl
index ae974e3..f5ba0d9 100644
--- a/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMin(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMin(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
void atomicMin_c67a74() {
uint arg_1 = 1u;
- uint res = tint_atomicMin(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicMin(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.fxc.hlsl
index ae974e3..f5ba0d9 100644
--- a/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicMin/c67a74.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicMin(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicMin(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedMin(offset, value, original_value);
+ sb_rw.InterlockedMin(offset, value, original_value);
return original_value;
}
void atomicMin_c67a74() {
uint arg_1 = 1u;
- uint res = tint_atomicMin(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicMin(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.dxc.hlsl
index 2df87d2..5945dea 100644
--- a/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicOr(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicOr(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
void atomicOr_5e95d4() {
uint arg_1 = 1u;
- uint res = tint_atomicOr(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicOr(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.fxc.hlsl
index 2df87d2..5945dea 100644
--- a/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicOr/5e95d4.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicOr(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicOr(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
void atomicOr_5e95d4() {
uint arg_1 = 1u;
- uint res = tint_atomicOr(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicOr(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.dxc.hlsl
index b3d4bb9..9e1b10c 100644
--- a/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicOr(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicOr(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
void atomicOr_8d96a0() {
int arg_1 = 1;
- int res = tint_atomicOr(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicOr(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.fxc.hlsl
index b3d4bb9..9e1b10c 100644
--- a/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicOr/8d96a0.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicOr(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicOr(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedOr(offset, value, original_value);
+ sb_rw.InterlockedOr(offset, value, original_value);
return original_value;
}
void atomicOr_8d96a0() {
int arg_1 = 1;
- int res = tint_atomicOr(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicOr(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicStore/cdc29e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicStore/cdc29e.wgsl.expected.dxc.hlsl
index 253ad31..53d16c6 100644
--- a/test/tint/builtins/gen/var/atomicStore/cdc29e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicStore/cdc29e.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, uint value) {
+void sb_rwatomicStore(uint offset, uint value) {
uint ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
void atomicStore_cdc29e() {
uint arg_1 = 1u;
- tint_atomicStore(sb_rw, 0u, arg_1);
+ sb_rwatomicStore(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicStore/cdc29e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicStore/cdc29e.wgsl.expected.fxc.hlsl
index 253ad31..53d16c6 100644
--- a/test/tint/builtins/gen/var/atomicStore/cdc29e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicStore/cdc29e.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, uint value) {
+void sb_rwatomicStore(uint offset, uint value) {
uint ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
void atomicStore_cdc29e() {
uint arg_1 = 1u;
- tint_atomicStore(sb_rw, 0u, arg_1);
+ sb_rwatomicStore(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicStore/d1e9a6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicStore/d1e9a6.wgsl.expected.dxc.hlsl
index bb02128..75b9e39 100644
--- a/test/tint/builtins/gen/var/atomicStore/d1e9a6.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicStore/d1e9a6.wgsl.expected.dxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, int value) {
+void sb_rwatomicStore(uint offset, int value) {
int ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
void atomicStore_d1e9a6() {
int arg_1 = 1;
- tint_atomicStore(sb_rw, 0u, arg_1);
+ sb_rwatomicStore(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicStore/d1e9a6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicStore/d1e9a6.wgsl.expected.fxc.hlsl
index bb02128..75b9e39 100644
--- a/test/tint/builtins/gen/var/atomicStore/d1e9a6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicStore/d1e9a6.wgsl.expected.fxc.hlsl
@@ -1,14 +1,14 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-void tint_atomicStore(RWByteAddressBuffer buffer, uint offset, int value) {
+void sb_rwatomicStore(uint offset, int value) {
int ignored;
- buffer.InterlockedExchange(offset, value, ignored);
+ sb_rw.InterlockedExchange(offset, value, ignored);
}
void atomicStore_d1e9a6() {
int arg_1 = 1;
- tint_atomicStore(sb_rw, 0u, arg_1);
+ sb_rwatomicStore(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.dxc.hlsl
index eac50d3..3e49340 100644
--- a/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicSub(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicSub(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicSub_051100() {
int arg_1 = 1;
- int res = tint_atomicSub(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicSub(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.fxc.hlsl
index eac50d3..3e49340 100644
--- a/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicSub/051100.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicSub(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicSub(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicSub_051100() {
int arg_1 = 1;
- int res = tint_atomicSub(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicSub(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.dxc.hlsl
index 166f709..374add5 100644
--- a/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicSub(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicSub(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicSub_15bfc9() {
uint arg_1 = 1u;
- uint res = tint_atomicSub(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicSub(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.fxc.hlsl
index 166f709..374add5 100644
--- a/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicSub/15bfc9.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicSub(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicSub(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedAdd(offset, -value, original_value);
+ sb_rw.InterlockedAdd(offset, -value, original_value);
return original_value;
}
void atomicSub_15bfc9() {
uint arg_1 = 1u;
- uint res = tint_atomicSub(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicSub(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.dxc.hlsl
index d745f12..6294ed3 100644
--- a/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicXor(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicXor(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
void atomicXor_54510e() {
uint arg_1 = 1u;
- uint res = tint_atomicXor(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicXor(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.fxc.hlsl
index d745f12..6294ed3 100644
--- a/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicXor/54510e.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-uint tint_atomicXor(RWByteAddressBuffer buffer, uint offset, uint value) {
+uint sb_rwatomicXor(uint offset, uint value) {
uint original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
void atomicXor_54510e() {
uint arg_1 = 1u;
- uint res = tint_atomicXor(sb_rw, 0u, arg_1);
+ uint res = sb_rwatomicXor(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.dxc.hlsl
index df83cd9..168a8a0 100644
--- a/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.dxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicXor(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicXor(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
void atomicXor_c1b78c() {
int arg_1 = 1;
- int res = tint_atomicXor(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicXor(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.fxc.hlsl
index df83cd9..168a8a0 100644
--- a/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atomicXor/c1b78c.wgsl.expected.fxc.hlsl
@@ -1,15 +1,15 @@
RWByteAddressBuffer sb_rw : register(u0, space0);
-int tint_atomicXor(RWByteAddressBuffer buffer, uint offset, int value) {
+int sb_rwatomicXor(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedXor(offset, value, original_value);
+ sb_rw.InterlockedXor(offset, value, original_value);
return original_value;
}
void atomicXor_c1b78c() {
int arg_1 = 1;
- int res = tint_atomicXor(sb_rw, 0u, arg_1);
+ int res = sb_rwatomicXor(0u, arg_1);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
index 4bd893f..4b7b50e 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
@@ -47,14 +47,14 @@
return float4(color, 1.0f);
}
-float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -63,37 +63,37 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_11;
+ const GammaTransferParams tint_symbol_1 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_1;
}
-float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
- return tint_symbol_12;
+ const ExternalTextureParams tint_symbol_2 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_2;
}
void textureLoad_1bfdfb() {
uint2 arg_1 = (1u).xx;
- float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u));
+ float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, ext_tex_params_load(0u));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
index 4bd893f..4b7b50e 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
@@ -47,14 +47,14 @@
return float4(color, 1.0f);
}
-float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -63,37 +63,37 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_11;
+ const GammaTransferParams tint_symbol_1 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_1;
}
-float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
- return tint_symbol_12;
+ const ExternalTextureParams tint_symbol_2 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_2;
}
void textureLoad_1bfdfb() {
uint2 arg_1 = (1u).xx;
- float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u));
+ float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, ext_tex_params_load(0u));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.dxc.hlsl
index f4f4be1..eaf70d6 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.dxc.hlsl
@@ -47,14 +47,14 @@
return float4(color, 1.0f);
}
-float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -63,37 +63,37 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_11;
+ const GammaTransferParams tint_symbol_1 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_1;
}
-float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
- return tint_symbol_12;
+ const ExternalTextureParams tint_symbol_2 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_2;
}
void textureLoad_8acf41() {
int2 arg_1 = (1).xx;
- float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u));
+ float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, ext_tex_params_load(0u));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.fxc.hlsl
index f4f4be1..eaf70d6 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.fxc.hlsl
@@ -47,14 +47,14 @@
return float4(color, 1.0f);
}
-float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -63,37 +63,37 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_11;
+ const GammaTransferParams tint_symbol_1 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_1;
}
-float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
- return tint_symbol_12;
+ const ExternalTextureParams tint_symbol_2 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_2;
}
void textureLoad_8acf41() {
int2 arg_1 = (1).xx;
- float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u));
+ float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, ext_tex_params_load(0u));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl
index 678344f..3f7528b 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl
@@ -58,14 +58,14 @@
return float4(color, 1.0f);
}
-float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -74,37 +74,37 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_11;
+ const GammaTransferParams tint_symbol_1 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_1;
}
-float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
- return tint_symbol_12;
+ const ExternalTextureParams tint_symbol_2 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_2;
}
void textureSampleBaseClampToEdge_7c04e6() {
float2 arg_2 = (1.0f).xx;
- float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, arg_2, tint_symbol_1(ext_tex_params, 0u));
+ float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, arg_2, ext_tex_params_load(0u));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl
index 678344f..3f7528b 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl
@@ -58,14 +58,14 @@
return float4(color, 1.0f);
}
-float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -74,37 +74,37 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_11;
+ const GammaTransferParams tint_symbol_1 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_1;
}
-float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
- return tint_symbol_12;
+ const ExternalTextureParams tint_symbol_2 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_2;
}
void textureSampleBaseClampToEdge_7c04e6() {
float2 arg_2 = (1.0f).xx;
- float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, arg_2, tint_symbol_1(ext_tex_params, 0u));
+ float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, arg_2, ext_tex_params_load(0u));
}
struct tint_symbol {
diff --git a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.dxc.hlsl b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.dxc.hlsl
index 327f874..6feb649 100644
--- a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.dxc.hlsl
@@ -51,14 +51,14 @@
return textureLoadExternal(tint_symbol, ext_tex_plane_1_1, coords, ext_tex_params_1);
}
-float3x4 tint_symbol_4(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_6(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -67,36 +67,36 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_12 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_12;
+ const GammaTransferParams tint_symbol_2 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_2;
}
-float3x3 tint_symbol_8(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_10(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_2(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_13 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_4(buffer, (offset + 16u)), tint_symbol_6(buffer, (offset + 64u)), tint_symbol_6(buffer, (offset + 96u)), tint_symbol_8(buffer, (offset + 128u)), tint_symbol_10(buffer, (offset + 176u))};
- return tint_symbol_13;
+ const ExternalTextureParams tint_symbol_3 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_3;
}
void doTextureLoad() {
- float4 res = textureLoad2d(arg_0, ext_tex_plane_1, tint_symbol_2(ext_tex_params, 0u), (0).xx);
+ float4 res = textureLoad2d(arg_0, ext_tex_plane_1, ext_tex_params_load(0u), (0).xx);
}
struct tint_symbol_1 {
diff --git a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.fxc.hlsl b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.fxc.hlsl
index 327f874..6feb649 100644
--- a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.fxc.hlsl
@@ -51,14 +51,14 @@
return textureLoadExternal(tint_symbol, ext_tex_plane_1_1, coords, ext_tex_params_1);
}
-float3x4 tint_symbol_4(uint4 buffer[13], uint offset) {
+float3x4 ext_tex_params_load_2(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+ return float3x4(asfloat(ext_tex_params[scalar_offset / 4]), asfloat(ext_tex_params[scalar_offset_1 / 4]), asfloat(ext_tex_params[scalar_offset_2 / 4]));
}
-GammaTransferParams tint_symbol_6(uint4 buffer[13], uint offset) {
+GammaTransferParams ext_tex_params_load_4(uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@@ -67,36 +67,36 @@
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
- const GammaTransferParams tint_symbol_12 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
- return tint_symbol_12;
+ const GammaTransferParams tint_symbol_2 = {asfloat(ext_tex_params[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(ext_tex_params[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(ext_tex_params[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(ext_tex_params[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(ext_tex_params[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(ext_tex_params[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(ext_tex_params[scalar_offset_9 / 4][scalar_offset_9 % 4]), ext_tex_params[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+ return tint_symbol_2;
}
-float3x3 tint_symbol_8(uint4 buffer[13], uint offset) {
+float3x3 ext_tex_params_load_6(uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+ return float3x3(asfloat(ext_tex_params[scalar_offset_11 / 4].xyz), asfloat(ext_tex_params[scalar_offset_12 / 4].xyz), asfloat(ext_tex_params[scalar_offset_13 / 4].xyz));
}
-float3x2 tint_symbol_10(uint4 buffer[13], uint offset) {
+float3x2 ext_tex_params_load_8(uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset_14 / 4];
+ uint4 ubo_load = ext_tex_params[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
+ uint4 ubo_load_1 = ext_tex_params[scalar_offset_15 / 4];
const uint scalar_offset_16 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
+ uint4 ubo_load_2 = ext_tex_params[scalar_offset_16 / 4];
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
-ExternalTextureParams tint_symbol_2(uint4 buffer[13], uint offset) {
+ExternalTextureParams ext_tex_params_load(uint offset) {
const uint scalar_offset_17 = ((offset + 0u)) / 4;
const uint scalar_offset_18 = ((offset + 4u)) / 4;
- const ExternalTextureParams tint_symbol_13 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 4], tint_symbol_4(buffer, (offset + 16u)), tint_symbol_6(buffer, (offset + 64u)), tint_symbol_6(buffer, (offset + 96u)), tint_symbol_8(buffer, (offset + 128u)), tint_symbol_10(buffer, (offset + 176u))};
- return tint_symbol_13;
+ const ExternalTextureParams tint_symbol_3 = {ext_tex_params[scalar_offset_17 / 4][scalar_offset_17 % 4], ext_tex_params[scalar_offset_18 / 4][scalar_offset_18 % 4], ext_tex_params_load_2((offset + 16u)), ext_tex_params_load_4((offset + 64u)), ext_tex_params_load_4((offset + 96u)), ext_tex_params_load_6((offset + 128u)), ext_tex_params_load_8((offset + 176u))};
+ return tint_symbol_3;
}
void doTextureLoad() {
- float4 res = textureLoad2d(arg_0, ext_tex_plane_1, tint_symbol_2(ext_tex_params, 0u), (0).xx);
+ float4 res = textureLoad2d(arg_0, ext_tex_plane_1, ext_tex_params_load(0u), (0).xx);
}
struct tint_symbol_1 {
diff --git a/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.dxc.hlsl b/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.dxc.hlsl
index 523d7b4..fe85aff 100644
--- a/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.dxc.hlsl
@@ -2,13 +2,13 @@
uint4 data[2];
};
-matrix<float16_t, 3, 2> tint_symbol_2(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 2> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint ubo_load = buffer[scalar_offset / 4][scalar_offset % 4];
+ uint ubo_load = data[scalar_offset / 4][scalar_offset % 4];
const uint scalar_offset_1 = ((offset + 4u)) / 4;
- uint ubo_load_1 = buffer[scalar_offset_1 / 4][scalar_offset_1 % 4];
+ uint ubo_load_1 = data[scalar_offset_1 / 4][scalar_offset_1 % 4];
const uint scalar_offset_2 = ((offset + 8u)) / 4;
- uint ubo_load_2 = buffer[scalar_offset_2 / 4][scalar_offset_2 % 4];
+ uint ubo_load_2 = data[scalar_offset_2 / 4][scalar_offset_2 % 4];
return matrix<float16_t, 3, 2>(vector<float16_t, 2>(float16_t(f16tof32(ubo_load & 0xFFFF)), float16_t(f16tof32(ubo_load >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_1 & 0xFFFF)), float16_t(f16tof32(ubo_load_1 >> 16))), vector<float16_t, 2>(float16_t(f16tof32(ubo_load_2 & 0xFFFF)), float16_t(f16tof32(ubo_load_2 >> 16))));
}
@@ -16,6 +16,6 @@
uint2 ubo_load_3 = data[1].xy;
vector<float16_t, 2> ubo_load_3_xz = vector<float16_t, 2>(f16tof32(ubo_load_3 & 0xFFFF));
float16_t ubo_load_3_y = f16tof32(ubo_load_3[0] >> 16);
- const vector<float16_t, 2> x = mul(vector<float16_t, 3>(ubo_load_3_xz[0], ubo_load_3_y, ubo_load_3_xz[1]), tint_symbol_2(data, 0u));
+ const vector<float16_t, 2> x = mul(vector<float16_t, 3>(ubo_load_3_xz[0], ubo_load_3_y, ubo_load_3_xz[1]), data_load(0u));
return;
}
diff --git a/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.dxc.hlsl b/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.dxc.hlsl
index 6e12e5c..95f8c11 100644
--- a/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.dxc.hlsl
@@ -2,17 +2,17 @@
uint4 data[3];
};
-float3x2 tint_symbol_2(uint4 buffer[3], uint offset) {
+float3x2 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = data[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = data[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = data[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
void main() {
- const float2 x = mul(asfloat(data[2].xyz), tint_symbol_2(data, 0u));
+ const float2 x = mul(asfloat(data[2].xyz), data_load(0u));
return;
}
diff --git a/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.fxc.hlsl b/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.fxc.hlsl
index 6e12e5c..95f8c11 100644
--- a/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.fxc.hlsl
@@ -2,17 +2,17 @@
uint4 data[3];
};
-float3x2 tint_symbol_2(uint4 buffer[3], uint offset) {
+float3x2 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load = buffer[scalar_offset / 4];
+ uint4 ubo_load = data[scalar_offset / 4];
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_1 = data[scalar_offset_1 / 4];
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_2 = data[scalar_offset_2 / 4];
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
}
void main() {
- const float2 x = mul(asfloat(data[2].xyz), tint_symbol_2(data, 0u));
+ const float2 x = mul(asfloat(data[2].xyz), data_load(0u));
return;
}
diff --git a/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.dxc.hlsl b/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.dxc.hlsl
index a60cb20..e167251 100644
--- a/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.dxc.hlsl
@@ -2,19 +2,19 @@
uint4 data[2];
};
-matrix<float16_t, 3, 3> tint_symbol_2(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 3> data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = data[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
@@ -25,6 +25,6 @@
uint2 ubo_load_6 = data[1].zw;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
- const vector<float16_t, 3> x = mul(vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]), tint_symbol_2(data, 0u));
+ const vector<float16_t, 3> x = mul(vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]), data_load(0u));
return;
}
diff --git a/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.dxc.hlsl b/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.dxc.hlsl
index c680c08..a7889f2 100644
--- a/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.dxc.hlsl
@@ -2,14 +2,14 @@
uint4 data[4];
};
-float3x3 tint_symbol_2(uint4 buffer[4], uint offset) {
+float3x3 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(data[scalar_offset / 4].xyz), asfloat(data[scalar_offset_1 / 4].xyz), asfloat(data[scalar_offset_2 / 4].xyz));
}
void main() {
- const float3 x = mul(asfloat(data[3].xyz), tint_symbol_2(data, 0u));
+ const float3 x = mul(asfloat(data[3].xyz), data_load(0u));
return;
}
diff --git a/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.fxc.hlsl b/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.fxc.hlsl
index c680c08..a7889f2 100644
--- a/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.fxc.hlsl
@@ -2,14 +2,14 @@
uint4 data[4];
};
-float3x3 tint_symbol_2(uint4 buffer[4], uint offset) {
+float3x3 data_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(data[scalar_offset / 4].xyz), asfloat(data[scalar_offset_1 / 4].xyz), asfloat(data[scalar_offset_2 / 4].xyz));
}
void main() {
- const float3 x = mul(asfloat(data[3].xyz), tint_symbol_2(data, 0u));
+ const float3 x = mul(asfloat(data[3].xyz), data_load(0u));
return;
}
diff --git a/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.dxc.hlsl b/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.dxc.hlsl
index 4f38587..bbc5e14 100644
--- a/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.dxc.hlsl
@@ -2,19 +2,19 @@
uint4 data[2];
};
-matrix<float16_t, 3, 3> tint_symbol_3(uint4 buffer[2], uint offset) {
+matrix<float16_t, 3, 3> data_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = data[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
@@ -25,6 +25,6 @@
uint2 ubo_load_6 = data[1].zw;
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
- const vector<float16_t, 3> x = mul(tint_symbol_3(data, 0u), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
+ const vector<float16_t, 3> x = mul(data_load_1(0u), vector<float16_t, 3>(ubo_load_6_xz[0], ubo_load_6_y, ubo_load_6_xz[1]));
return;
}
diff --git a/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.dxc.hlsl b/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.dxc.hlsl
index 4bd768f..c4a04f3 100644
--- a/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.dxc.hlsl
@@ -2,14 +2,14 @@
uint4 data[4];
};
-float3x3 tint_symbol_3(uint4 buffer[4], uint offset) {
+float3x3 data_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(data[scalar_offset / 4].xyz), asfloat(data[scalar_offset_1 / 4].xyz), asfloat(data[scalar_offset_2 / 4].xyz));
}
void main() {
- const float3 x = mul(tint_symbol_3(data, 0u), asfloat(data[3].xyz));
+ const float3 x = mul(data_load_1(0u), asfloat(data[3].xyz));
return;
}
diff --git a/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.fxc.hlsl b/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.fxc.hlsl
index 4bd768f..c4a04f3 100644
--- a/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.fxc.hlsl
@@ -2,14 +2,14 @@
uint4 data[4];
};
-float3x3 tint_symbol_3(uint4 buffer[4], uint offset) {
+float3x3 data_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
- return float3x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz));
+ return float3x3(asfloat(data[scalar_offset / 4].xyz), asfloat(data[scalar_offset_1 / 4].xyz), asfloat(data[scalar_offset_2 / 4].xyz));
}
void main() {
- const float3 x = mul(tint_symbol_3(data, 0u), asfloat(data[3].xyz));
+ const float3 x = mul(data_load_1(0u), asfloat(data[3].xyz));
return;
}
diff --git a/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.dxc.hlsl b/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.dxc.hlsl
index 818c96e..e622477 100644
--- a/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.dxc.hlsl
@@ -2,24 +2,24 @@
uint4 data[3];
};
-matrix<float16_t, 4, 3> tint_symbol_3(uint4 buffer[3], uint offset) {
+matrix<float16_t, 4, 3> data_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- uint4 ubo_load_1 = buffer[scalar_offset / 4];
+ uint4 ubo_load_1 = data[scalar_offset / 4];
uint2 ubo_load = ((scalar_offset & 2) ? ubo_load_1.zw : ubo_load_1.xy);
vector<float16_t, 2> ubo_load_xz = vector<float16_t, 2>(f16tof32(ubo_load & 0xFFFF));
float16_t ubo_load_y = f16tof32(ubo_load[0] >> 16);
const uint scalar_offset_1 = ((offset + 8u)) / 4;
- uint4 ubo_load_3 = buffer[scalar_offset_1 / 4];
+ uint4 ubo_load_3 = data[scalar_offset_1 / 4];
uint2 ubo_load_2 = ((scalar_offset_1 & 2) ? ubo_load_3.zw : ubo_load_3.xy);
vector<float16_t, 2> ubo_load_2_xz = vector<float16_t, 2>(f16tof32(ubo_load_2 & 0xFFFF));
float16_t ubo_load_2_y = f16tof32(ubo_load_2[0] >> 16);
const uint scalar_offset_2 = ((offset + 16u)) / 4;
- uint4 ubo_load_5 = buffer[scalar_offset_2 / 4];
+ uint4 ubo_load_5 = data[scalar_offset_2 / 4];
uint2 ubo_load_4 = ((scalar_offset_2 & 2) ? ubo_load_5.zw : ubo_load_5.xy);
vector<float16_t, 2> ubo_load_4_xz = vector<float16_t, 2>(f16tof32(ubo_load_4 & 0xFFFF));
float16_t ubo_load_4_y = f16tof32(ubo_load_4[0] >> 16);
const uint scalar_offset_3 = ((offset + 24u)) / 4;
- uint4 ubo_load_7 = buffer[scalar_offset_3 / 4];
+ uint4 ubo_load_7 = data[scalar_offset_3 / 4];
uint2 ubo_load_6 = ((scalar_offset_3 & 2) ? ubo_load_7.zw : ubo_load_7.xy);
vector<float16_t, 2> ubo_load_6_xz = vector<float16_t, 2>(f16tof32(ubo_load_6 & 0xFFFF));
float16_t ubo_load_6_y = f16tof32(ubo_load_6[0] >> 16);
@@ -30,6 +30,6 @@
uint2 ubo_load_8 = data[2].xy;
vector<float16_t, 2> ubo_load_8_xz = vector<float16_t, 2>(f16tof32(ubo_load_8 & 0xFFFF));
float16_t ubo_load_8_y = f16tof32(ubo_load_8[0] >> 16);
- const vector<float16_t, 4> x = mul(tint_symbol_3(data, 0u), vector<float16_t, 3>(ubo_load_8_xz[0], ubo_load_8_y, ubo_load_8_xz[1]));
+ const vector<float16_t, 4> x = mul(data_load_1(0u), vector<float16_t, 3>(ubo_load_8_xz[0], ubo_load_8_y, ubo_load_8_xz[1]));
return;
}
diff --git a/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.dxc.hlsl b/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.dxc.hlsl
index 574af42..8d756d6 100644
--- a/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.dxc.hlsl
@@ -2,15 +2,15 @@
uint4 data[5];
};
-float4x3 tint_symbol_3(uint4 buffer[5], uint offset) {
+float4x3 data_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(data[scalar_offset / 4].xyz), asfloat(data[scalar_offset_1 / 4].xyz), asfloat(data[scalar_offset_2 / 4].xyz), asfloat(data[scalar_offset_3 / 4].xyz));
}
void main() {
- const float4 x = mul(tint_symbol_3(data, 0u), asfloat(data[4].xyz));
+ const float4 x = mul(data_load_1(0u), asfloat(data[4].xyz));
return;
}
diff --git a/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.fxc.hlsl b/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.fxc.hlsl
index 574af42..8d756d6 100644
--- a/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.fxc.hlsl
@@ -2,15 +2,15 @@
uint4 data[5];
};
-float4x3 tint_symbol_3(uint4 buffer[5], uint offset) {
+float4x3 data_load_1(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz), asfloat(buffer[scalar_offset_2 / 4].xyz), asfloat(buffer[scalar_offset_3 / 4].xyz));
+ return float4x3(asfloat(data[scalar_offset / 4].xyz), asfloat(data[scalar_offset_1 / 4].xyz), asfloat(data[scalar_offset_2 / 4].xyz), asfloat(data[scalar_offset_3 / 4].xyz));
}
void main() {
- const float4 x = mul(tint_symbol_3(data, 0u), asfloat(data[4].xyz));
+ const float4 x = mul(data_load_1(0u), asfloat(data[4].xyz));
return;
}
diff --git a/test/tint/layout/storage/mat2x2/f32.wgsl.expected.dxc.hlsl b/test/tint/layout/storage/mat2x2/f32.wgsl.expected.dxc.hlsl
index 49afc06..49bbb8f 100644
--- a/test/tint/layout/storage/mat2x2/f32.wgsl.expected.dxc.hlsl
+++ b/test/tint/layout/storage/mat2x2/f32.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
RWByteAddressBuffer ssbo : register(u0, space0);
-float2x2 tint_symbol(RWByteAddressBuffer buffer, uint offset) {
- return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
+float2x2 ssbo_load(uint offset) {
+ return float2x2(asfloat(ssbo.Load2((offset + 0u))), asfloat(ssbo.Load2((offset + 8u))));
}
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void ssbo_store(uint offset, float2x2 value) {
+ ssbo.Store2((offset + 0u), asuint(value[0u]));
+ ssbo.Store2((offset + 8u), asuint(value[1u]));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x2 v = tint_symbol(ssbo, 0u);
- tint_symbol_2(ssbo, 0u, v);
+ const float2x2 v = ssbo_load(0u);
+ ssbo_store(0u, v);
return;
}
diff --git a/test/tint/layout/storage/mat2x2/f32.wgsl.expected.fxc.hlsl b/test/tint/layout/storage/mat2x2/f32.wgsl.expected.fxc.hlsl
index 49afc06..49bbb8f 100644
--- a/test/tint/layout/storage/mat2x2/f32.wgsl.expected.fxc.hlsl
+++ b/test/tint/layout/storage/mat2x2/f32.wgsl.expected.fxc.hlsl
@@ -1,17 +1,17 @@
RWByteAddressBuffer ssbo : register(u0, space0);
-float2x2 tint_symbol(RWByteAddressBuffer buffer, uint offset) {
- return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
+float2x2 ssbo_load(uint offset) {
+ return float2x2(asfloat(ssbo.Load2((offset + 0u))), asfloat(ssbo.Load2((offset + 8u))));
}
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
- buffer.Store2((offset + 0u), asuint(value[0u]));
- buffer.Store2((offset + 8u), asuint(value[1u]));
+void ssbo_store(uint offset, float2x2 value) {
+ ssbo.Store2((offset + 0u), asuint(value[0u]));
+ ssbo.Store2((offset + 8u), asuint(value[1u]));
}
[numthreads(1, 1, 1)]
void f() {
- const float2x2 v = tint_symbol(ssbo, 0u);
- tint_symbol_2(ssbo, 0u, v);
+ const float2x2 v = ssbo_load(0u);
+ ssbo_store(0u, v);
return;
}
diff --git a/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.dxc.hlsl b/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.dxc.hlsl
index 0c20131..45f02cd 100644
--- a/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.dxc.hlsl
+++ b/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.dxc.hlsl
@@ -10,45 +10,45 @@
typedef strided_arr mat2x2_stride_16_to_arr_ret[2];
mat2x2_stride_16_to_arr_ret mat2x2_stride_16_to_arr(float2x2 m) {
- const strided_arr tint_symbol_7 = {m[0u]};
- const strided_arr tint_symbol_8 = {m[1u]};
- const strided_arr tint_symbol_9[2] = {tint_symbol_7, tint_symbol_8};
- return tint_symbol_9;
+ const strided_arr tint_symbol_1 = {m[0u]};
+ const strided_arr tint_symbol_2 = {m[1u]};
+ const strided_arr tint_symbol_3[2] = {tint_symbol_1, tint_symbol_2};
+ return tint_symbol_3;
}
-strided_arr tint_symbol_2(RWByteAddressBuffer buffer, uint offset) {
- const strided_arr tint_symbol_10 = {asfloat(buffer.Load2((offset + 0u)))};
- return tint_symbol_10;
+strided_arr ssbo_load_1(uint offset) {
+ const strided_arr tint_symbol_4 = {asfloat(ssbo.Load2((offset + 0u)))};
+ return tint_symbol_4;
}
-typedef strided_arr tint_symbol_1_ret[2];
-tint_symbol_1_ret tint_symbol_1(RWByteAddressBuffer buffer, uint offset) {
+typedef strided_arr ssbo_load_ret[2];
+ssbo_load_ret ssbo_load(uint offset) {
strided_arr arr_1[2] = (strided_arr[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- arr_1[i] = tint_symbol_2(buffer, (offset + (i * 16u)));
+ arr_1[i] = ssbo_load_1((offset + (i * 16u)));
}
}
return arr_1;
}
-void tint_symbol_5(RWByteAddressBuffer buffer, uint offset, strided_arr value) {
- buffer.Store2((offset + 0u), asuint(value.el));
+void ssbo_store_1(uint offset, strided_arr value) {
+ ssbo.Store2((offset + 0u), asuint(value.el));
}
-void tint_symbol_4(RWByteAddressBuffer buffer, uint offset, strided_arr value[2]) {
+void ssbo_store(uint offset, strided_arr value[2]) {
strided_arr array_1[2] = value;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- tint_symbol_5(buffer, (offset + (i_1 * 16u)), array_1[i_1]);
+ ssbo_store_1((offset + (i_1 * 16u)), array_1[i_1]);
}
}
}
void f_1() {
- const float2x2 x_15 = arr_to_mat2x2_stride_16(tint_symbol_1(ssbo, 0u));
+ const float2x2 x_15 = arr_to_mat2x2_stride_16(ssbo_load(0u));
const strided_arr tint_symbol[2] = mat2x2_stride_16_to_arr(x_15);
- tint_symbol_4(ssbo, 0u, tint_symbol);
+ ssbo_store(0u, tint_symbol);
return;
}
diff --git a/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.fxc.hlsl b/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.fxc.hlsl
index 0c20131..45f02cd 100644
--- a/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.fxc.hlsl
+++ b/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.fxc.hlsl
@@ -10,45 +10,45 @@
typedef strided_arr mat2x2_stride_16_to_arr_ret[2];
mat2x2_stride_16_to_arr_ret mat2x2_stride_16_to_arr(float2x2 m) {
- const strided_arr tint_symbol_7 = {m[0u]};
- const strided_arr tint_symbol_8 = {m[1u]};
- const strided_arr tint_symbol_9[2] = {tint_symbol_7, tint_symbol_8};
- return tint_symbol_9;
+ const strided_arr tint_symbol_1 = {m[0u]};
+ const strided_arr tint_symbol_2 = {m[1u]};
+ const strided_arr tint_symbol_3[2] = {tint_symbol_1, tint_symbol_2};
+ return tint_symbol_3;
}
-strided_arr tint_symbol_2(RWByteAddressBuffer buffer, uint offset) {
- const strided_arr tint_symbol_10 = {asfloat(buffer.Load2((offset + 0u)))};
- return tint_symbol_10;
+strided_arr ssbo_load_1(uint offset) {
+ const strided_arr tint_symbol_4 = {asfloat(ssbo.Load2((offset + 0u)))};
+ return tint_symbol_4;
}
-typedef strided_arr tint_symbol_1_ret[2];
-tint_symbol_1_ret tint_symbol_1(RWByteAddressBuffer buffer, uint offset) {
+typedef strided_arr ssbo_load_ret[2];
+ssbo_load_ret ssbo_load(uint offset) {
strided_arr arr_1[2] = (strided_arr[2])0;
{
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
- arr_1[i] = tint_symbol_2(buffer, (offset + (i * 16u)));
+ arr_1[i] = ssbo_load_1((offset + (i * 16u)));
}
}
return arr_1;
}
-void tint_symbol_5(RWByteAddressBuffer buffer, uint offset, strided_arr value) {
- buffer.Store2((offset + 0u), asuint(value.el));
+void ssbo_store_1(uint offset, strided_arr value) {
+ ssbo.Store2((offset + 0u), asuint(value.el));
}
-void tint_symbol_4(RWByteAddressBuffer buffer, uint offset, strided_arr value[2]) {
+void ssbo_store(uint offset, strided_arr value[2]) {
strided_arr array_1[2] = value;
{
for(uint i_1 = 0u; (i_1 < 2u); i_1 = (i_1 + 1u)) {
- tint_symbol_5(buffer, (offset + (i_1 * 16u)), array_1[i_1]);
+ ssbo_store_1((offset + (i_1 * 16u)), array_1[i_1]);
}
}
}
void f_1() {
- const float2x2 x_15 = arr_to_mat2x2_stride_16(tint_symbol_1(ssbo, 0u));
+ const float2x2 x_15 = arr_to_mat2x2_stride_16(ssbo_load(0u));
const strided_arr tint_symbol[2] = mat2x2_stride_16_to_arr(x_15);
- tint_symbol_4(ssbo, 0u, tint_symbol);
+ ssbo_store(0u, tint_symbol);
return;
}
diff --git a/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.dxc.hlsl b/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.dxc.hlsl
index a3f14af..efd7af4 100644
--- a/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.dxc.hlsl
+++ b/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.dxc.hlsl
@@ -1,11 +1,11 @@
ByteAddressBuffer S : register(t0, space0);
-typedef int tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(ByteAddressBuffer buffer, uint offset) {
+typedef int S_load_ret[4];
+S_load_ret S_load(uint offset) {
int arr_1[4] = (int[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr_1[i] = asint(buffer.Load((offset + (i * 4u))));
+ arr_1[i] = asint(S.Load((offset + (i * 4u))));
}
}
return arr_1;
@@ -13,7 +13,7 @@
typedef int func_S_arr_ret[4];
func_S_arr_ret func_S_arr() {
- return tint_symbol(S, 0u);
+ return S_load(0u);
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.fxc.hlsl b/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.fxc.hlsl
index a3f14af..efd7af4 100644
--- a/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.fxc.hlsl
+++ b/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.fxc.hlsl
@@ -1,11 +1,11 @@
ByteAddressBuffer S : register(t0, space0);
-typedef int tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(ByteAddressBuffer buffer, uint offset) {
+typedef int S_load_ret[4];
+S_load_ret S_load(uint offset) {
int arr_1[4] = (int[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- arr_1[i] = asint(buffer.Load((offset + (i * 4u))));
+ arr_1[i] = asint(S.Load((offset + (i * 4u))));
}
}
return arr_1;
@@ -13,7 +13,7 @@
typedef int func_S_arr_ret[4];
func_S_arr_ret func_S_arr() {
- return tint_symbol(S, 0u);
+ return S_load(0u);
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.dxc.hlsl b/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.dxc.hlsl
index 05f09cb..d12626f 100644
--- a/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.dxc.hlsl
+++ b/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.dxc.hlsl
@@ -4,18 +4,18 @@
ByteAddressBuffer S : register(t0, space0);
-str tint_symbol(ByteAddressBuffer buffer, uint offset) {
- const str tint_symbol_2 = {asint(buffer.Load((offset + 0u)))};
- return tint_symbol_2;
+str S_load(uint offset) {
+ const str tint_symbol = {asint(S.Load((offset + 0u)))};
+ return tint_symbol;
}
str func_S_X(uint pointer[1]) {
- return tint_symbol(S, (4u * pointer[0]));
+ return S_load((4u * pointer[0]));
}
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_3[1] = {2u};
- const str r = func_S_X(tint_symbol_3);
+ const uint tint_symbol_1[1] = {2u};
+ const str r = func_S_X(tint_symbol_1);
return;
}
diff --git a/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.fxc.hlsl b/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.fxc.hlsl
index 05f09cb..d12626f 100644
--- a/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.fxc.hlsl
+++ b/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.fxc.hlsl
@@ -4,18 +4,18 @@
ByteAddressBuffer S : register(t0, space0);
-str tint_symbol(ByteAddressBuffer buffer, uint offset) {
- const str tint_symbol_2 = {asint(buffer.Load((offset + 0u)))};
- return tint_symbol_2;
+str S_load(uint offset) {
+ const str tint_symbol = {asint(S.Load((offset + 0u)))};
+ return tint_symbol;
}
str func_S_X(uint pointer[1]) {
- return tint_symbol(S, (4u * pointer[0]));
+ return S_load((4u * pointer[0]));
}
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_3[1] = {2u};
- const str r = func_S_X(tint_symbol_3);
+ const uint tint_symbol_1[1] = {2u};
+ const str r = func_S_X(tint_symbol_1);
return;
}
diff --git a/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.dxc.hlsl b/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.dxc.hlsl
index 809f70e..eba8732 100644
--- a/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.dxc.hlsl
+++ b/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.dxc.hlsl
@@ -6,7 +6,7 @@
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_1[1] = {1u};
- const float2 r = func_S_X(tint_symbol_1);
+ const uint tint_symbol[1] = {1u};
+ const float2 r = func_S_X(tint_symbol);
return;
}
diff --git a/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.fxc.hlsl b/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.fxc.hlsl
index 809f70e..eba8732 100644
--- a/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.fxc.hlsl
+++ b/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.fxc.hlsl
@@ -6,7 +6,7 @@
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_1[1] = {1u};
- const float2 r = func_S_X(tint_symbol_1);
+ const uint tint_symbol[1] = {1u};
+ const float2 r = func_S_X(tint_symbol);
return;
}
diff --git a/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.dxc.hlsl b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.dxc.hlsl
index 10793c7..c0b633a 100644
--- a/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.dxc.hlsl
+++ b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.dxc.hlsl
@@ -6,7 +6,7 @@
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_1[1] = {1u};
- const float4 r = func_S_X(tint_symbol_1);
+ const uint tint_symbol[1] = {1u};
+ const float4 r = func_S_X(tint_symbol);
return;
}
diff --git a/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.fxc.hlsl b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.fxc.hlsl
index 10793c7..c0b633a 100644
--- a/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.fxc.hlsl
+++ b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.fxc.hlsl
@@ -6,7 +6,7 @@
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_1[1] = {1u};
- const float4 r = func_S_X(tint_symbol_1);
+ const uint tint_symbol[1] = {1u};
+ const float4 r = func_S_X(tint_symbol);
return;
}
diff --git a/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.dxc.hlsl b/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.dxc.hlsl
index df6d009..a228d97 100644
--- a/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.dxc.hlsl
+++ b/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.dxc.hlsl
@@ -2,13 +2,13 @@
uint4 S[4];
};
-typedef int4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef int4 S_load_ret[4];
+S_load_ret S_load(uint offset) {
int4 arr_1[4] = (int4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
const uint scalar_offset = ((offset + (i * 16u))) / 4;
- arr_1[i] = asint(buffer[scalar_offset / 4]);
+ arr_1[i] = asint(S[scalar_offset / 4]);
}
}
return arr_1;
@@ -16,7 +16,7 @@
typedef int4 func_S_arr_ret[4];
func_S_arr_ret func_S_arr() {
- return tint_symbol(S, 0u);
+ return S_load(0u);
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.fxc.hlsl b/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.fxc.hlsl
index df6d009..a228d97 100644
--- a/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.fxc.hlsl
+++ b/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.fxc.hlsl
@@ -2,13 +2,13 @@
uint4 S[4];
};
-typedef int4 tint_symbol_ret[4];
-tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
+typedef int4 S_load_ret[4];
+S_load_ret S_load(uint offset) {
int4 arr_1[4] = (int4[4])0;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
const uint scalar_offset = ((offset + (i * 16u))) / 4;
- arr_1[i] = asint(buffer[scalar_offset / 4]);
+ arr_1[i] = asint(S[scalar_offset / 4]);
}
}
return arr_1;
@@ -16,7 +16,7 @@
typedef int4 func_S_arr_ret[4];
func_S_arr_ret func_S_arr() {
- return tint_symbol(S, 0u);
+ return S_load(0u);
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.dxc.hlsl b/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.dxc.hlsl
index cea8a9a..e8b9f2b 100644
--- a/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.dxc.hlsl
+++ b/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.dxc.hlsl
@@ -6,19 +6,19 @@
uint4 S[4];
};
-str tint_symbol(uint4 buffer[4], uint offset) {
+str S_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- const str tint_symbol_2 = {asint(buffer[scalar_offset / 4])};
- return tint_symbol_2;
+ const str tint_symbol = {asint(S[scalar_offset / 4])};
+ return tint_symbol;
}
str func_S_X(uint pointer[1]) {
- return tint_symbol(S, (16u * pointer[0]));
+ return S_load((16u * pointer[0]));
}
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_3[1] = {2u};
- const str r = func_S_X(tint_symbol_3);
+ const uint tint_symbol_1[1] = {2u};
+ const str r = func_S_X(tint_symbol_1);
return;
}
diff --git a/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.fxc.hlsl b/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.fxc.hlsl
index cea8a9a..e8b9f2b 100644
--- a/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.fxc.hlsl
+++ b/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.fxc.hlsl
@@ -6,19 +6,19 @@
uint4 S[4];
};
-str tint_symbol(uint4 buffer[4], uint offset) {
+str S_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
- const str tint_symbol_2 = {asint(buffer[scalar_offset / 4])};
- return tint_symbol_2;
+ const str tint_symbol = {asint(S[scalar_offset / 4])};
+ return tint_symbol;
}
str func_S_X(uint pointer[1]) {
- return tint_symbol(S, (16u * pointer[0]));
+ return S_load((16u * pointer[0]));
}
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_3[1] = {2u};
- const str r = func_S_X(tint_symbol_3);
+ const uint tint_symbol_1[1] = {2u};
+ const str r = func_S_X(tint_symbol_1);
return;
}
diff --git a/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.dxc.hlsl b/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.dxc.hlsl
index 7718f57..73428f2 100644
--- a/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.dxc.hlsl
+++ b/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.dxc.hlsl
@@ -10,7 +10,7 @@
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_1[1] = {1u};
- const float2 r = func_S_X(tint_symbol_1);
+ const uint tint_symbol[1] = {1u};
+ const float2 r = func_S_X(tint_symbol);
return;
}
diff --git a/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.fxc.hlsl b/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.fxc.hlsl
index 7718f57..73428f2 100644
--- a/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.fxc.hlsl
+++ b/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.fxc.hlsl
@@ -10,7 +10,7 @@
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_1[1] = {1u};
- const float2 r = func_S_X(tint_symbol_1);
+ const uint tint_symbol[1] = {1u};
+ const float2 r = func_S_X(tint_symbol);
return;
}
diff --git a/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.dxc.hlsl b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.dxc.hlsl
index 8aeba47..f3acebf 100644
--- a/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.dxc.hlsl
+++ b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.dxc.hlsl
@@ -9,7 +9,7 @@
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_1[1] = {1u};
- const float4 r = func_S_X(tint_symbol_1);
+ const uint tint_symbol[1] = {1u};
+ const float4 r = func_S_X(tint_symbol);
return;
}
diff --git a/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.fxc.hlsl b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.fxc.hlsl
index 8aeba47..f3acebf 100644
--- a/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.fxc.hlsl
+++ b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.fxc.hlsl
@@ -9,7 +9,7 @@
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_1[1] = {1u};
- const float4 r = func_S_X(tint_symbol_1);
+ const uint tint_symbol[1] = {1u};
+ const float4 r = func_S_X(tint_symbol);
return;
}
diff --git a/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.dxc.hlsl b/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.dxc.hlsl
index 517d789..4cbff97 100644
--- a/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.dxc.hlsl
+++ b/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
RWByteAddressBuffer S : register(u0, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, int value[4]) {
+void S_store(uint offset, int value[4]) {
int array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- buffer.Store((offset + (i * 4u)), asuint(array_1[i]));
+ S.Store((offset + (i * 4u)), asuint(array_1[i]));
}
}
}
void func_S_arr() {
- const int tint_symbol_2[4] = (int[4])0;
- tint_symbol(S, 0u, tint_symbol_2);
+ const int tint_symbol[4] = (int[4])0;
+ S_store(0u, tint_symbol);
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.fxc.hlsl b/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.fxc.hlsl
index 517d789..4cbff97 100644
--- a/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.fxc.hlsl
+++ b/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.fxc.hlsl
@@ -1,17 +1,17 @@
RWByteAddressBuffer S : register(u0, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, int value[4]) {
+void S_store(uint offset, int value[4]) {
int array_1[4] = value;
{
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
- buffer.Store((offset + (i * 4u)), asuint(array_1[i]));
+ S.Store((offset + (i * 4u)), asuint(array_1[i]));
}
}
}
void func_S_arr() {
- const int tint_symbol_2[4] = (int[4])0;
- tint_symbol(S, 0u, tint_symbol_2);
+ const int tint_symbol[4] = (int[4])0;
+ S_store(0u, tint_symbol);
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.dxc.hlsl b/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.dxc.hlsl
index b51e632..19a8f15 100644
--- a/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.dxc.hlsl
+++ b/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.dxc.hlsl
@@ -4,18 +4,18 @@
RWByteAddressBuffer S : register(u0, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, str value) {
- buffer.Store((offset + 0u), asuint(value.i));
+void S_store(uint offset, str value) {
+ S.Store((offset + 0u), asuint(value.i));
}
void func_S_X(uint pointer[1]) {
- const str tint_symbol_2 = (str)0;
- tint_symbol(S, (4u * pointer[0]), tint_symbol_2);
+ const str tint_symbol = (str)0;
+ S_store((4u * pointer[0]), tint_symbol);
}
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_3[1] = {2u};
- func_S_X(tint_symbol_3);
+ const uint tint_symbol_1[1] = {2u};
+ func_S_X(tint_symbol_1);
return;
}
diff --git a/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.fxc.hlsl b/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.fxc.hlsl
index b51e632..19a8f15 100644
--- a/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.fxc.hlsl
+++ b/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.fxc.hlsl
@@ -4,18 +4,18 @@
RWByteAddressBuffer S : register(u0, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, str value) {
- buffer.Store((offset + 0u), asuint(value.i));
+void S_store(uint offset, str value) {
+ S.Store((offset + 0u), asuint(value.i));
}
void func_S_X(uint pointer[1]) {
- const str tint_symbol_2 = (str)0;
- tint_symbol(S, (4u * pointer[0]), tint_symbol_2);
+ const str tint_symbol = (str)0;
+ S_store((4u * pointer[0]), tint_symbol);
}
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_3[1] = {2u};
- func_S_X(tint_symbol_3);
+ const uint tint_symbol_1[1] = {2u};
+ func_S_X(tint_symbol_1);
return;
}
diff --git a/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.dxc.hlsl b/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.dxc.hlsl
index c2a926b..5f9ff67 100644
--- a/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.dxc.hlsl
+++ b/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.dxc.hlsl
@@ -6,7 +6,7 @@
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_1[1] = {1u};
- func_S_X(tint_symbol_1);
+ const uint tint_symbol[1] = {1u};
+ func_S_X(tint_symbol);
return;
}
diff --git a/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.fxc.hlsl b/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.fxc.hlsl
index c2a926b..5f9ff67 100644
--- a/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.fxc.hlsl
+++ b/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.fxc.hlsl
@@ -6,7 +6,7 @@
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_1[1] = {1u};
- func_S_X(tint_symbol_1);
+ const uint tint_symbol[1] = {1u};
+ func_S_X(tint_symbol);
return;
}
diff --git a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.dxc.hlsl b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.dxc.hlsl
index a345b7a..b5e0a29 100644
--- a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.dxc.hlsl
+++ b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.dxc.hlsl
@@ -6,7 +6,7 @@
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_1[1] = {1u};
- func_S_X(tint_symbol_1);
+ const uint tint_symbol[1] = {1u};
+ func_S_X(tint_symbol);
return;
}
diff --git a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.fxc.hlsl b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.fxc.hlsl
index a345b7a..b5e0a29 100644
--- a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.fxc.hlsl
+++ b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.fxc.hlsl
@@ -6,7 +6,7 @@
[numthreads(1, 1, 1)]
void main() {
- const uint tint_symbol_1[1] = {1u};
- func_S_X(tint_symbol_1);
+ const uint tint_symbol[1] = {1u};
+ func_S_X(tint_symbol);
return;
}
diff --git a/test/tint/samples/cube.wgsl.expected.dxc.hlsl b/test/tint/samples/cube.wgsl.expected.dxc.hlsl
index 82af450..833e317 100644
--- a/test/tint/samples/cube.wgsl.expected.dxc.hlsl
+++ b/test/tint/samples/cube.wgsl.expected.dxc.hlsl
@@ -19,24 +19,24 @@
float4 Position : SV_Position;
};
-float4x4 tint_symbol_6(uint4 buffer[4], uint offset) {
+float4x4 uniforms_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(uniforms[scalar_offset / 4]), asfloat(uniforms[scalar_offset_1 / 4]), asfloat(uniforms[scalar_offset_2 / 4]), asfloat(uniforms[scalar_offset_3 / 4]));
}
VertexOutput vtx_main_inner(VertexInput input) {
VertexOutput output = (VertexOutput)0;
- output.Position = mul(input.cur_position, tint_symbol_6(uniforms, 0u));
+ output.Position = mul(input.cur_position, uniforms_load(0u));
output.vtxFragColor = input.color;
return output;
}
tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol) {
- const VertexInput tint_symbol_8 = {tint_symbol.cur_position, tint_symbol.color};
- const VertexOutput inner_result = vtx_main_inner(tint_symbol_8);
+ const VertexInput tint_symbol_6 = {tint_symbol.cur_position, tint_symbol.color};
+ const VertexOutput inner_result = vtx_main_inner(tint_symbol_6);
tint_symbol_2 wrapper_result = (tint_symbol_2)0;
wrapper_result.vtxFragColor = inner_result.vtxFragColor;
wrapper_result.Position = inner_result.Position;
diff --git a/test/tint/samples/cube.wgsl.expected.fxc.hlsl b/test/tint/samples/cube.wgsl.expected.fxc.hlsl
index 82af450..833e317 100644
--- a/test/tint/samples/cube.wgsl.expected.fxc.hlsl
+++ b/test/tint/samples/cube.wgsl.expected.fxc.hlsl
@@ -19,24 +19,24 @@
float4 Position : SV_Position;
};
-float4x4 tint_symbol_6(uint4 buffer[4], uint offset) {
+float4x4 uniforms_load(uint offset) {
const uint scalar_offset = ((offset + 0u)) / 4;
const uint scalar_offset_1 = ((offset + 16u)) / 4;
const uint scalar_offset_2 = ((offset + 32u)) / 4;
const uint scalar_offset_3 = ((offset + 48u)) / 4;
- return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
+ return float4x4(asfloat(uniforms[scalar_offset / 4]), asfloat(uniforms[scalar_offset_1 / 4]), asfloat(uniforms[scalar_offset_2 / 4]), asfloat(uniforms[scalar_offset_3 / 4]));
}
VertexOutput vtx_main_inner(VertexInput input) {
VertexOutput output = (VertexOutput)0;
- output.Position = mul(input.cur_position, tint_symbol_6(uniforms, 0u));
+ output.Position = mul(input.cur_position, uniforms_load(0u));
output.vtxFragColor = input.color;
return output;
}
tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol) {
- const VertexInput tint_symbol_8 = {tint_symbol.cur_position, tint_symbol.color};
- const VertexOutput inner_result = vtx_main_inner(tint_symbol_8);
+ const VertexInput tint_symbol_6 = {tint_symbol.cur_position, tint_symbol.color};
+ const VertexOutput inner_result = vtx_main_inner(tint_symbol_6);
tint_symbol_2 wrapper_result = (tint_symbol_2)0;
wrapper_result.vtxFragColor = inner_result.vtxFragColor;
wrapper_result.Position = inner_result.Position;
diff --git a/test/tint/shader_io/compute_input_builtins_struct.wgsl.expected.dxc.hlsl b/test/tint/shader_io/compute_input_builtins_struct.wgsl.expected.dxc.hlsl
index 783117e..d3dd9c3 100644
--- a/test/tint/shader_io/compute_input_builtins_struct.wgsl.expected.dxc.hlsl
+++ b/test/tint/shader_io/compute_input_builtins_struct.wgsl.expected.dxc.hlsl
@@ -22,7 +22,7 @@
[numthreads(1, 1, 1)]
void main(tint_symbol_1 tint_symbol) {
- const ComputeInputs tint_symbol_5 = {tint_symbol.local_invocation_id, tint_symbol.local_invocation_index, tint_symbol.global_invocation_id, tint_symbol.workgroup_id, tint_symbol_3[0].xyz};
- main_inner(tint_symbol_5);
+ const ComputeInputs tint_symbol_4 = {tint_symbol.local_invocation_id, tint_symbol.local_invocation_index, tint_symbol.global_invocation_id, tint_symbol.workgroup_id, tint_symbol_3[0].xyz};
+ main_inner(tint_symbol_4);
return;
}
diff --git a/test/tint/shader_io/compute_input_builtins_struct.wgsl.expected.fxc.hlsl b/test/tint/shader_io/compute_input_builtins_struct.wgsl.expected.fxc.hlsl
index 783117e..d3dd9c3 100644
--- a/test/tint/shader_io/compute_input_builtins_struct.wgsl.expected.fxc.hlsl
+++ b/test/tint/shader_io/compute_input_builtins_struct.wgsl.expected.fxc.hlsl
@@ -22,7 +22,7 @@
[numthreads(1, 1, 1)]
void main(tint_symbol_1 tint_symbol) {
- const ComputeInputs tint_symbol_5 = {tint_symbol.local_invocation_id, tint_symbol.local_invocation_index, tint_symbol.global_invocation_id, tint_symbol.workgroup_id, tint_symbol_3[0].xyz};
- main_inner(tint_symbol_5);
+ const ComputeInputs tint_symbol_4 = {tint_symbol.local_invocation_id, tint_symbol.local_invocation_index, tint_symbol.global_invocation_id, tint_symbol.workgroup_id, tint_symbol_3[0].xyz};
+ main_inner(tint_symbol_4);
return;
}
diff --git a/test/tint/shader_io/shared_struct_storage_buffer.wgsl.expected.dxc.hlsl b/test/tint/shader_io/shared_struct_storage_buffer.wgsl.expected.dxc.hlsl
index 45c61bb..6922096 100644
--- a/test/tint/shader_io/shared_struct_storage_buffer.wgsl.expected.dxc.hlsl
+++ b/test/tint/shader_io/shared_struct_storage_buffer.wgsl.expected.dxc.hlsl
@@ -12,21 +12,21 @@
float4 v : SV_Position;
};
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.f));
- buffer.Store((offset + 4u), asuint(value.u));
- buffer.Store4((offset + 128u), asuint(value.v));
+void output_store(uint offset, S value) {
+ output.Store((offset + 0u), asuint(value.f));
+ output.Store((offset + 4u), asuint(value.u));
+ output.Store4((offset + 128u), asuint(value.v));
}
void frag_main_inner(S input) {
const float f = input.f;
const uint u = input.u;
const float4 v = input.v;
- tint_symbol_2(output, 0u, input);
+ output_store(0u, input);
}
void frag_main(tint_symbol_1 tint_symbol) {
- const S tint_symbol_6 = {tint_symbol.f, tint_symbol.u, tint_symbol.v};
- frag_main_inner(tint_symbol_6);
+ const S tint_symbol_2 = {tint_symbol.f, tint_symbol.u, tint_symbol.v};
+ frag_main_inner(tint_symbol_2);
return;
}
diff --git a/test/tint/shader_io/shared_struct_storage_buffer.wgsl.expected.fxc.hlsl b/test/tint/shader_io/shared_struct_storage_buffer.wgsl.expected.fxc.hlsl
index 45c61bb..6922096 100644
--- a/test/tint/shader_io/shared_struct_storage_buffer.wgsl.expected.fxc.hlsl
+++ b/test/tint/shader_io/shared_struct_storage_buffer.wgsl.expected.fxc.hlsl
@@ -12,21 +12,21 @@
float4 v : SV_Position;
};
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.f));
- buffer.Store((offset + 4u), asuint(value.u));
- buffer.Store4((offset + 128u), asuint(value.v));
+void output_store(uint offset, S value) {
+ output.Store((offset + 0u), asuint(value.f));
+ output.Store((offset + 4u), asuint(value.u));
+ output.Store4((offset + 128u), asuint(value.v));
}
void frag_main_inner(S input) {
const float f = input.f;
const uint u = input.u;
const float4 v = input.v;
- tint_symbol_2(output, 0u, input);
+ output_store(0u, input);
}
void frag_main(tint_symbol_1 tint_symbol) {
- const S tint_symbol_6 = {tint_symbol.f, tint_symbol.u, tint_symbol.v};
- frag_main_inner(tint_symbol_6);
+ const S tint_symbol_2 = {tint_symbol.f, tint_symbol.u, tint_symbol.v};
+ frag_main_inner(tint_symbol_2);
return;
}
diff --git a/test/tint/shader_io/shared_struct_storage_buffer_f16.wgsl.expected.dxc.hlsl b/test/tint/shader_io/shared_struct_storage_buffer_f16.wgsl.expected.dxc.hlsl
index 614cc72..16d98521 100644
--- a/test/tint/shader_io/shared_struct_storage_buffer_f16.wgsl.expected.dxc.hlsl
+++ b/test/tint/shader_io/shared_struct_storage_buffer_f16.wgsl.expected.dxc.hlsl
@@ -16,12 +16,12 @@
float4 v : SV_Position;
};
-void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, S value) {
- buffer.Store((offset + 0u), asuint(value.f));
- buffer.Store((offset + 4u), asuint(value.u));
- buffer.Store4((offset + 128u), asuint(value.v));
- buffer.Store<float16_t>((offset + 160u), value.x);
- buffer.Store<vector<float16_t, 3> >((offset + 192u), value.y);
+void output_store(uint offset, S value) {
+ output.Store((offset + 0u), asuint(value.f));
+ output.Store((offset + 4u), asuint(value.u));
+ output.Store4((offset + 128u), asuint(value.v));
+ output.Store<float16_t>((offset + 160u), value.x);
+ output.Store<vector<float16_t, 3> >((offset + 192u), value.y);
}
void frag_main_inner(S input) {
@@ -30,11 +30,11 @@
const float4 v = input.v;
const float16_t x = input.x;
const vector<float16_t, 3> y = input.y;
- tint_symbol_2(output, 0u, input);
+ output_store(0u, input);
}
void frag_main(tint_symbol_1 tint_symbol) {
- const S tint_symbol_8 = {tint_symbol.f, tint_symbol.u, tint_symbol.v, tint_symbol.x, tint_symbol.y};
- frag_main_inner(tint_symbol_8);
+ const S tint_symbol_2 = {tint_symbol.f, tint_symbol.u, tint_symbol.v, tint_symbol.x, tint_symbol.y};
+ frag_main_inner(tint_symbol_2);
return;
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.dxc.hlsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.dxc.hlsl
index 4ae0605..9413d56 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.dxc.hlsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.dxc.hlsl
@@ -7,13 +7,13 @@
};
RWByteAddressBuffer s1 : register(u0, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, InnerS value) {
- buffer.Store((offset + 0u), asuint(value.v));
+void s1_store(uint offset, InnerS value) {
+ s1.Store((offset + 0u), asuint(value.v));
}
[numthreads(1, 1, 1)]
void main() {
InnerS v = (InnerS)0;
- tint_symbol_1(s1, (4u * uniforms[0].x), v);
+ s1_store((4u * uniforms[0].x), v);
return;
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.fxc.hlsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.fxc.hlsl
index 4ae0605..9413d56 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.fxc.hlsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.fxc.hlsl
@@ -7,13 +7,13 @@
};
RWByteAddressBuffer s1 : register(u0, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, InnerS value) {
- buffer.Store((offset + 0u), asuint(value.v));
+void s1_store(uint offset, InnerS value) {
+ s1.Store((offset + 0u), asuint(value.v));
}
[numthreads(1, 1, 1)]
void main() {
InnerS v = (InnerS)0;
- tint_symbol_1(s1, (4u * uniforms[0].x), v);
+ s1_store((4u * uniforms[0].x), v);
return;
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.dxc.hlsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.dxc.hlsl
index 222fd91..ed3e737 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.dxc.hlsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.dxc.hlsl
@@ -7,13 +7,13 @@
};
RWByteAddressBuffer s : register(u0, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, InnerS value) {
- buffer.Store((offset + 0u), asuint(value.v));
+void s_store(uint offset, InnerS value) {
+ s.Store((offset + 0u), asuint(value.v));
}
[numthreads(1, 1, 1)]
void main() {
InnerS v = (InnerS)0;
- tint_symbol_1(s, ((32u * uniforms[0].x) + (4u * uniforms[0].y)), v);
+ s_store(((32u * uniforms[0].x) + (4u * uniforms[0].y)), v);
return;
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.fxc.hlsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.fxc.hlsl
index 222fd91..ed3e737 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.fxc.hlsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.fxc.hlsl
@@ -7,13 +7,13 @@
};
RWByteAddressBuffer s : register(u0, space0);
-void tint_symbol_1(RWByteAddressBuffer buffer, uint offset, InnerS value) {
- buffer.Store((offset + 0u), asuint(value.v));
+void s_store(uint offset, InnerS value) {
+ s.Store((offset + 0u), asuint(value.v));
}
[numthreads(1, 1, 1)]
void main() {
InnerS v = (InnerS)0;
- tint_symbol_1(s, ((32u * uniforms[0].x) + (4u * uniforms[0].y)), v);
+ s_store(((32u * uniforms[0].x) + (4u * uniforms[0].y)), v);
return;
}
diff --git a/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.dxc.hlsl b/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.dxc.hlsl
index 6b0784d..2fabef2 100644
--- a/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.dxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.dxc.hlsl
@@ -5,17 +5,17 @@
RWByteAddressBuffer v : register(u0, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void v_store(uint offset, float4x4 value) {
+ v.Store4((offset + 0u), asuint(value[0u]));
+ v.Store4((offset + 16u), asuint(value[1u]));
+ v.Store4((offset + 32u), asuint(value[2u]));
+ v.Store4((offset + 48u), asuint(value[3u]));
}
-float4x4 tint_symbol_2(RWByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 v_load(uint offset) {
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
- tint_symbol(v, 0u, (tint_symbol_2(v, 0u) - float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx)));
+ v_store(0u, (v_load(0u) - float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx)));
}
diff --git a/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.fxc.hlsl b/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.fxc.hlsl
index 6b0784d..2fabef2 100644
--- a/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.fxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.fxc.hlsl
@@ -5,17 +5,17 @@
RWByteAddressBuffer v : register(u0, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void v_store(uint offset, float4x4 value) {
+ v.Store4((offset + 0u), asuint(value[0u]));
+ v.Store4((offset + 16u), asuint(value[1u]));
+ v.Store4((offset + 32u), asuint(value[2u]));
+ v.Store4((offset + 48u), asuint(value[3u]));
}
-float4x4 tint_symbol_2(RWByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 v_load(uint offset) {
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
- tint_symbol(v, 0u, (tint_symbol_2(v, 0u) - float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx)));
+ v_store(0u, (v_load(0u) - float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx)));
}
diff --git a/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.dxc.hlsl b/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.dxc.hlsl
index efa7687..ccd7bc0 100644
--- a/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.dxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.dxc.hlsl
@@ -5,17 +5,17 @@
RWByteAddressBuffer v : register(u0, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void v_store(uint offset, float4x4 value) {
+ v.Store4((offset + 0u), asuint(value[0u]));
+ v.Store4((offset + 16u), asuint(value[1u]));
+ v.Store4((offset + 32u), asuint(value[2u]));
+ v.Store4((offset + 48u), asuint(value[3u]));
}
-float4x4 tint_symbol_2(RWByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 v_load(uint offset) {
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
- tint_symbol(v, 0u, (tint_symbol_2(v, 0u) + float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx)));
+ v_store(0u, (v_load(0u) + float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx)));
}
diff --git a/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.fxc.hlsl b/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.fxc.hlsl
index efa7687..ccd7bc0 100644
--- a/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.fxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.fxc.hlsl
@@ -5,17 +5,17 @@
RWByteAddressBuffer v : register(u0, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void v_store(uint offset, float4x4 value) {
+ v.Store4((offset + 0u), asuint(value[0u]));
+ v.Store4((offset + 16u), asuint(value[1u]));
+ v.Store4((offset + 32u), asuint(value[2u]));
+ v.Store4((offset + 48u), asuint(value[3u]));
}
-float4x4 tint_symbol_2(RWByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 v_load(uint offset) {
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
- tint_symbol(v, 0u, (tint_symbol_2(v, 0u) + float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx)));
+ v_store(0u, (v_load(0u) + float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx)));
}
diff --git a/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.dxc.hlsl b/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.dxc.hlsl
index 24236fd..a5678de 100644
--- a/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.dxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.dxc.hlsl
@@ -5,17 +5,17 @@
RWByteAddressBuffer v : register(u0, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void v_store(uint offset, float4x4 value) {
+ v.Store4((offset + 0u), asuint(value[0u]));
+ v.Store4((offset + 16u), asuint(value[1u]));
+ v.Store4((offset + 32u), asuint(value[2u]));
+ v.Store4((offset + 48u), asuint(value[3u]));
}
-float4x4 tint_symbol_2(RWByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 v_load(uint offset) {
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
- tint_symbol(v, 0u, (tint_symbol_2(v, 0u) * 2.0f));
+ v_store(0u, (v_load(0u) * 2.0f));
}
diff --git a/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.fxc.hlsl b/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.fxc.hlsl
index 24236fd..a5678de 100644
--- a/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.fxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.fxc.hlsl
@@ -5,17 +5,17 @@
RWByteAddressBuffer v : register(u0, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void v_store(uint offset, float4x4 value) {
+ v.Store4((offset + 0u), asuint(value[0u]));
+ v.Store4((offset + 16u), asuint(value[1u]));
+ v.Store4((offset + 32u), asuint(value[2u]));
+ v.Store4((offset + 48u), asuint(value[3u]));
}
-float4x4 tint_symbol_2(RWByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 v_load(uint offset) {
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
- tint_symbol(v, 0u, (tint_symbol_2(v, 0u) * 2.0f));
+ v_store(0u, (v_load(0u) * 2.0f));
}
diff --git a/test/tint/statements/compound_assign/matrix/times.wgsl.expected.dxc.hlsl b/test/tint/statements/compound_assign/matrix/times.wgsl.expected.dxc.hlsl
index 05313f1..5aee6d4 100644
--- a/test/tint/statements/compound_assign/matrix/times.wgsl.expected.dxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/times.wgsl.expected.dxc.hlsl
@@ -5,17 +5,17 @@
RWByteAddressBuffer v : register(u0, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void v_store(uint offset, float4x4 value) {
+ v.Store4((offset + 0u), asuint(value[0u]));
+ v.Store4((offset + 16u), asuint(value[1u]));
+ v.Store4((offset + 32u), asuint(value[2u]));
+ v.Store4((offset + 48u), asuint(value[3u]));
}
-float4x4 tint_symbol_2(RWByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 v_load(uint offset) {
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
- tint_symbol(v, 0u, mul(float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx), tint_symbol_2(v, 0u)));
+ v_store(0u, mul(float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx), v_load(0u)));
}
diff --git a/test/tint/statements/compound_assign/matrix/times.wgsl.expected.fxc.hlsl b/test/tint/statements/compound_assign/matrix/times.wgsl.expected.fxc.hlsl
index 05313f1..5aee6d4 100644
--- a/test/tint/statements/compound_assign/matrix/times.wgsl.expected.fxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/times.wgsl.expected.fxc.hlsl
@@ -5,17 +5,17 @@
RWByteAddressBuffer v : register(u0, space0);
-void tint_symbol(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
- buffer.Store4((offset + 0u), asuint(value[0u]));
- buffer.Store4((offset + 16u), asuint(value[1u]));
- buffer.Store4((offset + 32u), asuint(value[2u]));
- buffer.Store4((offset + 48u), asuint(value[3u]));
+void v_store(uint offset, float4x4 value) {
+ v.Store4((offset + 0u), asuint(value[0u]));
+ v.Store4((offset + 16u), asuint(value[1u]));
+ v.Store4((offset + 32u), asuint(value[2u]));
+ v.Store4((offset + 48u), asuint(value[3u]));
}
-float4x4 tint_symbol_2(RWByteAddressBuffer buffer, uint offset) {
- return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
+float4x4 v_load(uint offset) {
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
- tint_symbol(v, 0u, mul(float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx), tint_symbol_2(v, 0u)));
+ v_store(0u, mul(float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx), v_load(0u)));
}
diff --git a/test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.dxc.hlsl b/test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.dxc.hlsl
index ed03b3f..a7d7fd2 100644
--- a/test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.dxc.hlsl
+++ b/test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.dxc.hlsl
@@ -15,9 +15,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, int compare, int value) {
+atomic_compare_exchange_weak_ret_type aatomicCompareExchangeWeak(uint offset, int compare, int value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ a.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -28,7 +28,7 @@
int x = 0;
tint_symbol_2 tint_symbol_1 = (tint_symbol_2)0;
if (!(tint_discarded)) {
- const atomic_compare_exchange_weak_ret_type tint_symbol_3 = tint_atomicCompareExchangeWeak(a, 0u, 0, 1);
+ const atomic_compare_exchange_weak_ret_type tint_symbol_3 = aatomicCompareExchangeWeak(0u, 0, 1);
tint_symbol_1.old_value = tint_symbol_3.old_value;
tint_symbol_1.exchanged = tint_symbol_3.exchanged;
}
diff --git a/test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.fxc.hlsl b/test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.fxc.hlsl
index ed03b3f..a7d7fd2 100644
--- a/test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.fxc.hlsl
+++ b/test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.fxc.hlsl
@@ -15,9 +15,9 @@
bool exchanged;
};
-atomic_compare_exchange_weak_ret_type tint_atomicCompareExchangeWeak(RWByteAddressBuffer buffer, uint offset, int compare, int value) {
+atomic_compare_exchange_weak_ret_type aatomicCompareExchangeWeak(uint offset, int compare, int value) {
atomic_compare_exchange_weak_ret_type result=(atomic_compare_exchange_weak_ret_type)0;
- buffer.InterlockedCompareExchange(offset, compare, value, result.old_value);
+ a.InterlockedCompareExchange(offset, compare, value, result.old_value);
result.exchanged = result.old_value == compare;
return result;
}
@@ -28,7 +28,7 @@
int x = 0;
tint_symbol_2 tint_symbol_1 = (tint_symbol_2)0;
if (!(tint_discarded)) {
- const atomic_compare_exchange_weak_ret_type tint_symbol_3 = tint_atomicCompareExchangeWeak(a, 0u, 0, 1);
+ const atomic_compare_exchange_weak_ret_type tint_symbol_3 = aatomicCompareExchangeWeak(0u, 0, 1);
tint_symbol_1.old_value = tint_symbol_3.old_value;
tint_symbol_1.exchanged = tint_symbol_3.exchanged;
}
diff --git a/test/tint/statements/discard/atomic_in_for_loop_continuing.wgsl.expected.dxc.hlsl b/test/tint/statements/discard/atomic_in_for_loop_continuing.wgsl.expected.dxc.hlsl
index 44d8b38..abd1ed8 100644
--- a/test/tint/statements/discard/atomic_in_for_loop_continuing.wgsl.expected.dxc.hlsl
+++ b/test/tint/statements/discard/atomic_in_for_loop_continuing.wgsl.expected.dxc.hlsl
@@ -11,9 +11,9 @@
int value : SV_Target0;
};
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int aatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ a.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -35,7 +35,7 @@
{
int tint_symbol_4 = 0;
if (!(tint_discarded)) {
- tint_symbol_4 = tint_atomicAdd(a, 0u, 1);
+ tint_symbol_4 = aatomicAdd(0u, 1);
}
i = tint_symbol_4;
}
diff --git a/test/tint/statements/discard/atomic_in_for_loop_continuing.wgsl.expected.fxc.hlsl b/test/tint/statements/discard/atomic_in_for_loop_continuing.wgsl.expected.fxc.hlsl
index 44d8b38..abd1ed8 100644
--- a/test/tint/statements/discard/atomic_in_for_loop_continuing.wgsl.expected.fxc.hlsl
+++ b/test/tint/statements/discard/atomic_in_for_loop_continuing.wgsl.expected.fxc.hlsl
@@ -11,9 +11,9 @@
int value : SV_Target0;
};
-int tint_atomicAdd(RWByteAddressBuffer buffer, uint offset, int value) {
+int aatomicAdd(uint offset, int value) {
int original_value = 0;
- buffer.InterlockedAdd(offset, value, original_value);
+ a.InterlockedAdd(offset, value, original_value);
return original_value;
}
@@ -35,7 +35,7 @@
{
int tint_symbol_4 = 0;
if (!(tint_discarded)) {
- tint_symbol_4 = tint_atomicAdd(a, 0u, 1);
+ tint_symbol_4 = aatomicAdd(0u, 1);
}
i = tint_symbol_4;
}