From a7173fcab4af49846211b7c25118e295c5b61c52 Mon Sep 17 00:00:00 2001 From: James Price Date: Wed, 23 Jun 2021 03:01:09 +0000 Subject: [PATCH] Metal: Pass fixed sample mask to MSL transform Tint now combines a fixed sample mask with any mask authored in the shader, and generates the builtin if necessary. Fixed: tint:387 Change-Id: Ic084f28356432566e8d2566f45cf0730f4cd2f6d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55686 Auto-Submit: James Price Commit-Queue: Austin Eng Reviewed-by: Austin Eng --- src/dawn_native/metal/ShaderModuleMTL.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dawn_native/metal/ShaderModuleMTL.mm b/src/dawn_native/metal/ShaderModuleMTL.mm index c7dda480a4..382ee86277 100644 --- a/src/dawn_native/metal/ShaderModuleMTL.mm +++ b/src/dawn_native/metal/ShaderModuleMTL.mm @@ -55,7 +55,6 @@ namespace dawn_native { namespace metal { const char* entryPointName, SingleShaderStage stage, const PipelineLayout* layout, - // TODO(crbug.com/tint/387): AND in a fixed sample mask in the shader. uint32_t sampleMask, const RenderPipeline* renderPipeline, const VertexState* vertexState, @@ -130,7 +129,7 @@ namespace dawn_native { namespace metal { std::move(accessControls), /* mayCollide */ true); - transformInputs.Add(kBufferLengthBufferSlot); + transformInputs.Add(kBufferLengthBufferSlot, sampleMask); tint::Program program; tint::transform::DataMap transformOutputs;