From 6aa62ba43f64f617c608e52b63c7eaa7aae16fb4 Mon Sep 17 00:00:00 2001 From: Zou Nan hai Date: Fri, 26 Jan 2007 07:04:15 +0800 Subject: [PATCH] ARB_Occlusion_query should support multiple query at same time --- src/mesa/drivers/dri/i965/intel_context.c | 6 +++--- src/mesa/drivers/dri/i965/intel_context.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index f7ab7d3b7d5..3f8c2c0890c 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -258,11 +258,11 @@ intelBeginQuery(GLcontext *ctx, GLenum target, struct gl_query_object *q) { struct intel_context *intel = intel_context( ctx ); drmI830MMIO io = { - .read_write = MMIO_WRITE, + .read_write = MMIO_READ, .reg = MMIO_REGS_PS_DEPTH_COUNT, .data = &q->Result }; - intel->stats_wm = GL_TRUE; + intel->stats_wm++; intelFinish(&intel->ctx); drmCommandRead(intel->driFd, DRM_I830_MMIO, &io, sizeof(io)); } @@ -281,7 +281,7 @@ intelEndQuery(GLcontext *ctx, GLenum target, struct gl_query_object *q) drmCommandRead(intel->driFd, DRM_I830_MMIO, &io, sizeof(io)); q->Result = tmp - q->Result; q->Ready = GL_TRUE; - intel->stats_wm = GL_FALSE; + intel->stats_wm--; } diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h index d51536c3fe8..a0f392f9353 100644 --- a/src/mesa/drivers/dri/i965/intel_context.h +++ b/src/mesa/drivers/dri/i965/intel_context.h @@ -177,7 +177,7 @@ struct intel_context GLuint second_last_swap_fence; GLboolean aub_wrap; - GLboolean stats_wm; + GLuint stats_wm; struct intel_batchbuffer *batch; -- 2.30.2