mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
TexCache: Encourage vectorization.
This gets clang to vectorize on RISC-V V, although it looks suboptimal (probably faster than not using vector, though.) Also improves other platforms, but our specializations seem better.
This commit is contained in:
parent
7cc6c5fa62
commit
41cddce167
1 changed files with 5 additions and 0 deletions
|
@ -243,8 +243,13 @@ static u32 QuickTexHashNonSSE(const void *checkp, u32 size) {
|
||||||
if (((intptr_t)checkp & 0xf) == 0 && (size & 0x3f) == 0) {
|
if (((intptr_t)checkp & 0xf) == 0 && (size & 0x3f) == 0) {
|
||||||
static const u16 cursor2_initial[8] = {0xc00bU, 0x9bd9U, 0x4b73U, 0xb651U, 0x4d9bU, 0x4309U, 0x0083U, 0x0001U};
|
static const u16 cursor2_initial[8] = {0xc00bU, 0x9bd9U, 0x4b73U, 0xb651U, 0x4d9bU, 0x4309U, 0x0083U, 0x0001U};
|
||||||
union u32x4_u16x8 {
|
union u32x4_u16x8 {
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
uint32_t x32 __attribute__((vector_size(16)));
|
||||||
|
uint16_t x16 __attribute__((vector_size(16)));
|
||||||
|
#else
|
||||||
u32 x32[4];
|
u32 x32[4];
|
||||||
u16 x16[8];
|
u16 x16[8];
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
u32x4_u16x8 cursor{};
|
u32x4_u16x8 cursor{};
|
||||||
u32x4_u16x8 cursor2;
|
u32x4_u16x8 cursor2;
|
||||||
|
|
Loading…
Add table
Reference in a new issue