mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 05:57:51 +00:00
[ast] Rename Builtin::kSampleId to Builtin::kSampleIndex
Other builtins use WGSL terms instead of SPIR-V terms too, and the WGSL writer is relying on the output of `operator<<(Builtin)`, which just stringifies the name of the enum. This also matches the equivalent `semantic::Usage::kSampleIndex` enum. Added test coverage for WGSL builtin generation. Bug: tint:372 Change-Id: I8077d22c4a5ddf67b1ad07e7365453db74db8e7d Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/41660 Reviewed-by: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org> Commit-Queue: dan sinclair <dsinclair@chromium.org> Auto-Submit: James Price <jrprice@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
d086c147d0
commit
e7dab3c9ea
@@ -59,8 +59,8 @@ std::ostream& operator<<(std::ostream& out, Builtin builtin) {
|
||||
out << "global_invocation_id";
|
||||
break;
|
||||
}
|
||||
case Builtin::kSampleId: {
|
||||
out << "sample_id";
|
||||
case Builtin::kSampleIndex: {
|
||||
out << "sample_index";
|
||||
break;
|
||||
}
|
||||
case Builtin::kSampleMaskIn: {
|
||||
|
||||
@@ -32,7 +32,7 @@ enum class Builtin {
|
||||
kLocalInvocationId,
|
||||
kLocalInvocationIndex,
|
||||
kGlobalInvocationId,
|
||||
kSampleId,
|
||||
kSampleIndex,
|
||||
kSampleMaskIn,
|
||||
kSampleMaskOut,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user