/* common allocation inlines for vulkan drivers */
+#include <string.h>
#include <vulkan/vulkan.h>
static inline void *
return vk_alloc(parent_alloc, size, align, scope);
}
+static inline void *
+vk_zalloc2(const VkAllocationCallbacks *parent_alloc,
+ const VkAllocationCallbacks *alloc,
+ size_t size, size_t align,
+ VkSystemAllocationScope scope)
+{
+ void *mem = vk_alloc2(parent_alloc, alloc, size, align, scope);
+ if (mem == NULL)
+ return NULL;
+
+ memset(mem, 0, size);
+
+ return mem;
+}
+
static inline void
vk_free2(const VkAllocationCallbacks *parent_alloc,
const VkAllocationCallbacks *alloc,