summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2014-06-13 12:58:13 -0400
committerTom Stellard <[email protected]>2014-06-13 21:32:34 -0400
commitac26a562edc8b249de083a766eeac9ce1678cfa2 (patch)
tree24bbaad146a2476dc2ae99c440072d8494fda90d /src
parentffe609cc69f328de5b57d4d7ab1d270fcf28de5f (diff)
radeon/compute: Always report at least 1 compute unit
Some apps will abort if they detect 0 compute units. This fixes crashes in some OpenCV tests.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 4b9d31c4da3..1911cdef3de 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -523,7 +523,7 @@ static int r600_get_compute_param(struct pipe_screen *screen,
case PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS:
if (ret) {
uint32_t *max_compute_units = ret;
- *max_compute_units = rscreen->info.max_compute_units;
+ *max_compute_units = MAX2(rscreen->info.max_compute_units, 1);
}
return sizeof(uint32_t);