Added INDEX32 caps support for d3d9 renderer (#2996)

* Added INDEX32 caps support for d3d9 renderer

* Use UINT16_MAX instead of 1<<16

Co-authored-by: Ali Seyedof <ali.seyedof@xyzreality.com>
This commit is contained in:
Seyedof
2022-12-16 16:43:12 +00:00
committed by GitHub
parent 43296d6f3f
commit dfbbb64664

View File

@@ -729,6 +729,7 @@ namespace bgfx { namespace d3d9
| ( (m_caps.DevCaps2 & D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES) ? BGFX_CAPS_TEXTURE_BLIT : 0)
| BGFX_CAPS_TEXTURE_READ_BACK
| (m_occlusionQuerySupport ? BGFX_CAPS_OCCLUSION_QUERY : 0)
| ((m_caps.MaxVertexIndex > UINT16_MAX) ? BGFX_CAPS_INDEX32 : 0)
);
m_caps.NumSimultaneousRTs = bx::uint32_min(m_caps.NumSimultaneousRTs, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS);