SDL
SDL copied to clipboard
Can add a D3D11 WARP renderer?
On Windows, enabling D3D hardware acceleration carries significant unknown risks—such as system sleep/resume cycles, graphics-driver reinstallations, and compatibility issues with older hardware—that can all cause the D3D11 renderer to crash. After reviewing SDL’s D3D11 implementation, I found no way to force the use of D3D_DRIVER_TYPE_WARP. Although WARP runs on the CPU, it far outperforms the sdl software render and proves much more stable across diverse environments.
That seems like a reasonable thing to add as a hint or property in SDL 3.4
Is there a specific reason to force using WARP within SDL, rather than it being a system-wide setting?
For enterprise software, stability is the top priority. Using WARP ensures GDI-like stability on computers running Windows 8 and above, while delivering better rendering performance than GDI.
My question was more asking why you wouldn't activate WARP by configuring it globally in the Windows options, rather than specifying it on a case by case basis within SDL.
I added a hint, SDL_HINT_RENDER_DIRECT3D11_WARP to specify that the direct3d11 renderer should use WARP.