aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/condrender.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/condrender.c')
-rw-r--r--mesalib/src/mesa/main/condrender.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/condrender.c b/mesalib/src/mesa/main/condrender.c
index 0ad1e5c2a..75f9d74bc 100644
--- a/mesalib/src/mesa/main/condrender.c
+++ b/mesalib/src/mesa/main/condrender.c
@@ -77,8 +77,14 @@ _mesa_BeginConditionalRender(GLuint queryId, GLenum mode)
case GL_QUERY_NO_WAIT:
case GL_QUERY_BY_REGION_WAIT:
case GL_QUERY_BY_REGION_NO_WAIT:
- /* OK */
- break;
+ break; /* OK */
+ case GL_QUERY_WAIT_INVERTED:
+ case GL_QUERY_NO_WAIT_INVERTED:
+ case GL_QUERY_BY_REGION_WAIT_INVERTED:
+ case GL_QUERY_BY_REGION_NO_WAIT_INVERTED:
+ if (ctx->Extensions.ARB_conditional_render_inverted)
+ break; /* OK */
+ /* fallthrough - invalid */
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glBeginConditionalRender(mode=%s)",
_mesa_lookup_enum_by_nr(mode));
@@ -156,12 +162,25 @@ _mesa_check_conditional_render(struct gl_context *ctx)
ctx->Driver.WaitQuery(ctx, q);
}
return q->Result > 0;
+ case GL_QUERY_BY_REGION_WAIT_INVERTED:
+ /* fall-through */
+ case GL_QUERY_WAIT_INVERTED:
+ if (!q->Ready) {
+ ctx->Driver.WaitQuery(ctx, q);
+ }
+ return q->Result == 0;
case GL_QUERY_BY_REGION_NO_WAIT:
/* fall-through */
case GL_QUERY_NO_WAIT:
if (!q->Ready)
ctx->Driver.CheckQuery(ctx, q);
return q->Ready ? (q->Result > 0) : GL_TRUE;
+ case GL_QUERY_BY_REGION_NO_WAIT_INVERTED:
+ /* fall-through */
+ case GL_QUERY_NO_WAIT_INVERTED:
+ if (!q->Ready)
+ ctx->Driver.CheckQuery(ctx, q);
+ return q->Ready ? (q->Result == 0) : GL_TRUE;
default:
_mesa_problem(ctx, "Bad cond render mode %s in "
" _mesa_check_conditional_render()",