mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-24 19:30:26 +01:00
Merge pull request #30 from linuxoidmc/master
Initial support for Apple ARM64
This commit is contained in:
commit
8cafd5f860
|
@ -101,13 +101,13 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||||
add_compile_options(-Wall)
|
add_compile_options(-Wall)
|
||||||
add_compile_options(-pipe)
|
add_compile_options(-pipe)
|
||||||
add_compile_options(-fPIC)
|
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)
|
add_compile_options(-march=native)
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm.*")
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm.*")
|
||||||
if(PYRA)
|
if(PYRA)
|
||||||
add_compile_options(-mfpu=neon-vfpv4)
|
add_compile_options(-mfpu=neon-vfpv4)
|
||||||
else()
|
elseif(NOT (MACOSX AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64"))
|
||||||
add_compile_options(-mfpu=neon)
|
add_compile_options(-mfpu=neon)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -2106,7 +2106,7 @@ vtxRest:
|
||||||
vtxEnd:
|
vtxEnd:
|
||||||
pop ebx
|
pop ebx
|
||||||
}
|
}
|
||||||
#elif defined(__ARM_NEON__)
|
#elif defined(__ARM_NEON__) && !defined (PLATFORM_MACOSX)
|
||||||
register float tc_u __asm__("s0") = fTexCorrU;
|
register float tc_u __asm__("s0") = fTexCorrU;
|
||||||
register float tc_v __asm__("s1") = fTexCorrV;
|
register float tc_v __asm__("s1") = fTexCorrV;
|
||||||
const void *tc_src = pvTexCoord->vector;
|
const void *tc_src = pvTexCoord->vector;
|
||||||
|
|
|
@ -512,7 +512,7 @@ void CCastRay::TestBrushSector(CBrushSector *pbscSector)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef __ARM_NEON__
|
#if defined __ARM_NEON__ && !defined PLATFORM_MACOSX
|
||||||
// get distances of ray points from the polygon plane
|
// get distances of ray points from the polygon plane
|
||||||
register FLOAT fDistance0 __asm__("s0") = bpoPolygon.bpo_pbplPlane->bpl_plAbsolute.PointDistance(cr_vOrigin);
|
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);
|
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