aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_cs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c
index 2a255847c65..c8598d61891 100644
--- a/src/mesa/drivers/dri/i965/brw_cs.c
+++ b/src/mesa/drivers/dri/i965/brw_cs.c
@@ -149,8 +149,10 @@ brw_codegen_cs_prog(struct brw_context *brw,
}
if (prog_data.base.total_scratch) {
+ const unsigned subslices = MAX2(brw->intelScreen->subslice_total, 1);
brw_get_scratch_bo(brw, &brw->cs.base.scratch_bo,
- prog_data.base.total_scratch * brw->max_cs_threads);
+ prog_data.base.total_scratch *
+ brw->max_cs_threads * subslices);
}
if (unlikely(INTEL_DEBUG & DEBUG_CS))