summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common/meta.c
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2011-12-19 14:28:32 -0800
committerPaul Berry <[email protected]>2011-12-20 15:22:28 -0800
commit163611d7b21670de6074c09d37bdf93bad494036 (patch)
treeb167151b0c469986f872ff3f0e63e800b680c531 /src/mesa/drivers/common/meta.c
parentdc7b6d7d6defdfe4f79fb682d3378a3bed8b5db9 (diff)
mesa: Add a function to query whether a meta-op is in progress.
This is needed by i965 to ensure that transform feedback counters are not incremented during meta-ops. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common/meta.c')
-rw-r--r--src/mesa/drivers/common/meta.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 1683c85e9b7..c5c59ebeec9 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -985,6 +985,16 @@ _mesa_meta_end(struct gl_context *ctx)
/**
+ * Determine whether Mesa is currently in a meta state.
+ */
+GLboolean
+_mesa_meta_in_progress(struct gl_context *ctx)
+{
+ return ctx->Meta->SaveStackDepth != 0;
+}
+
+
+/**
* Convert Z from a normalized value in the range [0, 1] to an object-space
* Z coordinate in [-1, +1] so that drawing at the new Z position with the
* default/identity ortho projection results in the original Z value.