From: Nanley Chery Date: Tue, 10 Jan 2017 03:24:44 +0000 (-0800) Subject: anv: Add a helper to determine sampling with HiZ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3ac01ad2ac2aedee7e2515365d13c71a024878fb;p=mesa.git anv: Add a helper to determine sampling with HiZ Signed-off-by: Nanley Chery Reviewed-by: Jason Ekstrand --- diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index aa1b6a81ccf..2342fcbfeb4 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1609,6 +1609,13 @@ struct anv_image { struct anv_surface aux_surface; }; +/* Returns true if a HiZ-enabled depth buffer can be sampled from. */ +static inline bool +anv_can_sample_with_hiz(uint8_t gen, uint32_t samples) +{ + return gen >= 8 && samples == 1; +} + void anv_gen8_hiz_op_resolve(struct anv_cmd_buffer *cmd_buffer, const struct anv_image *image,