initial commit, 4.5 stable
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
This commit is contained in:
40
thirdparty/embree/patches/0005-mingw-llvm-arm64.patch
vendored
Normal file
40
thirdparty/embree/patches/0005-mingw-llvm-arm64.patch
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
diff --git a/thirdparty/embree/common/simd/arm/sse2neon.h b/thirdparty/embree/common/simd/arm/sse2neon.h
|
||||
index b18d41e783..5a75ccff20 100644
|
||||
--- a/thirdparty/embree/common/simd/arm/sse2neon.h
|
||||
+++ b/thirdparty/embree/common/simd/arm/sse2neon.h
|
||||
@@ -102,7 +102,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
-#if defined(_WIN32)
|
||||
+#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
/* Definitions for _mm_{malloc,free} are provided by <malloc.h>
|
||||
* from both MinGW-w64 and MSVC.
|
||||
*/
|
||||
@@ -1888,7 +1888,11 @@ FORCE_INLINE __m128 _mm_div_ss(__m128 a, __m128 b)
|
||||
#if !defined(SSE2NEON_ALLOC_DEFINED)
|
||||
FORCE_INLINE void _mm_free(void *addr)
|
||||
{
|
||||
+#if defined(_WIN32)
|
||||
+ _aligned_free(addr);
|
||||
+#else
|
||||
free(addr);
|
||||
+#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2080,8 +2084,14 @@ FORCE_INLINE void *_mm_malloc(size_t size, size_t align)
|
||||
return malloc(size);
|
||||
if (align == 2 || (sizeof(void *) == 8 && align == 4))
|
||||
align = sizeof(void *);
|
||||
+#if defined(_WIN32)
|
||||
+ ptr = _aligned_malloc(size, align);
|
||||
+ if (ptr)
|
||||
+ return ptr;
|
||||
+#else
|
||||
if (!posix_memalign(&ptr, align, size))
|
||||
return ptr;
|
||||
+#endif
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user