mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-12-25 15:14:51 +01:00
Improvements and fixes to Pandora fast-math
This commit is contained in:
parent
ae30b8b4de
commit
ad81a5606a
|
@ -90,7 +90,9 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|||
add_compile_options(-Wall)
|
||||
add_compile_options(-pipe)
|
||||
add_compile_options(-fPIC)
|
||||
add_compile_options(-march=native)
|
||||
if(NOT PANDORA)
|
||||
add_compile_options(-march=native)
|
||||
endif()
|
||||
add_compile_options(-fno-strict-aliasing)
|
||||
add_definitions(-D_REENTRANT=1)
|
||||
add_definitions(-D_MT=1)
|
||||
|
@ -130,7 +132,7 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|||
add_compile_options(-Wno-missing-braces)
|
||||
add_compile_options(-Wno-overloaded-virtual)
|
||||
add_compile_options(-Wno-invalid-offsetof)
|
||||
MESSAGE(WARNING, "re-enable some of the warnings some day!")
|
||||
#MESSAGE(WARNING, "re-enable some of the warnings some day!")
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
|
||||
# !!! FIXME: turn a bunch of these off, this is just for now. I hope. --ryan.
|
||||
|
|
|
@ -310,10 +310,10 @@ Rect ExtractPolygonsInBox(CTerrain *ptrTerrain, const FLOATaabbox3D &bboxExtract
|
|||
if(!bFixSize) {
|
||||
// max vector of bbox in incremented for one, because first vertex is at 0,0,0 in world and in heightmap is at 1,1
|
||||
#ifdef __arm__
|
||||
#ifdef PANDORA
|
||||
#ifdef PLATFORM_PANDORA
|
||||
#define Isinf(a) (((*(unsigned int*)&a)&0x7fffffff)==0x7f800000)
|
||||
#else
|
||||
#define Isinf insif
|
||||
#define Isinf insiff
|
||||
#endif
|
||||
rc.rc_iLeft = (Isinf(bbox.minvect(1)))?(INDEX)0:Clamp((INDEX)(bbox.minvect(1)-0),(INDEX)0,ptrTerrain->tr_pixHeightMapWidth);
|
||||
rc.rc_iTop = (Isinf(bbox.minvect(3)))?(INDEX)0:Clamp((INDEX)(bbox.minvect(3)-0),(INDEX)0,ptrTerrain->tr_pixHeightMapHeight);
|
||||
|
|
|
@ -48,10 +48,10 @@ static inline void BoxToGrid(
|
|||
FLOAT fMaxX = boxEntity.Max()(1);
|
||||
FLOAT fMaxZ = boxEntity.Max()(3);
|
||||
#ifdef __arm__
|
||||
#ifdef PANDORA
|
||||
#ifdef PLATFORM_PANDORA
|
||||
#define Isinf(a) (((*(unsigned int*)&a)&0x7fffffff)==0x7f800000)
|
||||
#else
|
||||
#define Isinf insif
|
||||
#define Isinf insiff
|
||||
#endif
|
||||
iMinX = (Isinf(fMinX))?INDEX(GRID_MIN):Clamp(INDEX(floor(fMinX/GRID_CELLSIZE)), (INDEX)GRID_MIN, (INDEX)GRID_MAX);
|
||||
iMinZ = (Isinf(fMinZ))?INDEX(GRID_MIN):Clamp(INDEX(floor(fMinZ/GRID_CELLSIZE)), (INDEX)GRID_MIN, (INDEX)GRID_MAX);
|
||||
|
|
Loading…
Reference in New Issue
Block a user