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

Jordan Justen jordan.l.justen at intel.com
Mon Jul 21 23:01:03 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 1d0f238..a620ff9 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1655,7 +1655,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.1



More information about the mesa-dev mailing list