radv: do not support blitting surfaces with depth and stencil
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 18 Sep 2018 13:06:42 +0000 (15:06 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Sep 2018 11:36:07 +0000 (13:36 +0200)
Fixes:
dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.depth_stencil.d32_sfloat_s8_uint_d32_sfloat_s8_uint.optimal_optimal_nearest

And all friends that try to blit a surface with different
depth and stencil formats.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_formats.c

index e1b4b5e830f968c2dee183aee72ba302d5ccb31c..ad06c9e996431ce3a82e2b19e255823daaa728eb 100644 (file)
@@ -645,6 +645,10 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical
                        if (radv_is_filter_minmax_format_supported(format))
                                 tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT;
 
+                       /* Don't support blitting surfaces with depth/stencil. */
+                       if (vk_format_is_depth(format) && vk_format_is_stencil(format))
+                               tiled &= ~VK_FORMAT_FEATURE_BLIT_DST_BIT;
+
                        /* Don't support linear depth surfaces */
                        linear = 0;
                }