Mesa (master): i965: perf: reuse timescale base function from query
Lionel Landwerlin
llandwerlin at kemper.freedesktop.org
Thu Mar 8 23:07:42 UTC 2018
Module: Mesa
Branch: master
Commit: e4387faafb1455b92d5e9620df9754cae1cd07e8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4387faafb1455b92d5e9620df9754cae1cd07e8
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Tue Mar 6 15:47:00 2018 +0000
i965: perf: reuse timescale base function from query
We already have the same function in brw_queryobj.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/mesa/drivers/dri/i965/brw_performance_query.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
index a084b30fe7..d0faf4a2cb 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_query.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -613,15 +613,6 @@ drop_from_unaccumulated_query_list(struct brw_context *brw,
reap_old_sample_buffers(brw);
}
-static uint64_t
-timebase_scale(struct brw_context *brw, uint32_t u32_time_delta)
-{
- const struct gen_device_info *devinfo = &brw->screen->devinfo;
- uint64_t tmp = ((uint64_t)u32_time_delta) * 1000000000ull;
-
- return tmp ? tmp / devinfo->timestamp_frequency : 0;
-}
-
static void
accumulate_uint32(const uint32_t *report0,
const uint32_t *report1,
@@ -943,13 +934,13 @@ accumulate_oa_reports(struct brw_context *brw,
/* Ignore reports that come before the start marker.
* (Note: takes care to allow overflow of 32bit timestamps)
*/
- if (timebase_scale(brw, report[1] - start[1]) > 5000000000)
+ if (brw_timebase_scale(brw, report[1] - start[1]) > 5000000000)
continue;
/* Ignore reports that come after the end marker.
* (Note: takes care to allow overflow of 32bit timestamps)
*/
- if (timebase_scale(brw, report[1] - end[1]) <= 5000000000)
+ if (brw_timebase_scale(brw, report[1] - end[1]) <= 5000000000)
goto end;
/* For Gen8+ since the counters continue while other
More information about the mesa-commit
mailing list