mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 01:10:16 +01:00
radv: Disable NGG for GS with suboptimal output vertex count.
When GS has a lot of output vertices: In this case, the occupancy of NGG GS is very low because API GS invocations can't even occupy a single Wave32 wave. Therefore the legacy pipeline performs better here. Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6260 Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15767>
This commit is contained in:
parent
53e83b7031
commit
94706601fa
1 changed files with 13 additions and 0 deletions
|
|
@ -3207,6 +3207,19 @@ radv_fill_shader_info(struct radv_pipeline *pipeline,
|
|||
infos[MESA_SHADER_TESS_EVAL].is_ngg = false;
|
||||
}
|
||||
|
||||
if (nir[MESA_SHADER_GEOMETRY] &&
|
||||
nir[MESA_SHADER_GEOMETRY]->info.gs.vertices_out >= 9) {
|
||||
/* GS has suboptimal number of output vertices. In this case,
|
||||
* the occupancy of NGG GS is very low, and API GS invocations
|
||||
* can't even occupy a single Wave32 wave.
|
||||
* Therefore the legacy pipeline performs better here.
|
||||
*/
|
||||
if (nir[MESA_SHADER_TESS_EVAL])
|
||||
infos[MESA_SHADER_TESS_EVAL].is_ngg = false;
|
||||
else
|
||||
infos[MESA_SHADER_VERTEX].is_ngg = false;
|
||||
}
|
||||
|
||||
gl_shader_stage last_xfb_stage = MESA_SHADER_VERTEX;
|
||||
|
||||
for (int i = MESA_SHADER_VERTEX; i <= MESA_SHADER_GEOMETRY; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue