radeonsi: don't try to enable NGG culling for GS
authorMarek Olšák <marek.olsak@amd.com>
Wed, 17 Jun 2020 15:57:45 +0000 (11:57 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 30 Jun 2020 10:56:41 +0000 (10:56 +0000)
It doesn't do anything.

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

src/gallium/drivers/radeonsi/si_state_draw.c

index aee8a7acfe7a1c481eb2feb44757af93d49a4cf8..c7223d9412204fc28c2d32a404fcee336641eafc 100644 (file)
@@ -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;