diff --git a/src/writer/msl/generator_impl.cc b/src/writer/msl/generator_impl.cc index 5c9c1def74..1f715612e2 100644 --- a/src/writer/msl/generator_impl.cc +++ b/src/writer/msl/generator_impl.cc @@ -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; } diff --git a/src/writer/msl/generator_impl_test.cc b/src/writer/msl/generator_impl_test.cc index f2ce025ace..4bce1d9755 100644 --- a/src/writer/msl/generator_impl_test.cc +++ b/src/writer/msl/generator_impl_test.cc @@ -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());