Merge pull request #13 from realitix/missing_vulkan_function
Fix vulkan calls
This commit is contained in:
commit
f8b70f0542
1 changed files with 16 additions and 5 deletions
|
@ -6401,7 +6401,13 @@ VkResult VmaAllocator_T::AllocateOwnMemory(
|
||||||
{
|
{
|
||||||
if(m_UnmapPersistentlyMappedMemoryCounter == 0)
|
if(m_UnmapPersistentlyMappedMemoryCounter == 0)
|
||||||
{
|
{
|
||||||
res = vkMapMemory(m_hDevice, hMemory, 0, VK_WHOLE_SIZE, 0, &pMappedData);
|
res = (*this->GetVulkanFunctions().vkMapMemory)(
|
||||||
|
m_hDevice,
|
||||||
|
hMemory,
|
||||||
|
0,
|
||||||
|
VK_WHOLE_SIZE,
|
||||||
|
0,
|
||||||
|
&pMappedData);
|
||||||
if(res < 0)
|
if(res < 0)
|
||||||
{
|
{
|
||||||
VMA_DEBUG_LOG(" vkMapMemory FAILED");
|
VMA_DEBUG_LOG(" vkMapMemory FAILED");
|
||||||
|
@ -7015,7 +7021,7 @@ void VmaAllocator_T::FreeOwnMemory(VmaAllocation allocation)
|
||||||
|
|
||||||
if(allocation->GetMappedData() != VMA_NULL)
|
if(allocation->GetMappedData() != VMA_NULL)
|
||||||
{
|
{
|
||||||
vkUnmapMemory(m_hDevice, hMemory);
|
(*this->GetVulkanFunctions().vkUnmapMemory)(m_hDevice, hMemory);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeVulkanMemory(memTypeIndex, allocation->GetSize(), hMemory);
|
FreeVulkanMemory(memTypeIndex, allocation->GetSize(), hMemory);
|
||||||
|
@ -7616,8 +7622,13 @@ VkResult vmaMapMemory(
|
||||||
|
|
||||||
VMA_DEBUG_GLOBAL_MUTEX_LOCK
|
VMA_DEBUG_GLOBAL_MUTEX_LOCK
|
||||||
|
|
||||||
return vkMapMemory(allocator->m_hDevice, allocation->GetMemory(),
|
return (*allocator->GetVulkanFunctions().vkMapMemory)(
|
||||||
allocation->GetOffset(), allocation->GetSize(), 0, ppData);
|
allocator->m_hDevice,
|
||||||
|
allocation->GetMemory(),
|
||||||
|
allocation->GetOffset(),
|
||||||
|
allocation->GetSize(),
|
||||||
|
0,
|
||||||
|
ppData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaUnmapMemory(
|
void vmaUnmapMemory(
|
||||||
|
@ -7628,7 +7639,7 @@ void vmaUnmapMemory(
|
||||||
|
|
||||||
VMA_DEBUG_GLOBAL_MUTEX_LOCK
|
VMA_DEBUG_GLOBAL_MUTEX_LOCK
|
||||||
|
|
||||||
vkUnmapMemory(allocator->m_hDevice, allocation->GetMemory());
|
(*allocator->GetVulkanFunctions().vkUnmapMemory)(allocator->m_hDevice, allocation->GetMemory());
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaUnmapPersistentlyMappedMemory(VmaAllocator allocator)
|
void vmaUnmapPersistentlyMappedMemory(VmaAllocator allocator)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue