Skip to content

Commit

Permalink
vertexcodec: Mark all decodeBytesGroupSimdX as inline
Browse files Browse the repository at this point in the history
Other compilers would inline these regardless, but new bit group support
resulted in gcc keeping these outlined on x64.
  • Loading branch information
zeux committed Dec 6, 2024
1 parent 8675b0f commit 9586779
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/vertexcodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ static const unsigned char* decodeBytesGroupSimd(const unsigned char* data, unsi
}

SIMD_TARGET
static const unsigned char* decodeBytesGroupSimdX(const unsigned char* data, unsigned char* buffer, int bits)
inline const unsigned char* decodeBytesGroupSimdX(const unsigned char* data, unsigned char* buffer, int bits)
{
switch (bits)
{
Expand Down Expand Up @@ -991,7 +991,8 @@ static const __m128i decodeBytesGroupConfigX[6][3] = {
{_mm_setr_epi8(5, 4, 3, 2, 1, 0, -128, -128, 11, 10, 9, 8, 7, 6, -128, -128), _mm_set1_epi8(63), _mm_setr_epi8(42, 36, 30, 24, 18, 12, 6, 0, 42, 36, 30, 24, 18, 12, 6, 0)}, // 6
};

static const unsigned char* decodeBytesGroupSimdX(const unsigned char* data, unsigned char* buffer, int bits)
SIMD_TARGET
inline const unsigned char* decodeBytesGroupSimdX(const unsigned char* data, unsigned char* buffer, int bits)
{
switch (bits)
{
Expand Down Expand Up @@ -1171,7 +1172,7 @@ static const unsigned char* decodeBytesGroupSimd(const unsigned char* data, unsi
}

SIMD_TARGET
static const unsigned char* decodeBytesGroupSimdX(const unsigned char* data, unsigned char* buffer, int bits)
inline const unsigned char* decodeBytesGroupSimdX(const unsigned char* data, unsigned char* buffer, int bits)
{
switch (bits)
{
Expand Down Expand Up @@ -1434,7 +1435,7 @@ static const unsigned char* decodeBytesGroupSimd(const unsigned char* data, unsi
}

SIMD_TARGET
static const unsigned char* decodeBytesGroupSimdX(const unsigned char* data, unsigned char* buffer, int bits)
inline const unsigned char* decodeBytesGroupSimdX(const unsigned char* data, unsigned char* buffer, int bits)
{
switch (bits)
{
Expand Down

0 comments on commit 9586779

Please sign in to comment.