radeonsi: simplify util_rast_prim_is_lines_or_triangles

PATCHES can't occur here.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31865>
This commit is contained in:
Marek Olšák
2024-10-27 12:00:39 -04:00
committed by Marge Bot
parent 73abbf1175
commit 16aec27515
2 changed files with 1 additions and 6 deletions
-5
View File
@@ -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;
@@ -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. */