1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[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

View File

@ -216,8 +216,10 @@ namespace dxvk {
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;
}
}
}