[d3d9] Use max point size of Vulkan device

The default render state value has to match what we report in the device caps.
Fixes a Wine stateblock test.
This commit is contained in:
Robin Kertels 2024-03-13 02:02:44 +01:00
parent 99039459f8
commit b948591ef6
No known key found for this signature in database
GPG Key ID: 3824904F14D40757
2 changed files with 6 additions and 2 deletions

View File

@ -271,6 +271,8 @@ namespace dxvk {
auto& options = m_parent->GetOptions();
const VkPhysicalDeviceLimits& limits = m_adapter->deviceProperties().limits;
// TODO: Actually care about what the adapter supports here.
// ^ For Intel and older cards most likely here.
@ -531,7 +533,7 @@ namespace dxvk {
// Max Vertex Blend Matrix Index
pCaps->MaxVertexBlendMatrixIndex = 0;
// Max Point Size
pCaps->MaxPointSize = 256.0f;
pCaps->MaxPointSize = limits.pointSizeRange[1];
// Max Primitive Count
pCaps->MaxPrimitiveCount = 0x00555555;
// Max Vertex Index

View File

@ -7725,6 +7725,8 @@ namespace dxvk {
rs[D3DRS_CLIPPLANEENABLE] = 0;
m_flags.set(D3D9DeviceFlag::DirtyClipPlanes);
const VkPhysicalDeviceLimits& limits = m_dxvkDevice->adapter()->deviceProperties().limits;
rs[D3DRS_POINTSPRITEENABLE] = FALSE;
rs[D3DRS_POINTSCALEENABLE] = FALSE;
rs[D3DRS_POINTSCALE_A] = bit::cast<DWORD>(1.0f);
@ -7732,7 +7734,7 @@ namespace dxvk {
rs[D3DRS_POINTSCALE_C] = bit::cast<DWORD>(0.0f);
rs[D3DRS_POINTSIZE] = bit::cast<DWORD>(1.0f);
rs[D3DRS_POINTSIZE_MIN] = bit::cast<DWORD>(1.0f);
rs[D3DRS_POINTSIZE_MAX] = bit::cast<DWORD>(64.0f);
rs[D3DRS_POINTSIZE_MAX] = bit::cast<DWORD>(limits.pointSizeRange[1]);
UpdatePushConstant<D3D9RenderStateItem::PointSize>();
UpdatePushConstant<D3D9RenderStateItem::PointSizeMin>();
UpdatePushConstant<D3D9RenderStateItem::PointSizeMax>();