summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-core-Add-explicit-static_cast-from-vk-Buff.patch
blob: b0e7cdabe4a8c3abcae89bfdbd7b5c18a1ef5df4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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