mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-04 16:24:29 +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:
parent
f92c6ae859
commit
4f8da62c34
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user