aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-05-21 09:30:35 -0700
committerEric Anholt <[email protected]>2012-05-23 10:18:27 -0700
commit5b226ad603302554f38e6b12a93bd2cf443d4b56 (patch)
tree3d189f28ef7612493360c4698b51b5916d882c2f /src/mesa/drivers/dri/intel
parent7da9795070b1af746ab85692d4b65dbe8c4f2d76 (diff)
i965: Add an interface for doing hiz ops from C code.
This required moving gen6_hiz_op, and I put it in intel_resolve_map.h for the next commit. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel')
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.h15
-rw-r--r--src/mesa/drivers/dri/intel/intel_resolve_map.h17
2 files changed, 32 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
index ca1666da2f5..e690a12312b 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
@@ -421,6 +421,21 @@ intel_miptree_unmap(struct intel_context *intel,
unsigned int level,
unsigned int slice);
+#ifdef I915
+static inline void
+intel_hiz_exec(struct intel_context *intel, struct intel_mipmap_tree *mt,
+ unsigned int level, unsigned int layer, enum gen6_hiz_op op)
+{
+ /* Stub on i915. It would be nice if we didn't execute resolve code at all
+ * there.
+ */
+}
+#else
+void
+intel_hiz_exec(struct intel_context *intel, struct intel_mipmap_tree *mt,
+ unsigned int level, unsigned int layer, enum gen6_hiz_op op);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_resolve_map.h b/src/mesa/drivers/dri/intel/intel_resolve_map.h
index 1082c10e214..0f31ca80117 100644
--- a/src/mesa/drivers/dri/intel/intel_resolve_map.h
+++ b/src/mesa/drivers/dri/intel/intel_resolve_map.h
@@ -25,6 +25,23 @@
#include <stdint.h>
+/**
+ * For an overview of the HiZ operations, see the following sections of the
+ * Sandy Bridge PRM, Volume 1, Part2:
+ * - 7.5.3.1 Depth Buffer Clear
+ * - 7.5.3.2 Depth Buffer Resolve
+ * - 7.5.3.3 Hierarchical Depth Buffer Resolve
+ *
+ * Of these, two get entered in the resolve map as needing to be done to the
+ * buffer: depth resolve and hiz resolve.
+ */
+enum gen6_hiz_op {
+ GEN6_HIZ_OP_DEPTH_CLEAR,
+ GEN6_HIZ_OP_DEPTH_RESOLVE,
+ GEN6_HIZ_OP_HIZ_RESOLVE,
+ GEN6_HIZ_OP_NONE,
+};
+
enum intel_need_resolve {
INTEL_NEED_HIZ_RESOLVE,
INTEL_NEED_DEPTH_RESOLVE,