radv: Allow extra planes for DCC.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 2 Feb 2021 03:02:10 +0000 (04:02 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 24 Mar 2021 00:28:25 +0000 (00:28 +0000)
plane_count is only the format plane count.

Fixes: 7f7da82dbb7 ("radv: Add image layout with drm format modifiers.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8817>

src/amd/vulkan/radv_image.c

index 7642a25..b3552f2 100644 (file)
@@ -1377,7 +1377,7 @@ radv_image_create_layout(struct radv_device *device,
        if (result != VK_SUCCESS)
                return result;
 
-       assert(!mod_info || mod_info->drmFormatModifierPlaneCount == image->plane_count);
+       assert(!mod_info || mod_info->drmFormatModifierPlaneCount >= image->plane_count);
 
        radv_image_reset_layout(image);