anv: Fix compute maximum number of threads value

There is no mention in spec about subtract one of the number of
threads, also Iris and blorp code don't subtract.

Alchemist PRMs: Volume 2a: Command Reference: Instructions: CFE_STATE: Maximum Number of Threads:
	Normally set to the maximum number of threads: (# EUs) * (# threads/EU)

Cc: mesa-stable
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23973>
(cherry picked from commit c142736f52)
This commit is contained in:
José Roberto de Souza 2023-07-03 08:15:00 -07:00 committed by Eric Engestrom
parent e4dd65fc4f
commit 5217a77d6d
2 changed files with 2 additions and 4 deletions

View file

@ -4567,7 +4567,7 @@
"description": "anv: Fix compute maximum number of threads value",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -5652,9 +5652,7 @@ genX(cmd_buffer_ensure_cfe_state)(struct anv_cmd_buffer *cmd_buffer,
const struct intel_device_info *devinfo = cmd_buffer->device->info;
anv_batch_emit(&cmd_buffer->batch, GENX(CFE_STATE), cfe) {
const uint32_t subslices = MAX2(devinfo->subslice_total, 1);
cfe.MaximumNumberofThreads =
devinfo->max_cs_threads * subslices - 1;
cfe.MaximumNumberofThreads = devinfo->max_cs_threads * devinfo->subslice_total;
uint32_t scratch_surf = 0xffffffff;
if (total_scratch > 0) {