From edc1326736eb8902c6f817b0a29bc1240c31112a Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 25 Nov 2022 12:57:56 +0900 Subject: [PATCH] [vulkan] Search for BGRA8 instead of RGBA8 I guess nvidia gives a non-srgb format as the first in the list, but my laptop gives an srgb format first, thus the unexpected difference in rendering brightness. Hard-coding BGRA isn't any better, but it will do for now. --- libs/video/renderer/vulkan/swapchain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/video/renderer/vulkan/swapchain.c b/libs/video/renderer/vulkan/swapchain.c index a2a962409..c8eff4768 100644 --- a/libs/video/renderer/vulkan/swapchain.c +++ b/libs/video/renderer/vulkan/swapchain.c @@ -93,7 +93,7 @@ QFV_CreateSwapchain (vulkan_ctx_t *ctx, VkSwapchainKHR old_swapchain) ifuncs->vkGetPhysicalDeviceSurfaceFormatsKHR (physDev, ctx->surface, &numFormats, formats); - VkSurfaceFormatKHR useFormat = {VK_FORMAT_R8G8B8A8_UNORM, + VkSurfaceFormatKHR useFormat = {VK_FORMAT_B8G8R8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR}; if (numFormats > 1) { uint32_t i;