intel/compiler: pass num_workgroups from task to mesh shaders
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22334>
This commit is contained in:

committed by
Marge Bot

parent
e7ca9d70f5
commit
7ec1ef75d3
@@ -1284,6 +1284,23 @@ brw_nir_link_shaders(const struct brw_compiler *compiler,
|
||||
NIR_PASS(_, producer, nir_split_var_copies);
|
||||
NIR_PASS(_, producer, nir_lower_var_copies);
|
||||
}
|
||||
|
||||
if (producer->info.stage == MESA_SHADER_TASK &&
|
||||
consumer->info.stage == MESA_SHADER_MESH &&
|
||||
!consumer->info.mesh.nv) {
|
||||
|
||||
for (unsigned i = 0; i < 3; ++i)
|
||||
assert(producer->info.mesh.ts_mesh_dispatch_dimensions[i] <= UINT16_MAX);
|
||||
|
||||
nir_lower_compute_system_values_options options = {
|
||||
.lower_workgroup_id_to_index = true,
|
||||
.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_PASS(_, consumer, nir_lower_compute_system_values, &options);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
Reference in New Issue
Block a user