For gen8+ this will indicate when we should allow hiz based sampling
during rendering.

Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com>
---
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c 
b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 880e41d..756d122 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1649,7 +1649,17 @@ bool
 intel_miptree_sample_with_hiz(struct brw_context *brw,
                               struct intel_mipmap_tree *mt)
 {
-   return false;
+   /* Sampling using the hiz buffer requires gen8.
+    *
+    * If compressed multisampling is enabled, then we use it for the auxiliary
+    * buffer instead.
+    *
+    * We can't enable hiz auxiliary buffer support for 3D textures.
+    */
+   return (brw->gen >= 8 &&
+           mt->hiz_buf &&
+           !mt->mcs_buf &&
+           mt->target != GL_TEXTURE_3D);
 }
 
 /**
-- 
2.0.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to