diff options
author | Marek Olšák <[email protected]> | 2017-03-10 12:17:20 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-05-15 13:01:33 +0200 |
commit | 4c98afb241fbb8a7bbebb140a0ce74d24c842d48 (patch) | |
tree | b7621c2793cdd713e2baba8616c7f49c66264ac1 /src/gallium/drivers/radeon/r600_query.c | |
parent | 7166773f90d541103b85e35227d59d82b416aa45 (diff) |
gallium/radeon: add threaded context counter monitoring for HUD
"tc" will be initialized by the next commit.
v2: rename stuff according to v2 changes in u_threaded_context
Reviewed-by: Nicolai Hähnle <[email protected]> (v1)
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_query.c')
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index dac9b9cbc62..9878745edc8 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -133,6 +133,15 @@ static bool r600_query_sw_begin(struct r600_common_context *rctx, case R600_QUERY_NUM_L2_WRITEBACKS: query->begin_result = rctx->num_L2_writebacks; break; + case R600_QUERY_TC_OFFLOADED_SLOTS: + query->begin_result = rctx->tc ? rctx->tc->num_offloaded_slots : 0; + break; + case R600_QUERY_TC_DIRECT_SLOTS: + query->begin_result = rctx->tc ? rctx->tc->num_direct_slots : 0; + break; + case R600_QUERY_TC_NUM_SYNCS: + query->begin_result = rctx->tc ? rctx->tc->num_syncs : 0; + break; case R600_QUERY_REQUESTED_VRAM: case R600_QUERY_REQUESTED_GTT: case R600_QUERY_MAPPED_VRAM: @@ -260,6 +269,15 @@ static bool r600_query_sw_end(struct r600_common_context *rctx, case R600_QUERY_NUM_L2_WRITEBACKS: query->end_result = rctx->num_L2_writebacks; break; + case R600_QUERY_TC_OFFLOADED_SLOTS: + query->end_result = rctx->tc ? rctx->tc->num_offloaded_slots : 0; + break; + case R600_QUERY_TC_DIRECT_SLOTS: + query->end_result = rctx->tc ? rctx->tc->num_direct_slots : 0; + break; + case R600_QUERY_TC_NUM_SYNCS: + query->end_result = rctx->tc ? rctx->tc->num_syncs : 0; + break; case R600_QUERY_REQUESTED_VRAM: case R600_QUERY_REQUESTED_GTT: case R600_QUERY_MAPPED_VRAM: @@ -1785,6 +1803,9 @@ static struct pipe_driver_query_info r600_driver_query_list[] = { X("num-fb-cache-flushes", NUM_FB_CACHE_FLUSHES, UINT64, AVERAGE), X("num-L2-invalidates", NUM_L2_INVALIDATES, UINT64, AVERAGE), X("num-L2-writebacks", NUM_L2_WRITEBACKS, UINT64, AVERAGE), + X("tc-offloaded-slots", TC_OFFLOADED_SLOTS, UINT64, AVERAGE), + X("tc-direct-slots", TC_DIRECT_SLOTS, UINT64, AVERAGE), + X("tc-num-syncs", TC_NUM_SYNCS, UINT64, AVERAGE), X("CS-thread-busy", CS_THREAD_BUSY, UINT64, AVERAGE), X("requested-VRAM", REQUESTED_VRAM, BYTES, AVERAGE), X("requested-GTT", REQUESTED_GTT, BYTES, AVERAGE), |