From 0e94eae4838a45e4cf1401761a87205b36264879 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:10:34 +0200 Subject: [PATCH] Force-inline SIMD index buffer functions --- include/PICA/pica_simd.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/PICA/pica_simd.hpp b/include/PICA/pica_simd.hpp index ae7d04eb2..efb00d43f 100644 --- a/include/PICA/pica_simd.hpp +++ b/include/PICA/pica_simd.hpp @@ -3,6 +3,7 @@ #include #include +#include "compiler_builtins.hpp" #include "helpers.hpp" #if defined(_M_AMD64) || defined(__x86_64__) @@ -43,7 +44,7 @@ namespace PICA::IndexBuffer { #ifdef PICA_SIMD_ARM64 template - std::pair analyzeNEON(u8* indexBuffer, u32 vertexCount) { + ALWAYS_INLINE std::pair analyzeNEON(u8* indexBuffer, u32 vertexCount) { // We process 16 bytes per iteration, which is 8 vertices if we're using u16 indices or 16 vertices if we're using u8 indices constexpr u32 vertsPerLoop = (useShortIndices) ? 8 : 16; @@ -134,7 +135,7 @@ namespace PICA::IndexBuffer { #if defined(PICA_SIMD_X64) && (defined(__SSE4_1__) || defined(__AVX__)) template - std::pair analyzeSSE4_1(u8* indexBuffer, u32 vertexCount) { + ALWAYS_INLINE std::pair analyzeSSE4_1(u8* indexBuffer, u32 vertexCount) { // We process 16 bytes per iteration, which is 8 vertices if we're using u16 // indices or 16 vertices if we're using u8 indices constexpr u32 vertsPerLoop = (useShortIndices) ? 8 : 16;