ast: add sample_mask_in, ample_mask_out, sample_id
Fixed: tint:472 Change-Id: Id7ac14f4ec34fce8172747bfc24b1693addbe738 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/39842 Commit-Queue: dan sinclair <dsinclair@chromium.org> Reviewed-by: dan sinclair <dsinclair@chromium.org> Auto-Submit: David Neto <dneto@google.com>
This commit is contained in:
parent
f2d687137c
commit
c694d43c75
|
@ -59,6 +59,18 @@ std::ostream& operator<<(std::ostream& out, Builtin builtin) {
|
||||||
out << "global_invocation_id";
|
out << "global_invocation_id";
|
||||||
break;
|
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: {
|
case Builtin::kPointSize: {
|
||||||
out << "pointsize";
|
out << "pointsize";
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,9 @@ enum class Builtin {
|
||||||
kLocalInvocationId,
|
kLocalInvocationId,
|
||||||
kLocalInvocationIndex,
|
kLocalInvocationIndex,
|
||||||
kGlobalInvocationId,
|
kGlobalInvocationId,
|
||||||
|
kSampleId,
|
||||||
|
kSampleMaskIn,
|
||||||
|
kSampleMaskOut,
|
||||||
|
|
||||||
// Below are not currently WGSL builtins, but are included in this enum as
|
// Below are not currently WGSL builtins, but are included in this enum as
|
||||||
// they are used by certain backends.
|
// they are used by certain backends.
|
||||||
|
|
|
@ -3137,6 +3137,9 @@ SpvBuiltIn Builder::ConvertBuiltin(ast::Builtin builtin) const {
|
||||||
return SpvBuiltInGlobalInvocationId;
|
return SpvBuiltInGlobalInvocationId;
|
||||||
case ast::Builtin::kPointSize:
|
case ast::Builtin::kPointSize:
|
||||||
return SpvBuiltInPointSize;
|
return SpvBuiltInPointSize;
|
||||||
|
case ast::Builtin::kSampleId: // TODO(dneto)
|
||||||
|
case ast::Builtin::kSampleMaskIn: // TODO(dneto)
|
||||||
|
case ast::Builtin::kSampleMaskOut: // TODO(dneto)
|
||||||
case ast::Builtin::kNone:
|
case ast::Builtin::kNone:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue