util/treewide: Use alignas(x) instead __attribute__((aligned(x)))
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:
@@ -564,7 +564,7 @@ union anv_free_list {
|
||||
/* Make sure it's aligned to 64 bits. This will make atomic operations
|
||||
* faster on 32 bit platforms.
|
||||
*/
|
||||
uint64_t u64 __attribute__ ((aligned (8)));
|
||||
alignas(8) uint64_t u64;
|
||||
};
|
||||
|
||||
#define ANV_FREE_LIST_EMPTY ((union anv_free_list) { { UINT32_MAX, 0 } })
|
||||
@@ -578,7 +578,7 @@ struct anv_block_state {
|
||||
/* Make sure it's aligned to 64 bits. This will make atomic operations
|
||||
* faster on 32 bit platforms.
|
||||
*/
|
||||
uint64_t u64 __attribute__ ((aligned (8)));
|
||||
alignas(8) uint64_t u64;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -845,7 +845,7 @@ struct anv_memory_heap {
|
||||
*
|
||||
* Align it to 64 bits to make atomic operations faster on 32 bit platforms.
|
||||
*/
|
||||
VkDeviceSize used __attribute__ ((aligned (8)));
|
||||
alignas(8) VkDeviceSize used;
|
||||
|
||||
bool is_local_mem;
|
||||
};
|
||||
|
Reference in New Issue
Block a user