mesa: add default function for ctx->Driver.CheckQuery() hook
This commit is contained in:
@@ -231,6 +231,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
|
||||
driver->BeginQuery = _mesa_begin_query;
|
||||
driver->EndQuery = _mesa_end_query;
|
||||
driver->WaitQuery = _mesa_wait_query;
|
||||
driver->CheckQuery = _mesa_check_query;
|
||||
|
||||
/* APPLE_vertex_array_object */
|
||||
driver->NewArrayObject = _mesa_new_array_object;
|
||||
|
@@ -83,12 +83,26 @@ 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.
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user