From d7ef4f99da045aaad958efe5eac70e7ec397881b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=9Alusarz?= Date: Thu, 21 Apr 2022 17:26:52 +0200 Subject: [PATCH] anv: update task/mesh distribution with the recommended values Fixes: ef04caea9b8 ("anv: Implement Mesh Shading pipeline") Acked-by: Caio Oliveira Part-of: (cherry picked from commit f083df87108231005889b7af92f0cad7c61e1f81) --- .pick_status.json | 2 +- src/intel/vulkan/genX_pipeline.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 4b43fc0c1eb..67fa4b60c6a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -211,7 +211,7 @@ "description": "anv: update task/mesh distribution with the recommended values", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "ef04caea9b8b98187340fd0ec6550aed06424b60" }, diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index b8889155b4a..5c2e6cdf77e 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