radv: Don't allow any operations on non-supported depth/stencil formats.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 27 Jan 2017 05:03:05 +0000 (00:03 -0500)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 30 Jan 2017 07:42:26 +0000 (08:42 +0100)
We really use the depth block for the blits.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_formats.c

index 87c28f1ede0712158c7cdee64ba9de227a0ba96e..e147f94074c3618f321353a321b1dece607d14f0 100644 (file)
@@ -565,11 +565,12 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical
        }
 
        if (vk_format_is_depth_or_stencil(format)) {
-               if (radv_is_zs_format_supported(format))
+               if (radv_is_zs_format_supported(format)) {
                        tiled |= VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT;
-               tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
-               tiled |= VK_FORMAT_FEATURE_BLIT_SRC_BIT |
-                       VK_FORMAT_FEATURE_BLIT_DST_BIT;
+                       tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
+                       tiled |= VK_FORMAT_FEATURE_BLIT_SRC_BIT |
+                                VK_FORMAT_FEATURE_BLIT_DST_BIT;
+               }
        } else {
                bool linear_sampling;
                if (radv_is_sampler_format_supported(format, &linear_sampling)) {