[Mesa-dev] [PATCH 14/14] i965/gen8: Allow sampling with hiz when supported

Jordan Justen jordan.l.justen at intel.com
Tue Jul 15 18:32:22 PDT 2014


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

Signed-off-by: Jordan Justen <jordan.l.justen at 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



More information about the mesa-dev mailing list