From 2b09ab4bad068331509d4ace1b9e3fa6a237c1d7 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 1 Aug 2023 10:45:28 -0400 Subject: [PATCH] nir/passthrough_gs: Drop unused array_size_for_prim MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ../src/compiler/nir/nir_passthrough_gs.c:96:1: warning: ‘array_size_for_prim’ defined but not used [-Wunused-function] 96 | array_size_for_prim(enum mesa_prim prim) Signed-off-by: Alyssa Rosenzweig Reviewed-by: Italo Nicola Acked-by: Faith Ekstrand Part-of: --- src/compiler/nir/nir_passthrough_gs.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/compiler/nir/nir_passthrough_gs.c b/src/compiler/nir/nir_passthrough_gs.c index 4cb93e5..5d22437 100644 --- a/src/compiler/nir/nir_passthrough_gs.c +++ b/src/compiler/nir/nir_passthrough_gs.c @@ -92,36 +92,6 @@ vertices_for_prim(enum mesa_prim prim) } } -static unsigned int -array_size_for_prim(enum mesa_prim prim) -{ - switch (prim) { - case MESA_PRIM_POINTS: - return 1; - case MESA_PRIM_LINES: - case MESA_PRIM_LINE_LOOP: - case MESA_PRIM_LINE_STRIP: - return 2; - case MESA_PRIM_LINES_ADJACENCY: - case MESA_PRIM_LINE_STRIP_ADJACENCY: - return 4; - case MESA_PRIM_TRIANGLES: - case MESA_PRIM_TRIANGLE_STRIP: - case MESA_PRIM_TRIANGLE_FAN: - case MESA_PRIM_POLYGON: - return 3; - case MESA_PRIM_TRIANGLES_ADJACENCY: - case MESA_PRIM_TRIANGLE_STRIP_ADJACENCY: - return 6; - case MESA_PRIM_QUADS: - case MESA_PRIM_QUAD_STRIP: - return 4; - case MESA_PRIM_PATCHES: - default: - unreachable("unsupported primitive for gs input"); - } -} - static void copy_vars(nir_builder *b, nir_deref_instr *dst, nir_deref_instr *src) { -- 2.7.4