[Mesa-dev] [PATCH 08/22] i965: Add helper for determining if miptree represents stencil buffer

Topi Pohjolainen topi.pohjolainen at intel.com
Mon Jun 9 00:45:42 PDT 2014


Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
 src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index 6a91884..80520fa 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -515,6 +515,12 @@ intel_miptree_check_level_layer(struct intel_mipmap_tree *mt,
    assert(layer < mt->level[level].depth);
 }
 
+static inline bool
+is_stencil(const struct intel_mipmap_tree *mt)
+{
+   return mt->format == MESA_FORMAT_S_UINT8;
+}
+
 void intel_miptree_reference(struct intel_mipmap_tree **dst,
                              struct intel_mipmap_tree *src);
 
-- 
1.8.3.1



More information about the mesa-dev mailing list