mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 18:59:21 +00:00
tint: Disallow write-only storage buffers
These have not been in the spec for a long time. The read_write access mode can be used instead. Fixed: tint:1342 Change-Id: I01ffc343d2d2f9df9d7028bba4548c749616c65c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93500 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
3b800578b5
commit
5286ea9d16
@@ -137,9 +137,9 @@ struct S {
|
||||
a : f32,
|
||||
};
|
||||
|
||||
@group(2) @binding(1) var<storage, read> a : S;
|
||||
@group(2) @binding(1) var<storage, read_write> a : S;
|
||||
|
||||
@group(3) @binding(2) var<storage, write> b : S;
|
||||
@group(3) @binding(2) var<storage, read_write> b : S;
|
||||
|
||||
@group(4) @binding(3) var<storage, read> c : S;
|
||||
|
||||
@@ -153,9 +153,9 @@ struct S {
|
||||
a : f32,
|
||||
}
|
||||
|
||||
@group(2) @binding(1) var<storage, write> a : S;
|
||||
@group(2) @binding(1) var<storage, read_write> a : S;
|
||||
|
||||
@group(3) @binding(2) var<storage, write> b : S;
|
||||
@group(3) @binding(2) var<storage, read_write> b : S;
|
||||
|
||||
@group(4) @binding(3) var<storage, read> c : S;
|
||||
|
||||
@@ -168,7 +168,7 @@ fn f() {
|
||||
data.Add<BindingRemapper::Remappings>(
|
||||
BindingRemapper::BindingPoints{},
|
||||
BindingRemapper::AccessControls{
|
||||
{{2, 1}, ast::Access::kWrite}, // Modify access control
|
||||
{{2, 1}, ast::Access::kReadWrite}, // Modify access control
|
||||
// Keep @group(3) @binding(2) as is
|
||||
{{4, 3}, ast::Access::kRead}, // Add access control
|
||||
});
|
||||
@@ -197,9 +197,9 @@ struct S {
|
||||
a : f32,
|
||||
}
|
||||
|
||||
@group(4) @binding(5) var<storage, write> a : S;
|
||||
@group(4) @binding(5) var<storage, read_write> a : S;
|
||||
|
||||
@group(6) @binding(7) var<storage, write> b : S;
|
||||
@group(6) @binding(7) var<storage, read_write> b : S;
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn f() {
|
||||
@@ -213,8 +213,8 @@ fn f() {
|
||||
{{3, 2}, {6, 7}},
|
||||
},
|
||||
BindingRemapper::AccessControls{
|
||||
{{2, 1}, ast::Access::kWrite},
|
||||
{{3, 2}, ast::Access::kWrite},
|
||||
{{2, 1}, ast::Access::kReadWrite},
|
||||
{{3, 2}, ast::Access::kReadWrite},
|
||||
});
|
||||
auto got = Run<BindingRemapper>(src, data);
|
||||
|
||||
|
||||
@@ -568,7 +568,7 @@ struct S1 {
|
||||
@group(3) @binding(0) var g5 : texture_depth_cube_array;
|
||||
@group(4) @binding(0) var g6 : texture_external;
|
||||
|
||||
@group(0) @binding(1) var<storage, write> g8 : S0;
|
||||
@group(0) @binding(1) var<storage, read_write> g8 : S0;
|
||||
@group(1) @binding(3) var<storage, read> g9 : S0;
|
||||
@group(3) @binding(2) var<storage, read_write> g10 : S0;
|
||||
|
||||
@@ -634,7 +634,7 @@ struct S1 {
|
||||
|
||||
@group(4) @binding(0) var g6 : texture_external;
|
||||
|
||||
@group(0) @binding(1) var<storage, write> g8 : S0;
|
||||
@group(0) @binding(1) var<storage, read_write> g8 : S0;
|
||||
|
||||
@group(1) @binding(3) var<storage, read> g9 : S0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user