diff --git a/src/d3d8/d3d8_d3d9_util.h b/src/d3d8/d3d8_d3d9_util.h index d8ed4dbed80..96a83c10b80 100644 --- a/src/d3d8/d3d8_d3d9_util.h +++ b/src/d3d8/d3d8_d3d9_util.h @@ -49,13 +49,9 @@ namespace dxvk { & ~D3DPRASTERCAPS_DEPTHBIAS & ~D3DPRASTERCAPS_MULTISAMPLE_TOGGLE; - pCaps8->SrcBlendCaps &= ~D3DPBLENDCAPS_BLENDFACTOR - & ~D3DPBLENDCAPS_INVSRCCOLOR2 - & ~D3DPBLENDCAPS_SRCCOLOR2; + pCaps8->SrcBlendCaps &= ~D3DPBLENDCAPS_BLENDFACTOR; - pCaps8->DestBlendCaps &= ~D3DPBLENDCAPS_BLENDFACTOR - & ~D3DPBLENDCAPS_INVSRCCOLOR2 - & ~D3DPBLENDCAPS_SRCCOLOR2; + pCaps8->DestBlendCaps &= ~D3DPBLENDCAPS_BLENDFACTOR; pCaps8->LineCaps &= ~D3DLINECAPS_ANTIALIAS; diff --git a/src/d3d9/d3d9_adapter.cpp b/src/d3d9/d3d9_adapter.cpp index d166d7138a5..cebc9a43d78 100644 --- a/src/d3d9/d3d9_adapter.cpp +++ b/src/d3d9/d3d9_adapter.cpp @@ -413,8 +413,8 @@ namespace dxvk { | D3DPBLENDCAPS_BOTHSRCALPHA | D3DPBLENDCAPS_BOTHINVSRCALPHA | D3DPBLENDCAPS_BLENDFACTOR - | D3DPBLENDCAPS_INVSRCCOLOR2 - | D3DPBLENDCAPS_SRCCOLOR2; + | D3DPBLENDCAPS_SRCCOLOR2 + | D3DPBLENDCAPS_INVSRCCOLOR2; // Destination Blend Caps pCaps->DestBlendCaps = pCaps->SrcBlendCaps; // Alpha Comparison Caps diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index ab8111e1e19..84227c8f65b 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -309,6 +309,14 @@ namespace dxvk { // When in SWVP mode, 256 matrices can be used for indexed vertex blending pCaps->MaxVertexBlendMatrixIndex = m_isSWVP ? 255 : 8; + // Only 9Ex devices advertise D3DPBLENDCAPS_SRCCOLOR2 and D3DPBLENDCAPS_INVSRCCOLOR2 + if (!IsExtended()) { + pCaps->SrcBlendCaps &= ~D3DPBLENDCAPS_SRCCOLOR2 + & ~D3DPBLENDCAPS_INVSRCCOLOR2; + + pCaps->DestBlendCaps &= ~D3DPBLENDCAPS_SRCCOLOR2 + & ~D3DPBLENDCAPS_INVSRCCOLOR2; + } return D3D_OK; } diff --git a/src/d3d9/d3d9_interface.cpp b/src/d3d9/d3d9_interface.cpp index 1d3946cf70d..c289d69a559 100644 --- a/src/d3d9/d3d9_interface.cpp +++ b/src/d3d9/d3d9_interface.cpp @@ -243,9 +243,20 @@ namespace dxvk { UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) { - if (auto* adapter = GetAdapter(Adapter)) - return adapter->GetDeviceCaps( - DeviceType, pCaps); + if (auto* adapter = GetAdapter(Adapter)) { + adapter->GetDeviceCaps(DeviceType, pCaps); + + // Only 9Ex interfaces advertise D3DPBLENDCAPS_SRCCOLOR2 and D3DPBLENDCAPS_INVSRCCOLOR2 + if (!IsExtended()) { + pCaps->SrcBlendCaps &= ~D3DPBLENDCAPS_SRCCOLOR2 + & ~D3DPBLENDCAPS_INVSRCCOLOR2; + + pCaps->DestBlendCaps &= ~D3DPBLENDCAPS_SRCCOLOR2 + & ~D3DPBLENDCAPS_INVSRCCOLOR2; + } + + return D3D_OK; + } return D3DERR_INVALIDCALL; }