gallium: use a packed enum to make pipe_prim_mode 1-byte large with __GNUC__
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12480>
This commit is contained in:
@@ -327,6 +327,13 @@ 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
|
||||
|
Reference in New Issue
Block a user