mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
include: Add align() helper function.
This commit is contained in:
@@ -24,6 +24,11 @@
|
||||
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
|
||||
|
||||
static inline size_t align(size_t addr, size_t alignment)
|
||||
{
|
||||
return (addr + (alignment - 1)) & ~(alignment - 1);
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define VKD3D_PRINTF_FUNC(fmt, args) __attribute__((format(printf, fmt, args)))
|
||||
# define VKD3D_UNUSED __attribute__((unused))
|
||||
|
Reference in New Issue
Block a user