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

> From: Chad Versace <chad.vers...@intel.com>
>
> Nanley Chery (amend):
>  - Remove wip! tag
>
> Signed-off-by: Nanley Chery <nanley.g.ch...@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
>
>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to