summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Rogovin <[email protected]>2017-12-12 14:17:27 +0200
committerKenneth Graunke <[email protected]>2017-12-12 10:02:43 -0800
commitb1ce812c514750f8d94a6813df351a9e5430825d (patch)
tree736535fd46ac9c5cc30e6a2ffb8d967b4ed77438
parenteea9027f87e42c4ebe9fcf851e189a51557c570f (diff)
i965: compute scratch space size correctly for Gen9+
Fixes: 8ecdbb61360 "i965: Pretend there are 4 subslices for compute shader threads on Gen9+." Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104005 Signed-off-by: Kevin Rogovin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Eero Tamminen <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 6aa41009e74..5b168c25e3d 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -368,9 +368,13 @@ brw_alloc_stage_scratch(struct brw_context *brw,
*
* According to the other driver team, this applies to compute shaders
* as well. This is not currently documented at all.
+ *
+ * brw->screen->subslice_total is the TOTAL number of subslices
+ * and we wish to view that there are 4 subslices per slice
+ * instead of the actual number of subslices per slice.
*/
if (devinfo->gen >= 9)
- subslices = 4;
+ subslices = 4 * brw->screen->devinfo.num_slices;
/* WaCSScratchSize:hsw
*