[Mesa-dev] [PATCH 4/6] radeonsi: show average results per frame for perf counters in HUD

Marek Olšák maraeo at gmail.com
Mon Jan 16 02:00:04 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

so that the graphs are independent from FPS.
---
 src/gallium/drivers/radeon/r600_perfcounter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeon/r600_perfcounter.c b/src/gallium/drivers/radeon/r600_perfcounter.c
index 0c55fc2..4671b20 100644
--- a/src/gallium/drivers/radeon/r600_perfcounter.c
+++ b/src/gallium/drivers/radeon/r600_perfcounter.c
@@ -538,21 +538,21 @@ int r600_get_perfcounter_info(struct r600_common_screen *screen,
 		return 0;
 
 	if (!block->selector_names) {
 		if (!r600_init_block_names(screen, block))
 			return 0;
 	}
 	info->name = block->selector_names + sub * block->selector_name_stride;
 	info->query_type = R600_QUERY_FIRST_PERFCOUNTER + index;
 	info->max_value.u64 = 0;
 	info->type = PIPE_DRIVER_QUERY_TYPE_UINT64;
-	info->result_type = PIPE_DRIVER_QUERY_RESULT_TYPE_CUMULATIVE;
+	info->result_type = PIPE_DRIVER_QUERY_RESULT_TYPE_AVERAGE;
 	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;
 }
 
 int r600_get_perfcounter_group_info(struct r600_common_screen *screen,
 				    unsigned index,
 				    struct pipe_driver_query_group_info *info)
-- 
2.7.4



More information about the mesa-dev mailing list