- Fix 3D rendering on non-MSVC builds.
This commit is contained in:
rogerman 2016-08-16 00:12:34 +00:00
parent 7abca69750
commit d837653b5f
1 changed files with 10 additions and 10 deletions

View File

@ -632,20 +632,20 @@ FORCEINLINE s32 vec3dot_fixed32(const s32* a, const s32* b) {
//I'm going to start name these functions GE for GEOMETRY ENGINE MATH.
//Pretty much any math function in this file should be explicit about how it's handling precision.
//Handling that stuff generically globally is not a winning proposition.
FORCEINLINE s64 GEM_Mul32x32To64(const s32 a, const s32 b)
{
#ifdef _MSC_VER
return __emul(a,b);
#else
return ((s64)a)*((s64)b);
#endif
FORCEINLINE s64 GEM_Mul32x32To64(const s32 a, const s32 b)
{
#ifdef _MSC_VER
return __emul(a,b);
#else
return ((s64)a)*((s64)b);
#endif
}
static s32 GEM_SaturateAndShiftdown36To32(const s64 val)
{
if(val>0x000007FFFFFFFFFFLL) return 0x7FFFFFFF;
if(val<0xFFFFF80000000000LL) return 0x80000000;
if(val>(s64)0x000007FFFFFFFFFFULL) return (s32)0x7FFFFFFFU;
if(val<(s64)0xFFFFF80000000000ULL) return (s32)0x80000000U;
return fx32_shiftdown(val);
}