From bc09c3d59e52136e975a6bb3e23b3178a8d485ce Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 24 Aug 2018 22:57:17 -0400 Subject: ac: add radeon_info::num_good_cu_per_sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tested-by: Dieter Nützel --- src/amd/common/ac_gpu_info.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/amd/common/ac_gpu_info.c') diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index 8705d878f9a..bfaff45219f 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -414,6 +414,8 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev, for (j = 0; j < info->max_sh_per_se; j++) info->num_good_compute_units += util_bitcount(amdinfo->cu_bitmap[i][j]); + info->num_good_cu_per_sh = info->num_good_compute_units / + (info->max_se * info->max_sh_per_se); memcpy(info->si_tile_mode_array, amdinfo->gb_tile_mode, sizeof(amdinfo->gb_tile_mode)); @@ -543,6 +545,7 @@ void ac_print_gpu_info(struct radeon_info *info) printf("Shader core info:\n"); printf(" max_shader_clock = %i\n", info->max_shader_clock); printf(" num_good_compute_units = %i\n", info->num_good_compute_units); + printf(" num_good_cu_per_sh = %i\n", info->num_good_cu_per_sh); printf(" num_tcc_blocks = %i\n", info->num_tcc_blocks); printf(" max_se = %i\n", info->max_se); printf(" max_sh_per_se = %i\n", info->max_sh_per_se); -- cgit v1.2.3