mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +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
@@ -14,25 +14,25 @@ struct IsosurfaceVolume {
|
||||
values : array<f32>,
|
||||
}
|
||||
|
||||
@group(0) @binding(1) var<storage, write> volume : IsosurfaceVolume;
|
||||
@group(0) @binding(1) var<storage, read_write> volume : IsosurfaceVolume;
|
||||
|
||||
struct PositionBuffer {
|
||||
values : array<f32>,
|
||||
}
|
||||
|
||||
@group(0) @binding(2) var<storage, write> positionsOut : PositionBuffer;
|
||||
@group(0) @binding(2) var<storage, read_write> positionsOut : PositionBuffer;
|
||||
|
||||
struct NormalBuffer {
|
||||
values : array<f32>,
|
||||
}
|
||||
|
||||
@group(0) @binding(3) var<storage, write> normalsOut : NormalBuffer;
|
||||
@group(0) @binding(3) var<storage, read_write> normalsOut : NormalBuffer;
|
||||
|
||||
struct IndexBuffer {
|
||||
tris : array<u32>,
|
||||
}
|
||||
|
||||
@group(0) @binding(4) var<storage, write> indicesOut : IndexBuffer;
|
||||
@group(0) @binding(4) var<storage, read_write> indicesOut : IndexBuffer;
|
||||
|
||||
struct DrawIndirectArgs {
|
||||
vc : u32,
|
||||
|
||||
@@ -15,7 +15,7 @@ struct S {
|
||||
j : array<Inner, 4>,
|
||||
};
|
||||
|
||||
@binding(0) @group(0) var<storage, write> s : S;
|
||||
@binding(0) @group(0) var<storage, read_write> s : S;
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn main() {
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
OpMemberDecorate %Inner 0 Offset 0
|
||||
OpMemberDecorate %S 9 Offset 108
|
||||
OpDecorate %_arr_Inner_uint_4 ArrayStride 4
|
||||
OpDecorate %s NonReadable
|
||||
OpDecorate %s Binding 0
|
||||
OpDecorate %s DescriptorSet 0
|
||||
%int = OpTypeInt 32 1
|
||||
|
||||
@@ -15,7 +15,7 @@ struct S {
|
||||
j : array<Inner, 4>,
|
||||
}
|
||||
|
||||
@binding(0) @group(0) var<storage, write> s : S;
|
||||
@binding(0) @group(0) var<storage, read_write> s : S;
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn main() {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
@group(0) @binding(0) var<storage, read> firstMatrix : Matrix;
|
||||
@group(0) @binding(1) var<storage, read> secondMatrix : Matrix;
|
||||
@group(0) @binding(2) var<storage, write> resultMatrix : Matrix;
|
||||
@group(0) @binding(2) var<storage, read_write> resultMatrix : Matrix;
|
||||
@group(0) @binding(3) var<uniform> uniforms : Uniforms;
|
||||
|
||||
@compute @workgroup_size(2,2,1)
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
OpDecorate %secondMatrix NonWritable
|
||||
OpDecorate %secondMatrix DescriptorSet 0
|
||||
OpDecorate %secondMatrix Binding 1
|
||||
OpDecorate %resultMatrix NonReadable
|
||||
OpDecorate %resultMatrix DescriptorSet 0
|
||||
OpDecorate %resultMatrix Binding 2
|
||||
OpDecorate %Uniforms Block
|
||||
|
||||
@@ -12,7 +12,7 @@ struct Matrix {
|
||||
|
||||
@group(0) @binding(1) var<storage, read> secondMatrix : Matrix;
|
||||
|
||||
@group(0) @binding(2) var<storage, write> resultMatrix : Matrix;
|
||||
@group(0) @binding(2) var<storage, read_write> resultMatrix : Matrix;
|
||||
|
||||
@group(0) @binding(3) var<uniform> uniforms : Uniforms;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
@group(0) @binding(0) var<storage, read> firstMatrix : Matrix;
|
||||
@group(0) @binding(1) var<storage, read> secondMatrix : Matrix;
|
||||
@group(0) @binding(2) var<storage, write> resultMatrix : Matrix;
|
||||
@group(0) @binding(2) var<storage, read_write> resultMatrix : Matrix;
|
||||
@group(0) @binding(3) var<uniform> uniforms : Uniforms;
|
||||
|
||||
fn mm_readA(row : u32, col : u32) -> f32 {
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
OpDecorate %secondMatrix NonWritable
|
||||
OpDecorate %secondMatrix DescriptorSet 0
|
||||
OpDecorate %secondMatrix Binding 1
|
||||
OpDecorate %resultMatrix NonReadable
|
||||
OpDecorate %resultMatrix DescriptorSet 0
|
||||
OpDecorate %resultMatrix Binding 2
|
||||
OpDecorate %Uniforms Block
|
||||
|
||||
@@ -12,7 +12,7 @@ struct Matrix {
|
||||
|
||||
@group(0) @binding(1) var<storage, read> secondMatrix : Matrix;
|
||||
|
||||
@group(0) @binding(2) var<storage, write> resultMatrix : Matrix;
|
||||
@group(0) @binding(2) var<storage, read_write> resultMatrix : Matrix;
|
||||
|
||||
@group(0) @binding(3) var<uniform> uniforms : Uniforms;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
struct Result {
|
||||
value: u32,
|
||||
};
|
||||
@group(1) @binding(1) var<storage, write> result: Result;
|
||||
@group(1) @binding(1) var<storage, read_write> result: Result;
|
||||
|
||||
struct TestData {
|
||||
data: array<atomic<i32>,3>,
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
OpDecorate %constants Binding 0
|
||||
OpDecorate %Result Block
|
||||
OpMemberDecorate %Result 0 Offset 0
|
||||
OpDecorate %result NonReadable
|
||||
OpDecorate %result DescriptorSet 1
|
||||
OpDecorate %result Binding 1
|
||||
OpDecorate %TestData Block
|
||||
|
||||
@@ -8,7 +8,7 @@ struct Result {
|
||||
value : u32,
|
||||
}
|
||||
|
||||
@group(1) @binding(1) var<storage, write> result : Result;
|
||||
@group(1) @binding(1) var<storage, read_write> result : Result;
|
||||
|
||||
struct TestData {
|
||||
data : array<atomic<i32>, 3>,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
struct Result {
|
||||
value: u32,
|
||||
};
|
||||
@group(1) @binding(1) var<storage, write> result: Result;
|
||||
@group(1) @binding(1) var<storage, read_write> result: Result;
|
||||
|
||||
struct S {
|
||||
data: array<u32, 3>,
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
OpDecorate %constants Binding 0
|
||||
OpDecorate %Result Block
|
||||
OpMemberDecorate %Result 0 Offset 0
|
||||
OpDecorate %result NonReadable
|
||||
OpDecorate %result DescriptorSet 1
|
||||
OpDecorate %result Binding 1
|
||||
OpMemberDecorate %S 0 Offset 0
|
||||
|
||||
@@ -8,7 +8,7 @@ struct Result {
|
||||
value : u32,
|
||||
}
|
||||
|
||||
@group(1) @binding(1) var<storage, write> result : Result;
|
||||
@group(1) @binding(1) var<storage, read_write> result : Result;
|
||||
|
||||
struct S {
|
||||
data : array<u32, 3>,
|
||||
|
||||
@@ -5,7 +5,7 @@ struct S {
|
||||
};
|
||||
|
||||
@group(0) @binding(0)
|
||||
var<storage, write> output : S;
|
||||
var<storage, read_write> output : S;
|
||||
|
||||
@fragment
|
||||
fn frag_main(input : S) {
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
OpMemberDecorate %S 0 Offset 0
|
||||
OpMemberDecorate %S 1 Offset 4
|
||||
OpMemberDecorate %S 2 Offset 128
|
||||
OpDecorate %output NonReadable
|
||||
OpDecorate %output DescriptorSet 0
|
||||
OpDecorate %output Binding 0
|
||||
%float = OpTypeFloat 32
|
||||
|
||||
@@ -7,7 +7,7 @@ struct S {
|
||||
v : vec4<f32>,
|
||||
}
|
||||
|
||||
@group(0) @binding(0) var<storage, write> output : S;
|
||||
@group(0) @binding(0) var<storage, read_write> output : S;
|
||||
|
||||
@fragment
|
||||
fn frag_main(input : S) {
|
||||
|
||||
Reference in New Issue
Block a user