mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 19:20:08 +01:00
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:
parent
0ca43db2d0
commit
8fe6e6957c
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue