blob: b0e7cdabe4a8c3abcae89bfdbd7b5c18a1ef5df4 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001From f88fd472e57b59013570f08949dbbc0875c1bae4 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 13 Nov 2021 18:37:13 -0800
4Subject: [PATCH] framework/core: Add explicit static_cast from vk::Buffer to
5 VkBuffer
6
7This fixes errors like
8framework/core/hpp_buffer.cpp:149:3: error: no matching function for call to 'vmaDestroyBuffer'
9| vmaDestroyBuffer(vmaAllocator, handle, vmaAllocation);
10| ^~~~~~~~~~~~~~~~
11| /mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux-musl/vulkan-samples/git-r0/git/third_party/vma/src/vk_mem_alloc.h:3803:33: note: candidate function not viable: no known conversion from 'vk::Buffer' to 'V
12kBuffer' (aka 'unsigned long long') for 2nd argument
13
14Upstream-Status: Submitted [https://github.com/KhronosGroup/Vulkan-Samples/pull/395]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 framework/core/hpp_buffer.cpp | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/framework/core/hpp_buffer.cpp b/framework/core/hpp_buffer.cpp
21index c1f5649..2609e4e 100644
22--- a/framework/core/hpp_buffer.cpp
23+++ b/framework/core/hpp_buffer.cpp
24@@ -146,7 +146,7 @@ void HPPBuffer::destroy()
25 {
26 assert(vmaAllocation != VK_NULL_HANDLE);
27 unmap();
28- vmaDestroyBuffer(vmaAllocator, handle, vmaAllocation);
29+ vmaDestroyBuffer(vmaAllocator, static_cast<VkBuffer>(handle), vmaAllocation);
30 }
31 }
32
33--
342.33.1
35