ARB_Occlusion_query should support multiple query at same time
authorZou Nan hai <nanhai.zou@intel.com>
Thu, 25 Jan 2007 23:04:15 +0000 (07:04 +0800)
committerZou Nan hai <nanhai.zou@intel.com>
Thu, 25 Jan 2007 23:04:15 +0000 (07:04 +0800)
src/mesa/drivers/dri/i965/intel_context.c
src/mesa/drivers/dri/i965/intel_context.h

index f7ab7d3b7d56f47ee96571cf3f3f0a6a23ca46ce..3f8c2c0890c761db65ee46ea1830c5c242facd00 100644 (file)
@@ -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--;
 }
 
 
index d51536c3fe82ec6718246051e0d0f1e21a550c33..a0f392f9353efea2da23804bdd324d910bbfe1a6 100644 (file)
@@ -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;