anv,blorp,iris: Set PreferredSLMAllocationSize on gfx125+
authorRohan Garg <rohan.garg@intel.com>
Tue, 11 Oct 2022 15:20:04 +0000 (17:20 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 6 Apr 2023 10:54:47 +0000 (10:54 +0000)
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22307>

src/gallium/drivers/iris/iris_state.c
src/intel/blorp/blorp_genX_exec.h
src/intel/common/intel_genX_state.h
src/intel/vulkan/genX_cmd_buffer.c
src/intel/vulkan/genX_pipeline.c

index 46b2895..3daa691 100644 (file)
@@ -7620,6 +7620,7 @@ iris_upload_compute_walker(struct iris_context *ice,
          .NumberofThreadsinGPGPUThreadGroup = dispatch.threads,
          .SharedLocalMemorySize =
             encode_slm_size(GFX_VER, prog_data->total_shared),
+         .PreferredSLMAllocationSize = preferred_slm_allocation_size(devinfo),
          .NumberOfBarriers = cs_prog_data->uses_barrier,
          .SamplerStatePointer = shs->sampler_table.offset,
          .SamplerCount = encode_sampler_count(shader),
index 3119d2b..60f95c7 100644 (file)
@@ -2187,6 +2187,7 @@ blorp_exec_compute(struct blorp_batch *batch, const struct blorp_params *params)
          .NumberofThreadsinGPGPUThreadGroup = dispatch.threads,
          .SharedLocalMemorySize =
             encode_slm_size(GFX_VER, prog_data->total_shared),
+         .PreferredSLMAllocationSize = preferred_slm_allocation_size(devinfo),
          .NumberOfBarriers = cs_prog_data->uses_barrier,
       };
    }
index 69ccbd6..6b9e121 100644 (file)
@@ -126,6 +126,16 @@ intel_set_ps_dispatch_state(struct GENX(3DSTATE_PS) *ps,
 
 #endif
 
+#if GFX_VERx10 >= 125
+
+UNUSED static int
+preferred_slm_allocation_size(const struct intel_device_info *devinfo)
+{
+   return 0;
+}
+
+#endif
+
 #ifdef __cplusplus
 }
 #endif
index 4514b96..8dd3d09 100644 (file)
@@ -35,6 +35,7 @@
 #include "genxml/genX_rt_pack.h"
 #include "common/intel_guardband.h"
 #include "compiler/brw_prim.h"
+#include "common/intel_genX_state.h"
 
 #include "ds/intel_tracepoints.h"
 
@@ -5717,6 +5718,7 @@ emit_compute_walker(struct anv_cmd_buffer *cmd_buffer,
          .NumberofThreadsinGPGPUThreadGroup = dispatch.threads,
          .SharedLocalMemorySize = encode_slm_size(GFX_VER,
                                                   prog_data->base.total_shared),
+         .PreferredSLMAllocationSize = preferred_slm_allocation_size(devinfo),
          .NumberOfBarriers = prog_data->uses_barrier,
       };
    }
index 1cfbdf3..6b0302a 100644 (file)
@@ -1724,6 +1724,8 @@ emit_task_state(struct anv_graphics_pipeline *pipeline)
       task.NumberofBarriers                  = task_prog_data->base.uses_barrier;
       task.SharedLocalMemorySize             =
          encode_slm_size(GFX_VER, task_prog_data->base.base.total_shared);
+      task.PreferredSLMAllocationSize        =
+         preferred_slm_allocation_size(devinfo);
 
       /*
        * 3DSTATE_TASK_SHADER_DATA.InlineData[0:1] will be used for an address
@@ -1800,6 +1802,8 @@ emit_mesh_state(struct anv_graphics_pipeline *pipeline)
       mesh.NumberofBarriers                  = mesh_prog_data->base.uses_barrier;
       mesh.SharedLocalMemorySize             =
          encode_slm_size(GFX_VER, mesh_prog_data->base.base.total_shared);
+      mesh.PreferredSLMAllocationSize        =
+         preferred_slm_allocation_size(devinfo);
 
       /*
        * 3DSTATE_MESH_SHADER_DATA.InlineData[0:1] will be used for an address