mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-16 20:31:20 +00:00
This CL adds the ability to parse the `@compute`, `@fragment` and `@vertex` attrbutes. The `@stage(...)` are still accepted and are not marked as deprecated yet. Most tests are still using `@stage(..)` except for a testing one. Bug: tint:1503 Change-Id: I85cad5996605035e83109b021ffb13db98b1a144 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92480 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Auto-Submit: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
16 lines
493 B
WebGPU Shading Language
16 lines
493 B
WebGPU Shading Language
@compute @workgroup_size(1)
|
|
fn main(
|
|
@builtin(local_invocation_id) local_invocation_id : vec3<u32>,
|
|
@builtin(local_invocation_index) local_invocation_index : u32,
|
|
@builtin(global_invocation_id) global_invocation_id : vec3<u32>,
|
|
@builtin(workgroup_id) workgroup_id : vec3<u32>,
|
|
@builtin(num_workgroups) num_workgroups : vec3<u32>,
|
|
) {
|
|
let foo : u32 =
|
|
local_invocation_id.x +
|
|
local_invocation_index +
|
|
global_invocation_id.x +
|
|
workgroup_id.x +
|
|
num_workgroups.x;
|
|
}
|