radv: fix radv_get_aspect_format() for D+S formats
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 2 May 2019 16:07:11 +0000 (18:07 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 3 May 2019 07:01:10 +0000 (09:01 +0200)
This restores the previous behaviour before YCBCR landed. For D+S
formats, it returns the depth format.

This fixes an assertion with Thrones of Britannia.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110540
Fixes: 66507cc6563 ("radv: Add single plane image views & meta operations")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_image.c

index a487a5576a61ae659b7364abfc2f4dc261ac60cd..92409d147f1f3e3263f60c78bf9a977f0a83f34c 100644 (file)
@@ -1189,6 +1189,8 @@ radv_get_aspect_format(struct radv_image *image, VkImageAspectFlags mask)
                return vk_format_stencil_only(image->vk_format);
        case VK_IMAGE_ASPECT_DEPTH_BIT:
                return vk_format_depth_only(image->vk_format);
+       case VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT:
+               return vk_format_depth_only(image->vk_format);
        default:
                return image->vk_format;
        }