mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 05:50:14 +01:00
iris/perf: add begin/end hooks
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
8c4c346665
commit
1cb4fc184f
2 changed files with 28 additions and 0 deletions
|
|
@ -390,3 +390,24 @@ void iris_destroy_monitor_object(struct pipe_context *ctx,
|
|||
monitor->active_counters = NULL;
|
||||
free(monitor);
|
||||
}
|
||||
|
||||
bool
|
||||
iris_begin_monitor(struct pipe_context *ctx,
|
||||
struct iris_monitor_object *monitor)
|
||||
{
|
||||
struct iris_context *ice = (void *) ctx;
|
||||
struct gen_perf_context *perf_ctx = ice->perf_ctx;
|
||||
|
||||
return gen_perf_begin_query(perf_ctx, monitor->query);
|
||||
}
|
||||
|
||||
bool
|
||||
iris_end_monitor(struct pipe_context *ctx,
|
||||
struct iris_monitor_object *monitor)
|
||||
{
|
||||
struct iris_context *ice = (void *) ctx;
|
||||
struct gen_perf_context *perf_ctx = ice->perf_ctx;
|
||||
|
||||
gen_perf_end_query(perf_ctx, monitor->query);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,4 +57,11 @@ struct pipe_query;
|
|||
void iris_destroy_monitor_object(struct pipe_context *ctx,
|
||||
struct iris_monitor_object *monitor);
|
||||
|
||||
bool
|
||||
iris_begin_monitor(struct pipe_context *ctx,
|
||||
struct iris_monitor_object *monitor);
|
||||
bool
|
||||
iris_end_monitor(struct pipe_context *ctx,
|
||||
struct iris_monitor_object *monitor);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue