Mesa (main): anv: update task/mesh distribution with the recommended values

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 13 10:19:16 UTC 2022


Module: Mesa
Branch: main
Commit: f083df87108231005889b7af92f0cad7c61e1f81
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f083df87108231005889b7af92f0cad7c61e1f81

Author: Marcin Ślusarz <marcin.slusarz at intel.com>
Date:   Thu Apr 21 17:26:52 2022 +0200

anv: update task/mesh distribution with the recommended values

Fixes: ef04caea9b8 ("anv: Implement Mesh Shading pipeline")

Acked-by: Caio Oliveira <caio.oliveira at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16493>

---

 src/intel/vulkan/genX_pipeline.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c
index 3dcd47c8913..97df60eb999 100644
--- a/src/intel/vulkan/genX_pipeline.c
+++ b/src/intel/vulkan/genX_pipeline.c
@@ -2579,10 +2579,10 @@ emit_task_state(struct anv_graphics_pipeline *pipeline)
    /* Recommended values from "Task and Mesh Distribution Programming". */
    anv_batch_emit(&pipeline->base.batch, GENX(3DSTATE_TASK_REDISTRIB), redistrib) {
       redistrib.LocalBOTAccumulatorThreshold = MULTIPLIER_1;
-      redistrib.SmallTaskThreshold = MULTIPLIER_2;
-      redistrib.TargetMeshBatchSize = MULTIPLIER_4;
+      redistrib.SmallTaskThreshold = 1; /* 2^N */
+      redistrib.TargetMeshBatchSize = devinfo->num_slices > 2 ? 3 : 5; /* 2^N */
       redistrib.TaskRedistributionLevel = TASKREDISTRIB_BOM;
-      redistrib.TaskRedistributionMode = TASKREDISTRIB_RR_FREE;
+      redistrib.TaskRedistributionMode = TASKREDISTRIB_RR_STRICT;
    }
 }
 
@@ -2653,8 +2653,8 @@ emit_mesh_state(struct anv_graphics_pipeline *pipeline)
    /* Recommended values from "Task and Mesh Distribution Programming". */
    anv_batch_emit(&pipeline->base.batch, GENX(3DSTATE_MESH_DISTRIB), distrib) {
       distrib.DistributionMode = MESH_RR_FREE;
-      distrib.TaskDistributionBatchSize = 2; /* 2^2 thread groups */
-      distrib.MeshDistributionBatchSize = 3; /* 2^3 thread groups */
+      distrib.TaskDistributionBatchSize = devinfo->num_slices > 2 ? 8 : 9; /* 2^N thread groups */
+      distrib.MeshDistributionBatchSize = devinfo->num_slices > 2 ? 5 : 3; /* 2^N thread groups */
    }
 }
 #endif



More information about the mesa-commit mailing list