st/mesa: replace conditional with assertion

Core Mesa will not call ctx->Driver.CheckQuery() if the Ready flag
is already set.
This commit is contained in:
Brian Paul 2010-02-17 08:27:53 -07:00
parent f4542477cf
commit 6b4a553dd3

View file

@ -130,13 +130,8 @@ st_CheckQuery(GLcontext *ctx, struct gl_query_object *q)
{
struct pipe_context *pipe = ctx->st->pipe;
struct st_query_object *stq = st_query_object(q);
if (!q->Ready) {
q->Ready = pipe->get_query_result(pipe,
stq->pq,
FALSE,
&q->Result);
}
assert(!q->Ready); /* we should not get called if Ready is TRUE */
q->Ready = pipe->get_query_result(pipe, stq->pq, FALSE, &q->Result);
}