Fix arm64 building and X11 conflicts (#214)

This commit is contained in:
theofficialgman 2024-05-21 20:39:34 -04:00 committed by GitHub
parent 0a0699f272
commit b803da8a58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 35 additions and 12 deletions

3
.gitmodules vendored
View File

@ -13,3 +13,6 @@
[submodule "lib/lunasvg"]
path = lib/lunasvg
url = https://github.com/sammycage/lunasvg
[submodule "lib/sse2neon"]
path = lib/sse2neon
url = https://github.com/DLTcollab/sse2neon.git

View File

@ -175,17 +175,25 @@ target_include_directories(Zelda64Recompiled PRIVATE
${CMAKE_SOURCE_DIR}/lib/rt64/src
${CMAKE_SOURCE_DIR}/lib/rt64/src/rhi
${CMAKE_SOURCE_DIR}/lib/rt64/src/render
${CMAKE_SOURCE_DIR}/lib/sse2neon
${CMAKE_SOURCE_DIR}/lib/freetype-windows-binaries/include
${CMAKE_SOURCE_DIR}/lib/rt64/src/contrib/nativefiledialog-extended/src/include
${CMAKE_BINARY_DIR}/shaders
${CMAKE_CURRENT_BINARY_DIR}
)
target_compile_options(Zelda64Recompiled PRIVATE
-march=nehalem
-fno-strict-aliasing
-fms-extensions
)
if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
target_compile_options(Zelda64Recompiled PRIVATE
-march=nehalem
-fno-strict-aliasing
-fms-extensions
)
else()
target_compile_options(Zelda64Recompiled PRIVATE
-fno-strict-aliasing
-fms-extensions
)
endif()
if (WIN32)
include(FetchContent)
@ -289,7 +297,19 @@ if (${WIN32})
set (DXC "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/x64/dxc.exe")
add_compile_definitions(NOMINMAX)
else()
set (DXC "LD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/lib/x64" "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/x64/dxc")
if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
if (APPLE)
set (DXC "DYLD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/lib/x64" "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/x64/dxc")
else()
set (DXC "LD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/lib/x64" "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/x64/dxc")
endif()
else()
if (APPLE)
set (DXC "DYLD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/lib/arm64" "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/arm64/dxc-macos")
else()
set (DXC "LD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/lib/arm64" "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/arm64/dxc-linux")
endif()
endif()
endif()
build_vertex_shader(Zelda64Recompiled "shaders/InterfaceVS.hlsl" "shaders/InterfaceVS.hlsl")

View File

@ -20,14 +20,13 @@
// ----------------------------------------------------------------------
#include <cstdint>
#define ARCHITECTURE_AMD64
#if defined(__x86_64__) || defined(_M_X64)
#define ARCHITECTURE_SUPPORTS_SSE4_1 1
#if defined(ARCHITECTURE_AMD64)
#include <nmmintrin.h>
using v128 = __m128i;
#elif defined(ARCHITECTURE_ARM64)
#include <sse2neon.h>
#elif defined(__aarch64__) || defined(_M_ARM64)
#define ARCHITECTURE_SUPPORTS_SSE4_1 1
#include "sse2neon.h"
using v128 = __m128i;
#endif

@ -1 +1 @@
Subproject commit ecdd609c49fb5f10e3040335901d8860ef259f67
Subproject commit 1dd801264dbbf7a2f4e8fc483d28664852f50082

1
lib/sse2neon Submodule

@ -0,0 +1 @@
Subproject commit 42c704755d3ec218ed9126a122f0a667beeb630a