anv: Set TG size based on number of threads
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Series shows improvement on
TotalWarPharaoh-trace-dx11-1440p-ultra-n=2080 title by 0.96% (not a lot
but still it's improvement, so will take that.)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35904>
This commit is contained in:
Sagar Ghuge 2025-07-02 20:50:38 -07:00 committed by Marge Bot
parent 5f1f67358c
commit e761c45390
3 changed files with 7 additions and 0 deletions

View file

@ -367,6 +367,7 @@ get_interface_descriptor_data(struct anv_cmd_buffer *cmd_buffer,
.BindingTableEntryCount = devinfo->verx10 == 125 ?
0 : MIN2(shader->bind_map.surface_count, 30),
.NumberofThreadsinGPGPUThreadGroup = dispatch->threads,
.ThreadGroupDispatchSize = intel_compute_threads_group_dispatch_size(dispatch->threads),
.SharedLocalMemorySize = intel_compute_slm_encode_size(GFX_VER, prog_data->base.total_shared),
.PreferredSLMAllocationSize =
intel_compute_preferred_slm_calc_encode_size(devinfo,
@ -1392,6 +1393,8 @@ cmd_buffer_trace_rays(struct anv_cmd_buffer *cmd_buffer,
.SamplerCount = 0,
.BindingTablePointer = surfaces->offset,
.NumberofThreadsinGPGPUThreadGroup = 1,
.ThreadGroupDispatchSize =
intel_compute_threads_group_dispatch_size(dispatch.threads),
.BTDMode = true,
#if INTEL_NEEDS_WA_14017794102 || INTEL_NEEDS_WA_14023061436
.ThreadPreemption = false,

View file

@ -28,6 +28,7 @@
#include "genxml/genX_rt_pack.h"
#include "common/intel_compute_slm.h"
#include "common/intel_common.h"
#include "common/intel_genX_state_brw.h"
#include "common/intel_l3_config.h"
#include "common/intel_sample_positions.h"
@ -2080,6 +2081,8 @@ genX(compute_pipeline_emit)(struct anv_compute_pipeline *pipeline)
.BindingTableEntryCount = devinfo->verx10 == 125 ?
0 : 1 + MIN2(shader->bind_map.surface_count, 30),
.NumberofThreadsinGPGPUThreadGroup = dispatch.threads,
.ThreadGroupDispatchSize =
intel_compute_threads_group_dispatch_size(dispatch.threads),
.SharedLocalMemorySize =
intel_compute_slm_encode_size(GFX_VER, prog_data->base.total_shared),
.PreferredSLMAllocationSize =

View file

@ -647,6 +647,7 @@ genX(emit_simple_shader_dispatch)(struct anv_simple_shader *state,
.BindingTablePointer = 0,
.BindingTableEntryCount = 0,
.NumberofThreadsinGPGPUThreadGroup = dispatch.threads,
.ThreadGroupDispatchSize = intel_compute_threads_group_dispatch_size(dispatch.threads),
.SharedLocalMemorySize = intel_compute_slm_encode_size(GFX_VER,
prog_data->base.total_shared),
.NumberOfBarriers = prog_data->uses_barrier,