X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fstate_tracker%2Fst_cb_queryobj.c;h=c66729b1244336e35a5f47b8e04fad934d16e22b;hb=f0f04cd12db156ec53b7ea46fae27199af121f90;hp=10629e92254453e2f2f5a6049195ae1a5a1cce59;hpb=3e18bad36d90255dca6cb519eb7ecfc540c292c1;p=mesa.git diff --git a/src/mesa/state_tracker/st_cb_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c index 10629e92254..c66729b1244 100644 --- a/src/mesa/state_tracker/st_cb_queryobj.c +++ b/src/mesa/state_tracker/st_cb_queryobj.c @@ -41,7 +41,6 @@ #include "pipe/p_defines.h" #include "st_context.h" #include "st_cb_queryobj.h" -#include "st_public.h" static struct gl_query_object * @@ -70,7 +69,7 @@ st_DeleteQuery(GLcontext *ctx, struct gl_query_object *q) stq->pq = NULL; } - _mesa_free(stq); + free(stq); } @@ -131,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); }