mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-28 06:30:40 +02:00
radv: disable NGG in more situations with ESO on GFX10/GFX10.3
NGG streamout isn't supported on GFX10/GFX10.3, so NGG GS must be disabled when pre-rasterization stages are compiled separately because it's not possible to know that when compiling VS/TES only. Also GFX10/GFX10.3 needs to disable NGG when extreme geometry are used with tessellation and we can't know the previous stage if the GS is compiled separately. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27880>
This commit is contained in:
parent
bffdd05a79
commit
62e6132284
1 changed files with 16 additions and 0 deletions
|
|
@ -2049,6 +2049,22 @@ radv_fill_shader_info_ngg(struct radv_device *device, struct radv_shader_stage *
|
|||
else
|
||||
stages[MESA_SHADER_GEOMETRY].info.is_ngg = stages[MESA_SHADER_VERTEX].info.is_ngg;
|
||||
}
|
||||
|
||||
/* When pre-rasterization stages are compiled separately with shader objects, NGG GS needs to
|
||||
* be disabled because if the next stage of VS/TES is GS and GS is unknown, it might use
|
||||
* streamout but it's not possible to know that when compiling VS or TES only.
|
||||
*/
|
||||
if (stages[MESA_SHADER_VERTEX].nir && stages[MESA_SHADER_VERTEX].info.next_stage == MESA_SHADER_GEOMETRY &&
|
||||
!stages[MESA_SHADER_GEOMETRY].nir) {
|
||||
stages[MESA_SHADER_VERTEX].info.is_ngg = false;
|
||||
} else if (stages[MESA_SHADER_TESS_EVAL].nir &&
|
||||
stages[MESA_SHADER_TESS_EVAL].info.next_stage == MESA_SHADER_GEOMETRY &&
|
||||
!stages[MESA_SHADER_GEOMETRY].nir) {
|
||||
stages[MESA_SHADER_TESS_EVAL].info.is_ngg = false;
|
||||
} else if (stages[MESA_SHADER_GEOMETRY].nir &&
|
||||
(!stages[MESA_SHADER_VERTEX].nir && !stages[MESA_SHADER_TESS_EVAL].nir)) {
|
||||
stages[MESA_SHADER_GEOMETRY].info.is_ngg = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue