Skip to content
Snippets Groups Projects
Commit 3f8ad326 authored by Chris Forbes's avatar Chris Forbes
Browse files

mesa: Add support for inverted s/w conditional rendering


Signed-off-by: default avatarChris Forbes <chrisf@ijw.co.nz>
Reviewed-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
parent 9a071e33
No related branches found
No related tags found
No related merge requests found
......@@ -162,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()",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment