Module: Mesa Branch: main Commit: 2d3f0a834aefd0ca1ae4d8272ebb3b88f6805432 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2d3f0a834aefd0ca1ae4d8272ebb3b88f6805432
Author: Sagar Ghuge <sagar.gh...@intel.com> Date: Tue Nov 21 10:40:20 2023 -0800 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 <sagar.gh...@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwer...@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26294> --- 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,