mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
ac: fix num_good_cu_per_sh for harvested chips
Cc: 19.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit b7c2f7c5a6)
This commit is contained in:
parent
0a2285b1d4
commit
f5cccfe0e6
1 changed files with 6 additions and 0 deletions
|
|
@ -458,6 +458,12 @@ bool ac_query_gpu_info(int fd, void *dev_p,
|
|||
info->num_good_cu_per_sh = info->num_good_compute_units /
|
||||
(info->max_se * info->max_sh_per_se);
|
||||
|
||||
/* Round down to the nearest multiple of 2, because the hw can't
|
||||
* disable CUs. It can only disable whole WGPs (dual-CUs).
|
||||
*/
|
||||
if (info->chip_class >= GFX10)
|
||||
info->num_good_cu_per_sh -= info->num_good_cu_per_sh % 2;
|
||||
|
||||
memcpy(info->si_tile_mode_array, amdinfo->gb_tile_mode,
|
||||
sizeof(amdinfo->gb_tile_mode));
|
||||
info->enabled_rb_mask = amdinfo->enabled_rb_pipes_mask;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue