From: Alyssa Rosenzweig Date: Tue, 1 Aug 2023 14:45:28 +0000 (-0400) Subject: nir/passthrough_gs: Drop unused array_size_for_prim X-Git-Tag: upstream/23.3.3~4836 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b09ab4bad068331509d4ace1b9e3fa6a237c1d7;p=platform%2Fupstream%2Fmesa.git nir/passthrough_gs: Drop unused array_size_for_prim ../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: --- 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) {