anv: Clarify behavior of anv_image_aspect_to_plane()
authorChad Versace <chadversary@chromium.org>
Thu, 24 Oct 2019 21:21:02 +0000 (14:21 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 12 Feb 2020 21:01:45 +0000 (21:01 +0000)
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

index 828d0f0d954a8beb6f2732e42cabb874d9eb32af..665e8cf54f4291e6badf0a8f3b46810975afdc4f 100644 (file)
@@ -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)