Mesa (master): anv: Add func anv_image_has_hiz()
Nanley Chery
nchery at kemper.freedesktop.org
Fri Oct 7 19:57:07 UTC 2016
Module: Mesa
Branch: master
Commit: 3aec432ed3306ffb62e2a703f5b419d5ae012afa
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3aec432ed3306ffb62e2a703f5b419d5ae012afa
Author: Chad Versace <chad.versace at intel.com>
Date: Thu Oct 6 15:21:48 2016 -0700
anv: Add func anv_image_has_hiz()
Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
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 dfcedd1..fd886bf 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -1759,6 +1759,16 @@ const struct anv_surface *
anv_image_get_surface_for_aspect_mask(const struct anv_image *image,
VkImageAspectFlags aspect_mask);
+static inline bool
+anv_image_has_hiz(const struct anv_image *image)
+{
+ /* We must check the aspect because anv_image::hiz_surface belongs to
+ * a union.
+ */
+ return (image->aspects & VK_IMAGE_ASPECT_DEPTH_BIT) &&
+ image->hiz_surface.isl.size > 0;
+}
+
void anv_image_view_init(struct anv_image_view *view,
struct anv_device *device,
const VkImageViewCreateInfo* pCreateInfo,
More information about the mesa-commit
mailing list