aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2014-12-05 23:59:10 +0000
committerTom Stellard <[email protected]>2014-12-08 17:20:50 -0500
commit0e1c085f17fdd774ff6b060dd03422e74ea3e2cc (patch)
tree6a8d954778fb507c8c4c76be4f9cff8980bd249f /src/gallium/winsys
parent67dcbcd92cb9877a04747d6cf7fef14c2b8af8b3 (diff)
winsys/radeon: Always report at least 1 compute unit
All uses of this require that the value be at least one, so it's easier to report at least one than having to wrap all uses in MAX2(max_compute_units, 1). Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.c2
1 files changed, 2 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 3974034c911..75fc80feebc 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -387,6 +387,8 @@ 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);
+ /* All GPUs have at least one compute unit */
+ ws->info.max_compute_units = 1;
radeon_get_drm_value(ws->fd, RADEON_INFO_ACTIVE_CU_COUNT, NULL,
&ws->info.max_compute_units);