Module: Mesa
Branch: main
Commit: e3ecba326648615aad37fea3ffc0ac761a078c0b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3ecba326648615aad37fea3ffc0ac761a078c0b

Author: Hyunjun Ko <[email protected]>
Date:   Wed Jul 12 14:00:54 2023 +0900

anv: use ycbcr_info for P010 format

Since !24096 landed, we can just use ycbcr_info to get information
of an image of the P010 format.

Signed-off-by: Hyunjun Ko <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24265>

---

 src/intel/vulkan/anv_image.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index e7ce4cbca41..275af9e1289 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -857,14 +857,6 @@ add_primary_surface(struct anv_device *device,
       assert(plane < ycbcr_info->n_planes);
       width /= ycbcr_info->planes[plane].denominator_scales[0];
       height /= ycbcr_info->planes[plane].denominator_scales[1];
-   } else if (isl_usage & ISL_SURF_USAGE_VIDEO_DECODE_BIT) {
-      /* To get proper width/height for P010 format,
-       * that isn't supported for YCbCr conversion yet
-       */
-      width = util_format_get_plane_width(
-            vk_format_to_pipe_format(image->vk.format), plane, width);
-      height = util_format_get_plane_height(
-            vk_format_to_pipe_format(image->vk.format), plane, height);
    }
 
    ok = isl_surf_init(&device->isl_dev, &anv_surf->isl,

Reply via email to