SDL icon indicating copy to clipboard operation
SDL copied to clipboard

Can add a D3D11 WARP renderer?

Open pipiwoaini opened this issue 6 months ago • 4 comments

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.

pipiwoaini avatar May 11 '25 06:05 pipiwoaini

That seems like a reasonable thing to add as a hint or property in SDL 3.4

slouken avatar May 11 '25 17:05 slouken

Is there a specific reason to force using WARP within SDL, rather than it being a system-wide setting?

ccawley2011 avatar May 12 '25 18:05 ccawley2011

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.

pipiwoaini avatar May 26 '25 08:05 pipiwoaini

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.

ccawley2011 avatar May 26 '25 15:05 ccawley2011

I added a hint, SDL_HINT_RENDER_DIRECT3D11_WARP to specify that the direct3d11 renderer should use WARP.

slouken avatar Sep 07 '25 18:09 slouken