mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 01:08:03 +02:00
intel: Fix calculation of max_scratch_ids on fused devices
The subslice IDs provided by the SR0.0 EU register are not adjusted to account for fusing, so the upper bound max_scratch_ids can vary from device to device depending on what specific slices were fused during manufacturing. Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38689>
This commit is contained in:
parent
d86f5f6bcb
commit
c0d809820f
1 changed files with 2 additions and 29 deletions
|
|
@ -1698,37 +1698,10 @@ intel_device_info_adjust_memory(struct intel_device_info *devinfo)
|
|||
static void
|
||||
init_max_scratch_ids(struct intel_device_info *devinfo)
|
||||
{
|
||||
/* Determine the max number of subslices that potentially might be used in
|
||||
/* Determine the max subslice that potentially might be used in
|
||||
* scratch space ids.
|
||||
*
|
||||
* For, Gfx11+, scratch space allocation is based on the number of threads
|
||||
* in the base configuration.
|
||||
*
|
||||
* For Gfx9, devinfo->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. 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.
|
||||
*
|
||||
* For Gfx8 and older we user devinfo->subslice_total.
|
||||
*/
|
||||
unsigned subslices;
|
||||
if (devinfo->verx10 == 125)
|
||||
subslices = 32;
|
||||
else if (devinfo->ver == 12)
|
||||
subslices = (devinfo->platform == INTEL_PLATFORM_DG1 || devinfo->gt == 2 ? 6 : 2);
|
||||
else if (devinfo->ver == 11)
|
||||
subslices = 8;
|
||||
else if (devinfo->ver >= 9 && devinfo->ver < 11)
|
||||
subslices = 4 * devinfo->num_slices;
|
||||
else
|
||||
subslices = devinfo->subslice_total;
|
||||
unsigned subslices = intel_device_info_dual_subslice_id_bound(devinfo);
|
||||
assert(subslices >= devinfo->subslice_total);
|
||||
|
||||
unsigned scratch_ids_per_subslice;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue