Mesa (master): radeonsi: don't try to enable NGG culling for GS

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 30 11:29:01 UTC 2020


Module: Mesa
Branch: master
Commit: b0c77a5f1d442b05888017dce8b1d522996ca3e5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b0c77a5f1d442b05888017dce8b1d522996ca3e5

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Wed Jun 17 11:57:45 2020 -0400

radeonsi: don't try to enable NGG culling for GS

It doesn't do anything.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5524>

---

 src/gallium/drivers/radeonsi/si_state_draw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index aee8a7acfe7..c7223d94122 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -1863,13 +1863,14 @@ static void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *i
 
    /* Update NGG culling settings. */
    if (sctx->ngg && !dispatch_prim_discard_cs && rast_prim == PIPE_PRIM_TRIANGLES &&
+       !sctx->gs_shader.cso && /* GS doesn't support NGG culling. */
        (sctx->screen->always_use_ngg_culling ||
         /* At least 1024 non-indexed vertices (8 subgroups) are needed
          * per draw call (no TES/GS) to enable NGG culling.
          */
         (!index_size && direct_count >= 1024 &&
          (prim == PIPE_PRIM_TRIANGLES || prim == PIPE_PRIM_TRIANGLE_STRIP) &&
-         !sctx->tes_shader.cso && !sctx->gs_shader.cso)) &&
+         !sctx->tes_shader.cso)) &&
        si_get_vs(sctx)->cso->ngg_culling_allowed) {
       unsigned ngg_culling = 0;
 



More information about the mesa-commit mailing list