DirectX 12 Support in Monogame: Default Behavior and Fallback
0 reputation · 08 Oct 2023, 01:00 UTC
Background
Monogame 4.8.0.0 documents that Windows builds use DirectX 11 by default. The Windows Store app packaging includes a "Use DirectX 12" checkbox that generates a DX12 configuration element, but the runtime documentation does not state whether the flag automatically switches the rendering pipeline to DirectX 12 or merely signals availability to the application.
Current Uncertainty
The Monogame source contains a compile‑time directive for a 'DX12' symbol, yet there is no public API or configuration setting documented for enabling or disabling DirectX 12 at runtime. Additionally, the fallback behavior when the target GPU does not support DirectX 12 is not explicitly described in the documentation.
Key Questions
- When the "Use DirectX 12" flag is set in the Windows Store app packaging, does the Monogame runtime automatically select DirectX 12 or does it simply expose a flag for the application to query?
- If the GPU lacks DirectX 12 support, does Monogame automatically fall back to DirectX 11, and how can a developer detect that fallback has occurred?
- Is there a programmatic method or configuration file that can explicitly enable or disable DirectX 12 at runtime, beyond the compile‑time directive?