[msl-writer] Add support for sample_mask builtins
Bug: tint:372 Change-Id: Ib1d9dc525fbc180b603241c4746cbbd54077a489 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/40640 Commit-Queue: Ben Clayton <bclayton@google.com> Auto-Submit: James Price <jrprice@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
3e8060b4e3
commit
2b5acacbd4
|
@ -1438,6 +1438,12 @@ std::string GeneratorImpl::builtin_to_attribute(ast::Builtin builtin) const {
|
|||
return "thread_index_in_threadgroup";
|
||||
case ast::Builtin::kGlobalInvocationId:
|
||||
return "thread_position_in_grid";
|
||||
case ast::Builtin::kSampleId:
|
||||
return "sample_id";
|
||||
case ast::Builtin::kSampleMaskIn:
|
||||
return "sample_mask";
|
||||
case ast::Builtin::kSampleMaskOut:
|
||||
return "sample_mask";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -119,7 +119,11 @@ INSTANTIATE_TEST_SUITE_P(
|
|||
MslBuiltinData{ast::Builtin::kLocalInvocationIndex,
|
||||
"thread_index_in_threadgroup"},
|
||||
MslBuiltinData{ast::Builtin::kGlobalInvocationId,
|
||||
"thread_position_in_grid"}));
|
||||
"thread_position_in_grid"},
|
||||
MslBuiltinData{ast::Builtin::kSampleId, "sample_id"},
|
||||
MslBuiltinData{ast::Builtin::kSampleMaskIn, "sample_mask"},
|
||||
MslBuiltinData{ast::Builtin::kSampleMaskOut,
|
||||
"sample_mask"}));
|
||||
|
||||
TEST_F(MslGeneratorImplTest, calculate_alignment_size_alias) {
|
||||
auto* alias = ty.alias("a", ty.f32());
|
||||
|
|
Loading…
Reference in New Issue