Module: Mesa Branch: main Commit: 2b09ab4bad068331509d4ace1b9e3fa6a237c1d7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b09ab4bad068331509d4ace1b9e3fa6a237c1d7
Author: Alyssa Rosenzweig <[email protected]> Date: Tue Aug 1 10:45:28 2023 -0400 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 <[email protected]> Reviewed-by: Italo Nicola <[email protected]> Acked-by: Faith Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24428> --- 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 4cb93e5c95f..5d22437a05e 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) {
