Skip to content

Commit

Permalink
Merge pull request #7874 from unknownbrackets/gpu-minor
Browse files Browse the repository at this point in the history
arm64: Use XXH64 for vertex hashing, etc.
  • Loading branch information
hrydgard committed Jul 23, 2015
2 parents e3b6e35 + 7f8cf7f commit 7062fe1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion GPU/Common/TextureDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ void DoUnswizzleTex16Basic(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32
QuickTexHashFunc DoQuickTexHash = &QuickTexHashBasic;
UnswizzleTex16Func DoUnswizzleTex16 = &DoUnswizzleTex16Basic;
ReliableHash32Func DoReliableHash32 = &XXH32;
#endif
ReliableHash64Func DoReliableHash64 = &XXH64;
#endif
#endif

// This has to be done after CPUDetect has done its magic.
void SetupTextureDecoder() {
Expand Down
9 changes: 4 additions & 5 deletions GPU/Common/TextureDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,11 @@ typedef u32 ReliableHashType;
#define DoUnswizzleTex16 DoUnswizzleTex16NEON
#define DoReliableHash32 ReliableHash32NEON

// TODO: NEON version of this too? Since we're 64, might be faster.
typedef u64 (*ReliableHash64Func)(const void *input, size_t len, u64 seed);
extern ReliableHash64Func DoReliableHash64;
#include "ext/xxhash.h"
#define DoReliableHash64 XXH64

#define DoReliableHash DoReliableHash32
typedef u32 ReliableHashType;
#define DoReliableHash XXH64
typedef u64 ReliableHashType;

#else
typedef u32 (*QuickTexHashFunc)(const void *checkp, u32 size);
Expand Down
2 changes: 1 addition & 1 deletion GPU/Directx9/TransformPipelineDX9.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ enum {
};

// Avoiding the full include of TextureDecoder.h.
#ifdef _M_X64
#if (defined(_M_SSE) && defined(_M_X64)) || defined(ARM64)
typedef u64 ReliableHashType;
#else
typedef u32 ReliableHashType;
Expand Down
2 changes: 1 addition & 1 deletion GPU/GLES/TransformPipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ enum {
};

// Avoiding the full include of TextureDecoder.h.
#ifdef _M_X64
#if (defined(_M_SSE) && defined(_M_X64)) || defined(ARM64)
typedef u64 ReliableHashType;
#else
typedef u32 ReliableHashType;
Expand Down

0 comments on commit 7062fe1

Please sign in to comment.