SPIRV-Cross/reference
Bill Hollings ebb5098def MSL: Adjust gl_SampleMaskIn for sample-shading and/or fixed sample mask.
Vulkan specifies that the Sample Mask Test occurs before fragment shading.
This means gl_SampleMaskIn should be influenced by both sample-shading and
VkPipelineMultisampleStateCreateInfo::pSampleMask.

CTS tests dEQP-VK.pipeline.multisample_shader_builtin.* bear this out.

For sample-shading, gl_SampleMaskIn should only have a single bit set,
Since Metal does not filter for this, apply a bitmask based on gl_SampleID.

For a fixed sample mask, since Metal is unaware of
VkPipelineMultisampleStateCreateInfo::pSampleMask, we need to ensure that
we apply it to both gl_SampleMaskIn and gl_SampleMask. This has the side
effect of a redundant application of pSampleMask if the shader already
includes gl_SampleMaskIn when setting gl_SampleMask, but I don't see an
easy way around this.

Also, simplify the logic for including the fixed sample mask in gl_ShaderMask,
and print the fixed sample mask as a hex value for readability of bits.
2021-07-13 21:22:13 -04:00
..
opt MSL: Adjust gl_SampleMaskIn for sample-shading and/or fixed sample mask. 2021-07-13 21:22:13 -04:00
shaders GLSL: Support pervertexNV in NV barycentric extension. 2021-06-30 16:27:46 +02:00
shaders-hlsl HLSL: Rewrite how block IO is emitted. 2021-06-28 15:04:49 +02:00
shaders-hlsl-no-opt HLSL: Rewrite how block IO is emitted. 2021-06-28 15:04:49 +02:00
shaders-msl MSL: Adjust gl_SampleMaskIn for sample-shading and/or fixed sample mask. 2021-07-13 21:22:13 -04:00
shaders-msl-no-opt MSL: Add test for scalar access chain pull interpolant. 2021-07-13 12:25:18 +02:00
shaders-no-opt GLSL: Support pervertexNV in NV barycentric extension. 2021-06-30 16:27:46 +02:00
shaders-reflection Parser: Don't assume OpTypePointer will always take a SPIRType. 2020-11-03 10:53:37 +01:00
shaders-ue4/asm Handle SPIR-V 1.4 selection constructs. 2021-06-28 12:23:44 +02:00
shaders-ue4-no-opt/asm Implement context-sensitive expression read tracking. 2020-06-29 12:20:35 +02:00