summaryrefslogtreecommitdiffstats
path: root/drivers/vulkan/rendering_context_driver_vulkan.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2024-08-24 01:01:37 +0200
committerGitHub <noreply@github.com>2024-08-24 01:01:37 +0200
commite3550cb20f5d6a61befaafb7d9cbdb57b24870e4 (patch)
tree7dd43603bc08b8aabf4dcb93c7dce2fbe20704f9 /drivers/vulkan/rendering_context_driver_vulkan.cpp
parenta1acd38c35781181cde726b039eb8a9a0b6aa79f (diff)
parent38ae58bda27998b9e1cacdbcb09b4152cbc26768 (diff)
downloadredot-engine-e3550cb20f5d6a61befaafb7d9cbdb57b24870e4.tar.gz
Merge pull request #95975 from darksylinc/matias-TheForge-hotfix
Fix build error in arm32
Diffstat (limited to 'drivers/vulkan/rendering_context_driver_vulkan.cpp')
-rw-r--r--drivers/vulkan/rendering_context_driver_vulkan.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/vulkan/rendering_context_driver_vulkan.cpp b/drivers/vulkan/rendering_context_driver_vulkan.cpp
index 6ffbb91516..7db79bddd3 100644
--- a/drivers/vulkan/rendering_context_driver_vulkan.cpp
+++ b/drivers/vulkan/rendering_context_driver_vulkan.cpp
@@ -229,6 +229,13 @@ VkAllocationCallbacks *RenderingContextDriverVulkan::get_allocation_callbacks(Vk
#if !defined(VK_TRACK_DRIVER_MEMORY)
return nullptr;
#else
+
+#ifdef _MSC_VER
+#define LAMBDA_VK_CALL_CONV
+#else
+#define LAMBDA_VK_CALL_CONV VKAPI_PTR
+#endif
+
struct TrackedMemHeader {
size_t size;
VkSystemAllocationScope allocation_scope;
@@ -241,7 +248,7 @@ VkAllocationCallbacks *RenderingContextDriverVulkan::get_allocation_callbacks(Vk
void *p_user_data,
size_t size,
size_t alignment,
- VkSystemAllocationScope allocation_scope) -> void * {
+ VkSystemAllocationScope allocation_scope) LAMBDA_VK_CALL_CONV -> void * {
static constexpr size_t tracking_data_size = 32;
VkTrackedObjectType type = static_cast<VkTrackedObjectType>(*reinterpret_cast<VkTrackedObjectType *>(p_user_data));
@@ -274,7 +281,7 @@ VkAllocationCallbacks *RenderingContextDriverVulkan::get_allocation_callbacks(Vk
void *p_original,
size_t size,
size_t alignment,
- VkSystemAllocationScope allocation_scope) -> void * {
+ VkSystemAllocationScope allocation_scope) LAMBDA_VK_CALL_CONV -> void * {
if (p_original == nullptr) {
VkObjectType type = static_cast<VkObjectType>(*reinterpret_cast<uint32_t *>(p_user_data));
return get_allocation_callbacks(type)->pfnAllocation(p_user_data, size, alignment, allocation_scope);
@@ -305,7 +312,7 @@ VkAllocationCallbacks *RenderingContextDriverVulkan::get_allocation_callbacks(Vk
// Free function
[](
void *p_user_data,
- void *p_memory) {
+ void *p_memory) LAMBDA_VK_CALL_CONV {
if (!p_memory) {
return;
}
@@ -326,13 +333,13 @@ VkAllocationCallbacks *RenderingContextDriverVulkan::get_allocation_callbacks(Vk
void *p_user_data,
size_t size,
VkInternalAllocationType allocation_type,
- VkSystemAllocationScope allocation_scope) {
+ VkSystemAllocationScope allocation_scope) LAMBDA_VK_CALL_CONV {
},
[](
void *p_user_data,
size_t size,
VkInternalAllocationType allocation_type,
- VkSystemAllocationScope allocation_scope) {
+ VkSystemAllocationScope allocation_scope) LAMBDA_VK_CALL_CONV {
},
};