CSO_BIT_STREAM_OUTPUTS |
CSO_BIT_VERTEX_ELEMENTS |
CSO_BIT_AUX_VERTEX_BUFFER_SLOT |
- CSO_BIT_PAUSE_QUERIES |
+ (st->active_queries ? CSO_BIT_PAUSE_QUERIES : 0) |
CSO_BITS_ALL_SHADERS));
/* blend state: RGBA masking */
return;
}
+ if (stq->type != PIPE_QUERY_TIMESTAMP)
+ st->active_queries++;
+
assert(stq->type == type);
}
static void
st_EndQuery(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;
struct st_query_object *stq = st_query_object(q);
bool ret = false;
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glEndQuery");
return;
}
+
+ if (stq->type != PIPE_QUERY_TIMESTAMP)
+ st->active_queries--;
}
CSO_BIT_RASTERIZER |
CSO_BIT_DEPTH_STENCIL_ALPHA |
CSO_BIT_STREAM_OUTPUTS |
- CSO_BIT_PAUSE_QUERIES |
+ (st->active_queries ? CSO_BIT_PAUSE_QUERIES : 0) |
CSO_BIT_SAMPLE_MASK |
CSO_BIT_MIN_SAMPLES |
CSO_BIT_RENDER_CONDITION |
CSO_BIT_DEPTH_STENCIL_ALPHA |
CSO_BIT_RASTERIZER |
CSO_BIT_STREAM_OUTPUTS |
- CSO_BIT_PAUSE_QUERIES |
+ (st->active_queries ? CSO_BIT_PAUSE_QUERIES : 0) |
CSO_BIT_SAMPLE_MASK |
CSO_BIT_MIN_SAMPLES |
CSO_BIT_RENDER_CONDITION |
GLboolean vertdata_edgeflags;
GLboolean edgeflag_culls_prims;
+ /**
+ * The number of currently active queries (excluding timer queries).
+ * This is used to know if we need to pause any queries for meta ops.
+ */
+ unsigned active_queries;
+
struct st_vertex_program *vp; /**< Currently bound vertex program */
struct st_fragment_program *fp; /**< Currently bound fragment program */
struct st_common_program *gp; /**< Currently bound geometry program */