From d1d2dee9708b5a3624696460d27969bc03940395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=9Alusarz?= Date: Thu, 27 Oct 2022 09:50:51 +0200 Subject: [PATCH] anv: set 3DSTATE_[MESH|TASK]_CONTROL.MaximumNumberofThreadGroups Documentation is worded in a confusing way, which may be understood that we don't have to set this field to get good results. MESH part of this commit improves performance of vk_meshlet_cadscene by a factor of 2 on A380. Fixes: ef04caea9b8 ("anv: Implement Mesh Shading pipeline") Reviewed-by: Caio Oliveira Part-of: --- src/intel/vulkan/genX_pipeline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 6e0fda44ca0..9fa96726c4d 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -1695,6 +1695,7 @@ emit_task_state(struct anv_graphics_pipeline *pipeline) tc.TaskShaderEnable = true; tc.ScratchSpaceBuffer = get_scratch_surf(&pipeline->base, MESA_SHADER_TASK, task_bin); + tc.MaximumNumberofThreadGroups = 511; } const struct intel_device_info *devinfo = pipeline->base.device->info; @@ -1751,8 +1752,7 @@ emit_mesh_state(struct anv_graphics_pipeline *pipeline) mc.MeshShaderEnable = true; mc.ScratchSpaceBuffer = get_scratch_surf(&pipeline->base, MESA_SHADER_MESH, mesh_bin); - - /* TODO(mesh): MaximumNumberofThreadGroups. */ + mc.MaximumNumberofThreadGroups = 511; } const struct intel_device_info *devinfo = pipeline->base.device->info;