mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
wgsl: Deprecate [[access]] decorations
Handle access control on var declarations instead of via [[access]] decorations. This change does the minimal work to migrate the WGSL parser over to the new syntax. Additional changes will be needed to correctly generate defaulted access qualifiers, as well as validating access usage. The [[access]] decorations are still supported by the WGSL parser, with new deprecated warnings, but not for aliases. Example: var x : [[access(x)]] alias_to_struct; Making this work is far more effort than I want to dedicate to backwards compatibility, and I do not beleive any real-world usage will be doing this. Still TODO: * Adding access control as the optional, third parameter to ptr<>. * Calculating default accesses for the various storage types. * Validating usage of variables against the different accesses. Bug: tint:846 Change-Id: If8ca82e5d16ec319ecd01f9a2cafffd930963bde Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53088 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com> Reviewed-by: David Neto <dneto@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
b175d91c7e
commit
93e8f527ee
@@ -112,13 +112,12 @@ Output BindingRemapper::Run(const Program* in, const DataMap& datamap) {
|
||||
// Replace any access controls.
|
||||
auto ac_it = remappings->access_controls.find(from);
|
||||
if (ac_it != remappings->access_controls.end()) {
|
||||
ast::AccessControl::Access ac = ac_it->second;
|
||||
ast::Access ac = ac_it->second;
|
||||
auto* ty = in->Sem().Get(var)->Type()->UnwrapRef();
|
||||
ast::Type* inner_ty = CreateASTTypeFor(&ctx, ty);
|
||||
auto* new_ty = ctx.dst->create<ast::AccessControl>(ac, inner_ty);
|
||||
auto* new_var = ctx.dst->create<ast::Variable>(
|
||||
ctx.Clone(var->source()), ctx.Clone(var->symbol()),
|
||||
var->declared_storage_class(), new_ty, var->is_const(),
|
||||
var->declared_storage_class(), ac, inner_ty, var->is_const(),
|
||||
ctx.Clone(var->constructor()), ctx.Clone(var->decorations()));
|
||||
ctx.Replace(var, new_var);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
#include "src/ast/access_control.h"
|
||||
#include "src/ast/access.h"
|
||||
#include "src/sem/binding_point.h"
|
||||
#include "src/transform/transform.h"
|
||||
|
||||
@@ -35,8 +35,7 @@ class BindingRemapper : public Transform {
|
||||
using BindingPoints = std::unordered_map<BindingPoint, BindingPoint>;
|
||||
|
||||
/// AccessControls is a map of old binding point to new access control
|
||||
using AccessControls =
|
||||
std::unordered_map<BindingPoint, ast::AccessControl::Access>;
|
||||
using AccessControls = std::unordered_map<BindingPoint, ast::Access>;
|
||||
|
||||
/// Remappings is consumed by the BindingRemapper transform.
|
||||
/// Data holds information about shader usage and constant buffer offsets.
|
||||
|
||||
@@ -30,9 +30,9 @@ TEST_F(BindingRemapperTest, NoRemappings) {
|
||||
struct S {
|
||||
};
|
||||
|
||||
[[group(2), binding(1)]] var<storage> a : [[access(read)]] S;
|
||||
[[group(2), binding(1)]] var<storage, read> a : S;
|
||||
|
||||
[[group(3), binding(2)]] var<storage> b : [[access(read)]] S;
|
||||
[[group(3), binding(2)]] var<storage, read> b : S;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn f() {
|
||||
@@ -55,9 +55,9 @@ TEST_F(BindingRemapperTest, RemapBindingPoints) {
|
||||
struct S {
|
||||
};
|
||||
|
||||
[[group(2), binding(1)]] var<storage> a : [[access(read)]] S;
|
||||
[[group(2), binding(1)]] var<storage, read> a : S;
|
||||
|
||||
[[group(3), binding(2)]] var<storage> b : [[access(read)]] S;
|
||||
[[group(3), binding(2)]] var<storage, read> b : S;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn f() {
|
||||
@@ -69,9 +69,9 @@ fn f() {
|
||||
struct S {
|
||||
};
|
||||
|
||||
[[group(1), binding(2)]] var<storage> a : [[access(read)]] S;
|
||||
[[group(1), binding(2)]] var<storage, read> a : S;
|
||||
|
||||
[[group(3), binding(2)]] var<storage> b : [[access(read)]] S;
|
||||
[[group(3), binding(2)]] var<storage, read> b : S;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn f() {
|
||||
@@ -97,11 +97,11 @@ TEST_F(BindingRemapperTest, RemapAccessControls) {
|
||||
struct S {
|
||||
};
|
||||
|
||||
[[group(2), binding(1)]] var<storage> a : [[access(read)]] S;
|
||||
[[group(2), binding(1)]] var<storage, read> a : S;
|
||||
|
||||
[[group(3), binding(2)]] var<storage> b : [[access(write)]] S;
|
||||
[[group(3), binding(2)]] var<storage, write> b : S;
|
||||
|
||||
[[group(4), binding(3)]] var<storage> c : [[access(read)]] S;
|
||||
[[group(4), binding(3)]] var<storage, read> c : S;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn f() {
|
||||
@@ -113,11 +113,11 @@ fn f() {
|
||||
struct S {
|
||||
};
|
||||
|
||||
[[group(2), binding(1)]] var<storage> a : [[access(write)]] S;
|
||||
[[group(2), binding(1)]] var<storage, write> a : S;
|
||||
|
||||
[[group(3), binding(2)]] var<storage> b : [[access(write)]] S;
|
||||
[[group(3), binding(2)]] var<storage, write> b : S;
|
||||
|
||||
[[group(4), binding(3)]] var<storage> c : [[access(read)]] S;
|
||||
[[group(4), binding(3)]] var<storage, read> c : S;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn f() {
|
||||
@@ -128,9 +128,9 @@ fn f() {
|
||||
data.Add<BindingRemapper::Remappings>(
|
||||
BindingRemapper::BindingPoints{},
|
||||
BindingRemapper::AccessControls{
|
||||
{{2, 1}, ast::AccessControl::kWrite}, // Modify access control
|
||||
{{2, 1}, ast::Access::kWrite}, // Modify access control
|
||||
// Keep [[group(3), binding(2)]] as is
|
||||
{{4, 3}, ast::AccessControl::kRead}, // Add access control
|
||||
{{4, 3}, ast::Access::kRead}, // Add access control
|
||||
});
|
||||
auto got = Run<BindingRemapper>(src, data);
|
||||
|
||||
@@ -145,9 +145,9 @@ TEST_F(BindingRemapperTest, DISABLED_RemapAccessControlsWithAliases) {
|
||||
struct S {
|
||||
};
|
||||
|
||||
type ReadOnlyS = [[access(read)]] S;
|
||||
type, read ReadOnlyS = S;
|
||||
|
||||
type WriteOnlyS = [[access(write)]] S;
|
||||
type, write WriteOnlyS = S;
|
||||
|
||||
type A = S;
|
||||
|
||||
@@ -167,17 +167,17 @@ fn f() {
|
||||
struct S {
|
||||
};
|
||||
|
||||
type ReadOnlyS = [[access(read)]] S;
|
||||
type, read ReadOnlyS = S;
|
||||
|
||||
type WriteOnlyS = [[access(write)]] S;
|
||||
type, write WriteOnlyS = S;
|
||||
|
||||
type A = S;
|
||||
|
||||
[[group(2), binding(1)]] var<storage> a : [[access(write)]] S;
|
||||
[[group(2), binding(1)]] var<storage, write> a : S;
|
||||
|
||||
[[group(3), binding(2)]] var<storage> b : WriteOnlyS;
|
||||
|
||||
[[group(4), binding(3)]] var<storage> c : [[access(write)]] S;
|
||||
[[group(4), binding(3)]] var<storage, write> c : S;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn f() {
|
||||
@@ -188,9 +188,9 @@ fn f() {
|
||||
data.Add<BindingRemapper::Remappings>(
|
||||
BindingRemapper::BindingPoints{},
|
||||
BindingRemapper::AccessControls{
|
||||
{{2, 1}, ast::AccessControl::kWrite}, // Modify access control
|
||||
{{2, 1}, ast::Access::kWrite}, // Modify access control
|
||||
// Keep [[group(3), binding(2)]] as is
|
||||
{{4, 3}, ast::AccessControl::kRead}, // Add access control
|
||||
{{4, 3}, ast::Access::kRead}, // Add access control
|
||||
});
|
||||
auto got = Run<BindingRemapper>(src, data);
|
||||
|
||||
@@ -203,9 +203,9 @@ TEST_F(BindingRemapperTest, RemapAll) {
|
||||
struct S {
|
||||
};
|
||||
|
||||
[[group(2), binding(1)]] var<storage> a : [[access(read)]] S;
|
||||
[[group(2), binding(1)]] var<storage, read> a : S;
|
||||
|
||||
[[group(3), binding(2)]] var<storage> b : [[access(read)]] S;
|
||||
[[group(3), binding(2)]] var<storage, read> b : S;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn f() {
|
||||
@@ -217,9 +217,9 @@ fn f() {
|
||||
struct S {
|
||||
};
|
||||
|
||||
[[group(4), binding(5)]] var<storage> a : [[access(write)]] S;
|
||||
[[group(4), binding(5)]] var<storage, write> a : S;
|
||||
|
||||
[[group(6), binding(7)]] var<storage> b : [[access(write)]] S;
|
||||
[[group(6), binding(7)]] var<storage, write> b : S;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn f() {
|
||||
@@ -233,8 +233,8 @@ fn f() {
|
||||
{{3, 2}, {6, 7}},
|
||||
},
|
||||
BindingRemapper::AccessControls{
|
||||
{{2, 1}, ast::AccessControl::kWrite},
|
||||
{{3, 2}, ast::AccessControl::kWrite},
|
||||
{{2, 1}, ast::Access::kWrite},
|
||||
{{3, 2}, ast::Access::kWrite},
|
||||
});
|
||||
auto got = Run<BindingRemapper>(src, data);
|
||||
|
||||
@@ -248,13 +248,13 @@ struct S {
|
||||
i : i32;
|
||||
};
|
||||
|
||||
[[group(2), binding(1)]] var<storage> a : [[access(read)]] S;
|
||||
[[group(2), binding(1)]] var<storage, read> a : S;
|
||||
|
||||
[[group(3), binding(2)]] var<storage> b : [[access(read)]] S;
|
||||
[[group(3), binding(2)]] var<storage, read> b : S;
|
||||
|
||||
[[group(4), binding(3)]] var<storage> c : [[access(read)]] S;
|
||||
[[group(4), binding(3)]] var<storage, read> c : S;
|
||||
|
||||
[[group(5), binding(4)]] var<storage> d : [[access(read)]] S;
|
||||
[[group(5), binding(4)]] var<storage, read> d : S;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn f() {
|
||||
@@ -268,13 +268,13 @@ struct S {
|
||||
i : i32;
|
||||
};
|
||||
|
||||
[[internal(disable_validation__binding_point_collision), group(1), binding(1)]] var<storage> a : [[access(read)]] S;
|
||||
[[internal(disable_validation__binding_point_collision), group(1), binding(1)]] var<storage, read> a : S;
|
||||
|
||||
[[internal(disable_validation__binding_point_collision), group(1), binding(1)]] var<storage> b : [[access(read)]] S;
|
||||
[[internal(disable_validation__binding_point_collision), group(1), binding(1)]] var<storage, read> b : S;
|
||||
|
||||
[[internal(disable_validation__binding_point_collision), group(5), binding(4)]] var<storage> c : [[access(read)]] S;
|
||||
[[internal(disable_validation__binding_point_collision), group(5), binding(4)]] var<storage, read> c : S;
|
||||
|
||||
[[internal(disable_validation__binding_point_collision), group(5), binding(4)]] var<storage> d : [[access(read)]] S;
|
||||
[[internal(disable_validation__binding_point_collision), group(5), binding(4)]] var<storage, read> d : S;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn f() {
|
||||
@@ -302,13 +302,13 @@ struct S {
|
||||
i : i32;
|
||||
};
|
||||
|
||||
[[group(2), binding(1)]] var<storage> a : [[access(read)]] S;
|
||||
[[group(2), binding(1)]] var<storage, read> a : S;
|
||||
|
||||
[[group(3), binding(2)]] var<storage> b : [[access(read)]] S;
|
||||
[[group(3), binding(2)]] var<storage, read> b : S;
|
||||
|
||||
[[group(4), binding(3)]] var<storage> c : [[access(read)]] S;
|
||||
[[group(4), binding(3)]] var<storage, read> c : S;
|
||||
|
||||
[[group(5), binding(4)]] var<storage> d : [[access(read)]] S;
|
||||
[[group(5), binding(4)]] var<storage, read> d : S;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn f1() {
|
||||
@@ -327,13 +327,13 @@ struct S {
|
||||
i : i32;
|
||||
};
|
||||
|
||||
[[group(1), binding(1)]] var<storage> a : [[access(read)]] S;
|
||||
[[group(1), binding(1)]] var<storage, read> a : S;
|
||||
|
||||
[[group(1), binding(1)]] var<storage> b : [[access(read)]] S;
|
||||
[[group(1), binding(1)]] var<storage, read> b : S;
|
||||
|
||||
[[group(5), binding(4)]] var<storage> c : [[access(read)]] S;
|
||||
[[group(5), binding(4)]] var<storage, read> c : S;
|
||||
|
||||
[[group(5), binding(4)]] var<storage> d : [[access(read)]] S;
|
||||
[[group(5), binding(4)]] var<storage, read> d : S;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn f1() {
|
||||
@@ -365,8 +365,8 @@ TEST_F(BindingRemapperTest, NoData) {
|
||||
struct S {
|
||||
};
|
||||
|
||||
[[group(2), binding(1)]] var<storage> a : [[access(read)]] S;
|
||||
[[group(3), binding(2)]] var<storage> b : [[access(read)]] S;
|
||||
[[group(2), binding(1)]] var<storage, read> a : S;
|
||||
[[group(3), binding(2)]] var<storage, read> b : S;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn f() {}
|
||||
|
||||
@@ -540,7 +540,7 @@ struct S {
|
||||
a : f32;
|
||||
b : array<f32>;
|
||||
};
|
||||
[[group(0), binding(0)]] var<storage> s : [[access(read)]] S;
|
||||
[[group(0), binding(0)]] var<storage, read> s : S;
|
||||
|
||||
fn f() {
|
||||
var d : f32 = s.b[25];
|
||||
@@ -554,7 +554,7 @@ struct S {
|
||||
b : array<f32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> s : [[access(read)]] S;
|
||||
[[group(0), binding(0)]] var<storage, read> s : S;
|
||||
|
||||
fn f() {
|
||||
var d : f32 = s.b[min(u32(25), (arrayLength(s.b) - 1u))];
|
||||
@@ -601,7 +601,7 @@ struct S {
|
||||
b : array<f32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> s : [[access(read)]] S;
|
||||
[[group(0), binding(0)]] var<storage, read> s : S;
|
||||
|
||||
let c : u32 = 1u;
|
||||
|
||||
@@ -619,7 +619,7 @@ struct S {
|
||||
b : array<f32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> s : [[access(read)]] S;
|
||||
[[group(0), binding(0)]] var<storage, read> s : S;
|
||||
|
||||
let c : u32 = 1u;
|
||||
|
||||
|
||||
@@ -91,7 +91,8 @@ Output CalculateArrayLength::Run(const Program* in, const DataMap&) {
|
||||
// in order for HLSL to emit this as a ByteAddressBuffer.
|
||||
ctx.dst->create<ast::Variable>(
|
||||
ctx.dst->Sym("buffer"), ast::StorageClass::kStorage,
|
||||
buffer_typename, true, nullptr, ast::DecorationList{}),
|
||||
ast::Access::kUndefined, buffer_typename, true, nullptr,
|
||||
ast::DecorationList{}),
|
||||
ctx.dst->Param("result",
|
||||
ctx.dst->ty.pointer(ctx.dst->ty.u32(),
|
||||
ast::StorageClass::kFunction)),
|
||||
|
||||
@@ -30,7 +30,7 @@ struct SB {
|
||||
arr : array<i32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -48,7 +48,7 @@ struct SB {
|
||||
[[internal(intrinsic_buffer_size)]]
|
||||
fn tint_symbol(buffer : SB, result : ptr<function, u32>)
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -72,7 +72,7 @@ struct SB {
|
||||
arr : array<i32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -92,7 +92,7 @@ struct SB {
|
||||
[[internal(intrinsic_buffer_size)]]
|
||||
fn tint_symbol(buffer : SB, result : ptr<function, u32>)
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -119,7 +119,7 @@ struct SB {
|
||||
arr : [[stride(64)]] array<i32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -138,7 +138,7 @@ struct SB {
|
||||
[[internal(intrinsic_buffer_size)]]
|
||||
fn tint_symbol(buffer : SB, result : ptr<function, u32>)
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -162,7 +162,7 @@ struct SB {
|
||||
arr : array<i32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -186,7 +186,7 @@ struct SB {
|
||||
[[internal(intrinsic_buffer_size)]]
|
||||
fn tint_symbol(buffer : SB, result : ptr<function, u32>)
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -225,9 +225,9 @@ struct SB2 {
|
||||
arr2 : array<vec4<f32>>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb1 : [[access(read)]] SB1;
|
||||
[[group(0), binding(0)]] var<storage, read> sb1 : SB1;
|
||||
|
||||
[[group(0), binding(1)]] var<storage> sb2 : [[access(read)]] SB2;
|
||||
[[group(0), binding(1)]] var<storage, read> sb2 : SB2;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -256,9 +256,9 @@ struct SB2 {
|
||||
[[internal(intrinsic_buffer_size)]]
|
||||
fn tint_symbol_3(buffer : SB2, result : ptr<function, u32>)
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb1 : [[access(read)]] SB1;
|
||||
[[group(0), binding(0)]] var<storage, read> sb1 : SB1;
|
||||
|
||||
[[group(0), binding(1)]] var<storage> sb2 : [[access(read)]] SB2;
|
||||
[[group(0), binding(1)]] var<storage, read> sb2 : SB2;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
|
||||
@@ -360,17 +360,6 @@ struct Store {
|
||||
StorageBufferAccess target; // The target for the write
|
||||
};
|
||||
|
||||
ast::Type* MaybeCreateASTAccessControl(CloneContext* ctx,
|
||||
const sem::VariableUser* var_user,
|
||||
ast::Type* ty) {
|
||||
if (var_user &&
|
||||
var_user->Variable()->StorageClass() == ast::StorageClass::kStorage) {
|
||||
return ctx->dst->create<ast::AccessControl>(
|
||||
var_user->Variable()->AccessControl(), ty);
|
||||
}
|
||||
return ty;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
/// State holds the current transform state
|
||||
@@ -431,14 +420,14 @@ struct DecomposeStorageAccess::State {
|
||||
const sem::VariableUser* var_user) {
|
||||
return utils::GetOrCreate(load_funcs, TypePair{buf_ty, el_ty}, [&] {
|
||||
auto* buf_ast_ty = CreateASTTypeFor(&ctx, buf_ty);
|
||||
buf_ast_ty = MaybeCreateASTAccessControl(&ctx, var_user, buf_ast_ty);
|
||||
|
||||
ast::VariableList params = {
|
||||
// Note: The buffer parameter requires the kStorage StorageClass in
|
||||
// order for HLSL to emit this as a ByteAddressBuffer.
|
||||
ctx.dst->create<ast::Variable>(
|
||||
ctx.dst->Sym("buffer"), ast::StorageClass::kStorage, buf_ast_ty,
|
||||
true, nullptr, ast::DecorationList{}),
|
||||
ctx.dst->Sym("buffer"), ast::StorageClass::kStorage,
|
||||
var_user->Variable()->Access(), buf_ast_ty, true, nullptr,
|
||||
ast::DecorationList{}),
|
||||
ctx.dst->Param("offset", ctx.dst->ty.u32()),
|
||||
};
|
||||
|
||||
@@ -507,14 +496,14 @@ struct DecomposeStorageAccess::State {
|
||||
const sem::VariableUser* var_user) {
|
||||
return utils::GetOrCreate(store_funcs, TypePair{buf_ty, el_ty}, [&] {
|
||||
auto* buf_ast_ty = CreateASTTypeFor(&ctx, buf_ty);
|
||||
buf_ast_ty = MaybeCreateASTAccessControl(&ctx, var_user, buf_ast_ty);
|
||||
auto* el_ast_ty = CreateASTTypeFor(&ctx, el_ty);
|
||||
ast::VariableList params{
|
||||
// Note: The buffer parameter requires the kStorage StorageClass in
|
||||
// order for HLSL to emit this as a ByteAddressBuffer.
|
||||
ctx.dst->create<ast::Variable>(
|
||||
ctx.dst->Sym("buffer"), ast::StorageClass::kStorage, buf_ast_ty,
|
||||
true, nullptr, ast::DecorationList{}),
|
||||
ctx.dst->Sym("buffer"), ast::StorageClass::kStorage,
|
||||
var_user->Variable()->Access(), buf_ast_ty, true, nullptr,
|
||||
ast::DecorationList{}),
|
||||
ctx.dst->Param("offset", ctx.dst->ty.u32()),
|
||||
ctx.dst->Param("value", el_ast_ty),
|
||||
};
|
||||
|
||||
@@ -50,7 +50,7 @@ struct SB {
|
||||
v : array<vec3<f32>, 2>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read_write)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -107,82 +107,82 @@ struct SB {
|
||||
};
|
||||
|
||||
[[internal(intrinsic_load_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol(buffer : [[access(read_write)]] SB, offset : u32) -> i32
|
||||
fn tint_symbol(buffer : SB, offset : u32) -> i32
|
||||
|
||||
[[internal(intrinsic_load_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_1(buffer : [[access(read_write)]] SB, offset : u32) -> u32
|
||||
fn tint_symbol_1(buffer : SB, offset : u32) -> u32
|
||||
|
||||
[[internal(intrinsic_load_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_2(buffer : [[access(read_write)]] SB, offset : u32) -> f32
|
||||
fn tint_symbol_2(buffer : SB, offset : u32) -> f32
|
||||
|
||||
[[internal(intrinsic_load_vec2_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_3(buffer : [[access(read_write)]] SB, offset : u32) -> vec2<i32>
|
||||
fn tint_symbol_3(buffer : SB, offset : u32) -> vec2<i32>
|
||||
|
||||
[[internal(intrinsic_load_vec2_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_4(buffer : [[access(read_write)]] SB, offset : u32) -> vec2<u32>
|
||||
fn tint_symbol_4(buffer : SB, offset : u32) -> vec2<u32>
|
||||
|
||||
[[internal(intrinsic_load_vec2_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_5(buffer : [[access(read_write)]] SB, offset : u32) -> vec2<f32>
|
||||
fn tint_symbol_5(buffer : SB, offset : u32) -> vec2<f32>
|
||||
|
||||
[[internal(intrinsic_load_vec3_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_6(buffer : [[access(read_write)]] SB, offset : u32) -> vec3<i32>
|
||||
fn tint_symbol_6(buffer : SB, offset : u32) -> vec3<i32>
|
||||
|
||||
[[internal(intrinsic_load_vec3_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_7(buffer : [[access(read_write)]] SB, offset : u32) -> vec3<u32>
|
||||
fn tint_symbol_7(buffer : SB, offset : u32) -> vec3<u32>
|
||||
|
||||
[[internal(intrinsic_load_vec3_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_8(buffer : [[access(read_write)]] SB, offset : u32) -> vec3<f32>
|
||||
fn tint_symbol_8(buffer : SB, offset : u32) -> vec3<f32>
|
||||
|
||||
[[internal(intrinsic_load_vec4_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_9(buffer : [[access(read_write)]] SB, offset : u32) -> vec4<i32>
|
||||
fn tint_symbol_9(buffer : SB, offset : u32) -> vec4<i32>
|
||||
|
||||
[[internal(intrinsic_load_vec4_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_10(buffer : [[access(read_write)]] SB, offset : u32) -> vec4<u32>
|
||||
fn tint_symbol_10(buffer : SB, offset : u32) -> vec4<u32>
|
||||
|
||||
[[internal(intrinsic_load_vec4_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_11(buffer : [[access(read_write)]] SB, offset : u32) -> vec4<f32>
|
||||
fn tint_symbol_11(buffer : SB, offset : u32) -> vec4<f32>
|
||||
|
||||
fn tint_symbol_12(buffer : [[access(read_write)]] SB, offset : u32) -> mat2x2<f32> {
|
||||
fn tint_symbol_12(buffer : SB, offset : u32) -> mat2x2<f32> {
|
||||
return mat2x2<f32>(tint_symbol_5(buffer, (offset + 0u)), tint_symbol_5(buffer, (offset + 8u)));
|
||||
}
|
||||
|
||||
fn tint_symbol_13(buffer : [[access(read_write)]] SB, offset : u32) -> mat2x3<f32> {
|
||||
fn tint_symbol_13(buffer : SB, offset : u32) -> mat2x3<f32> {
|
||||
return mat2x3<f32>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)));
|
||||
}
|
||||
|
||||
fn tint_symbol_14(buffer : [[access(read_write)]] SB, offset : u32) -> mat2x4<f32> {
|
||||
fn tint_symbol_14(buffer : SB, offset : u32) -> mat2x4<f32> {
|
||||
return mat2x4<f32>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 16u)));
|
||||
}
|
||||
|
||||
fn tint_symbol_15(buffer : [[access(read_write)]] SB, offset : u32) -> mat3x2<f32> {
|
||||
fn tint_symbol_15(buffer : SB, 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 tint_symbol_16(buffer : [[access(read_write)]] SB, offset : u32) -> mat3x3<f32> {
|
||||
fn tint_symbol_16(buffer : SB, 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 tint_symbol_17(buffer : [[access(read_write)]] SB, offset : u32) -> mat3x4<f32> {
|
||||
fn tint_symbol_17(buffer : SB, offset : u32) -> mat3x4<f32> {
|
||||
return mat3x4<f32>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 16u)), tint_symbol_11(buffer, (offset + 32u)));
|
||||
}
|
||||
|
||||
fn tint_symbol_18(buffer : [[access(read_write)]] SB, offset : u32) -> mat4x2<f32> {
|
||||
fn tint_symbol_18(buffer : SB, 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 tint_symbol_19(buffer : [[access(read_write)]] SB, offset : u32) -> mat4x3<f32> {
|
||||
fn tint_symbol_19(buffer : SB, 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 tint_symbol_20(buffer : [[access(read_write)]] SB, offset : u32) -> mat4x4<f32> {
|
||||
fn tint_symbol_20(buffer : SB, offset : u32) -> mat4x4<f32> {
|
||||
return mat4x4<f32>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 16u)), tint_symbol_11(buffer, (offset + 32u)), tint_symbol_11(buffer, (offset + 48u)));
|
||||
}
|
||||
|
||||
fn tint_symbol_21(buffer : [[access(read_write)]] SB, offset : u32) -> array<vec3<f32>, 2> {
|
||||
fn tint_symbol_21(buffer : SB, offset : u32) -> array<vec3<f32>, 2> {
|
||||
return array<vec3<f32>, 2>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)));
|
||||
}
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read_write)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -244,7 +244,7 @@ struct SB {
|
||||
v : array<vec3<f32>, 2>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read_write)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -301,101 +301,101 @@ struct SB {
|
||||
};
|
||||
|
||||
[[internal(intrinsic_store_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol(buffer : [[access(read_write)]] SB, offset : u32, value : i32)
|
||||
fn tint_symbol(buffer : SB, offset : u32, value : i32)
|
||||
|
||||
[[internal(intrinsic_store_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_1(buffer : [[access(read_write)]] SB, offset : u32, value : u32)
|
||||
fn tint_symbol_1(buffer : SB, offset : u32, value : u32)
|
||||
|
||||
[[internal(intrinsic_store_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_2(buffer : [[access(read_write)]] SB, offset : u32, value : f32)
|
||||
fn tint_symbol_2(buffer : SB, offset : u32, value : f32)
|
||||
|
||||
[[internal(intrinsic_store_vec2_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_3(buffer : [[access(read_write)]] SB, offset : u32, value : vec2<i32>)
|
||||
fn tint_symbol_3(buffer : SB, offset : u32, value : vec2<i32>)
|
||||
|
||||
[[internal(intrinsic_store_vec2_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_4(buffer : [[access(read_write)]] SB, offset : u32, value : vec2<u32>)
|
||||
fn tint_symbol_4(buffer : SB, offset : u32, value : vec2<u32>)
|
||||
|
||||
[[internal(intrinsic_store_vec2_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_5(buffer : [[access(read_write)]] SB, offset : u32, value : vec2<f32>)
|
||||
fn tint_symbol_5(buffer : SB, offset : u32, value : vec2<f32>)
|
||||
|
||||
[[internal(intrinsic_store_vec3_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_6(buffer : [[access(read_write)]] SB, offset : u32, value : vec3<i32>)
|
||||
fn tint_symbol_6(buffer : SB, offset : u32, value : vec3<i32>)
|
||||
|
||||
[[internal(intrinsic_store_vec3_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_7(buffer : [[access(read_write)]] SB, offset : u32, value : vec3<u32>)
|
||||
fn tint_symbol_7(buffer : SB, offset : u32, value : vec3<u32>)
|
||||
|
||||
[[internal(intrinsic_store_vec3_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_8(buffer : [[access(read_write)]] SB, offset : u32, value : vec3<f32>)
|
||||
fn tint_symbol_8(buffer : SB, offset : u32, value : vec3<f32>)
|
||||
|
||||
[[internal(intrinsic_store_vec4_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_9(buffer : [[access(read_write)]] SB, offset : u32, value : vec4<i32>)
|
||||
fn tint_symbol_9(buffer : SB, offset : u32, value : vec4<i32>)
|
||||
|
||||
[[internal(intrinsic_store_vec4_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_10(buffer : [[access(read_write)]] SB, offset : u32, value : vec4<u32>)
|
||||
fn tint_symbol_10(buffer : SB, offset : u32, value : vec4<u32>)
|
||||
|
||||
[[internal(intrinsic_store_vec4_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_11(buffer : [[access(read_write)]] SB, offset : u32, value : vec4<f32>)
|
||||
fn tint_symbol_11(buffer : SB, offset : u32, value : vec4<f32>)
|
||||
|
||||
fn tint_symbol_12(buffer : [[access(read_write)]] SB, offset : u32, value : mat2x2<f32>) {
|
||||
fn tint_symbol_12(buffer : SB, offset : u32, value : mat2x2<f32>) {
|
||||
tint_symbol_5(buffer, (offset + 0u), value[0u]);
|
||||
tint_symbol_5(buffer, (offset + 8u), value[1u]);
|
||||
}
|
||||
|
||||
fn tint_symbol_13(buffer : [[access(read_write)]] SB, offset : u32, value : mat2x3<f32>) {
|
||||
fn tint_symbol_13(buffer : SB, offset : u32, value : mat2x3<f32>) {
|
||||
tint_symbol_8(buffer, (offset + 0u), value[0u]);
|
||||
tint_symbol_8(buffer, (offset + 16u), value[1u]);
|
||||
}
|
||||
|
||||
fn tint_symbol_14(buffer : [[access(read_write)]] SB, offset : u32, value : mat2x4<f32>) {
|
||||
fn tint_symbol_14(buffer : SB, offset : u32, value : mat2x4<f32>) {
|
||||
tint_symbol_11(buffer, (offset + 0u), value[0u]);
|
||||
tint_symbol_11(buffer, (offset + 16u), value[1u]);
|
||||
}
|
||||
|
||||
fn tint_symbol_15(buffer : [[access(read_write)]] SB, offset : u32, value : mat3x2<f32>) {
|
||||
fn tint_symbol_15(buffer : SB, 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 tint_symbol_16(buffer : [[access(read_write)]] SB, offset : u32, value : mat3x3<f32>) {
|
||||
fn tint_symbol_16(buffer : SB, 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 tint_symbol_17(buffer : [[access(read_write)]] SB, offset : u32, value : mat3x4<f32>) {
|
||||
fn tint_symbol_17(buffer : SB, offset : u32, value : mat3x4<f32>) {
|
||||
tint_symbol_11(buffer, (offset + 0u), value[0u]);
|
||||
tint_symbol_11(buffer, (offset + 16u), value[1u]);
|
||||
tint_symbol_11(buffer, (offset + 32u), value[2u]);
|
||||
}
|
||||
|
||||
fn tint_symbol_18(buffer : [[access(read_write)]] SB, offset : u32, value : mat4x2<f32>) {
|
||||
fn tint_symbol_18(buffer : SB, 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 tint_symbol_19(buffer : [[access(read_write)]] SB, offset : u32, value : mat4x3<f32>) {
|
||||
fn tint_symbol_19(buffer : SB, 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 tint_symbol_20(buffer : [[access(read_write)]] SB, offset : u32, value : mat4x4<f32>) {
|
||||
fn tint_symbol_20(buffer : SB, offset : u32, value : mat4x4<f32>) {
|
||||
tint_symbol_11(buffer, (offset + 0u), value[0u]);
|
||||
tint_symbol_11(buffer, (offset + 16u), value[1u]);
|
||||
tint_symbol_11(buffer, (offset + 32u), value[2u]);
|
||||
tint_symbol_11(buffer, (offset + 48u), value[3u]);
|
||||
}
|
||||
|
||||
fn tint_symbol_21(buffer : [[access(read_write)]] SB, offset : u32, value : array<vec3<f32>, 2>) {
|
||||
fn tint_symbol_21(buffer : SB, offset : u32, value : array<vec3<f32>, 2>) {
|
||||
tint_symbol_8(buffer, (offset + 0u), value[0u]);
|
||||
tint_symbol_8(buffer, (offset + 16u), value[1u]);
|
||||
}
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read_write)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -457,7 +457,7 @@ struct SB {
|
||||
v : array<vec3<f32>, 2>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read_write)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -493,86 +493,86 @@ struct SB {
|
||||
};
|
||||
|
||||
[[internal(intrinsic_load_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol(buffer : [[access(read_write)]] SB, offset : u32) -> i32
|
||||
fn tint_symbol(buffer : SB, offset : u32) -> i32
|
||||
|
||||
[[internal(intrinsic_load_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_1(buffer : [[access(read_write)]] SB, offset : u32) -> u32
|
||||
fn tint_symbol_1(buffer : SB, offset : u32) -> u32
|
||||
|
||||
[[internal(intrinsic_load_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_2(buffer : [[access(read_write)]] SB, offset : u32) -> f32
|
||||
fn tint_symbol_2(buffer : SB, offset : u32) -> f32
|
||||
|
||||
[[internal(intrinsic_load_vec2_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_3(buffer : [[access(read_write)]] SB, offset : u32) -> vec2<i32>
|
||||
fn tint_symbol_3(buffer : SB, offset : u32) -> vec2<i32>
|
||||
|
||||
[[internal(intrinsic_load_vec2_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_4(buffer : [[access(read_write)]] SB, offset : u32) -> vec2<u32>
|
||||
fn tint_symbol_4(buffer : SB, offset : u32) -> vec2<u32>
|
||||
|
||||
[[internal(intrinsic_load_vec2_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_5(buffer : [[access(read_write)]] SB, offset : u32) -> vec2<f32>
|
||||
fn tint_symbol_5(buffer : SB, offset : u32) -> vec2<f32>
|
||||
|
||||
[[internal(intrinsic_load_vec3_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_6(buffer : [[access(read_write)]] SB, offset : u32) -> vec3<i32>
|
||||
fn tint_symbol_6(buffer : SB, offset : u32) -> vec3<i32>
|
||||
|
||||
[[internal(intrinsic_load_vec3_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_7(buffer : [[access(read_write)]] SB, offset : u32) -> vec3<u32>
|
||||
fn tint_symbol_7(buffer : SB, offset : u32) -> vec3<u32>
|
||||
|
||||
[[internal(intrinsic_load_vec3_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_8(buffer : [[access(read_write)]] SB, offset : u32) -> vec3<f32>
|
||||
fn tint_symbol_8(buffer : SB, offset : u32) -> vec3<f32>
|
||||
|
||||
[[internal(intrinsic_load_vec4_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_9(buffer : [[access(read_write)]] SB, offset : u32) -> vec4<i32>
|
||||
fn tint_symbol_9(buffer : SB, offset : u32) -> vec4<i32>
|
||||
|
||||
[[internal(intrinsic_load_vec4_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_10(buffer : [[access(read_write)]] SB, offset : u32) -> vec4<u32>
|
||||
fn tint_symbol_10(buffer : SB, offset : u32) -> vec4<u32>
|
||||
|
||||
[[internal(intrinsic_load_vec4_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_11(buffer : [[access(read_write)]] SB, offset : u32) -> vec4<f32>
|
||||
fn tint_symbol_11(buffer : SB, offset : u32) -> vec4<f32>
|
||||
|
||||
fn tint_symbol_12(buffer : [[access(read_write)]] SB, offset : u32) -> mat2x2<f32> {
|
||||
fn tint_symbol_12(buffer : SB, offset : u32) -> mat2x2<f32> {
|
||||
return mat2x2<f32>(tint_symbol_5(buffer, (offset + 0u)), tint_symbol_5(buffer, (offset + 8u)));
|
||||
}
|
||||
|
||||
fn tint_symbol_13(buffer : [[access(read_write)]] SB, offset : u32) -> mat2x3<f32> {
|
||||
fn tint_symbol_13(buffer : SB, offset : u32) -> mat2x3<f32> {
|
||||
return mat2x3<f32>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)));
|
||||
}
|
||||
|
||||
fn tint_symbol_14(buffer : [[access(read_write)]] SB, offset : u32) -> mat2x4<f32> {
|
||||
fn tint_symbol_14(buffer : SB, offset : u32) -> mat2x4<f32> {
|
||||
return mat2x4<f32>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 16u)));
|
||||
}
|
||||
|
||||
fn tint_symbol_15(buffer : [[access(read_write)]] SB, offset : u32) -> mat3x2<f32> {
|
||||
fn tint_symbol_15(buffer : SB, 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 tint_symbol_16(buffer : [[access(read_write)]] SB, offset : u32) -> mat3x3<f32> {
|
||||
fn tint_symbol_16(buffer : SB, 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 tint_symbol_17(buffer : [[access(read_write)]] SB, offset : u32) -> mat3x4<f32> {
|
||||
fn tint_symbol_17(buffer : SB, offset : u32) -> mat3x4<f32> {
|
||||
return mat3x4<f32>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 16u)), tint_symbol_11(buffer, (offset + 32u)));
|
||||
}
|
||||
|
||||
fn tint_symbol_18(buffer : [[access(read_write)]] SB, offset : u32) -> mat4x2<f32> {
|
||||
fn tint_symbol_18(buffer : SB, 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 tint_symbol_19(buffer : [[access(read_write)]] SB, offset : u32) -> mat4x3<f32> {
|
||||
fn tint_symbol_19(buffer : SB, 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 tint_symbol_20(buffer : [[access(read_write)]] SB, offset : u32) -> mat4x4<f32> {
|
||||
fn tint_symbol_20(buffer : SB, offset : u32) -> mat4x4<f32> {
|
||||
return mat4x4<f32>(tint_symbol_11(buffer, (offset + 0u)), tint_symbol_11(buffer, (offset + 16u)), tint_symbol_11(buffer, (offset + 32u)), tint_symbol_11(buffer, (offset + 48u)));
|
||||
}
|
||||
|
||||
fn tint_symbol_21(buffer : [[access(read_write)]] SB, offset : u32) -> array<vec3<f32>, 2> {
|
||||
fn tint_symbol_21(buffer : SB, offset : u32) -> array<vec3<f32>, 2> {
|
||||
return array<vec3<f32>, 2>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)));
|
||||
}
|
||||
|
||||
fn tint_symbol_22(buffer : [[access(read_write)]] SB, offset : u32) -> SB {
|
||||
fn tint_symbol_22(buffer : SB, offset : u32) -> SB {
|
||||
return SB(tint_symbol(buffer, (offset + 0u)), tint_symbol_1(buffer, (offset + 4u)), tint_symbol_2(buffer, (offset + 8u)), tint_symbol_3(buffer, (offset + 16u)), tint_symbol_4(buffer, (offset + 24u)), tint_symbol_5(buffer, (offset + 32u)), tint_symbol_6(buffer, (offset + 48u)), tint_symbol_7(buffer, (offset + 64u)), tint_symbol_8(buffer, (offset + 80u)), tint_symbol_9(buffer, (offset + 96u)), tint_symbol_10(buffer, (offset + 112u)), tint_symbol_11(buffer, (offset + 128u)), tint_symbol_12(buffer, (offset + 144u)), tint_symbol_13(buffer, (offset + 160u)), tint_symbol_14(buffer, (offset + 192u)), tint_symbol_15(buffer, (offset + 224u)), tint_symbol_16(buffer, (offset + 256u)), tint_symbol_17(buffer, (offset + 304u)), tint_symbol_18(buffer, (offset + 352u)), tint_symbol_19(buffer, (offset + 384u)), tint_symbol_20(buffer, (offset + 448u)), tint_symbol_21(buffer, (offset + 512u)));
|
||||
}
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read_write)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -613,7 +613,7 @@ struct SB {
|
||||
v : array<vec3<f32>, 2>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read_write)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -649,101 +649,101 @@ struct SB {
|
||||
};
|
||||
|
||||
[[internal(intrinsic_store_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol(buffer : [[access(read_write)]] SB, offset : u32, value : i32)
|
||||
fn tint_symbol(buffer : SB, offset : u32, value : i32)
|
||||
|
||||
[[internal(intrinsic_store_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_1(buffer : [[access(read_write)]] SB, offset : u32, value : u32)
|
||||
fn tint_symbol_1(buffer : SB, offset : u32, value : u32)
|
||||
|
||||
[[internal(intrinsic_store_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_2(buffer : [[access(read_write)]] SB, offset : u32, value : f32)
|
||||
fn tint_symbol_2(buffer : SB, offset : u32, value : f32)
|
||||
|
||||
[[internal(intrinsic_store_vec2_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_3(buffer : [[access(read_write)]] SB, offset : u32, value : vec2<i32>)
|
||||
fn tint_symbol_3(buffer : SB, offset : u32, value : vec2<i32>)
|
||||
|
||||
[[internal(intrinsic_store_vec2_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_4(buffer : [[access(read_write)]] SB, offset : u32, value : vec2<u32>)
|
||||
fn tint_symbol_4(buffer : SB, offset : u32, value : vec2<u32>)
|
||||
|
||||
[[internal(intrinsic_store_vec2_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_5(buffer : [[access(read_write)]] SB, offset : u32, value : vec2<f32>)
|
||||
fn tint_symbol_5(buffer : SB, offset : u32, value : vec2<f32>)
|
||||
|
||||
[[internal(intrinsic_store_vec3_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_6(buffer : [[access(read_write)]] SB, offset : u32, value : vec3<i32>)
|
||||
fn tint_symbol_6(buffer : SB, offset : u32, value : vec3<i32>)
|
||||
|
||||
[[internal(intrinsic_store_vec3_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_7(buffer : [[access(read_write)]] SB, offset : u32, value : vec3<u32>)
|
||||
fn tint_symbol_7(buffer : SB, offset : u32, value : vec3<u32>)
|
||||
|
||||
[[internal(intrinsic_store_vec3_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_8(buffer : [[access(read_write)]] SB, offset : u32, value : vec3<f32>)
|
||||
fn tint_symbol_8(buffer : SB, offset : u32, value : vec3<f32>)
|
||||
|
||||
[[internal(intrinsic_store_vec4_u32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_9(buffer : [[access(read_write)]] SB, offset : u32, value : vec4<i32>)
|
||||
fn tint_symbol_9(buffer : SB, offset : u32, value : vec4<i32>)
|
||||
|
||||
[[internal(intrinsic_store_vec4_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_10(buffer : [[access(read_write)]] SB, offset : u32, value : vec4<u32>)
|
||||
fn tint_symbol_10(buffer : SB, offset : u32, value : vec4<u32>)
|
||||
|
||||
[[internal(intrinsic_store_vec4_i32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol_11(buffer : [[access(read_write)]] SB, offset : u32, value : vec4<f32>)
|
||||
fn tint_symbol_11(buffer : SB, offset : u32, value : vec4<f32>)
|
||||
|
||||
fn tint_symbol_12(buffer : [[access(read_write)]] SB, offset : u32, value : mat2x2<f32>) {
|
||||
fn tint_symbol_12(buffer : SB, offset : u32, value : mat2x2<f32>) {
|
||||
tint_symbol_5(buffer, (offset + 0u), value[0u]);
|
||||
tint_symbol_5(buffer, (offset + 8u), value[1u]);
|
||||
}
|
||||
|
||||
fn tint_symbol_13(buffer : [[access(read_write)]] SB, offset : u32, value : mat2x3<f32>) {
|
||||
fn tint_symbol_13(buffer : SB, offset : u32, value : mat2x3<f32>) {
|
||||
tint_symbol_8(buffer, (offset + 0u), value[0u]);
|
||||
tint_symbol_8(buffer, (offset + 16u), value[1u]);
|
||||
}
|
||||
|
||||
fn tint_symbol_14(buffer : [[access(read_write)]] SB, offset : u32, value : mat2x4<f32>) {
|
||||
fn tint_symbol_14(buffer : SB, offset : u32, value : mat2x4<f32>) {
|
||||
tint_symbol_11(buffer, (offset + 0u), value[0u]);
|
||||
tint_symbol_11(buffer, (offset + 16u), value[1u]);
|
||||
}
|
||||
|
||||
fn tint_symbol_15(buffer : [[access(read_write)]] SB, offset : u32, value : mat3x2<f32>) {
|
||||
fn tint_symbol_15(buffer : SB, 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 tint_symbol_16(buffer : [[access(read_write)]] SB, offset : u32, value : mat3x3<f32>) {
|
||||
fn tint_symbol_16(buffer : SB, 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 tint_symbol_17(buffer : [[access(read_write)]] SB, offset : u32, value : mat3x4<f32>) {
|
||||
fn tint_symbol_17(buffer : SB, offset : u32, value : mat3x4<f32>) {
|
||||
tint_symbol_11(buffer, (offset + 0u), value[0u]);
|
||||
tint_symbol_11(buffer, (offset + 16u), value[1u]);
|
||||
tint_symbol_11(buffer, (offset + 32u), value[2u]);
|
||||
}
|
||||
|
||||
fn tint_symbol_18(buffer : [[access(read_write)]] SB, offset : u32, value : mat4x2<f32>) {
|
||||
fn tint_symbol_18(buffer : SB, 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 tint_symbol_19(buffer : [[access(read_write)]] SB, offset : u32, value : mat4x3<f32>) {
|
||||
fn tint_symbol_19(buffer : SB, 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 tint_symbol_20(buffer : [[access(read_write)]] SB, offset : u32, value : mat4x4<f32>) {
|
||||
fn tint_symbol_20(buffer : SB, offset : u32, value : mat4x4<f32>) {
|
||||
tint_symbol_11(buffer, (offset + 0u), value[0u]);
|
||||
tint_symbol_11(buffer, (offset + 16u), value[1u]);
|
||||
tint_symbol_11(buffer, (offset + 32u), value[2u]);
|
||||
tint_symbol_11(buffer, (offset + 48u), value[3u]);
|
||||
}
|
||||
|
||||
fn tint_symbol_21(buffer : [[access(read_write)]] SB, offset : u32, value : array<vec3<f32>, 2>) {
|
||||
fn tint_symbol_21(buffer : SB, offset : u32, value : array<vec3<f32>, 2>) {
|
||||
tint_symbol_8(buffer, (offset + 0u), value[0u]);
|
||||
tint_symbol_8(buffer, (offset + 16u), value[1u]);
|
||||
}
|
||||
|
||||
fn tint_symbol_22(buffer : [[access(read_write)]] SB, offset : u32, value : SB) {
|
||||
fn tint_symbol_22(buffer : SB, offset : u32, value : SB) {
|
||||
tint_symbol(buffer, (offset + 0u), value.a);
|
||||
tint_symbol_1(buffer, (offset + 4u), value.b);
|
||||
tint_symbol_2(buffer, (offset + 8u), value.c);
|
||||
@@ -768,7 +768,7 @@ fn tint_symbol_22(buffer : [[access(read_write)]] SB, offset : u32, value : SB)
|
||||
tint_symbol_21(buffer, (offset + 512u), value.v);
|
||||
}
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read_write)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -802,7 +802,7 @@ struct SB {
|
||||
b : [[stride(256)]] array<S2>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read_write)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -838,9 +838,9 @@ struct SB {
|
||||
};
|
||||
|
||||
[[internal(intrinsic_load_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol(buffer : [[access(read_write)]] SB, offset : u32) -> f32
|
||||
fn tint_symbol(buffer : SB, offset : u32) -> f32
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read_write)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -874,7 +874,7 @@ struct SB {
|
||||
b : [[stride(256)]] array<S2>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read_write)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -906,9 +906,9 @@ struct SB {
|
||||
};
|
||||
|
||||
[[internal(intrinsic_load_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol(buffer : [[access(read_write)]] SB, offset : u32) -> f32
|
||||
fn tint_symbol(buffer : SB, offset : u32) -> f32
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read_write)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -953,7 +953,7 @@ struct SB {
|
||||
b : A2_Array;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read_write)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
@@ -993,9 +993,9 @@ struct SB {
|
||||
};
|
||||
|
||||
[[internal(intrinsic_load_f32), internal(disable_validation__function_has_no_body)]]
|
||||
fn tint_symbol(buffer : [[access(read_write)]] SB, offset : u32) -> f32
|
||||
fn tint_symbol(buffer : SB, offset : u32) -> f32
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read_write)]] SB;
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb : SB;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
|
||||
@@ -115,8 +115,9 @@ Output ExternalTextureTransform::Run(const Program* in, const DataMap&) {
|
||||
auto* clonedConstructor = ctx.Clone(var->constructor());
|
||||
auto clonedDecorations = ctx.Clone(var->decorations());
|
||||
auto* newVar = ctx.dst->create<ast::Variable>(
|
||||
clonedSrc, clonedSym, var->declared_storage_class(), newType,
|
||||
var->is_const(), clonedConstructor, clonedDecorations);
|
||||
clonedSrc, clonedSym, var->declared_storage_class(),
|
||||
var->declared_access(), newType, var->is_const(), clonedConstructor,
|
||||
clonedDecorations);
|
||||
|
||||
ctx.Replace(var, newVar);
|
||||
}
|
||||
|
||||
@@ -214,10 +214,10 @@ struct State {
|
||||
ctx.dst->create<ast::StructBlockDecoration>(),
|
||||
});
|
||||
for (uint32_t i = 0; i < cfg.vertex_state.size(); ++i) {
|
||||
auto* access = ctx.dst->ty.access(ast::AccessControl::kRead, struct_type);
|
||||
// The decorated variable with struct type
|
||||
ctx.dst->Global(
|
||||
GetVertexBufferName(i), access, ast::StorageClass::kStorage, nullptr,
|
||||
GetVertexBufferName(i), struct_type, ast::StorageClass::kStorage,
|
||||
ast::Access::kRead,
|
||||
ast::DecorationList{
|
||||
ctx.dst->create<ast::BindingDecoration>(i),
|
||||
ctx.dst->create<ast::GroupDecoration>(cfg.pulling_group),
|
||||
|
||||
@@ -121,7 +121,7 @@ struct TintVertexData {
|
||||
tint_vertex_data : [[stride(4)]] array<u32>;
|
||||
};
|
||||
|
||||
[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
|
||||
[[binding(0), group(4)]] var<storage, read> tint_pulling_vertex_buffer_0 : TintVertexData;
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(position)]] vec4<f32> {
|
||||
@@ -161,7 +161,7 @@ struct TintVertexData {
|
||||
tint_vertex_data : [[stride(4)]] array<u32>;
|
||||
};
|
||||
|
||||
[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
|
||||
[[binding(0), group(4)]] var<storage, read> tint_pulling_vertex_buffer_0 : TintVertexData;
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main([[builtin(instance_index)]] tint_pulling_instance_index : u32) -> [[builtin(position)]] vec4<f32> {
|
||||
@@ -201,7 +201,7 @@ struct TintVertexData {
|
||||
tint_vertex_data : [[stride(4)]] array<u32>;
|
||||
};
|
||||
|
||||
[[binding(0), group(5)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
|
||||
[[binding(0), group(5)]] var<storage, read> tint_pulling_vertex_buffer_0 : TintVertexData;
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(position)]] vec4<f32> {
|
||||
@@ -246,7 +246,7 @@ struct TintVertexData {
|
||||
tint_vertex_data : [[stride(4)]] array<u32>;
|
||||
};
|
||||
|
||||
[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
|
||||
[[binding(0), group(4)]] var<storage, read> tint_pulling_vertex_buffer_0 : TintVertexData;
|
||||
|
||||
struct Inputs {
|
||||
[[location(0)]]
|
||||
@@ -296,9 +296,9 @@ struct TintVertexData {
|
||||
tint_vertex_data : [[stride(4)]] array<u32>;
|
||||
};
|
||||
|
||||
[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
|
||||
[[binding(0), group(4)]] var<storage, read> tint_pulling_vertex_buffer_0 : TintVertexData;
|
||||
|
||||
[[binding(1), group(4)]] var<storage> tint_pulling_vertex_buffer_1 : [[access(read)]] TintVertexData;
|
||||
[[binding(1), group(4)]] var<storage, read> tint_pulling_vertex_buffer_1 : TintVertexData;
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main([[builtin(vertex_index)]] custom_vertex_index : u32, [[builtin(instance_index)]] custom_instance_index : u32) -> [[builtin(position)]] vec4<f32> {
|
||||
@@ -358,9 +358,9 @@ struct TintVertexData {
|
||||
tint_vertex_data : [[stride(4)]] array<u32>;
|
||||
};
|
||||
|
||||
[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
|
||||
[[binding(0), group(4)]] var<storage, read> tint_pulling_vertex_buffer_0 : TintVertexData;
|
||||
|
||||
[[binding(1), group(4)]] var<storage> tint_pulling_vertex_buffer_1 : [[access(read)]] TintVertexData;
|
||||
[[binding(1), group(4)]] var<storage, read> tint_pulling_vertex_buffer_1 : TintVertexData;
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(vertex_index)]]
|
||||
@@ -442,9 +442,9 @@ struct TintVertexData {
|
||||
tint_vertex_data : [[stride(4)]] array<u32>;
|
||||
};
|
||||
|
||||
[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
|
||||
[[binding(0), group(4)]] var<storage, read> tint_pulling_vertex_buffer_0 : TintVertexData;
|
||||
|
||||
[[binding(1), group(4)]] var<storage> tint_pulling_vertex_buffer_1 : [[access(read)]] TintVertexData;
|
||||
[[binding(1), group(4)]] var<storage, read> tint_pulling_vertex_buffer_1 : TintVertexData;
|
||||
|
||||
struct Inputs {
|
||||
[[location(0)]]
|
||||
@@ -511,7 +511,7 @@ struct TintVertexData {
|
||||
tint_vertex_data : [[stride(4)]] array<u32>;
|
||||
};
|
||||
|
||||
[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
|
||||
[[binding(0), group(4)]] var<storage, read> tint_pulling_vertex_buffer_0 : TintVertexData;
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(position)]] vec4<f32> {
|
||||
@@ -559,11 +559,11 @@ struct TintVertexData {
|
||||
tint_vertex_data : [[stride(4)]] array<u32>;
|
||||
};
|
||||
|
||||
[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
|
||||
[[binding(0), group(4)]] var<storage, read> tint_pulling_vertex_buffer_0 : TintVertexData;
|
||||
|
||||
[[binding(1), group(4)]] var<storage> tint_pulling_vertex_buffer_1 : [[access(read)]] TintVertexData;
|
||||
[[binding(1), group(4)]] var<storage, read> tint_pulling_vertex_buffer_1 : TintVertexData;
|
||||
|
||||
[[binding(2), group(4)]] var<storage> tint_pulling_vertex_buffer_2 : [[access(read)]] TintVertexData;
|
||||
[[binding(2), group(4)]] var<storage, read> tint_pulling_vertex_buffer_2 : TintVertexData;
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(position)]] vec4<f32> {
|
||||
@@ -617,7 +617,7 @@ struct TintVertexData {
|
||||
tint_vertex_data_1 : [[stride(4)]] array<u32>;
|
||||
};
|
||||
|
||||
[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0_1 : [[access(read)]] TintVertexData;
|
||||
[[binding(0), group(4)]] var<storage, read> tint_pulling_vertex_buffer_0_1 : TintVertexData;
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main([[builtin(vertex_index)]] tint_pulling_vertex_index_1 : u32) -> [[builtin(position)]] vec4<f32> {
|
||||
@@ -671,7 +671,7 @@ struct TintVertexData {
|
||||
tint_vertex_data : [[stride(4)]] array<u32>;
|
||||
};
|
||||
|
||||
[[binding(0), group(5)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
|
||||
[[binding(0), group(5)]] var<storage, read> tint_pulling_vertex_buffer_0 : TintVertexData;
|
||||
|
||||
var<private> var_a : f32;
|
||||
|
||||
@@ -720,9 +720,9 @@ struct TintVertexData {
|
||||
tint_vertex_data : [[stride(4)]] array<u32>;
|
||||
};
|
||||
|
||||
[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
|
||||
[[binding(0), group(4)]] var<storage, read> tint_pulling_vertex_buffer_0 : TintVertexData;
|
||||
|
||||
[[binding(1), group(4)]] var<storage> tint_pulling_vertex_buffer_1 : [[access(read)]] TintVertexData;
|
||||
[[binding(1), group(4)]] var<storage, read> tint_pulling_vertex_buffer_1 : TintVertexData;
|
||||
|
||||
var<private> var_a : f32;
|
||||
|
||||
@@ -787,7 +787,7 @@ struct TintVertexData {
|
||||
tint_vertex_data : [[stride(4)]] array<u32>;
|
||||
};
|
||||
|
||||
[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
|
||||
[[binding(0), group(4)]] var<storage, read> tint_pulling_vertex_buffer_0 : TintVertexData;
|
||||
|
||||
var<private> var_a : f32;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user