From 39f8c61f32594c058acf0148b62fb444ea81a043 Mon Sep 17 00:00:00 2001 From: Chuansheng Liu Date: Fri, 24 Jun 2022 10:19:03 +0800 Subject: [PATCH] iris,anv: correct the max thread number for DG2+ Correct the max thread number for DG2+ platforms according to below bspec. Ref: Bspec: 47202 Cc: mesa-stable Reviewed-by: Lionel Landwerlin Reviewed-by: Kenneth Graunke Signed-off-by: Chuansheng Liu Part-of: --- src/gallium/drivers/iris/iris_state.c | 2 +- src/intel/blorp/blorp_genX_exec.h | 2 +- src/intel/vulkan/genX_pipeline.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 8ca683bba81..0dee74d082a 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -7124,7 +7124,7 @@ iris_upload_compute_walker(struct iris_context *ice, if (stage_dirty & IRIS_STAGE_DIRTY_CS) { iris_emit_cmd(batch, GENX(CFE_STATE), cfe) { cfe.MaximumNumberofThreads = - devinfo->max_cs_threads * devinfo->subslice_total - 1; + devinfo->max_cs_threads * devinfo->subslice_total; uint32_t scratch_addr = pin_scratch_space(ice, batch, prog_data, MESA_SHADER_COMPUTE); cfe.ScratchSpaceBuffer = scratch_addr >> 4; diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h index d63bea31f8a..e85e411859b 100644 --- a/src/intel/blorp/blorp_genX_exec.h +++ b/src/intel/blorp/blorp_genX_exec.h @@ -2157,7 +2157,7 @@ blorp_exec_compute(struct blorp_batch *batch, const struct blorp_params *params) blorp_emit(batch, GENX(CFE_STATE), cfe) { cfe.MaximumNumberofThreads = - devinfo->max_cs_threads * devinfo->subslice_total - 1; + devinfo->max_cs_threads * devinfo->subslice_total; } assert(cs_prog_data->push.per_thread.regs == 0); diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index eff60c71bb7..bdce88f2ce2 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -2843,7 +2843,7 @@ emit_compute_state(struct anv_compute_pipeline *pipeline, anv_batch_emit(&pipeline->base.batch, GENX(CFE_STATE), cfe) { cfe.MaximumNumberofThreads = - devinfo->max_cs_threads * devinfo->subslice_total - 1; + devinfo->max_cs_threads * devinfo->subslice_total; cfe.ScratchSpaceBuffer = get_scratch_surf(&pipeline->base, MESA_SHADER_COMPUTE, cs_bin); }