From 9d19fa18a72d03d783df90cacdf854ed423ecb15 Mon Sep 17 00:00:00 2001 From: WinterSnowfall Date: Thu, 3 Oct 2024 23:12:55 +0300 Subject: [PATCH] [d3d9] Set D3DRS_POINTSIZE_MIN to 0.0f in D3D8 compatibility mode --- src/d3d8/d3d8_device.cpp | 3 +++ src/d3d9/d3d9_device.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/d3d8/d3d8_device.cpp b/src/d3d8/d3d8_device.cpp index c37664238..8ceefd82a 100644 --- a/src/d3d8/d3d8_device.cpp +++ b/src/d3d8/d3d8_device.cpp @@ -53,6 +53,9 @@ namespace dxvk { m_bridge->SetAPIName("D3D8"); m_bridge->SetD3D8CompatibilityMode(true); + // The default value of D3DRS_POINTSIZE_MIN in D3D8 is 0.0f, + // whereas it's initialized to 1.0f in D3D9 by default + GetD3D9()->SetRenderState(d3d9::D3DRS_POINTSIZE_MIN, bit::cast(0.0f)); ResetState(); RecreateBackBuffersAndAutoDepthStencil(); diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index ebab7d20d..698dfe1b6 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -7909,7 +7909,7 @@ namespace dxvk { rs[D3DRS_POINTSCALE_B] = bit::cast(0.0f); rs[D3DRS_POINTSCALE_C] = bit::cast(0.0f); rs[D3DRS_POINTSIZE] = bit::cast(1.0f); - rs[D3DRS_POINTSIZE_MIN] = bit::cast(1.0f); + rs[D3DRS_POINTSIZE_MIN] = m_isD3D8Compatible ? bit::cast(0.0f) : bit::cast(1.0f); rs[D3DRS_POINTSIZE_MAX] = bit::cast(limits.pointSizeRange[1]); UpdatePushConstant(); UpdatePushConstant();