thatcosmonaut / SDL

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

D3D11: Fix SDL_GPU_COLORSPACE_LINEAR_SRGB #26

Closed strangezakary closed 1 month ago

strangezakary commented 1 month ago

Description

SDL_GPU_COLORSPACE_LINEAR_SRGB would cause the swapchain to fail to create on flip-model swapchains. This patch addresses that issue by creating the swapchain (for both linear and non-linear) as DXGI_FORMAT_B8G8R8A8_UNORM then setting the render target view's format to DXGI_FORMAT_B8G8R8A8_UNORM_SRGB if the colorspace is SDL_GPU_COLORSPACE_LINEAR_SRGB

Existing Issue(s)

No existing issue is open for this