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 <kenneth@whitecape.org>
This commit is contained in:
Paul Berry 2011-12-19 14:28:32 -08:00
parent dc7b6d7d6d
commit 163611d7b2
2 changed files with 13 additions and 0 deletions

View File

@ -984,6 +984,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

View File

@ -69,6 +69,9 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state);
extern void
_mesa_meta_end(struct gl_context *ctx);
extern GLboolean
_mesa_meta_in_progress(struct gl_context *ctx);
extern void
_mesa_meta_BlitFramebuffer(struct gl_context *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,