*
* Align it to 64 bits to make atomic operations faster on 32 bit platforms.
*/
- VkDeviceSize used __attribute__ ((aligned (8)));
+ alignas(8) VkDeviceSize used;
};
struct tu_physical_device
#include "tu_common.h"
+#include "util/macros.h"
#include "util/u_math.h"
#include "util/format/u_format_pack.h"
#include "util/format/u_format_zs.h"
}
struct bcolor_entry {
- uint32_t fp32[4];
+ alignas(128) uint32_t fp32[4];
uint64_t ui16;
uint64_t si16;
uint64_t fp16;
uint32_t z24; /* also s8? */
uint64_t srgb;
uint8_t __pad1[56];
-} __attribute__((aligned(128)));
+};
+static_assert(alignof(struct bcolor_entry) == 128, "");
/* vulkan does not want clamping of integer clear values, differs from u_format
* see spec for VkClearColorValue
* Also align it to 64 bits. This will make atomic operations faster on 32
* bit platforms.
*/
- uint64_t last_seqnos[NUM_IRIS_DOMAINS] __attribute__ ((aligned (8)));
+ alignas(8) uint64_t last_seqnos[NUM_IRIS_DOMAINS];
/** Up to one per screen, may need realloc. */
struct iris_bo_screen_deps *deps;
/* 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 } })
/* 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;
};
};
*
* 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;
};
/* 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 } })
/* 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;
};
};
*
* Align it to 64 bits to make atomic operations faster on 32 bit platforms.
*/
- VkDeviceSize used __attribute__ ((aligned (8)));
+ alignas(8) VkDeviceSize used;
};
struct anv_memregion {
{
/* this can be changed/extended quite freely */
struct layout {
- uint32_t head __attribute__((aligned(64)));
- uint32_t tail __attribute__((aligned(64)));
- uint32_t status __attribute__((aligned(64)));
+ alignas(64) uint32_t head;
+ alignas(64) uint32_t tail;
+ alignas(64) uint32_t status;
- uint8_t buffer[] __attribute__((aligned(64)));
+ alignas(64) uint8_t buffer[];
};
assert(buf_size && util_is_power_of_two_or_zero(buf_size));