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 <nanley.g.chery@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user