[Mesa-dev] [PATCH] i965: fix time query
Zou Nan hai
nanhai.zou at intel.com
Thu Jul 14 06:38:30 PDT 2011
PIPE_CONTROL reported time stamp is a 64 bits value,
toggles every 80ns.
Signed-off-by: Zou Nan hai <nanhai.zou at intel.com>
---
src/mesa/drivers/dri/i965/brw_queryobj.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c
index b41d05d..77d3130 100644
--- a/src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
@@ -58,7 +58,7 @@ brw_queryobj_get_results(struct brw_query_object *query)
drm_intel_bo_map(query->bo, GL_FALSE);
results = query->bo->virtual;
if (query->Base.Target == GL_TIME_ELAPSED_EXT) {
- query->Base.Result += 1000 * ((results[1] >> 32) - (results[0] >> 32));
+ query->Base.Result += 80 * (results[1] - results[0]);
} else {
/* Map and count the pixels from the current query BO */
for (i = query->first_index; i <= query->last_index; i++) {
--
1.7.1
More information about the mesa-dev
mailing list