anv,intel/compiler: enable shortcut in wg id to wg idx lowering on >= gfx12.5

This speeds up vk_meshlet_cadscene in "VK mesh ext" renderer by 1.4%

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22334>
This commit is contained in:
Marcin Ślusarz
2023-03-31 12:31:19 +02:00
committed by Marge Bot
parent 3d7513ee8e
commit 1ac1d5d62e
2 changed files with 4 additions and 0 deletions

View File

@@ -1297,6 +1297,8 @@ brw_nir_link_shaders(const struct brw_compiler *compiler,
.num_workgroups[0] = producer->info.mesh.ts_mesh_dispatch_dimensions[0],
.num_workgroups[1] = producer->info.mesh.ts_mesh_dispatch_dimensions[1],
.num_workgroups[2] = producer->info.mesh.ts_mesh_dispatch_dimensions[2],
/* nir_lower_idiv generates expensive code */
.shortcut_1d_workgroup_id = compiler->devinfo->verx10 >= 125,
};
NIR_PASS(_, consumer, nir_lower_compute_system_values, &options);

View File

@@ -939,6 +939,8 @@ anv_pipeline_lower_nir(struct anv_pipeline *pipeline,
nir_lower_compute_system_values_options options = {
.lower_cs_local_id_to_index = true,
.lower_workgroup_id_to_index = true,
/* nir_lower_idiv generates expensive code */
.shortcut_1d_workgroup_id = compiler->devinfo->verx10 >= 125,
};
NIR_PASS(_, nir, nir_lower_compute_system_values, &options);