[d3d9] Properly expose the MaxVertexBlendMatrixIndex capability

This commit is contained in:
WinterSnowfall 2023-05-30 22:50:35 +03:00 committed by Joshie
parent 4b10846008
commit 8b6cbda6de
2 changed files with 10 additions and 2 deletions

View File

@ -529,7 +529,7 @@ namespace dxvk {
// Max Vertex Blend Matrices
pCaps->MaxVertexBlendMatrices = 4;
// Max Vertex Blend Matrix Index
pCaps->MaxVertexBlendMatrixIndex = 8;
pCaps->MaxVertexBlendMatrixIndex = 0;
// Max Point Size
pCaps->MaxPointSize = 256.0f;
// Max Primitive Count

View File

@ -268,7 +268,15 @@ namespace dxvk {
HRESULT STDMETHODCALLTYPE D3D9DeviceEx::GetDeviceCaps(D3DCAPS9* pCaps) {
return m_adapter->GetDeviceCaps(m_deviceType, pCaps);
if (pCaps == nullptr)
return D3DERR_INVALIDCALL;
m_adapter->GetDeviceCaps(m_deviceType, pCaps);
// When in SWVP mode, 256 matrices can be used for indexed vertex blending
pCaps->MaxVertexBlendMatrixIndex = m_isSWVP ? 255 : 8;
return D3D_OK;
}