diff options
author | Tobias Klausmann <[email protected]> | 2014-08-18 00:41:12 +0200 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2014-08-19 09:02:29 -0400 |
commit | 7a48858fcb90534a4a7415a9fa2670499a11bc39 (patch) | |
tree | e247e4b68dbbacec04d38ceca289f732290e1cf0 /src/mesa/state_tracker/st_cb_condrender.c | |
parent | fd5edee7002fbaef96618603bfe831ec7cca128d (diff) |
mesa/st: Support ARB_conditional_render_inverted modes
Reviewed-by: Ilia Mirkin <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Signed-off-by: Tobias Klausmann <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_condrender.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_condrender.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_condrender.c b/src/mesa/state_tracker/st_cb_condrender.c index 8776985f961..f02472aec8b 100644 --- a/src/mesa/state_tracker/st_cb_condrender.c +++ b/src/mesa/state_tracker/st_cb_condrender.c @@ -55,6 +55,8 @@ st_BeginConditionalRender(struct gl_context *ctx, struct gl_query_object *q, struct st_query_object *stq = st_query_object(q); struct st_context *st = st_context(ctx); uint m; + /* Don't invert the condition for rendering by default */ + boolean inverted = FALSE; st_flush_bitmap_cache(st); @@ -71,12 +73,28 @@ st_BeginConditionalRender(struct gl_context *ctx, struct gl_query_object *q, case GL_QUERY_BY_REGION_NO_WAIT: m = PIPE_RENDER_COND_BY_REGION_NO_WAIT; break; + case GL_QUERY_WAIT_INVERTED: + m = PIPE_RENDER_COND_WAIT; + inverted = TRUE; + break; + case GL_QUERY_NO_WAIT_INVERTED: + m = PIPE_RENDER_COND_NO_WAIT; + inverted = TRUE; + break; + case GL_QUERY_BY_REGION_WAIT_INVERTED: + m = PIPE_RENDER_COND_BY_REGION_WAIT; + inverted = TRUE; + break; + case GL_QUERY_BY_REGION_NO_WAIT_INVERTED: + m = PIPE_RENDER_COND_BY_REGION_NO_WAIT; + inverted = TRUE; + break; default: assert(0 && "bad mode in st_BeginConditionalRender"); m = PIPE_RENDER_COND_WAIT; } - cso_set_render_condition(st->cso_context, stq->pq, FALSE, m); + cso_set_render_condition(st->cso_context, stq->pq, inverted, m); } |