intel/perf: create a vtable entry for bo_wait_rendering
authorMark Janes <mark.a.janes@intel.com>
Fri, 28 Jun 2019 22:46:50 +0000 (15:46 -0700)
committerMark Janes <mark.a.janes@intel.com>
Thu, 8 Aug 2019 04:33:56 +0000 (21:33 -0700)
Iris and i965 variants of this method need to be called by perf
routines.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/perf/gen_perf.h
src/mesa/drivers/dri/i965/brw_performance_query.c

index 776873dbf99d93a1a691f35e90663093b94ff12c..066a2a4ba21f8c234d65422a7965f4c482311bac 100644 (file)
@@ -220,6 +220,7 @@ struct gen_perf_config {
       void *(*bo_map)(void *ctx, void *bo, unsigned flags);
       void (*bo_unmap)(void *bo);
       bool (*batch_references)(void *batch, void *bo);
+      void (*bo_wait_rendering)(void *bo);
       void (*emit_mi_flush)(void *ctx);
       void (*emit_mi_report_perf_count)(void *ctx,
                                         void *bo,
index cba763ba99807b4d6c06ccdf190c9934f368af8c..addb989f47b0830c5f26b8e5ec3e562827a39156 100644 (file)
@@ -696,7 +696,7 @@ brw_wait_perf_query(struct gl_context *ctx, struct gl_perf_query_object *o)
    if (perf_cfg->vtbl.batch_references(&brw->batch, bo))
       perf_cfg->vtbl.batchbuffer_flush(brw, __FILE__, __LINE__);
 
-   brw_bo_wait_rendering(bo);
+   perf_cfg->vtbl.bo_wait_rendering(bo);
 
    /* Due to a race condition between the OA unit signaling report
     * availability and the report actually being written into memory,
@@ -1177,6 +1177,7 @@ typedef void (*capture_frequency_stat_register_t)(void *, void *, uint32_t );
 typedef void (*store_register_mem64_t)(void *ctx, void *bo,
                                        uint32_t reg, uint32_t offset);
 typedef bool (*batch_references_t)(void *batch, void *bo);
+typedef void (*bo_wait_rendering_t)(void *bo);
 
 
 static unsigned
@@ -1205,6 +1206,7 @@ brw_init_perf_query_info(struct gl_context *ctx)
    perf_cfg->vtbl.store_register_mem64 =
       (store_register_mem64_t) brw_store_register_mem64;
    perf_cfg->vtbl.batch_references = (batch_references_t)brw_batch_references;
+   perf_cfg->vtbl.bo_wait_rendering = (bo_wait_rendering_t)brw_bo_wait_rendering;
 
    gen_perf_init_context(perf_ctx, perf_cfg, brw, brw->bufmgr, devinfo,
                          brw->hw_ctx, brw->screen->driScrnPriv->fd);