mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
mesa: Add support for inverted s/w conditional rendering
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
9a071e3339
commit
3f8ad32627
1 changed files with 13 additions and 0 deletions
|
|
@ -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()",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue