summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-06-11 14:55:14 -0600
committerBrian Paul <[email protected]>2009-06-11 14:58:25 -0600
commit322e8556b91ceb80d4a53129cbb5db99087085f1 (patch)
treedfb91d23d3497cb01dee46e1386130f4d5483657 /src/mesa/main
parent0ddc38309a4ecbe7db4a9e6055d7855d00e6ab7b (diff)
mesa: add default function for ctx->Driver.CheckQuery() hook
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/queryobj.c16
-rw-r--r--src/mesa/main/queryobj.h3
2 files changed, 18 insertions, 1 deletions
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 554e0b0d181..c25b31af023 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -83,13 +83,27 @@ void
_mesa_wait_query(GLcontext *ctx, struct gl_query_object *q)
{
/* For software drivers, _mesa_end_query() should have completed the query.
- * For real hardware, implement a proper WaitQuery() driver function.
+ * For real hardware, implement a proper WaitQuery() driver function,
+ * which may require issuing a flush.
*/
assert(q->Ready);
}
/**
+ * Check if a query results are ready. Software driver fallback.
+ * Called via ctx->Driver.CheckQuery().
+ */
+void
+_mesa_check_query(GLcontext *ctx, struct gl_query_object *q)
+{
+ /* No-op for sw rendering.
+ * HW drivers may need to flush at this time.
+ */
+}
+
+
+/**
* Delete a query object. Called via ctx->Driver.DeleteQuery().
* Not removed from hash table here.
*/
diff --git a/src/mesa/main/queryobj.h b/src/mesa/main/queryobj.h
index 9a9774641bb..bc02b65b54c 100644
--- a/src/mesa/main/queryobj.h
+++ b/src/mesa/main/queryobj.h
@@ -48,6 +48,9 @@ _mesa_end_query(GLcontext *ctx, struct gl_query_object *q);
extern void
_mesa_wait_query(GLcontext *ctx, struct gl_query_object *q);
+extern void
+_mesa_check_query(GLcontext *ctx, struct gl_query_object *q);
+
extern void GLAPIENTRY
_mesa_GenQueriesARB(GLsizei n, GLuint *ids);