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);
+ struct pipe_context *pipe = st->pipe;
uint m;
switch (mode) {
m = PIPE_RENDER_COND_WAIT;
}
+ st->render_condition = stq->pq;
+ st->condition_mode = m;
+
pipe->render_condition(pipe, stq->pq, m);
}
static void
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);
+ struct pipe_context *pipe = st->pipe;
(void) q;
+
pipe->render_condition(pipe, NULL, 0);
+ st->render_condition = NULL;
}
GLsizei stride;
} user_attrib[PIPE_MAX_ATTRIBS];
unsigned num_user_attribs;
+
+ /* Active render condition. */
+ struct pipe_query *render_condition;
+ unsigned condition_mode;
};
return FALSE;
}
+ /* Disable conditional rendering. */
+ if (st->render_condition) {
+ pipe->render_condition(pipe, NULL, 0);
+ }
+
util_gen_mipmap(st->gen_mipmap, psv, face, baseLevel, lastLevel,
PIPE_TEX_FILTER_LINEAR);
+ if (st->render_condition) {
+ pipe->render_condition(pipe, st->render_condition, st->condition_mode);
+ }
+
return TRUE;
}