mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
i965: Allocate scratch space for the maximum number of compute threads.
We were allocating enough space for the number of threads per subslice,
when we should have been allocating space for the number of threads in
the entire GPU.
Even though we currently run with a reduced thread count (due to a bug),
we might still overflow the scratch buffer because the address
calculation is based on the FFTID, which can depend on exactly which
threads, EUs, and threads are executing. We need to allocate enough
for every possible thread that could run.
Fixes rendering corruption in Synmark's Gl43CSDof on Gen8+.
Earlier platforms need additional bug fixes.
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
(cherry picked from commit 2213ffdb4b)
This commit is contained in:
parent
fdcc6a855b
commit
6c5c1bc1b9
1 changed files with 3 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue