[Mesa-dev] [PATCH v2 18/21] anv: Add a helper to determine sampling with HiZ
Nanley Chery
nanleychery at gmail.com
Fri Jan 13 01:34:03 UTC 2017
Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
src/intel/vulkan/anv_private.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index b669d186ef..56aa6ef6e3 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -1606,6 +1606,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,
--
2.11.0
More information about the mesa-dev
mailing list