anv/blorp: Drop some can_ycbcr checks
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 21 Jul 2021 22:52:58 +0000 (17:52 -0500)
committerMarge Bot <eric+marge@anholt.net>
Mon, 9 Aug 2021 16:07:23 +0000 (16:07 +0000)
Vulkan allows us to, in theory, support ycbcr on single-plane formats if
the client really wants it.  Also, these functions should work on a
multi-plane color image as long as the client specifies the right
aspect.  This gets rid of our usage of can_ycbcr outside of anv_image.c.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141>

src/intel/vulkan/anv_blorp.c

index ed1d4c6..ee405cc 100644 (file)
@@ -1390,8 +1390,6 @@ anv_image_msaa_resolve(struct anv_cmd_buffer *cmd_buffer,
    assert(dst_image->type == VK_IMAGE_TYPE_2D);
    assert(dst_image->samples == 1);
    assert(src_image->n_planes == dst_image->n_planes);
-   assert(!src_image->format->can_ycbcr);
-   assert(!dst_image->format->can_ycbcr);
 
    struct blorp_surf src_surf, dst_surf;
    get_blorp_surf_for_anv_image(cmd_buffer->device, src_image, aspect,
@@ -1492,8 +1490,6 @@ void anv_CmdResolveImage2KHR(
    ANV_FROM_HANDLE(anv_image, src_image, pResolveImageInfo->srcImage);
    ANV_FROM_HANDLE(anv_image, dst_image, pResolveImageInfo->dstImage);
 
-   assert(!src_image->format->can_ycbcr);
-
    for (uint32_t r = 0; r < pResolveImageInfo->regionCount; r++) {
       resolve_image(cmd_buffer,
                     src_image, pResolveImageInfo->srcImageLayout,