summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2015-08-21 21:49:09 +0200
committerTillmann Karras <tilkax@gmail.com>2015-08-26 05:41:18 +0200
commitee4a12ffe2cccb41c1cfc136e55903dc03a3e17c (patch)
tree2b09b3cfa48a7c0b94079ef9f0e00b2ef02c80a0 /Source/Core/VideoCommon
parent6015e2d812db80557810aaa39ce473bb1af21056 (diff)
Jit64: some byte-swapping changes
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/VertexLoaderX64.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderX64.cpp b/Source/Core/VideoCommon/VertexLoaderX64.cpp
index a298d7e1dd..dd9cd0528d 100644
--- a/Source/Core/VideoCommon/VertexLoaderX64.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderX64.cpp
@@ -53,21 +53,12 @@ OpArg VertexLoaderX64::GetVertexAddr(int array, u64 attribute)
OpArg data = MDisp(src_reg, m_src_ofs);
if (attribute & MASK_INDEXED)
{
- if (attribute == INDEX8)
- {
- MOVZX(64, 8, scratch1, data);
- m_src_ofs += 1;
- }
- else
- {
- MOV(16, R(scratch1), data);
- m_src_ofs += 2;
- BSWAP(16, scratch1);
- MOVZX(64, 16, scratch1, R(scratch1));
- }
+ int bits = attribute == INDEX8 ? 8 : 16;
+ LoadAndSwap(bits, scratch1, data);
+ m_src_ofs += bits / 8;
if (array == ARRAY_POSITION)
{
- CMP(attribute == INDEX8 ? 8 : 16, R(scratch1), Imm8(-1));
+ CMP(bits, R(scratch1), Imm8(-1));
m_skip_vertex = J_CC(CC_E, true);
}
IMUL(32, scratch1, MPIC(&g_main_cp_state.array_strides[array]));