Merge branch '7.8' into master
[mesa.git] / src / mesa / state_tracker / st_cb_queryobj.c
index 10629e92254453e2f2f5a6049195ae1a5a1cce59..c66729b1244336e35a5f47b8e04fad934d16e22b 100644 (file)
@@ -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);
 }