mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 01:20:22 +01:00
radeonsi: call nir_lower_gs_intrinsics in 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
f2947e2fd8
commit
9d271d171a
2 changed files with 11 additions and 10 deletions
|
|
@ -686,6 +686,16 @@ static void si_preprocess_nir(struct si_nir_shader_ctx *ctx)
|
|||
});
|
||||
}
|
||||
|
||||
if (nir->info.stage == MESA_SHADER_GEOMETRY) {
|
||||
NIR_PASS(progress, nir, nir_lower_gs_intrinsics,
|
||||
nir_lower_gs_intrinsics_per_stream |
|
||||
(shader->key.ge.as_ngg ?
|
||||
nir_lower_gs_intrinsics_count_primitives |
|
||||
nir_lower_gs_intrinsics_count_vertices_per_primitive |
|
||||
nir_lower_gs_intrinsics_overwrite_incomplete : 0));
|
||||
NIR_PASS(progress, nir, nir_lower_vars_to_ssa);
|
||||
}
|
||||
|
||||
/* nir_opt_clip_cull_const, si_nir_kill_outputs, and ac_nir_optimize_outputs require outputs
|
||||
* to be scalar.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -179,16 +179,7 @@ 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_GEOMETRY) {
|
||||
unsigned flags = nir_lower_gs_intrinsics_per_stream;
|
||||
if (sscreen->use_ngg) {
|
||||
flags |= nir_lower_gs_intrinsics_count_primitives |
|
||||
nir_lower_gs_intrinsics_count_vertices_per_primitive |
|
||||
nir_lower_gs_intrinsics_overwrite_incomplete;
|
||||
}
|
||||
|
||||
NIR_PASS(_, nir, nir_lower_gs_intrinsics, flags);
|
||||
} else if (nir->info.stage == MESA_SHADER_TASK) {
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue