diff --git a/src/ast/builtin.cc b/src/ast/builtin.cc index 8a8485fca3..36dbb83e83 100644 --- a/src/ast/builtin.cc +++ b/src/ast/builtin.cc @@ -59,6 +59,18 @@ std::ostream& operator<<(std::ostream& out, Builtin builtin) { out << "global_invocation_id"; break; } + case Builtin::kSampleId: { + out << "sample_id"; + break; + } + case Builtin::kSampleMaskIn: { + out << "sample_mask_in"; + break; + } + case Builtin::kSampleMaskOut: { + out << "sample_mask_out"; + break; + } case Builtin::kPointSize: { out << "pointsize"; } diff --git a/src/ast/builtin.h b/src/ast/builtin.h index e856e2cd31..864cfb3322 100644 --- a/src/ast/builtin.h +++ b/src/ast/builtin.h @@ -32,6 +32,9 @@ enum class Builtin { kLocalInvocationId, kLocalInvocationIndex, kGlobalInvocationId, + kSampleId, + kSampleMaskIn, + kSampleMaskOut, // Below are not currently WGSL builtins, but are included in this enum as // they are used by certain backends. diff --git a/src/writer/spirv/builder.cc b/src/writer/spirv/builder.cc index 158c56b8bb..d9b936fafa 100644 --- a/src/writer/spirv/builder.cc +++ b/src/writer/spirv/builder.cc @@ -3137,6 +3137,9 @@ SpvBuiltIn Builder::ConvertBuiltin(ast::Builtin builtin) const { return SpvBuiltInGlobalInvocationId; case ast::Builtin::kPointSize: return SpvBuiltInPointSize; + case ast::Builtin::kSampleId: // TODO(dneto) + case ast::Builtin::kSampleMaskIn: // TODO(dneto) + case ast::Builtin::kSampleMaskOut: // TODO(dneto) case ast::Builtin::kNone: break; }