summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-08-24 22:57:17 -0400
committerMarek Olšák <[email protected]>2018-09-10 15:19:56 -0400
commitbc09c3d59e52136e975a6bb3e23b3178a8d485ce (patch)
tree297e6792a347d404fec7e47b26e94dac661d2863 /src/gallium/winsys
parenta5f35aa742c3f1e2fae6a6c2fb53f92822f0cb70 (diff)
ac: add radeon_info::num_good_cu_per_sh
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
index 19472a50ce1..3560c34c17a 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -525,6 +525,10 @@ static bool do_winsys_init(struct radeon_drm_winsys *ws)
radeon_get_drm_value(ws->fd, RADEON_INFO_MAX_SH_PER_SE, NULL,
&ws->info.max_sh_per_se);
+ if (ws->gen == DRV_SI) {
+ ws->info.num_good_cu_per_sh = ws->info.num_good_compute_units /
+ (ws->info.max_se * ws->info.max_sh_per_se);
+ }
radeon_get_drm_value(ws->fd, RADEON_INFO_ACCEL_WORKING2, NULL,
&ws->accel_working2);