diff --git a/.gitmodules b/.gitmodules index e0b9e0abb38..4e570902340 100644 --- a/.gitmodules +++ b/.gitmodules @@ -40,3 +40,6 @@ [submodule "Externals/xrLuaFix"] path = Externals/xrLuaFix url = https://github.com/OpenXRay/xrLuaFix.git +[submodule "Externals/sse2rvv"] + path = Externals/sse2rvv + url = https://github.com/pattonkan/sse2rvv.git diff --git a/src/Common/Platform.hpp b/src/Common/Platform.hpp index 6bb391d3ac5..e0464854aa6 100644 --- a/src/Common/Platform.hpp +++ b/src/Common/Platform.hpp @@ -42,6 +42,9 @@ #elif defined (_M_ARM64) || defined(__aarch64__) # define XR_ARCHITECTURE_ARM64 # define _XRAY_ARCHITECTURE_MARKER "ARM 64-bit" +#elif (defined(__riscv) || defined(__riscv__)) +# define XR_ARCHITECTURE_RISCV +# define _XRAY_ARCHITECTURE_MARKER "RISC-V" #elif defined(__powerpc64__) || defined(__ppc64__) # define XR_ARCHITECTURE_PPC64 # define _XRAY_ARCHITECTURE_MARKER "PowerPC 64-bit" diff --git a/src/Layers/xrRender/DetailManager.cpp b/src/Layers/xrRender/DetailManager.cpp index 3e0c969a306..36408e29887 100644 --- a/src/Layers/xrRender/DetailManager.cpp +++ b/src/Layers/xrRender/DetailManager.cpp @@ -24,6 +24,8 @@ #include #elif defined(XR_ARCHITECTURE_ARM) || defined(XR_ARCHITECTURE_ARM64) #include "sse2neon/sse2neon.h" +#elif defined(XR_ARCHITECTURE_RISCV) +#include "sse2rvv/sse2rvv.h" #else #error Add your platform here #endif diff --git a/src/Layers/xrRender/ParticleEffect.cpp b/src/Layers/xrRender/ParticleEffect.cpp index 5add4574b31..c738584e1f0 100644 --- a/src/Layers/xrRender/ParticleEffect.cpp +++ b/src/Layers/xrRender/ParticleEffect.cpp @@ -9,6 +9,8 @@ #include #elif defined(XR_ARCHITECTURE_ARM) || defined(XR_ARCHITECTURE_ARM64) #include "sse2neon/sse2neon.h" +#elif defined(XR_ARCHITECTURE_RISCV) +#include "sse2rvv/sse2rvv.h" #else #error Add your platform here #endif diff --git a/src/xrCDB/ISpatial_q_ray.cpp b/src/xrCDB/ISpatial_q_ray.cpp index 73fbc72994c..9046c53399a 100644 --- a/src/xrCDB/ISpatial_q_ray.cpp +++ b/src/xrCDB/ISpatial_q_ray.cpp @@ -8,6 +8,8 @@ #include #elif defined(XR_ARCHITECTURE_ARM) || defined(XR_ARCHITECTURE_ARM64) #include "sse2neon/sse2neon.h" +#elif defined(XR_ARCHITECTURE_RISCV) +#include "sse2rvv/sse2rvv.h" #else #error Add your platform here #endif diff --git a/src/xrCDB/xrCDB_ray.cpp b/src/xrCDB/xrCDB_ray.cpp index efa6c8e86ab..30a798fac69 100644 --- a/src/xrCDB/xrCDB_ray.cpp +++ b/src/xrCDB/xrCDB_ray.cpp @@ -10,6 +10,8 @@ #include #elif defined(XR_ARCHITECTURE_ARM) || defined(XR_ARCHITECTURE_ARM64) #include "sse2neon/sse2neon.h" +#elif defined(XR_ARCHITECTURE_RISCV) +#include "sse2rvv/sse2rvv.h" #else #error Add your platform here #endif diff --git a/src/xrCore/Threading/TaskManager.cpp b/src/xrCore/Threading/TaskManager.cpp index 3dad17d9ed4..4746f70e886 100644 --- a/src/xrCore/Threading/TaskManager.cpp +++ b/src/xrCore/Threading/TaskManager.cpp @@ -31,6 +31,8 @@ #include #elif defined(XR_ARCHITECTURE_ARM) || defined(XR_ARCHITECTURE_ARM64) #include "sse2neon/sse2neon.h" +#elif defined(XR_ARCHITECTURE_RISCV) +#include "sse2rvv/sse2rvv.h" #elif defined(XR_ARCHITECTURE_PPC64) #include #else diff --git a/src/xrParticles/noise.cpp b/src/xrParticles/noise.cpp index 582d79c4cd1..d2574e87a68 100644 --- a/src/xrParticles/noise.cpp +++ b/src/xrParticles/noise.cpp @@ -6,6 +6,8 @@ #include #elif defined(XR_ARCHITECTURE_ARM) || defined(XR_ARCHITECTURE_ARM64) #include "sse2neon/sse2neon.h" +#elif defined(XR_ARCHITECTURE_RISCV) +#include "sse2rvv/sse2rvv.h" #else #error Add your platform here #endif diff --git a/src/xrParticles/particle_actions_collection.cpp b/src/xrParticles/particle_actions_collection.cpp index 413df325b23..31090068d78 100644 --- a/src/xrParticles/particle_actions_collection.cpp +++ b/src/xrParticles/particle_actions_collection.cpp @@ -1620,6 +1620,8 @@ extern void noise3Init(); #include #elif defined(XR_ARCHITECTURE_ARM) || defined(XR_ARCHITECTURE_ARM64) #include "sse2neon/sse2neon.h" +#elif defined(XR_ARCHITECTURE_RISCV) +#include "sse2rvv/sse2rvv.h" #else #error Add your platform here #endif