diff --git a/src/d3d8/d3d8_device.cpp b/src/d3d8/d3d8_device.cpp index 64198e353..b1d2d2225 100644 --- a/src/d3d8/d3d8_device.cpp +++ b/src/d3d8/d3d8_device.cpp @@ -1620,10 +1620,11 @@ namespace dxvk { return GetD3D9()->SetSoftwareVertexProcessing(Value); - // TODO: D3DRS_PATCHSEGMENTS + // TODO: Implement D3DRS_PATCHSEGMENTS case D3DRS_PATCHSEGMENTS: - stateChange = false; - break; + Logger::warn("D3D8Device::SetRenderState: Unimplemented render state D3DRS_PATCHSEGMENTS"); + m_patchSegments = bit::cast(Value); + return D3D_OK; } if (stateChange) { @@ -1674,9 +1675,9 @@ namespace dxvk { case D3DRS_SOFTWAREVERTEXPROCESSING: return GetD3D9()->GetSoftwareVertexProcessing(); - // TODO: D3DRS_PATCHSEGMENTS case D3DRS_PATCHSEGMENTS: - break; + *pValue = bit::cast(m_patchSegments); + return D3D_OK; } // This call will never fail diff --git a/src/d3d8/d3d8_device.h b/src/d3d8/d3d8_device.h index 181e513c4..2cba51b45 100644 --- a/src/d3d8/d3d8_device.h +++ b/src/d3d8/d3d8_device.h @@ -425,8 +425,11 @@ namespace dxvk { Com m_parent; D3DPRESENT_PARAMETERS m_presentParams; - - D3DLINEPATTERN m_linePattern = {}; + + // Value of D3DRS_LINEPATTERN + D3DLINEPATTERN m_linePattern = {}; + // Value of D3DRS_PATCHSEGMENTS + float m_patchSegments = 1.0f; D3D8StateBlock* m_recorder = nullptr; DWORD m_recorderToken = 0;