From: Jason Ekstrand Date: Wed, 11 Oct 2017 19:13:19 +0000 (-0700) Subject: anv/multialloc: Add new add_size helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba4b7e9c44b62c2bf8c8346aa8c5d9659724638e;p=mesa.git anv/multialloc: Add new add_size helper Reviewed-by: Jordan Justen --- diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 00264af8f29..e8a845f7229 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -438,9 +438,11 @@ _anv_multialloc_add(struct anv_multialloc *ma, ma->ptrs[ma->ptr_count++] = ptr; } +#define anv_multialloc_add_size(_ma, _ptr, _size) \ + _anv_multialloc_add((_ma), (void **)(_ptr), (_size), __alignof__(**(_ptr))) + #define anv_multialloc_add(_ma, _ptr, _count) \ - _anv_multialloc_add((_ma), (void **)(_ptr), \ - (_count) * sizeof(**(_ptr)), __alignof__(**(_ptr))) + anv_multialloc_add_size(_ma, _ptr, (_count) * sizeof(**(_ptr))); __attribute__((always_inline)) static inline void *