From: Tom Stellard Date: Fri, 18 Jul 2014 17:19:43 +0000 (-0400) Subject: winsys/radeon: Query the kernel for the number of SEs and SHs per SE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=81385f7596ab3c336fb16b00864893421462b3fb;p=mesa.git winsys/radeon: Query the kernel for the number of SEs and SHs per SE Reviewed-by: Marek Olšák --- diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c index 576fea5f382..7cda70a98d3 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c @@ -389,6 +389,12 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws) radeon_get_drm_value(ws->fd, RADEON_INFO_ACTIVE_CU_COUNT, NULL, &ws->info.max_compute_units); + radeon_get_drm_value(ws->fd, RADEON_INFO_MAX_SE, NULL, + &ws->info.max_se); + + radeon_get_drm_value(ws->fd, RADEON_INFO_MAX_SH_PER_SE, NULL, + &ws->info.max_sh_per_se); + if (radeon_get_drm_value(ws->fd, RADEON_INFO_SI_TILE_MODE_ARRAY, NULL, ws->info.si_tile_mode_array)) { ws->info.si_tile_mode_array_valid = TRUE; diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h index 6df1987aee0..a63a50b01e8 100644 --- a/src/gallium/winsys/radeon/drm/radeon_winsys.h +++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h @@ -199,6 +199,8 @@ struct radeon_info { uint32_t vram_size; uint32_t max_sclk; uint32_t max_compute_units; + uint32_t max_se; + uint32_t max_sh_per_se; uint32_t drm_major; /* version */ uint32_t drm_minor;