[Mesa-dev] [PATCH 2/2] radeon: use PIPE_DRIVER_QUERY_FLAG_DONT_LIST for perfcounters

Nicolai Hähnle nhaehnle at gmail.com
Tue Nov 24 08:05:29 PST 2015


Since the query names are not very enlightening, and there are thousands
of them, GALLIUM_HUD=help should only show the first and last query name
for each hardware block.
---
This patch obviously only applies on top of the series implementing
AMD_performance_monitor for radeonsi, but it illustrates the intention
of the new flag.
---
 src/gallium/drivers/radeon/r600_perfcounter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/radeon/r600_perfcounter.c b/src/gallium/drivers/radeon/r600_perfcounter.c
index b4915d0..a74cc89 100644
--- a/src/gallium/drivers/radeon/r600_perfcounter.c
+++ b/src/gallium/drivers/radeon/r600_perfcounter.c
@@ -457,6 +457,8 @@ int r600_get_perfcounter_info(struct r600_common_screen *screen,
 	info->result_type = PIPE_DRIVER_QUERY_RESULT_TYPE_CUMULATIVE;
 	info->group_id = base_gid + sub / block->num_selectors;
 	info->flags = PIPE_DRIVER_QUERY_FLAG_BATCH;
+	if (sub > 0 && sub + 1 < block->num_selectors * block->num_groups)
+		info->flags |= PIPE_DRIVER_QUERY_FLAG_DONT_LIST;
 	return 1;
 }
 
-- 
2.5.0



More information about the mesa-dev mailing list