Mesa (master): anv: Clarify behavior of anv_image_aspect_to_plane()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 12 21:31:56 UTC 2020


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

Author: Chad Versace <chadversary at chromium.org>
Date:   Thu Oct 24 14:21:02 2019 -0700

anv: Clarify behavior of anv_image_aspect_to_plane()

It returns the aspect's _format_ plane, not its _memory_ plane (using the
vocabulary of VK_EXT_image_drm_format_modifier).

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3796>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3796>

---

 src/intel/vulkan/anv_private.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 828d0f0d954..665e8cf54f4 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -3293,6 +3293,12 @@ struct anv_format {
    bool can_ycbcr;
 };
 
+/**
+ * Return the aspect's _format_ plane, not its _memory_ plane (using the
+ * vocabulary of VK_EXT_image_drm_format_modifier). As a consequence, \a
+ * aspect_mask may contain VK_IMAGE_ASPECT_PLANE_*, but must not contain
+ * VK_IMAGE_ASPECT_MEMORY_PLANE_* .
+ */
 static inline uint32_t
 anv_image_aspect_to_plane(VkImageAspectFlags image_aspects,
                           VkImageAspectFlags aspect_mask)



More information about the mesa-commit mailing list