[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.
This commit is contained in:
Bill Currie 2022-11-25 12:57:56 +09:00
parent 7a91c905e0
commit edc1326736

View file

@ -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;