diff options
author | Bruno Jiménez <[email protected]> | 2014-06-13 11:23:14 +0200 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2014-06-13 10:59:30 -0400 |
commit | 03aab2af16778f3ab8130ec664fd6a6066ca869a (patch) | |
tree | bef90cf2c1e3a872dbacd895c06a2f09e6d4eac5 /src/gallium/winsys/radeon/drm | |
parent | b8d15ca5e8e189921e1290ed9d56484006652a75 (diff) |
radeon/compute: Implement PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS
v2:
Add RADEON_INFO_ACTIVE_CU_COUNT as a define, as suggested by
Tom Stellard
Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/winsys/radeon/drm')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 7 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_winsys.h | 1 |
2 files changed, 8 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 e54e79e38f8..576fea5f382 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c @@ -45,6 +45,10 @@ #include <sys/stat.h> #include <unistd.h> +#ifndef RADEON_INFO_ACTIVE_CU_COUNT +#define RADEON_INFO_ACTIVE_CU_COUNT 0x20 +#endif + static struct util_hash_table *fd_tab = NULL; pipe_static_mutex(fd_tab_mutex); @@ -382,6 +386,9 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws) radeon_get_drm_value(ws->fd, RADEON_INFO_MAX_PIPES, NULL, &ws->info.r600_max_pipes); + radeon_get_drm_value(ws->fd, RADEON_INFO_ACTIVE_CU_COUNT, NULL, + &ws->info.max_compute_units); + 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 2d13550c9cc..6df1987aee0 100644 --- a/src/gallium/winsys/radeon/drm/radeon_winsys.h +++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h @@ -198,6 +198,7 @@ struct radeon_info { uint32_t gart_size; uint32_t vram_size; uint32_t max_sclk; + uint32_t max_compute_units; uint32_t drm_major; /* version */ uint32_t drm_minor; |