mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-26 02:30:37 +02:00
radeonsi: lower task & mesh shader IO is si_preprocess_nir
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
This commit is contained in:
parent
9d271d171a
commit
2dc16ccb8f
2 changed files with 6 additions and 6 deletions
|
|
@ -641,6 +641,12 @@ static void si_preprocess_nir(struct si_nir_shader_ctx *ctx)
|
|||
nir_shader *nir = ctx->nir;
|
||||
bool progress = false;
|
||||
|
||||
if (nir->info.stage == MESA_SHADER_TASK) {
|
||||
NIR_PASS(progress, nir, ac_nir_lower_task_outputs_to_mem, false);
|
||||
} else if (nir->info.stage == MESA_SHADER_MESH) {
|
||||
NIR_PASS(progress, nir, ac_nir_lower_mesh_inputs_to_mem);
|
||||
}
|
||||
|
||||
if (mesa_shader_stage_is_compute(nir->info.stage)) {
|
||||
/* gl_LocalInvocationIndex must be derived from gl_LocalInvocationID.xyz to make it correct
|
||||
* with quad derivatives. Using gl_SubgroupID for that (which is what we do by default) is
|
||||
|
|
|
|||
|
|
@ -179,12 +179,6 @@ static void si_lower_nir(struct si_screen *sscreen, struct nir_shader *nir)
|
|||
NIR_PASS(_, nir, nir_opt_intrinsics);
|
||||
NIR_PASS(_, nir, nir_lower_system_values);
|
||||
|
||||
if (nir->info.stage == MESA_SHADER_TASK) {
|
||||
NIR_PASS(_, nir, ac_nir_lower_task_outputs_to_mem, false);
|
||||
} else if (nir->info.stage == MESA_SHADER_MESH) {
|
||||
NIR_PASS(_, nir, ac_nir_lower_mesh_inputs_to_mem);
|
||||
}
|
||||
|
||||
si_nir_opts(sscreen, nir, true);
|
||||
/* Run late optimizations to fuse ffma and eliminate 16-bit conversions. */
|
||||
si_nir_late_opts(nir);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue