diff options
author | Keith Whitwell <[email protected]> | 2008-09-20 06:34:23 -0700 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-09-21 09:44:25 -0700 |
commit | 7ce597508e7400e962c8fdb2d255f9887cb9c710 (patch) | |
tree | 4a34d426e1ec2eefa3aed84cf6e212dc81f55478 /src/mesa/drivers | |
parent | dc8058c3370588bfcad49fadace1691da47d58cd (diff) |
mesa: improved driver query interface
Brought over from gallium-0.2 branch.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/common/driverfuncs.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_context.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xm_dd.c | 8 |
3 files changed, 10 insertions, 8 deletions
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index f6411f303b0..9e2cce5bbed 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -228,8 +228,10 @@ _mesa_init_driver_functions(struct dd_function_table *driver) /* query objects */ driver->NewQueryObject = _mesa_new_query_object; - driver->BeginQuery = NULL; - driver->EndQuery = NULL; + driver->DeleteQuery = _mesa_delete_query; + driver->BeginQuery = _mesa_begin_query; + driver->EndQuery = _mesa_end_query; + driver->WaitQuery = _mesa_wait_query; /* APPLE_vertex_array_object */ driver->NewArrayObject = _mesa_new_array_object; diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index eee03d022ba..57e574447a6 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -550,7 +550,7 @@ intelFinish(GLcontext * ctx) #ifdef I915_MMIO_READ static void -intelBeginQuery(GLcontext *ctx, GLenum target, struct gl_query_object *q) +intelBeginQuery(GLcontext *ctx, struct gl_query_object *q) { struct intel_context *intel = intel_context( ctx ); struct drm_i915_mmio io = { @@ -564,7 +564,7 @@ intelBeginQuery(GLcontext *ctx, GLenum target, struct gl_query_object *q) } static void -intelEndQuery(GLcontext *ctx, GLenum target, struct gl_query_object *q) +intelEndQuery(GLcontext *ctx, struct gl_query_object *q) { struct intel_context *intel = intel_context( ctx ); GLuint64EXT tmp; diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 0a978e5cf7e..305df548fa2 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -1086,9 +1086,9 @@ xmesa_new_query_object(GLcontext *ctx, GLuint id) static void -xmesa_begin_query(GLcontext *ctx, GLenum target, struct gl_query_object *q) +xmesa_begin_query(GLcontext *ctx, struct gl_query_object *q) { - if (target == GL_TIME_ELAPSED_EXT) { + if (q->Target == GL_TIME_ELAPSED_EXT) { struct xmesa_query_object *xq = (struct xmesa_query_object *) q; (void) gettimeofday(&xq->StartTime, NULL); } @@ -1113,9 +1113,9 @@ time_diff(const struct timeval *t0, const struct timeval *t1) static void -xmesa_end_query(GLcontext *ctx, GLenum target, struct gl_query_object *q) +xmesa_end_query(GLcontext *ctx, struct gl_query_object *q) { - if (target == GL_TIME_ELAPSED_EXT) { + if (q->Target == GL_TIME_ELAPSED_EXT) { struct xmesa_query_object *xq = (struct xmesa_query_object *) q; struct timeval endTime; (void) gettimeofday(&endTime, NULL); |