diff --git a/src/d3d8/d3d8_device.cpp b/src/d3d8/d3d8_device.cpp index 3826721bd..59b4288f4 100644 --- a/src/d3d8/d3d8_device.cpp +++ b/src/d3d8/d3d8_device.cpp @@ -1683,8 +1683,9 @@ namespace dxvk { m_linePattern = bit::cast(Value); return D3D_OK; - // Not supported by D3D8. + // Not supported by D3D8, but its value is stored. case D3DRS_ZVISIBLE: + m_zVisible = Value; return D3D_OK; // TODO: Implement D3DRS_ANTIALIASEDLINEENABLE in D9VK. @@ -1745,9 +1746,9 @@ namespace dxvk { *pValue = bit::cast(m_linePattern); return D3D_OK; - // Not supported by D3D8. + // Not supported by D3D8, but its value is stored. case D3DRS_ZVISIBLE: - *pValue = 0; + *pValue = m_zVisible; return D3D_OK; case D3DRS_EDGEANTIALIAS: diff --git a/src/d3d8/d3d8_device.h b/src/d3d8/d3d8_device.h index 61ce40b8d..7ccbd8bae 100644 --- a/src/d3d8/d3d8_device.h +++ b/src/d3d8/d3d8_device.h @@ -426,6 +426,8 @@ namespace dxvk { // Value of D3DRS_LINEPATTERN D3DLINEPATTERN m_linePattern = {}; + // Value of D3DRS_ZVISIBLE (although the RS is not supported, its value is stored) + DWORD m_zVisible = 0; // Value of D3DRS_PATCHSEGMENTS float m_patchSegments = 1.0f;