Module: Mesa Branch: main Commit: d1d2dee9708b5a3624696460d27969bc03940395 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d1d2dee9708b5a3624696460d27969bc03940395
Author: Marcin Ĺšlusarz <[email protected]> Date: Thu Oct 27 09:50:51 2022 +0200 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19412> --- 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;
