Archived
1
Fork 0

Properly choose swapchain format

This commit is contained in:
Joshua Goins 2018-10-16 08:18:19 -04:00
parent c6fd8e49c9
commit 0568c6e5d2

View file

@ -131,7 +131,7 @@ RenderTarget* Renderer::createSurfaceRenderTarget(VkSurfaceKHR surface, RenderTa
uint32_t chosenFormat = 0; uint32_t chosenFormat = 0;
for(uint32_t i = 0; i < surfaceFormatCount; i++) { for(uint32_t i = 0; i < surfaceFormatCount; i++) {
if(surfaceFormats[i].colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR) if(surfaceFormats[i].format == VK_FORMAT_R8G8B8_SRGB)
chosenFormat = i; chosenFormat = i;
} }