thatcosmonaut / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
1 stars 1 forks source link

Swapchain Parameter Fallbacks #57

Closed TheSpydog closed 5 days ago

TheSpydog commented 1 week ago

Right now if you claim a window or set the swapchain parameters to use an unsupported SwapchainComposition or PresentMode, bad things will happen. The window fails to create, or destroys itself, or logs validation errors.

We should handle this scenario gracefully by checking the supported compositions and present modes and fall back to something reasonable if the requested parameters are not supported by the driver (e.g. Immediate -> Mailbox -> Vsync).

This is easy enough for present modes, but I don't know enough about colorspaces to determine if there is a "safe" fallback order for compositions.

thatcosmonaut commented 6 days ago

After discussion we decided that a fallback does not make sense because the swapchain composition and present mode materially affect the renderer.