diff options
author | Mark Janes <[email protected]> | 2019-06-26 11:38:38 -0700 |
---|---|---|
committer | Mark Janes <[email protected]> | 2019-08-07 21:33:55 -0700 |
commit | f57c8a6dc110e7701233f159ce166c63ea75ff5f (patch) | |
tree | 8e0ac72b3cd87551b6d4688ea94e2f76e5118980 | |
parent | 52f7a0bff7d4065de1ce4b91a767555dee811751 (diff) |
intel/perf: create a vtable entry for emit_mi_flush
This method is needed to move subsequent methods into perf.
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/intel/perf/gen_perf.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_performance_query.c | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/intel/perf/gen_perf.h b/src/intel/perf/gen_perf.h index 3606748c424..6e69278ccdf 100644 --- a/src/intel/perf/gen_perf.h +++ b/src/intel/perf/gen_perf.h @@ -217,6 +217,7 @@ struct gen_perf_config { struct { void *(*bo_alloc)(void *bufmgr, const char *name, uint64_t size); void (*bo_unreference)(void *bo); + void (*emit_mi_flush)(void *ctx); void (*emit_mi_report_perf_count)(void *ctx, void *bo, uint32_t offset_in_bytes, diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c index 63752e5eaca..770dcb4a9c6 100644 --- a/src/mesa/drivers/dri/i965/brw_performance_query.c +++ b/src/mesa/drivers/dri/i965/brw_performance_query.c @@ -795,7 +795,7 @@ brw_begin_perf_query(struct gl_context *ctx, * This is our Begin synchronization point to drain current work on the * GPU before we capture our first counter snapshot... */ - brw_emit_mi_flush(brw); + perf_cfg->vtbl.emit_mi_flush(brw); switch (query->kind) { case GEN_PERF_QUERY_TYPE_OA: @@ -1004,7 +1004,7 @@ brw_end_perf_query(struct gl_context *ctx, * For more details see comment in brw_begin_perf_query for * corresponding flush. */ - brw_emit_mi_flush(brw); + perf_cfg->vtbl.emit_mi_flush(brw); switch (obj->queryinfo->kind) { case GEN_PERF_QUERY_TYPE_OA: @@ -1542,6 +1542,7 @@ brw_oa_emit_mi_report_perf_count(void *c, typedef void (*bo_unreference_t)(void *); typedef void (* emit_mi_report_t)(void *, void *, uint32_t, uint32_t); +typedef void (*emit_mi_flush_t)(void *); static void brw_oa_batchbuffer_flush(void *c, const char *file, int line) @@ -1570,6 +1571,7 @@ brw_init_perf_query_info(struct gl_context *ctx) perf_cfg->vtbl.bo_alloc = brw_oa_bo_alloc; perf_cfg->vtbl.bo_unreference = (bo_unreference_t)brw_bo_unreference; + perf_cfg->vtbl.emit_mi_flush = (emit_mi_flush_t)brw_emit_mi_flush; perf_cfg->vtbl.emit_mi_report_perf_count = (emit_mi_report_t)brw_oa_emit_mi_report_perf_count; perf_cfg->vtbl.batchbuffer_flush = brw_oa_batchbuffer_flush; |