diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_program.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index 7607bc38840..5ecfb9f5b11 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -357,7 +357,19 @@ brw_alloc_stage_scratch(struct brw_context *brw, thread_count = devinfo->max_wm_threads; break; case MESA_SHADER_COMPUTE: { - const unsigned subslices = MAX2(brw->screen->subslice_total, 1); + unsigned subslices = MAX2(brw->screen->subslice_total, 1); + + /* The documentation for 3DSTATE_PS "Scratch Space Base Pointer" says: + * + * "Scratch Space per slice is computed based on 4 sub-slices. SW must + * allocate scratch space enough so that each slice has 4 slices + * allowed." + * + * According to the other driver team, this applies to compute shaders + * as well. This is not currently documented at all. + */ + if (devinfo->gen >= 9) + subslices = 4; /* WaCSScratchSize:hsw * |