summaryrefslogtreecommitdiff
path: root/thirdparty/vulkan/patches
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/vulkan/patches')
-rw-r--r--thirdparty/vulkan/patches/VMA-assert-remove.patch29
-rw-r--r--thirdparty/vulkan/patches/Vulkan-Loader-pr475.patch37
2 files changed, 66 insertions, 0 deletions
diff --git a/thirdparty/vulkan/patches/VMA-assert-remove.patch b/thirdparty/vulkan/patches/VMA-assert-remove.patch
new file mode 100644
index 0000000000..3d57ab7d42
--- /dev/null
+++ b/thirdparty/vulkan/patches/VMA-assert-remove.patch
@@ -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,
diff --git a/thirdparty/vulkan/patches/Vulkan-Loader-pr475.patch b/thirdparty/vulkan/patches/Vulkan-Loader-pr475.patch
new file mode 100644
index 0000000000..5303768f5c
--- /dev/null
+++ b/thirdparty/vulkan/patches/Vulkan-Loader-pr475.patch
@@ -0,0 +1,37 @@
+From e1c938170bba5879d95bf2d7b57b4d1d68557cd5 Mon Sep 17 00:00:00 2001
+From: Brecht Sanders <brecht@sanders.org>
+Date: Tue, 29 Sep 2020 18:14:55 +0200
+Subject: [PATCH] loader: Fixes build with MinGW-w64 8.0.0.
+
+See http://winlibs.com for a release of such GCC compiler
+See issue https://github.com/KhronosGroup/Vulkan-Loader/issues/474
+---
+ loader/loader.c | 7 +++++++
+ 1 file changed, 7 insertions(+), 0 deletions(-)
+
+diff --git a/loader/loader.c b/loader/loader.c
+index 4d8865e13..509f2f420 100644
+--- a/loader/loader.c
++++ b/loader/loader.c
+@@ -71,6 +71,9 @@
+ #include <devpkey.h>
+ #include <winternl.h>
+ #include <strsafe.h>
++#ifdef __MINGW32__
++#undef strcpy // fix error with redfined strcpy when building with MinGW-w64
++#endif
+ #include <dxgi1_6.h>
+ #include "adapters.h"
+
+@@ -695,7 +698,11 @@ VkResult loaderGetDeviceRegistryFiles(const struct loader_instance *inst, char *
+ LPCSTR value_name) {
+ static const wchar_t *softwareComponentGUID = L"{5c4c3332-344d-483c-8739-259e934c9cc8}";
+ static const wchar_t *displayGUID = L"{4d36e968-e325-11ce-bfc1-08002be10318}";
++#ifdef CM_GETIDLIST_FILTER_PRESENT
+ const ULONG flags = CM_GETIDLIST_FILTER_CLASS | CM_GETIDLIST_FILTER_PRESENT;
++#else
++ const ULONG flags = 0x300;
++#endif
+
+ wchar_t childGuid[MAX_GUID_STRING_LEN + 2]; // +2 for brackets {}
+ ULONG childGuidSize = sizeof(childGuid);