OSDN Git Service

mesa: Fix pixel shader scratch space allocation on Gen9+ platforms.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 8 Nov 2016 01:12:54 +0000 (17:12 -0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 11 Nov 2016 22:20:07 +0000 (22:20 +0000)
commite7de2510e5fc1a4ce602da2d41f1b7d7b9db8873
treefd731e6dd2d599ce40fbcbb85d4c81e29f98c7a8
parent1a47251da48adee162be752b9a7ca2699f98a30b
mesa: Fix pixel shader scratch space allocation on Gen9+ platforms.

We had missed a bit of errata - PS scratch needs to be computed as if
there were 4 subslices per slice, rather than 3.

                          Skylake      Broxton        Kabylake
                      GT1 GT2 GT3 GT4  2x6 3x6  GT1 GT1.5 GT2 GT3 GT4
Actual Slices          1   1   2   3    1   1    1    1    1   2   3
Total Subslices        3   3   6   9    2   3    2    3    3   6   9
Subsl. for PS Scratch  4   4   8   12   4   4    4    4    4   8   12

Note that Skylake GT1-3 already worked because we allocated 64 * 9
(trying to use a value that would work on GT4, with 9 subslices),
and the actual required values were 64 * 4 or 64 * 8.  However, all
others (Skylake GT4, Broxton, and Kabylake GT1-4) underallocated,
which can lead to scratch writes trashing random process memory,
and rendering corruption or GPU hangs.

Fixes GPU hangs and rendering corruption on Skylake GT4 in shaders that
spill.  Particularly, dEQP-GLES31.functional.ubo.all_per_block_buffers.*
now runs successfully with no hangs and renders correctly.  This may
fix problems on Broxton and Kabylake as well.

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
(cherry picked from commit aaee3daa90578fb711cc89186a65bc3d2c68022f)
src/intel/common/gen_device_info.c