mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-12-25 15:14:51 +01:00
Initial support for Apple ARM64
This commit is contained in:
parent
d11af2bad8
commit
b27a92c881
|
@ -101,13 +101,13 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|||
add_compile_options(-Wall)
|
||||
add_compile_options(-pipe)
|
||||
add_compile_options(-fPIC)
|
||||
if(NOT PANDORA AND NOT PYRA)
|
||||
if(NOT PANDORA AND NOT PYRA AND NOT (MACOSX AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64"))
|
||||
add_compile_options(-march=native)
|
||||
endif()
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm.*")
|
||||
if(PYRA)
|
||||
add_compile_options(-mfpu=neon-vfpv4)
|
||||
else()
|
||||
elseif(NOT (MACOSX AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64"))
|
||||
add_compile_options(-mfpu=neon)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -2106,7 +2106,7 @@ vtxRest:
|
|||
vtxEnd:
|
||||
pop ebx
|
||||
}
|
||||
#elif defined(__ARM_NEON__)
|
||||
#elif defined(__ARM_NEON__) && !defined (PLATFORM_MACOSX)
|
||||
register float tc_u __asm__("s0") = fTexCorrU;
|
||||
register float tc_v __asm__("s1") = fTexCorrV;
|
||||
const void *tc_src = pvTexCoord->vector;
|
||||
|
|
|
@ -512,7 +512,7 @@ void CCastRay::TestBrushSector(CBrushSector *pbscSector)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
#ifdef __ARM_NEON__
|
||||
#if defined __ARM_NEON__ && !defined PLATFORM_MACOSX
|
||||
// get distances of ray points from the polygon plane
|
||||
register FLOAT fDistance0 __asm__("s0") = bpoPolygon.bpo_pbplPlane->bpl_plAbsolute.PointDistance(cr_vOrigin);
|
||||
register FLOAT fDistance1 __asm__("s2") = bpoPolygon.bpo_pbplPlane->bpl_plAbsolute.PointDistance(cr_vTarget);
|
||||
|
|
14
Sources/build-macarm.sh
Executable file
14
Sources/build-macarm.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
NCPU=`sysctl -n hw.ncpu`
|
||||
echo "Will build with 'make -j$NCPU' ... please edit this script if incorrect."
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
rm -rf cmake-build
|
||||
mkdir $_
|
||||
cd $_
|
||||
cmake -DCMAKE_BUILD_TYPE=RelWithDbgInfo -DCMAKE_OSX_ARCHITECTURES=arm64 .. $1
|
||||
make -j$NCPU
|
||||
|
Loading…
Reference in New Issue
Block a user