anv,vulkan: Move anv_image_expand_aspects to common code
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023>
This commit is contained in:

committed by
Marge Bot

parent
25d4cffabf
commit
e45e4e3ba1
@@ -3826,7 +3826,7 @@ anv_aspect_to_plane(VkImageAspectFlags all_aspects,
|
||||
}
|
||||
|
||||
#define anv_foreach_image_aspect_bit(b, image, aspects) \
|
||||
u_foreach_bit(b, anv_image_expand_aspects(image, aspects))
|
||||
u_foreach_bit(b, vk_image_expand_aspect_mask(&(image)->vk, aspects))
|
||||
|
||||
const struct anv_format *
|
||||
anv_get_format(VkFormat format);
|
||||
@@ -4346,20 +4346,6 @@ anv_get_levelCount(const struct anv_image *image,
|
||||
image->vk.mip_levels - range->baseMipLevel : range->levelCount;
|
||||
}
|
||||
|
||||
static inline VkImageAspectFlags
|
||||
anv_image_expand_aspects(const struct anv_image *image,
|
||||
VkImageAspectFlags aspects)
|
||||
{
|
||||
/* If the underlying image has color plane aspects and
|
||||
* VK_IMAGE_ASPECT_COLOR_BIT has been requested, then return the aspects of
|
||||
* the underlying image. */
|
||||
if ((image->vk.aspects & VK_IMAGE_ASPECT_PLANES_BITS_ANV) != 0 &&
|
||||
aspects == VK_IMAGE_ASPECT_COLOR_BIT)
|
||||
return image->vk.aspects;
|
||||
|
||||
return aspects;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
anv_image_aspects_compatible(VkImageAspectFlags aspects1,
|
||||
VkImageAspectFlags aspects2)
|
||||
|
Reference in New Issue
Block a user