1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-15 07:29:17 +01:00

[d3d9] Disable old border color hack if custom border colors are supported

This commit is contained in:
Philip Rebohle 2020-05-04 20:16:56 +02:00
parent 263865cf28
commit 5fd361757b
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -5365,14 +5365,17 @@ namespace dxvk {
for (uint32_t i = 0; i < 4; i++) for (uint32_t i = 0; i < 4; i++)
colorInfo.borderColor.float32[i] = cKey.BorderColor[i]; colorInfo.borderColor.float32[i] = cKey.BorderColor[i];
if (!m_dxvkDevice->features().extCustomBorderColor.customBorderColorWithoutFormat) {
// HACK: Let's get OPAQUE_WHITE border color over // HACK: Let's get OPAQUE_WHITE border color over
// TRANSPARENT_BLACK if the border RGB is white. // TRANSPARENT_BLACK if the border RGB is white.
if (colorInfo.borderColor.float32[0] == 1.0f if (colorInfo.borderColor.float32[0] == 1.0f
&& colorInfo.borderColor.float32[1] == 1.0f && colorInfo.borderColor.float32[1] == 1.0f
&& colorInfo.borderColor.float32[2] == 1.0f) { && colorInfo.borderColor.float32[2] == 1.0f
&& !m_dxvkDevice->features().extCustomBorderColor.customBorderColors) {
// Then set the alpha to 1. // Then set the alpha to 1.
colorInfo.borderColor.float32[3] = 1.0f; colorInfo.borderColor.float32[3] = 1.0f;
} }
}
DxvkSamplerCreateInfo depthInfo = colorInfo; DxvkSamplerCreateInfo depthInfo = colorInfo;
depthInfo.compareToDepth = VK_TRUE; depthInfo.compareToDepth = VK_TRUE;