blob: b0e7cdabe4a8c3abcae89bfdbd7b5c18a1ef5df4 [file] [log] [blame]
From f88fd472e57b59013570f08949dbbc0875c1bae4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 13 Nov 2021 18:37:13 -0800
Subject: [PATCH] framework/core: Add explicit static_cast from vk::Buffer to
VkBuffer
This fixes errors like
framework/core/hpp_buffer.cpp:149:3: error: no matching function for call to 'vmaDestroyBuffer'
| vmaDestroyBuffer(vmaAllocator, handle, vmaAllocation);
| ^~~~~~~~~~~~~~~~
| /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
kBuffer' (aka 'unsigned long long') for 2nd argument
Upstream-Status: Submitted [https://github.com/KhronosGroup/Vulkan-Samples/pull/395]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
framework/core/hpp_buffer.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/framework/core/hpp_buffer.cpp b/framework/core/hpp_buffer.cpp
index c1f5649..2609e4e 100644
--- a/framework/core/hpp_buffer.cpp
+++ b/framework/core/hpp_buffer.cpp
@@ -146,7 +146,7 @@ void HPPBuffer::destroy()
{
assert(vmaAllocation != VK_NULL_HANDLE);
unmap();
- vmaDestroyBuffer(vmaAllocator, handle, vmaAllocation);
+ vmaDestroyBuffer(vmaAllocator, static_cast<VkBuffer>(handle), vmaAllocation);
}
}
--
2.33.1