From 202480a9ca0056c5994f2fad79b91d954cbe0620 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Fri, 27 Jan 2023 12:05:35 -0800 Subject: [PATCH] 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 Part-of: --- src/vulkan/wsi/wsi_common_win32.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_win32.cpp b/src/vulkan/wsi/wsi_common_win32.cpp index 16899b622b0..675aa17fe09 100644 --- a/src/vulkan/wsi/wsi_common_win32.cpp +++ b/src/vulkan/wsi/wsi_common_win32.cpp @@ -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)