diff options
author | Nanley Chery <[email protected]> | 2017-01-07 15:10:57 -0800 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2017-01-12 20:52:19 -0800 |
commit | 055ff2ec52143f9d9110a27cea046087de7a0cb5 (patch) | |
tree | 6581b1c665730edfaf2cb01c656dd2a2af9e3cc3 /src/intel/vulkan/anv_private.h | |
parent | 160a54810ebf05857ee46a5410b9893046357a1c (diff) |
anv: Replace anv_image_has_hiz() with ISL_AUX_USAGE_HIZ
The helper doesn't provide additional functionality over the current
infrastructure.
v2: Add comment to anv_image::aux_usage (Jason Ekstrand)
v3: Clarify comment for aux_usage (Jason Ekstrand)
Signed-off-by: Nanley Chery <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r-- | src/intel/vulkan/anv_private.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index dbc8c3cf68a..510191bf61a 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1581,7 +1581,13 @@ struct anv_image { }; }; - /** The aux usage for this surface when outside a render pass */ + /** + * For color images, this is the aux usage for this image when not used as a + * color attachment. + * + * For depth/stencil images, this is set to ISL_AUX_USAGE_HIZ if the image + * has a HiZ buffer. + */ enum isl_aux_usage aux_usage; struct anv_surface aux_surface; @@ -1642,16 +1648,6 @@ 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::aux_surface may be used for - * any type of auxiliary surface, not just HiZ. - */ - return (image->aspects & VK_IMAGE_ASPECT_DEPTH_BIT) && - image->aux_surface.isl.size > 0; -} - struct anv_buffer_view { enum isl_format format; /**< VkBufferViewCreateInfo::format */ struct anv_bo *bo; |