diff options
author | Marek Olšák <[email protected]> | 2017-04-24 12:10:24 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-04-28 21:47:35 +0200 |
commit | fa15436e634f36d94d6d477675a2037404df1952 (patch) | |
tree | bb256e2699659b65871ce442e811946b8e376eab /src/gallium/drivers/radeon | |
parent | 55445ff1891724c78e6573d2f8c721e14c0449fc (diff) |
radeonsi: add a HUD query for draw calls with primitive restart
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.c | 7 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index fbd0ac7e16c..3e83d371b6e 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -580,6 +580,7 @@ struct r600_common_context { unsigned num_cs_dw_queries_suspend; /* Misc stats. */ unsigned num_draw_calls; + unsigned num_prim_restart_calls; unsigned num_spill_draw_calls; unsigned num_compute_calls; unsigned num_spill_compute_calls; diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index 0980eca7884..cbf4bbac3e4 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -97,6 +97,9 @@ static bool r600_query_sw_begin(struct r600_common_context *rctx, case R600_QUERY_DRAW_CALLS: query->begin_result = rctx->num_draw_calls; break; + case R600_QUERY_PRIM_RESTART_CALLS: + query->begin_result = rctx->num_prim_restart_calls; + break; case R600_QUERY_SPILL_DRAW_CALLS: query->begin_result = rctx->num_spill_draw_calls; break; @@ -221,6 +224,9 @@ static bool r600_query_sw_end(struct r600_common_context *rctx, case R600_QUERY_DRAW_CALLS: query->end_result = rctx->num_draw_calls; break; + case R600_QUERY_PRIM_RESTART_CALLS: + query->end_result = rctx->num_prim_restart_calls; + break; case R600_QUERY_SPILL_DRAW_CALLS: query->end_result = rctx->num_spill_draw_calls; break; @@ -1761,6 +1767,7 @@ static struct pipe_driver_query_info r600_driver_query_list[] = { X("num-shaders-created", NUM_SHADERS_CREATED, UINT64, CUMULATIVE), X("num-shader-cache-hits", NUM_SHADER_CACHE_HITS, UINT64, CUMULATIVE), X("draw-calls", DRAW_CALLS, UINT64, AVERAGE), + X("prim-restart-calls", PRIM_RESTART_CALLS, UINT64, AVERAGE), X("spill-draw-calls", SPILL_DRAW_CALLS, UINT64, AVERAGE), X("compute-calls", COMPUTE_CALLS, UINT64, AVERAGE), X("spill-compute-calls", SPILL_COMPUTE_CALLS, UINT64, AVERAGE), diff --git a/src/gallium/drivers/radeon/r600_query.h b/src/gallium/drivers/radeon/r600_query.h index b9ab44ca3f7..05aceb72839 100644 --- a/src/gallium/drivers/radeon/r600_query.h +++ b/src/gallium/drivers/radeon/r600_query.h @@ -44,6 +44,7 @@ struct r600_resource; enum { R600_QUERY_DRAW_CALLS = PIPE_QUERY_DRIVER_SPECIFIC, + R600_QUERY_PRIM_RESTART_CALLS, R600_QUERY_SPILL_DRAW_CALLS, R600_QUERY_COMPUTE_CALLS, R600_QUERY_SPILL_COMPUTE_CALLS, |