1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 10:24:10 +01:00

[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 committed by Joshie
parent dc3dd0f88c
commit ab12ffa0da
2 changed files with 6 additions and 2 deletions

View File

@ -278,6 +278,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.
@ -538,7 +540,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

@ -7771,6 +7771,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);
@ -7778,7 +7780,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>();