wgsl: Replace use of [[attribute]] with @attribute

Bug: tint:1382
Change-Id: I58ad2c88fde1e7c96f2ae8257e6df924b94b61db
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/77660
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton
2022-01-25 16:29:04 +00:00
committed by Dawn LUCI CQ
parent facbc82d6c
commit a9ca8cb4ab
101 changed files with 1307 additions and 1312 deletions

View File

@@ -65,9 +65,9 @@ namespace dawn::native {
data: array<u32>;
};
[[group(0), binding(0)]] var<storage, read> batch: BatchInfo;
[[group(0), binding(1)]] var<storage, read_write> clientParams: IndirectParams;
[[group(0), binding(2)]] var<storage, write> validatedParams: IndirectParams;
@group(0) @binding(0) var<storage, read> batch: BatchInfo;
@group(0) @binding(1) var<storage, read_write> clientParams: IndirectParams;
@group(0) @binding(2) var<storage, write> validatedParams: IndirectParams;
fn fail(drawIndex: u32) {
let index = drawIndex * kNumIndirectParamsPerDrawCall;
@@ -93,8 +93,8 @@ namespace dawn::native {
clientParams.data[cIndex + kFirstInstanceEntry];
}
[[stage(compute), workgroup_size(64, 1, 1)]]
fn main([[builtin(global_invocation_id)]] id : vec3<u32>) {
@stage(compute) @workgroup_size(64, 1, 1)
fn main(@builtin(global_invocation_id) id : vec3<u32>) {
if (id.x >= batch.numDraws) {
return;
}