Mesa (main): radv: Use 128-sized vertex grouping for NGG shaders.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 15 16:32:03 UTC 2021


Module: Mesa
Branch: main
Commit: 19c828372975573d0e83b8b11c0a7cf9d73b55ed
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=19c828372975573d0e83b8b11c0a7cf9d73b55ed

Author: Timur Kristóf <timur.kristof at gmail.com>
Date:   Fri Jul  9 21:23:25 2021 +0200

radv: Use 128-sized vertex grouping for NGG shaders.

This matches what RadeonSI also does.
It seems to improve performance especially with NGG culling shaders.

Eg. in Doom Eternal this gives me +5ish fps.

Signed-off-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11810>

---

 src/amd/vulkan/radv_pipeline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 3dfaa44c4bc..fa4ad305599 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2021,7 +2021,7 @@ gfx10_get_ngg_info(const struct radv_pipeline_key *key, struct radv_pipeline *pi
    const unsigned min_esverts =
       pipeline->device->physical_device->rad_info.chip_class >= GFX10_3 ? 29 : 24;
    bool max_vert_out_per_gs_instance = false;
-   unsigned max_esverts_base = 256;
+   unsigned max_esverts_base = 128;
    unsigned max_gsprims_base = 128; /* default prim group size clamp */
 
    /* Hardware has the following non-natural restrictions on the value
@@ -2189,7 +2189,7 @@ gfx10_get_ngg_info(const struct radv_pipeline_key *key, struct radv_pipeline *pi
    ngg->prim_amp_factor = prim_amp_factor;
    ngg->max_vert_out_per_gs_instance = max_vert_out_per_gs_instance;
    ngg->ngg_emit_size = max_gsprims * gsprim_lds_size;
-   ngg->enable_vertex_grouping = false;
+   ngg->enable_vertex_grouping = true;
 
    /* Don't count unusable vertices. */
    ngg->esgs_ring_size = MIN2(max_esverts, max_gsprims * max_verts_per_prim) * esvert_lds_size * 4;



More information about the mesa-commit mailing list