svga: use alignas over struct MKSGuestStatInfoEntry

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24571>
This commit is contained in:
Yonggang Luo 2023-07-04 13:21:04 +08:00 committed by Marge Bot
parent 0ca43db2d0
commit 8fe6e6957c

View file

@ -107,8 +107,8 @@ typedef struct MKSGuestStatCounterTime {
#define MKS_GUEST_STAT_FLAG_NONE 0
#define MKS_GUEST_STAT_FLAG_TIME (1U << 0)
typedef __attribute__((aligned(32))) struct MKSGuestStatInfoEntry {
union {
typedef struct MKSGuestStatInfoEntry {
alignas(32) union {
const char *s;
uint64_t u;
} name;
@ -123,6 +123,7 @@ typedef __attribute__((aligned(32))) struct MKSGuestStatInfoEntry {
uint64_t u;
} stat;
} MKSGuestStatInfoEntry;
static_assert(alignof(struct MKSGuestStatInfoEntry) == 32, "");
static thread_local struct svga_winsys_stats_timeframe *mksstat_tls_global = NULL;