diff options
author | Paulo Zanoni <[email protected]> | 2020-01-31 15:51:41 -0800 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2020-03-04 08:27:32 -0800 |
commit | dd4df57ad9e04783e4ad2362b2fd98be6e762e8b (patch) | |
tree | c7ee3b8ae0453c625c928d98daf1615678c4b201 /src/intel | |
parent | 131136ab99c434a397477bc78da5a3835e8ca3cc (diff) |
intel: fix the gen 11 compute shader scratch IDs
Scratch space allocation is based on the number of threads in the base
configuration, and we only have one base configuration for ICL, with 8
subslices.
This fixes an issue with Aztec on Vulkan in a machine with a
configuration that's not the base. The issue looks like a regression
from b9e93db20896, but it seems things are broken since forever, just
not easily reproducible.
v2: Reimplement it using the subslices variable. Don't touch TGL.
Cc: [email protected]
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Signed-off-by: Paulo Zanoni <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4006>
(cherry picked from commit 1efe139cad150072985db02227be947aec532e2b)
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_allocator.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 7965008e060..112a12014cb 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -1395,7 +1395,12 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool, const struct gen_device_info *devinfo = &device->info; - const unsigned subslices = MAX2(device->physical->subslice_total, 1); + unsigned subslices = MAX2(device->physical->subslice_total, 1); + + /* For, ICL, scratch space allocation is based on the number of threads + * in the base configuration. */ + if (devinfo->gen == 11) + subslices = 8; unsigned scratch_ids_per_subslice; if (devinfo->gen >= 11) { |