Fix freeze-crash in lightmapper under MinGW-GCC
This commit is contained in:
parent
2d904127d6
commit
0f4c44c9fb
4 changed files with 4 additions and 44 deletions
16
thirdparty/embree/common/sys/intrinsics.h
vendored
16
thirdparty/embree/common/sys/intrinsics.h
vendored
|
@ -11,12 +11,6 @@
|
|||
|
||||
#include <immintrin.h>
|
||||
|
||||
// -- GODOT start --
|
||||
#if defined(__WIN32__) && defined(__MINGW32__)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
// -- GODOT end --
|
||||
|
||||
#if defined(__BMI__) && defined(__GNUC__) && !defined(__INTEL_COMPILER)
|
||||
#if !defined(_tzcnt_u32)
|
||||
#define _tzcnt_u32 __tzcnt_u32
|
||||
|
@ -425,16 +419,8 @@ namespace embree
|
|||
|
||||
__forceinline void pause_cpu(const size_t N = 8)
|
||||
{
|
||||
// -- GODOT start --
|
||||
for (size_t i=0; i<N; i++)
|
||||
#if !(defined(__WIN32__) && defined(__MINGW32__))
|
||||
// -- GODOT end --
|
||||
_mm_pause();
|
||||
// -- GODOT start --
|
||||
#else
|
||||
__builtin_ia32_pause();
|
||||
#endif
|
||||
// -- GODOT end --
|
||||
_mm_pause();
|
||||
}
|
||||
|
||||
/* prefetches */
|
||||
|
|
22
thirdparty/embree/common/sys/mutex.h
vendored
22
thirdparty/embree/common/sys/mutex.h
vendored
|
@ -47,17 +47,8 @@ namespace embree
|
|||
{
|
||||
while (flag.load())
|
||||
{
|
||||
// -- GODOT start --
|
||||
#if !(defined (__WIN32__) && defined (__MINGW32__))
|
||||
// -- GODOT end --
|
||||
_mm_pause();
|
||||
_mm_pause();
|
||||
// -- GODOT start --
|
||||
#else
|
||||
__builtin_ia32_pause();
|
||||
__builtin_ia32_pause();
|
||||
#endif
|
||||
// -- GODOT end --
|
||||
_mm_pause();
|
||||
}
|
||||
|
||||
bool expected = false;
|
||||
|
@ -83,17 +74,8 @@ namespace embree
|
|||
{
|
||||
while(flag.load())
|
||||
{
|
||||
// -- GODOT start --
|
||||
#if !(defined (__WIN32__) && defined(__MINGW32__))
|
||||
// -- GODOT end --
|
||||
_mm_pause();
|
||||
_mm_pause();
|
||||
// -- GODOT start --
|
||||
#else
|
||||
__builtin_ia32_pause();
|
||||
__builtin_ia32_pause();
|
||||
#endif
|
||||
// -- GODOT end --
|
||||
_mm_pause();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
thirdparty/embree/common/sys/platform.h
vendored
2
thirdparty/embree/common/sys/platform.h
vendored
|
@ -91,7 +91,7 @@
|
|||
#define dll_import
|
||||
#endif
|
||||
|
||||
#ifdef __WIN32__
|
||||
#if defined(__WIN32__) && !defined(__MINGW32__)
|
||||
#if !defined(__noinline)
|
||||
#define __noinline __declspec(noinline)
|
||||
#endif
|
||||
|
|
|
@ -361,15 +361,7 @@ namespace embree
|
|||
if ((loopIndex % LOOP_YIELD_THRESHOLD) == 0)
|
||||
yield();
|
||||
else
|
||||
// -- GODOT start --
|
||||
#if !defined(__MINGW32__)
|
||||
// -- GODOT end --
|
||||
_mm_pause();
|
||||
// -- GODOT start --
|
||||
#else
|
||||
__builtin_ia32_pause();
|
||||
#endif
|
||||
// -- GODOT end --
|
||||
loopIndex++;
|
||||
#else
|
||||
yield();
|
||||
|
|
Loading…
Reference in a new issue