aboutsummaryrefslogtreecommitdiff
path: root/.patch/vulkan-memory-allocator/0001-macos-clang.patch
diff options
context:
space:
mode:
authorlizzie <lizzie@eden-emu.dev>2026-09-05 23:43:46 +0200
committercrueter <crueter@eden-emu.dev>2026-09-05 23:43:46 +0200
commit11de2645411ba83e6fcf47bf30ae48a7ee6ae090 (patch)
treec2dec7ddba6220886890915b20a23464b1093943 /.patch/vulkan-memory-allocator/0001-macos-clang.patch
parentf6e768603881713b126cba6f0f5a035981da3b1d (diff)
[cmake] Fix some macOS compilation errors (#4350)
Don't compile GLSL/GLASM backends without OpenGL enabled. These codepaths are unused on non-OpenGL platforms. Fixes other miscellaneous errors that pop up on Clang 23 as well. Signed-off-by: Lizzie lizzie@eden-emu.dev Signed-off-by: crueter crueter@eden-emu.dev - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4350 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Diffstat (limited to '.patch/vulkan-memory-allocator/0001-macos-clang.patch')
-rw-r--r--.patch/vulkan-memory-allocator/0001-macos-clang.patch112
1 files changed, 112 insertions, 0 deletions
diff --git a/.patch/vulkan-memory-allocator/0001-macos-clang.patch b/.patch/vulkan-memory-allocator/0001-macos-clang.patch
new file mode 100644
index 0000000000..e965292f6f
--- /dev/null
+++ b/.patch/vulkan-memory-allocator/0001-macos-clang.patch
@@ -0,0 +1,112 @@
+diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h
+index 8df0364..4856064 100644
+--- a/include/vk_mem_alloc.h
++++ b/include/vk_mem_alloc.h
+@@ -3017,7 +3017,7 @@ remove them if not needed.
+
+ #if defined(__ANDROID_API__) && (__ANDROID_API__ < 16)
+ #include <cstdlib>
+-static void* vma_aligned_alloc(size_t alignment, size_t size)
++static inline void* vma_aligned_alloc(size_t alignment, size_t size)
+ {
+ // alignment must be >= sizeof(void*)
+ if(alignment < sizeof(void*))
+@@ -3860,7 +3860,7 @@ Returned value is the found element, if present in the collection or place where
+ new element with value (key) should be inserted.
+ */
+ template <typename CmpLess, typename IterT, typename KeyT>
+-static IterT VmaBinaryFindFirstNotLess(IterT beg, IterT end, const KeyT& key, const CmpLess& cmp)
++static inline IterT VmaBinaryFindFirstNotLess(IterT beg, IterT end, const KeyT& key, const CmpLess& cmp)
+ {
+ size_t down = 0;
+ size_t up = size_t(end - beg);
+@@ -3898,7 +3898,7 @@ Warning! O(n^2) complexity. Use only inside VMA_HEAVY_ASSERT.
+ T must be pointer type, e.g. VmaAllocation, VmaPool.
+ */
+ template<typename T>
+-static bool VmaValidatePointerArray(uint32_t count, const T* arr)
++static inline bool VmaValidatePointerArray(uint32_t count, const T* arr)
+ {
+ for (uint32_t i = 0; i < count; ++i)
+ {
+@@ -4188,13 +4188,13 @@ static void VmaFree(const VkAllocationCallbacks* pAllocationCallbacks, void* ptr
+ }
+
+ template<typename T>
+-static T* VmaAllocate(const VkAllocationCallbacks* pAllocationCallbacks)
++static inline T* VmaAllocate(const VkAllocationCallbacks* pAllocationCallbacks)
+ {
+ return (T*)VmaMalloc(pAllocationCallbacks, sizeof(T), VMA_ALIGN_OF(T));
+ }
+
+ template<typename T>
+-static T* VmaAllocateArray(const VkAllocationCallbacks* pAllocationCallbacks, size_t count)
++static inline T* VmaAllocateArray(const VkAllocationCallbacks* pAllocationCallbacks, size_t count)
+ {
+ return (T*)VmaMalloc(pAllocationCallbacks, sizeof(T) * count, VMA_ALIGN_OF(T));
+ }
+@@ -4204,14 +4204,14 @@ static T* VmaAllocateArray(const VkAllocationCallbacks* pAllocationCallbacks, si
+ #define vma_new_array(allocator, type, count) new(VmaAllocateArray<type>((allocator), (count)))(type)
+
+ template<typename T>
+-static void vma_delete(const VkAllocationCallbacks* pAllocationCallbacks, T* ptr)
++static inline void vma_delete(const VkAllocationCallbacks* pAllocationCallbacks, T* ptr)
+ {
+ ptr->~T();
+ VmaFree(pAllocationCallbacks, ptr);
+ }
+
+ template<typename T>
+-static void vma_delete_array(const VkAllocationCallbacks* pAllocationCallbacks, T* ptr, size_t count)
++static inline void vma_delete_array(const VkAllocationCallbacks* pAllocationCallbacks, T* ptr, size_t count)
+ {
+ if (ptr != VMA_NULL)
+ {
+@@ -4658,13 +4658,13 @@ void VmaVector<T, AllocatorT>::remove(size_t index)
+ #endif // _VMA_VECTOR_FUNCTIONS
+
+ template<typename T, typename allocatorT>
+-static void VmaVectorInsert(VmaVector<T, allocatorT>& vec, size_t index, const T& item)
++static inline void VmaVectorInsert(VmaVector<T, allocatorT>& vec, size_t index, const T& item)
+ {
+ vec.insert(index, item);
+ }
+
+ template<typename T, typename allocatorT>
+-static void VmaVectorRemove(VmaVector<T, allocatorT>& vec, size_t index)
++static inline void VmaVectorRemove(VmaVector<T, allocatorT>& vec, size_t index)
+ {
+ vec.remove(index);
+ }
+@@ -10620,19 +10620,19 @@ static void VmaFree(VmaAllocator hAllocator, void* ptr)
+ }
+
+ template<typename T>
+-static T* VmaAllocate(VmaAllocator hAllocator)
++static inline T* VmaAllocate(VmaAllocator hAllocator)
+ {
+ return (T*)VmaMalloc(hAllocator, sizeof(T), VMA_ALIGN_OF(T));
+ }
+
+ template<typename T>
+-static T* VmaAllocateArray(VmaAllocator hAllocator, size_t count)
++static inline T* VmaAllocateArray(VmaAllocator hAllocator, size_t count)
+ {
+ return (T*)VmaMalloc(hAllocator, sizeof(T) * count, VMA_ALIGN_OF(T));
+ }
+
+ template<typename T>
+-static void vma_delete(VmaAllocator hAllocator, T* ptr)
++static inline void vma_delete(VmaAllocator hAllocator, T* ptr)
+ {
+ if(ptr != VMA_NULL)
+ {
+@@ -10642,7 +10642,7 @@ static void vma_delete(VmaAllocator hAllocator, T* ptr)
+ }
+
+ template<typename T>
+-static void vma_delete_array(VmaAllocator hAllocator, T* ptr, size_t count)
++static inline void vma_delete_array(VmaAllocator hAllocator, T* ptr, size_t count)
+ {
+ if(ptr != VMA_NULL)
+ {