void (*bo_unreference)(void *bo);
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);
+ int (*bo_busy)(void *bo);
void (*emit_mi_flush)(void *ctx);
void (*emit_mi_report_perf_count)(void *ctx,
void *bo,
struct gen_perf_context {
struct gen_perf_config *perf;
+ void * ctx; /* driver context (eg, brw_context) */
+ void * bufmgr;
+ const struct gen_device_info *devinfo;
+
+ uint32_t hw_ctx;
+ int drm_fd;
+
/* The i915 perf stream we open to setup + enable the OA counters */
int oa_stream_fd;
int n_query_instances;
};
+void gen_perf_init_context(struct gen_perf_context *perf_ctx,
+ struct gen_perf_config *perf_cfg,
+ void * ctx, /* driver context (eg, brw_context) */
+ void * bufmgr, /* eg brw_bufmgr */
+ const struct gen_device_info *devinfo,
+ uint32_t hw_ctx,
+ int drm_fd);
+
static inline size_t
gen_perf_query_counter_get_size(const struct gen_perf_query_counter *counter)
{
bool gen_perf_inc_n_users(struct gen_perf_context *perfquery);
void gen_perf_dec_n_users(struct gen_perf_context *perfquery);
+bool gen_perf_begin_query(struct gen_perf_context *perf_ctx,
+ struct gen_perf_query_object *query);
+void gen_perf_end_query(struct gen_perf_context *perf_ctx,
+ struct gen_perf_query_object *query);
+void gen_perf_wait_query(struct gen_perf_context *perf_ctx,
+ struct gen_perf_query_object *query,
+ void *current_batch);
+bool gen_perf_is_query_ready(struct gen_perf_context *perf_ctx,
+ struct gen_perf_query_object *query,
+ void *current_batch);
+
#endif /* GEN_PERF_H */