summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-21 20:45:38 +0200
committerMarek Olšák <[email protected]>2017-06-26 02:17:03 +0200
commit5fa69be3c8894a6f313080c3afec7063d5356395 (patch)
treea90448a576095e0102b7d04452ffb41da9075789 /src/gallium/state_trackers
parent833f3c1c31b1c4dc7742d83eb2db63dcc9b42e1b (diff)
mesa/glthread: add glthread "perf" counters and pass them to gallium HUD
for HUD integration in following commits. This valuable profiling data will allow us to see on the HUD how well glthread is able to utilize parallelism. This is better than benchmarking, because you can see exactly what's happening and you don't have to be CPU-bound. u_threaded_context has the same counters. Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/dri_screen.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index aa215b09a2d..6b58830e0b4 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -447,7 +447,8 @@ dri_postprocessing_init(struct dri_screen *screen)
}
static void
-dri_set_background_context(struct st_context_iface *st)
+dri_set_background_context(struct st_context_iface *st,
+ struct util_queue_monitoring *queue_info)
{
struct dri_context *ctx = (struct dri_context *)st->st_manager_private;
const __DRIbackgroundCallableExtension *backgroundCallable =
@@ -459,6 +460,9 @@ dri_set_background_context(struct st_context_iface *st)
*/
assert(backgroundCallable);
backgroundCallable->setBackgroundContext(ctx->cPriv->loaderPrivate);
+
+ if (ctx->hud)
+ hud_add_queue_for_monitoring(ctx->hud, queue_info);
}
unsigned