summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2014-12-05 23:59:11 +0000
committerTom Stellard <[email protected]>2014-12-08 17:20:50 -0500
commitc16436149c1ca78f86ba992977fe6083b732bc1d (patch)
treec9a4946f38dc58f51d965b642bd4400af1544c7c /src/gallium
parent0e1c085f17fdd774ff6b060dd03422e74ea3e2cc (diff)
radeonsi/compute: Clamp COMPUTE_TMPRING_SIZE.WAVES to: num_cu * 32
This is the maximum value allowed for this field.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_compute.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index 6ddb47896c5..bf935dcfee7 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -371,6 +371,9 @@ static void si_launch_grid(
| S_00B85C_SH1_CU_EN(0xffff /* Default value */))
;
+ num_waves_for_scratch =
+ MIN2(num_waves_for_scratch,
+ 32 * sctx->screen->b.info.max_compute_units);
si_pm4_set_reg(pm4, R_00B860_COMPUTE_TMPRING_SIZE,
/* The maximum value for WAVES is 32 * num CU.
* If you program this value incorrectly, the GPU will hang if