X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fstate_tracker%2Fst_cb_condrender.c;h=8776985f961277a4d24946f4fc0938f0aab1d2c8;hb=a91a556c813cf7ecf462774e970f47072e2a7f82;hp=b509d43b7c6975ce6b3be29b3925c6da31daf6f0;hpb=0870e4a2022cff79805613ae7cd4b9237a2f564c;p=mesa.git diff --git a/src/mesa/state_tracker/st_cb_condrender.c b/src/mesa/state_tracker/st_cb_condrender.c index b509d43b7c6..8776985f961 100644 --- a/src/mesa/state_tracker/st_cb_condrender.c +++ b/src/mesa/state_tracker/st_cb_condrender.c @@ -38,22 +38,26 @@ #include "pipe/p_context.h" #include "pipe/p_defines.h" +#include "cso_cache/cso_context.h" #include "st_context.h" #include "st_cb_queryobj.h" #include "st_cb_condrender.h" +#include "st_cb_bitmap.h" /** * 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 = st_context(ctx)->pipe; + struct st_context *st = st_context(ctx); uint m; + st_flush_bitmap_cache(st); + switch (mode) { case GL_QUERY_WAIT: m = PIPE_RENDER_COND_WAIT; @@ -72,19 +76,22 @@ st_BeginConditionalRender(GLcontext *ctx, struct gl_query_object *q, m = PIPE_RENDER_COND_WAIT; } - pipe->render_condition(pipe, stq->pq, m); + cso_set_render_condition(st->cso_context, stq->pq, FALSE, m); } /** - * Called via ctx->Driver.BeginConditionalRender() + * Called via ctx->Driver.EndConditionalRender() */ 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 = st_context(ctx)->pipe; + struct st_context *st = st_context(ctx); (void) q; - pipe->render_condition(pipe, NULL, 0); + + st_flush_bitmap_cache(st); + + cso_set_render_condition(st->cso_context, NULL, FALSE, 0); }