mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Thirdparty Vulkan: patch VMA to fix assets
Applies VMA master branch patch that removes incorrect asserts:
issue: https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/issues/102
patch: 39aeff7a43
This commit is contained in:
29
thirdparty/vulkan/patches/VMA-assert-remove.patch
vendored
Normal file
29
thirdparty/vulkan/patches/VMA-assert-remove.patch
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
diff --git a/thirdparty/vulkan/vk_mem_alloc.h b/thirdparty/vulkan/vk_mem_alloc.h
|
||||||
|
index 0dfb66efc6..8a42699e7f 100644
|
||||||
|
--- a/thirdparty/vulkan/vk_mem_alloc.h
|
||||||
|
+++ b/thirdparty/vulkan/vk_mem_alloc.h
|
||||||
|
@@ -17508,24 +17508,6 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateBuffer(
|
||||||
|
allocator->GetBufferMemoryRequirements(*pBuffer, vkMemReq,
|
||||||
|
requiresDedicatedAllocation, prefersDedicatedAllocation);
|
||||||
|
|
||||||
|
- // Make sure alignment requirements for specific buffer usages reported
|
||||||
|
- // in Physical Device Properties are included in alignment reported by memory requirements.
|
||||||
|
- if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT) != 0)
|
||||||
|
- {
|
||||||
|
- VMA_ASSERT(vkMemReq.alignment %
|
||||||
|
- allocator->m_PhysicalDeviceProperties.limits.minTexelBufferOffsetAlignment == 0);
|
||||||
|
- }
|
||||||
|
- if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT) != 0)
|
||||||
|
- {
|
||||||
|
- VMA_ASSERT(vkMemReq.alignment %
|
||||||
|
- allocator->m_PhysicalDeviceProperties.limits.minUniformBufferOffsetAlignment == 0);
|
||||||
|
- }
|
||||||
|
- if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_STORAGE_BUFFER_BIT) != 0)
|
||||||
|
- {
|
||||||
|
- VMA_ASSERT(vkMemReq.alignment %
|
||||||
|
- allocator->m_PhysicalDeviceProperties.limits.minStorageBufferOffsetAlignment == 0);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
// 3. Allocate memory using allocator.
|
||||||
|
res = allocator->AllocateMemory(
|
||||||
|
vkMemReq,
|
||||||
18
thirdparty/vulkan/vk_mem_alloc.h
vendored
18
thirdparty/vulkan/vk_mem_alloc.h
vendored
@@ -17508,24 +17508,6 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateBuffer(
|
|||||||
allocator->GetBufferMemoryRequirements(*pBuffer, vkMemReq,
|
allocator->GetBufferMemoryRequirements(*pBuffer, vkMemReq,
|
||||||
requiresDedicatedAllocation, prefersDedicatedAllocation);
|
requiresDedicatedAllocation, prefersDedicatedAllocation);
|
||||||
|
|
||||||
// Make sure alignment requirements for specific buffer usages reported
|
|
||||||
// in Physical Device Properties are included in alignment reported by memory requirements.
|
|
||||||
if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT) != 0)
|
|
||||||
{
|
|
||||||
VMA_ASSERT(vkMemReq.alignment %
|
|
||||||
allocator->m_PhysicalDeviceProperties.limits.minTexelBufferOffsetAlignment == 0);
|
|
||||||
}
|
|
||||||
if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT) != 0)
|
|
||||||
{
|
|
||||||
VMA_ASSERT(vkMemReq.alignment %
|
|
||||||
allocator->m_PhysicalDeviceProperties.limits.minUniformBufferOffsetAlignment == 0);
|
|
||||||
}
|
|
||||||
if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_STORAGE_BUFFER_BIT) != 0)
|
|
||||||
{
|
|
||||||
VMA_ASSERT(vkMemReq.alignment %
|
|
||||||
allocator->m_PhysicalDeviceProperties.limits.minStorageBufferOffsetAlignment == 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. Allocate memory using allocator.
|
// 3. Allocate memory using allocator.
|
||||||
res = allocator->AllocateMemory(
|
res = allocator->AllocateMemory(
|
||||||
vkMemReq,
|
vkMemReq,
|
||||||
|
|||||||
Reference in New Issue
Block a user