[vk] don't ask for VK_FORMAT_UNDEFINED support

This commit is contained in:
Dzmitry Malyshau 2018-09-12 16:55:09 -04:00 committed by kd-11
parent 4cb98014a2
commit d28c0d16f8

View file

@ -407,15 +407,20 @@ namespace
verify(HERE), support == VK_ERROR_FORMAT_NOT_SUPPORTED; verify(HERE), support == VK_ERROR_FORMAT_NOT_SUPPORTED;
continue; continue;
} }
for (const VkFormat &depth_stencil_format : depth_format_list) for (const VkFormat &depth_stencil_format : depth_format_list)
{
if (depth_stencil_format != VK_FORMAT_UNDEFINED)
{ {
VkResult support = vkGetPhysicalDeviceImageFormatProperties(gpu, depth_stencil_format, VK_IMAGE_TYPE_2D, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, 0, &props); 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 (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); 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; verify(HERE), support == VK_ERROR_FORMAT_NOT_SUPPORTED;
continue; continue;
} }
}
for (u8 number_of_draw_buffer = 0; number_of_draw_buffer <= 4; number_of_draw_buffer++) 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); size_t idx = vk::get_render_pass_location(color_format, depth_stencil_format, number_of_draw_buffer);