X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fstate_tracker%2Fst_cb_condrender.c;h=64c6c117fca4efa71bff4a7720b2bda4f111c848;hb=c1477f6ffe6a3d032dbcc76a5f506a7293e2fece;hp=e2cd80b40461fbf05951e74ab7ceb371d3a796bb;hpb=ba5d600c90f7075cf2c33a0c5c679ef822e8746e;p=mesa.git diff --git a/src/mesa/state_tracker/st_cb_condrender.c b/src/mesa/state_tracker/st_cb_condrender.c index e2cd80b4046..64c6c117fca 100644 --- a/src/mesa/state_tracker/st_cb_condrender.c +++ b/src/mesa/state_tracker/st_cb_condrender.c @@ -47,11 +47,12 @@ * Called via ctx->Driver.BeginConditionalRender() */ static void -st_BeginConditionalRender(GLcontext *ctx, struct gl_query_object *q, +st_BeginConditionalRender(struct gl_context *ctx, struct gl_query_object *q, GLenum mode) { struct st_query_object *stq = st_query_object(q); - struct pipe_context *pipe = ctx->st->pipe; + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; uint m; switch (mode) { @@ -69,9 +70,12 @@ st_BeginConditionalRender(GLcontext *ctx, struct gl_query_object *q, break; default: assert(0 && "bad mode in st_BeginConditionalRender"); - return; + m = PIPE_RENDER_COND_WAIT; } + st->render_condition = stq->pq; + st->condition_mode = m; + pipe->render_condition(pipe, stq->pq, m); } @@ -80,11 +84,14 @@ st_BeginConditionalRender(GLcontext *ctx, struct gl_query_object *q, * Called via ctx->Driver.BeginConditionalRender() */ static void -st_EndConditionalRender(GLcontext *ctx, struct gl_query_object *q) +st_EndConditionalRender(struct gl_context *ctx, struct gl_query_object *q) { - struct pipe_context *pipe = ctx->st->pipe; + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; (void) q; + pipe->render_condition(pipe, NULL, 0); + st->render_condition = NULL; }