summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader.cpp
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2015-03-21 12:58:24 +1100
committerskidau <skidau@gmail.com>2015-03-21 12:58:24 +1100
commit39c41f5c705730fa760dafdcff7aa23649ffc8ed (patch)
treefb0b4e2d48511f074b2d2f86be834ea518aa1cad /Source/Core/VideoCommon/VertexLoader.cpp
parent63c4bd665e66ba0aba31ed26c7e3eac38afd6cdb (diff)
parent9da86092aeb1fda7470a661a36b794d94aa1e38b (diff)
Merge pull request #2192 from Tilka/sse2
VertexLoaderX64: support SSE2 as a fallback
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp
index d27d5287ad..49b6d23e1a 100644
--- a/Source/Core/VideoCommon/VertexLoader.cpp
+++ b/Source/Core/VideoCommon/VertexLoader.cpp
@@ -131,12 +131,13 @@ void VertexLoader::CompileVertexTranslator()
WriteCall(VertexLoader_Position::GetFunction(m_VtxDesc.Position, m_VtxAttr.PosFormat, m_VtxAttr.PosElements));
m_VertexSize += VertexLoader_Position::GetSize(m_VtxDesc.Position, m_VtxAttr.PosFormat, m_VtxAttr.PosElements);
- m_native_vtx_decl.position.components = 3;
+ int pos_elements = m_VtxAttr.PosElements + 2;
+ m_native_vtx_decl.position.components = pos_elements;
m_native_vtx_decl.position.enable = true;
m_native_vtx_decl.position.offset = nat_offset;
m_native_vtx_decl.position.type = VAR_FLOAT;
m_native_vtx_decl.position.integer = false;
- nat_offset += 12;
+ nat_offset += pos_elements * sizeof(float);
// Normals
if (m_VtxDesc.Normal != NOT_PRESENT)