From d28c0d16f8529b33f0a4b412474e88ab6c7be6d1 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Wed, 12 Sep 2018 16:55:09 -0400 Subject: [PATCH] [vk] don't ask for VK_FORMAT_UNDEFINED support --- rpcs3/Emu/RSX/VK/VKGSRender.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index d3300cc0ef..9527351f58 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -407,15 +407,20 @@ namespace verify(HERE), support == VK_ERROR_FORMAT_NOT_SUPPORTED; continue; } + for (const VkFormat &depth_stencil_format : depth_format_list) { - VkResult support = vkGetPhysicalDeviceImageFormatProperties(gpu, depth_stencil_format, VK_IMAGE_TYPE_2D, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, 0, &props); - if (depth_stencil_format != VK_FORMAT_UNDEFINED && support != VK_SUCCESS) + if (depth_stencil_format != VK_FORMAT_UNDEFINED) { - LOG_ERROR(RSX, "Format 0x%x is not supported for depth/stencil target usage by your GPU driver. Crashes may arise.", (u32)depth_stencil_format); - verify(HERE), support == VK_ERROR_FORMAT_NOT_SUPPORTED; - continue; + VkResult support = vkGetPhysicalDeviceImageFormatProperties(gpu, depth_stencil_format, VK_IMAGE_TYPE_2D, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, 0, &props); + if (support != VK_SUCCESS) + { + LOG_ERROR(RSX, "Format 0x%x is not supported for depth/stencil target usage by your GPU driver. Crashes may arise.", (u32)depth_stencil_format); + verify(HERE), support == VK_ERROR_FORMAT_NOT_SUPPORTED; + continue; + } } + for (u8 number_of_draw_buffer = 0; number_of_draw_buffer <= 4; number_of_draw_buffer++) { size_t idx = vk::get_render_pass_location(color_format, depth_stencil_format, number_of_draw_buffer);