diff options
| author | Linktothepast <kostamarino@gmail.com> | 2015-09-28 16:50:35 +0300 |
|---|---|---|
| committer | Linktothepast <kostamarino@gmail.com> | 2015-09-28 16:50:35 +0300 |
| commit | 748be565b8df535ef558e74b38cd0f4d615f8a21 (patch) | |
| tree | b151efee0a87e99125f2401325a9bddecf84fc73 /Source/Core/VideoCommon/VertexLoaderX64.cpp | |
| parent | cf17fccdd3093a1b8476b10183b1c4bde36da74d (diff) | |
| parent | ce493b897d6d3735c930a8465cc0c26bbe5feb86 (diff) | |
Merge remote-tracking branch 'dolphin-emu/master' into gameinis
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoaderX64.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoaderX64.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderX64.cpp b/Source/Core/VideoCommon/VertexLoaderX64.cpp index a298d7e1dd..d55ec17fef 100644 --- a/Source/Core/VideoCommon/VertexLoaderX64.cpp +++ b/Source/Core/VideoCommon/VertexLoaderX64.cpp @@ -38,7 +38,7 @@ VertexLoaderX64::VertexLoaderX64(const TVtxDesc& vtx_desc, const VAT& vtx_att) : if (!IsInitialized()) return; - AllocCodeSpace(4096); + AllocCodeSpace(4096, false); ClearCodeSpace(); GenerateVertexLoader(); WriteProtect(); @@ -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])); |
