[dxvk] Fix color write mask normalization

Previously we'd set too many bits by accident here. Also, we should
not modify partial write masks to include unnecessary bits. Only do
this if we can actually promote to a full write mask for consistency.
This commit is contained in:
Philip Rebohle 2022-03-16 19:31:37 +01:00
parent f92c6ae859
commit 4f8da62c34
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
1 changed files with 5 additions and 3 deletions

View File

@ -213,11 +213,13 @@ namespace dxvk {
omBlendAttachments[i].colorWriteMask = util::remapComponentMask(
state.omBlend[i].colorWriteMask(), state.omSwizzle[i].mapping());
}
omBlendAttachments[i].colorWriteMask &= formatInfo->componentMask;
if (omBlendAttachments[i].colorWriteMask)
omBlendAttachments[i].colorWriteMask |= ~formatInfo->componentMask;
if (omBlendAttachments[i].colorWriteMask == formatInfo->componentMask) {
omBlendAttachments[i].colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT
| VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT;
}
}
}