[Vulkan] Fix 2x MSAA alpha-to-coverage sample layout

Co-authored-by: Herman S. <429230+has207@users.noreply.github.com>
This commit is contained in:
goldislead
2026-08-04 16:32:00 -07:00
committed by Radosław Gliński
parent 4aeb518c9c
commit cb240560df

View File

@@ -4401,8 +4401,11 @@ void SpirvShaderTranslator::FSI_AlphaToMask() {
FSI_AlphaToMaskSample(false, 1, 1.0f, threshold_offset, 1.0f / 8.0f, alpha,
coverage_2x);
} else {
// FBO: Account for native 2x vs 2x-as-4x sample mapping.
if (native_2x_msaa_no_attachments_) {
// FBO: Account for native 2x vs 2x-as-4x sample mapping. This epilogue only
// runs when there is a color attachment (sample mask output), so whether 2x
// is native must be taken from the capability with attachments, matching
// the choice made for the host pipeline.
if (native_2x_msaa_with_attachments_) {
// Native 2x: D3D10.1+ standard - top is 1, bottom is 0.
FSI_AlphaToMaskSample(true, 1, 0.5f, threshold_offset, 1.0f / 8.0f, alpha,
coverage_2x);