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: ef04caea9b ("anv: Implement Mesh Shading pipeline")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19412>
This commit is contained in:
Marcin Ślusarz
2022-10-27 09:50:51 +02:00
committed by Marge Bot
parent 11612d81b7
commit d1d2dee970

View File

@@ -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;