[Mesa-dev] [PATCH 06/13] anv: move helper function internally
Jason Ekstrand
jason at jlekstrand.net
Thu Nov 8 22:42:55 UTC 2018
I left a nit on 3. Otherwise, 1-6 are
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
On Mon, Nov 5, 2018 at 9:36 AM Lionel Landwerlin <
lionel.g.landwerlin at intel.com> wrote:
> It's only used in anv_image.c
>
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> ---
> src/intel/vulkan/anv_image.c | 22 ++++++++++++++++++++++
> src/intel/vulkan/anv_private.h | 22 ----------------------
> 2 files changed, 22 insertions(+), 22 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
> index 7a06bde8e9e..4fa44aa8704 100644
> --- a/src/intel/vulkan/anv_image.c
> +++ b/src/intel/vulkan/anv_image.c
> @@ -1247,6 +1247,28 @@ remap_aspect_flags(VkImageAspectFlags view_aspects)
> return view_aspects;
> }
>
> +static uint32_t
> +anv_image_aspect_get_planes(VkImageAspectFlags aspect_mask)
> +{
> + uint32_t planes = 0;
> +
> + if (aspect_mask & (VK_IMAGE_ASPECT_COLOR_BIT |
> + VK_IMAGE_ASPECT_DEPTH_BIT |
> + VK_IMAGE_ASPECT_STENCIL_BIT |
> + VK_IMAGE_ASPECT_PLANE_0_BIT))
> + planes++;
> + if (aspect_mask & VK_IMAGE_ASPECT_PLANE_1_BIT)
> + planes++;
> + if (aspect_mask & VK_IMAGE_ASPECT_PLANE_2_BIT)
> + planes++;
> +
> + if ((aspect_mask & VK_IMAGE_ASPECT_DEPTH_BIT) != 0 &&
> + (aspect_mask & VK_IMAGE_ASPECT_STENCIL_BIT) != 0)
> + planes++;
> +
> + return planes;
> +}
> +
> VkResult
> anv_CreateImageView(VkDevice _device,
> const VkImageViewCreateInfo *pCreateInfo,
> diff --git a/src/intel/vulkan/anv_private.h
> b/src/intel/vulkan/anv_private.h
> index f8e7122cf25..8f8cbb4415e 100644
> --- a/src/intel/vulkan/anv_private.h
> +++ b/src/intel/vulkan/anv_private.h
> @@ -2584,28 +2584,6 @@ anv_image_aspect_to_plane(VkImageAspectFlags
> image_aspects,
> }
> }
>
> -static inline uint32_t
> -anv_image_aspect_get_planes(VkImageAspectFlags aspect_mask)
> -{
> - uint32_t planes = 0;
> -
> - if (aspect_mask & (VK_IMAGE_ASPECT_COLOR_BIT |
> - VK_IMAGE_ASPECT_DEPTH_BIT |
> - VK_IMAGE_ASPECT_STENCIL_BIT |
> - VK_IMAGE_ASPECT_PLANE_0_BIT))
> - planes++;
> - if (aspect_mask & VK_IMAGE_ASPECT_PLANE_1_BIT)
> - planes++;
> - if (aspect_mask & VK_IMAGE_ASPECT_PLANE_2_BIT)
> - planes++;
> -
> - if ((aspect_mask & VK_IMAGE_ASPECT_DEPTH_BIT) != 0 &&
> - (aspect_mask & VK_IMAGE_ASPECT_STENCIL_BIT) != 0)
> - planes++;
> -
> - return planes;
> -}
> -
> static inline VkImageAspectFlags
> anv_plane_to_aspect(VkImageAspectFlags image_aspects,
> uint32_t plane)
> --
> 2.19.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181108/3a8c1359/attachment.html>
More information about the mesa-dev
mailing list