diff options
author | Samuel Pitoiset <[email protected]> | 2017-01-30 12:52:24 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-01-30 14:37:00 +0100 |
commit | 0e04a078c5545d536173e50e32a0604b9abb42bc (patch) | |
tree | 192b79827becd8b7f9d284898c9f03bab1e47aa2 /src/gallium/drivers/radeon/r600_query.c | |
parent | b0f7ddef4fcea8f0be7911a06b77be9eabba5c8f (diff) |
gallium/radeon: add new GPU-sdma-busy HUD query
For simplicity, GPU-sdma-busy will return 0 on previous gens.
v2: only read SRBM_STATUS2 on Evergreen+
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_query.c')
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index 4b9a155dad2..1747026d0dc 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -162,6 +162,7 @@ static bool r600_query_sw_begin(struct r600_common_context *rctx, case R600_QUERY_GPU_DB_BUSY: case R600_QUERY_GPU_CP_BUSY: case R600_QUERY_GPU_CB_BUSY: + case R600_QUERY_GPU_SDMA_BUSY: query->begin_result = r600_begin_counter(rctx->screen, query->b.type); break; @@ -269,6 +270,7 @@ static bool r600_query_sw_end(struct r600_common_context *rctx, case R600_QUERY_GPU_DB_BUSY: case R600_QUERY_GPU_CP_BUSY: case R600_QUERY_GPU_CB_BUSY: + case R600_QUERY_GPU_SDMA_BUSY: query->end_result = r600_end_counter(rctx->screen, query->b.type, query->begin_result); @@ -1768,6 +1770,7 @@ static struct pipe_driver_query_info r600_driver_query_list[] = { X("GPU-db-busy", GPU_DB_BUSY, UINT64, AVERAGE), X("GPU-cp-busy", GPU_CP_BUSY, UINT64, AVERAGE), X("GPU-cb-busy", GPU_CB_BUSY, UINT64, AVERAGE), + X("GPU-sdma-busy", GPU_SDMA_BUSY, UINT64, AVERAGE), X("temperature", GPU_TEMPERATURE, UINT64, AVERAGE), X("shader-clock", CURRENT_GPU_SCLK, HZ, AVERAGE), @@ -1785,7 +1788,7 @@ static unsigned r600_get_num_queries(struct r600_common_screen *rscreen) else if (rscreen->info.drm_major == 3) return ARRAY_SIZE(r600_driver_query_list) - 3; else - return ARRAY_SIZE(r600_driver_query_list) - 17; + return ARRAY_SIZE(r600_driver_query_list) - 18; } static int r600_get_driver_query_info(struct pipe_screen *screen, |