diff options
author | Chris Forbes <[email protected]> | 2014-08-19 23:23:08 +1200 |
---|---|---|
committer | Chris Forbes <[email protected]> | 2014-08-20 07:49:17 +1200 |
commit | 3f8ad326276d14f3e38b4b5a58547227911d1ee7 (patch) | |
tree | 7f8a6fb06e22115fa249c7dada08c3ee13e9d5a6 /src | |
parent | 9a071e3339afcf6fd937ae31121fa3b3face3bfe (diff) |
mesa: Add support for inverted s/w conditional rendering
Signed-off-by: Chris Forbes <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/condrender.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c index 54cd423fa94..75f9d74bc88 100644 --- a/src/mesa/main/condrender.c +++ b/src/mesa/main/condrender.c @@ -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()", |