summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-10-11 12:13:19 -0700
committerJason Ekstrand <[email protected]>2017-10-12 21:47:06 -0700
commitba4b7e9c44b62c2bf8c8346aa8c5d9659724638e (patch)
treef0b843984cb727c551c8130d0421856b0533b677 /src/intel
parent6a41a52e625537d1072c4f605fb1ed651ac0b99d (diff)
anv/multialloc: Add new add_size helper
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_private.h6
1 files changed, 4 insertions, 2 deletions
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 *