[Mesa-dev] [PATCH 04/12] anv: Add func anv_image_has_hiz()

Jason Ekstrand jason at jlekstrand.net
Thu Sep 1 21:44:32 UTC 2016


On Wed, Aug 31, 2016 at 8:29 PM, Nanley Chery <nanleychery at gmail.com> wrote:

> From: Chad Versace <chad.versace at intel.com>
>
> Nanley Chery (amend):
>  - Remove wip! tag
>
> Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> ---
>  src/intel/vulkan/anv_private.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_
> private.h
> index 8964e3f..5718a19 100644
> --- a/src/intel/vulkan/anv_private.h
> +++ b/src/intel/vulkan/anv_private.h
> @@ -1765,6 +1765,16 @@ struct anv_surface *
>  anv_image_get_surface_for_aspect_mask(struct anv_image *image,
>                                        VkImageAspectFlags aspect_mask);
>
> +static inline bool
> +anv_image_has_hiz(const struct anv_image *image)
> +{
> +   /* We must check the usage because anv_image::hiz_surface belongs to
> +    * a union.
> +    */
> +   return (image->usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) &&
>

Would checking (image->aspects & VK_IMAGE_ASPECT_DEPTH_BIT) be more
appropriate?


> +          image->hiz_surface.isl.size > 0;
> +}
> +
>  void anv_image_view_init(struct anv_image_view *view,
>                           struct anv_device *device,
>                           const VkImageViewCreateInfo* pCreateInfo,
> --
> 2.9.3
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160901/3bab5e58/attachment.html>


More information about the mesa-dev mailing list