From 1f445e76ae8e2ef518f7247274d018300909aac3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 26 Sep 2021 03:19:40 -0400 Subject: [PATCH] radeonsi: don't check ngg_culling != 0 for fast launch because it's tautology Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_state_draw.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index 4808033..f582160 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -2167,6 +2167,7 @@ static void si_draw_vbo(struct pipe_context *ctx, uint8_t ngg_culling = sctx->viewport0_y_inverted ? rs->ngg_cull_flags_y_inverted : rs->ngg_cull_flags; + assert(ngg_culling); /* rasterizer state should always set this to non-zero */ /* Use NGG fast launch for certain primitive types. * A draw must have at least 1 full primitive. @@ -2176,7 +2177,7 @@ static void si_draw_vbo(struct pipe_context *ctx, * which decreases performance, decrease the frequency of switching it on/off using * a high vertex count threshold. */ - if (!HAS_TESS && ngg_culling && total_direct_count >= 8000 && + if (!HAS_TESS && total_direct_count >= 8000 && !(sctx->screen->debug_flags & DBG(NO_FAST_LAUNCH))) { if (prim == PIPE_PRIM_TRIANGLES && !index_size) { ngg_culling |= SI_NGG_CULL_GS_FAST_LAUNCH_TRI_LIST; -- 2.7.4