From 4cd9a236c7e769167caee71c9e97d242e1dc48d9 Mon Sep 17 00:00:00 2001 From: Jon Ashburn Date: Tue, 8 Dec 2015 16:36:22 -0700 Subject: demos: Fix bug in tri so it uses a realloc callback since it uses alloc callback --- demos/tri.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/demos/tri.c b/demos/tri.c index a1c2588c..4f404dc7 100644 --- a/demos/tri.c +++ b/demos/tri.c @@ -1692,6 +1692,15 @@ static VkBool32 demo_check_layers(uint32_t check_count, char **check_names, } return 1; } +VKAPI_ATTR void* VKAPI_CALL myrealloc( + void* pUserData, + void* pOriginal, + size_t size, + size_t alignment, + VkSystemAllocationScope allocationScope) +{ + return realloc(pOriginal, size); +} VKAPI_ATTR void* VKAPI_CALL myalloc( void* pUserData, @@ -1838,6 +1847,7 @@ static void demo_init_vk(struct demo *demo) demo->allocator.pfnAllocation = myalloc; demo->allocator.pfnFree = myfree; + demo->allocator.pfnReallocation = myrealloc; err = vkCreateInstance(&inst_info, &demo->allocator, &demo->inst); if (err == VK_ERROR_INCOMPATIBLE_DRIVER) { -- cgit v1.2.3