thekla: Fix build on x86 systems without SSE support
Fixes #14709. Same as https://github.com/Thekla/thekla_atlas/pull/11, but adding comments until it's merged upstream.
This commit is contained in:
parent
7767d89c45
commit
d6b6dcd20e
2 changed files with 17 additions and 5 deletions
5
thirdparty/thekla_atlas/nvmath/ftoi.h
vendored
5
thirdparty/thekla_atlas/nvmath/ftoi.h
vendored
|
@ -53,7 +53,10 @@ namespace nv
|
||||||
return (val<0) ? ftoi_ceil_xs(val) : ftoi_floor_xs(val);
|
return (val<0) ? ftoi_ceil_xs(val) : ftoi_floor_xs(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NV_CPU_X86 || NV_CPU_X86_64
|
// -- GODOT start --
|
||||||
|
//#if NV_CPU_X86 || NV_CPU_X86_64
|
||||||
|
#if NV_USE_SSE
|
||||||
|
// -- GODOT end --
|
||||||
|
|
||||||
NV_FORCEINLINE int ftoi_round_sse(float f) {
|
NV_FORCEINLINE int ftoi_round_sse(float f) {
|
||||||
return _mm_cvt_ss2si(_mm_set_ss(f));
|
return _mm_cvt_ss2si(_mm_set_ss(f));
|
||||||
|
|
17
thirdparty/thekla_atlas/nvmath/nvmath.h
vendored
17
thirdparty/thekla_atlas/nvmath/nvmath.h
vendored
|
@ -14,10 +14,12 @@
|
||||||
#include <float.h> // finite, isnan
|
#include <float.h> // finite, isnan
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NV_CPU_X86 || NV_CPU_X86_64
|
// -- GODOT start --
|
||||||
//#include <intrin.h>
|
//#if NV_CPU_X86 || NV_CPU_X86_64
|
||||||
#include <xmmintrin.h>
|
// //#include <intrin.h>
|
||||||
#endif
|
// #include <xmmintrin.h>
|
||||||
|
//#endif
|
||||||
|
// -- GODOT end --
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,6 +67,13 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
// -- GODOT start --
|
||||||
|
#if NV_USE_SSE
|
||||||
|
//#include <intrin.h>
|
||||||
|
#include <xmmintrin.h>
|
||||||
|
#endif
|
||||||
|
// -- GODOT end --
|
||||||
|
|
||||||
|
|
||||||
#ifndef PI
|
#ifndef PI
|
||||||
#define PI float(3.1415926535897932384626433833)
|
#define PI float(3.1415926535897932384626433833)
|
||||||
|
|
Loading…
Reference in a new issue