From 2d3f0a834aefd0ca1ae4d8272ebb3b88f6805432 Mon Sep 17 00:00:00 2001 From: Sagar Ghuge Date: Tue, 21 Nov 2023 10:40:20 -0800 Subject: [PATCH] anv: Add comment to copy image code block Anybody will be tempted to factor out the if-else block code since it looks like duplication but else block actually handles the ycbcr images where the aspect masks are compatible but don't need to be the same. Signed-off-by: Sagar Ghuge Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_blorp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index 7d234e3d052..d9c5818156c 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -344,6 +344,9 @@ copy_image(struct anv_cmd_buffer *cmd_buffer, } } } else { + /* This case handles the ycbcr images, aspect mask are compatible but + * don't need to be the same. + */ struct blorp_surf src_surf, dst_surf; get_blorp_surf_for_anv_image(cmd_buffer, src_image, src_mask, VK_IMAGE_USAGE_TRANSFER_SRC_BIT,