Search code examples
directxdirectx-11directx-9

What is DirectX 11's equivalent of D3DCAPS9::MaxVertexIndex of DirectX 9


I'm porting a DirectX 9 program to DirectX 11. How do I get the value in DirectX 11 that is retrieved using

D3DCAPS9::MaxVertexIndex

in DirectX 9?

Thanks in advance.


Solution

  • DirectX 11 uses "feature levels" to capture the bulk of device capabilities in set stair-step fashion. You should read about feature levels on MSDN and in this blog post.

    Feature Level 9.1 supports 16-bit indices and Feature Level 9.2 or later supports 32-bit indices.

    The MaxVertexIndex is essentially the same as "Max Primitive Count" on the MSDN Feature Level table.

    • Feature Level 9.1 requires MaxVertexIndex >= 65534
    • Feature Level 9.2 and 9.3 requires MaxVertexIndex >= 1048575
    • Feature Level 10.0 or later defines the maximum vertex index as a full 32-bits (with the 0xFFFFFFFF value reserved for strip restarts) i.e. 4294967295

    BTW, there are a few optional features that hardware can expose in addition to their defined feature levels, but there's really only a few dozen of these across the whole ecosystem. You use CheckFeatureSupport for most of these. You can use CheckFormatSupport for a lot of information, but the bulk of the settings here are strictly determined by the feature level anyhow. See MSDN for the DXGI format support tables.