Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support running SSE intrinsics on RISCV platform #1710

Merged
merged 2 commits into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions src/Common/Platform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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__))
Xottab-DUTY marked this conversation as resolved.
Show resolved Hide resolved
# 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"
Expand Down
2 changes: 2 additions & 0 deletions src/Layers/xrRender/DetailManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include <xmmintrin.h>
#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
Expand Down
2 changes: 2 additions & 0 deletions src/Layers/xrRender/ParticleEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include <xmmintrin.h>
#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
Expand Down
2 changes: 2 additions & 0 deletions src/xrCDB/ISpatial_q_ray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <xmmintrin.h>
#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
Expand Down
2 changes: 2 additions & 0 deletions src/xrCDB/xrCDB_ray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include <xmmintrin.h>
#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
Expand Down
2 changes: 2 additions & 0 deletions src/xrCore/Threading/TaskManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include <immintrin.h>
#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 <xmmintrin.h>
#else
Expand Down
2 changes: 2 additions & 0 deletions src/xrParticles/noise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <xmmintrin.h>
#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
Expand Down
2 changes: 2 additions & 0 deletions src/xrParticles/particle_actions_collection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1620,6 +1620,8 @@ extern void noise3Init();
#include <xmmintrin.h>
#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
Expand Down
Loading