dawn-cmake/test/tint/shader_io/shared_struct_storage_buffer.wgsl
dan sinclair 5286ea9d16 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>
2022-07-04 15:17:00 +00:00

17 lines
348 B
WebGPU Shading Language

struct S {
@align(64) @location(0) f : f32,
@size(32) @location(1) @interpolate(flat) u : u32,
@align(128) @builtin(position) v : vec4<f32>,
};
@group(0) @binding(0)
var<storage, read_write> output : S;
@fragment
fn frag_main(input : S) {
let f : f32 = input.f;
let u : u32 = input.u;
let v : vec4<f32> = input.v;
output = input;
}