[Mesa-dev] [PATCH 09/11] anv/multialloc: Add new add_size helper

Jason Ekstrand jason at jlekstrand.net
Wed Oct 11 20:38:49 UTC 2017


---
 src/intel/vulkan/anv_private.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 00264af..e8a845f 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 *
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list