mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 02:15:43 +00:00
Add parsing of shorter stage attributes.
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>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
1ad896df11
commit
f0c150b01b
@@ -34,7 +34,7 @@ namespace tint::transform {
|
||||
/// @location(2) loc2 : vec4<u32>;
|
||||
/// };
|
||||
///
|
||||
/// @stage(fragment)
|
||||
/// @fragment
|
||||
/// fn frag_main(@builtin(position) coord : vec4<f32>,
|
||||
/// locations : Locations) -> @location(0) f32 {
|
||||
/// if (coord.w > 1.0) {
|
||||
@@ -71,7 +71,7 @@ namespace tint::transform {
|
||||
/// return col;
|
||||
/// }
|
||||
///
|
||||
/// @stage(fragment)
|
||||
/// @fragment
|
||||
/// fn frag_main(in : frag_main_in) -> frag_main_out {
|
||||
/// let inner_retval = frag_main_inner(in.coord, Locations(in.loc1, in.loc2));
|
||||
/// var wrapper_result : frag_main_out;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace tint::transform {
|
||||
/// p = p + f;
|
||||
/// }
|
||||
///
|
||||
/// @stage(compute) @workgroup_size(1)
|
||||
/// @compute @workgroup_size(1)
|
||||
/// fn main() {
|
||||
/// foo();
|
||||
/// }
|
||||
@@ -55,7 +55,7 @@ namespace tint::transform {
|
||||
/// *p = *p + (*sptr).f;
|
||||
/// }
|
||||
///
|
||||
/// @stage(compute) @workgroup_size(1)
|
||||
/// @compute @workgroup_size(1)
|
||||
/// fn main(sptr : ptr<storage, S, read>) {
|
||||
/// var<private> p : f32 = 2.0;
|
||||
/// foo(&p, sptr);
|
||||
|
||||
Reference in New Issue
Block a user