From 16aec275154294598686f4cc6711748aeb3c90ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 27 Oct 2024 12:00:39 -0400 Subject: [PATCH] radeonsi: simplify util_rast_prim_is_lines_or_triangles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PATCHES can't occur here. Reviewed-by: Timur Kristóf Part-of: --- src/gallium/drivers/radeonsi/si_pipe.h | 5 ----- src/gallium/drivers/radeonsi/si_state_draw.cpp | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index 978401ac519..bc1535e0b8e 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -2030,11 +2030,6 @@ static inline bool util_rast_prim_is_triangles(unsigned prim) return ((1 << prim) & UTIL_ALL_PRIM_TRIANGLE_MODES) != 0; } -static inline bool util_rast_prim_is_lines_or_triangles(unsigned prim) -{ - return ((1 << prim) & (UTIL_ALL_PRIM_LINE_MODES | UTIL_ALL_PRIM_TRIANGLE_MODES)) != 0; -} - static inline void si_need_gfx_cs_space(struct si_context *ctx, unsigned num_draws) { struct radeon_cmdbuf *cs = &ctx->gfx_cs; diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index 4317a4ece3a..6cba34faf0e 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -2234,7 +2234,7 @@ static void si_draw(struct pipe_context *ctx, if (NGG && /* Tessellation and GS set ngg_cull_vert_threshold to UINT_MAX if the prim type * is not points, so this check is only needed for VS. */ - (HAS_TESS || HAS_GS || util_rast_prim_is_lines_or_triangles(sctx->current_rast_prim)) && + (HAS_TESS || HAS_GS || sctx->current_rast_prim != MESA_PRIM_POINTS) && /* Only the first draw for a shader starts with culling disabled and it's disabled * until we pass the total_direct_count check and then it stays enabled until * the shader is changed. This eliminates most culling on/off state changes. */