wsi/win32: Always use non-SRGB formats for DXGI
The actual buffer is always created as non-SRGB, and then SRGB views can be used to render into it. Fixes a crash trying to launch 3DMark Wild Lands Reviewed-by: Giancarlo Devich <gdevich@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20963>
This commit is contained in:
@@ -678,8 +678,7 @@ wsi_win32_surface_create_swapchain_dxgi(
|
||||
DXGI_SWAP_CHAIN_DESC1 desc = {
|
||||
create_info->imageExtent.width,
|
||||
create_info->imageExtent.height,
|
||||
create_info->imageFormat == VK_FORMAT_B8G8R8A8_SRGB ?
|
||||
DXGI_FORMAT_B8G8R8A8_UNORM_SRGB : DXGI_FORMAT_B8G8R8A8_UNORM,
|
||||
DXGI_FORMAT_B8G8R8A8_UNORM,
|
||||
create_info->imageArrayLayers > 1, // Stereo
|
||||
{ 1 }, // SampleDesc
|
||||
0, // Usage (filled in below)
|
||||
|
||||
Reference in New Issue
Block a user