From 13f7ef5e0c01cb6f39ad3147800338f3d5b1f13e Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 21 Dec 2022 16:59:02 -0600 Subject: [PATCH] util: Drop the ENUM_PACKED macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have both PACKED and ENUM_PACKED macros which expand to the same thing. PACKED was based on a meson check for function attributes while ENUM_PACKED appears to be a legacy gallium thing which was based on defined(__GCC__). This changes the one use of ENUM_PACKED to PACKED and deletes ENUM_PACKED. Reviewed-by: Marek Olšák Part-of: --- src/gallium/include/pipe/p_defines.h | 4 ++-- src/util/macros.h | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 702955278c5..c838fa09509 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -561,7 +561,7 @@ enum pipe_resource_usage { /** * Primitive types: */ -enum pipe_prim_type { +enum PACKED pipe_prim_type { PIPE_PRIM_POINTS, PIPE_PRIM_LINES, PIPE_PRIM_LINE_LOOP, @@ -578,7 +578,7 @@ enum pipe_prim_type { PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY, PIPE_PRIM_PATCHES, PIPE_PRIM_MAX, -} ENUM_PACKED; +}; /** * Tessellator spacing types diff --git a/src/util/macros.h b/src/util/macros.h index 8e0ee0ae171..84b2cddfbae 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -315,14 +315,6 @@ do { \ #define ATTRIBUTE_NOINLINE #endif -/* Use as: enum name { X, Y } ENUM_PACKED; */ -#if defined(__GNUC__) -#define ENUM_PACKED __attribute__((packed)) -#else -#define ENUM_PACKED -#endif - - /** * Check that STRUCT::FIELD can hold MAXVAL. We use a lot of bitfields * in Mesa/gallium. We have to be sure they're of sufficient size to