aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_performance_query.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_performance_query.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_performance_query.c33
1 files changed, 5 insertions, 28 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
index 1c9ddf52ea3..66128869f4f 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_query.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -468,29 +468,6 @@ snapshot_statistics_registers(struct brw_context *brw,
}
/**
- * Emit an MI_REPORT_PERF_COUNT command packet.
- *
- * This asks the GPU to write a report of the current OA counter
- * values into @bo at the given offset and containing the given
- * @report_id which we can cross-reference when parsing the report.
- */
-static void
-emit_mi_report_perf_count(struct brw_context *brw,
- struct brw_bo *bo,
- uint32_t offset_in_bytes,
- uint32_t report_id)
-{
- assert(offset_in_bytes % 64 == 0);
-
- BEGIN_BATCH(3);
- OUT_BATCH(GEN6_MI_REPORT_PERF_COUNT);
- OUT_RELOC(bo, I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION,
- offset_in_bytes);
- OUT_BATCH(report_id);
- ADVANCE_BATCH();
-}
-
-/**
* Add a query to the global list of "unaccumulated queries."
*
* Queries are tracked here until all the associated OA reports have
@@ -1001,8 +978,8 @@ brw_begin_perf_query(struct gl_context *ctx,
brw->perfquery.next_query_start_report_id += 2;
/* Take a starting OA counter snapshot. */
- emit_mi_report_perf_count(brw, obj->oa.bo, 0,
- obj->oa.begin_report_id);
+ brw->vtbl.emit_mi_report_perf_count(brw, obj->oa.bo, 0,
+ obj->oa.begin_report_id);
++brw->perfquery.n_active_oa_queries;
/* No already-buffered samples can possibly be associated with this query
@@ -1081,9 +1058,9 @@ brw_end_perf_query(struct gl_context *ctx,
*/
if (!obj->oa.results_accumulated) {
/* Take an ending OA counter snapshot. */
- emit_mi_report_perf_count(brw, obj->oa.bo,
- MI_RPC_BO_END_OFFSET_BYTES,
- obj->oa.begin_report_id + 1);
+ brw->vtbl.emit_mi_report_perf_count(brw, obj->oa.bo,
+ MI_RPC_BO_END_OFFSET_BYTES,
+ obj->oa.begin_report_id + 1);
}
--brw->perfquery.n_active_oa_queries;