summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-02-25 13:56:01 -0800
committerKenneth Graunke <[email protected]>2013-03-01 22:09:03 -0800
commitd1b34baf9b9c977d2bcd612aa8ea7256f2143ad8 (patch)
tree48b238be172294faed2e8854e5459c6a844d5111 /src
parent3d71f4fbac2e0337a1881cef93a220c36f9875f5 (diff)
i965: Write TIMESTAMP query values into the first buffer element.
For timestamp queries, we just write a single value to a BO. The natural place to write that is element 0, so we should do that. Previously, we wrote it into element 1 (the second slot) leaving element 0 filled with garbage. Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_queryobj.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c
index 03104791406..c6ed8e26d32 100644
--- a/src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
@@ -179,12 +179,11 @@ brw_queryobj_get_results(struct gl_context *ctx,
* The low 32 bits rolls over in ~343 seconds. Our 36-bit result
* rolls over every ~69 seconds.
*/
- query->Base.Result = 80 * (results[1] & 0xffffffff);
+ query->Base.Result = 80 * (results[0] & 0xffffffff);
query->Base.Result &= (1ull << 36) - 1;
} else {
- query->Base.Result = 1000 * (results[1] >> 32);
+ query->Base.Result = 1000 * (results[0] >> 32);
}
-
break;
case GL_SAMPLES_PASSED_ARB:
@@ -479,7 +478,7 @@ brw_query_counter(struct gl_context *ctx, struct gl_query_object *q)
drm_intel_bo_unreference(query->bo);
query->bo = drm_intel_bo_alloc(intel->bufmgr, "timestamp query", 4096, 4096);
- write_timestamp(intel, query->bo, 1);
+ write_timestamp(intel, query->bo, 0);
}
static uint64_t