From 873902b4a3cc40b6a03bef197e54c5165f98d842 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Mon, 19 Jan 2015 18:33:08 +0100 Subject: VertexLoader: remove non-JIT SSE code --- Source/Core/VideoCommon/VertexLoader.cpp | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'Source/Core/VideoCommon/VertexLoader.cpp') diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp index 1122a04f72..732f0db696 100644 --- a/Source/Core/VideoCommon/VertexLoader.cpp +++ b/Source/Core/VideoCommon/VertexLoader.cpp @@ -28,16 +28,6 @@ u8* g_video_buffer_read_ptr; u8* g_vertex_manager_write_ptr; -void* VertexLoader::operator new (size_t size) -{ - return AllocateAlignedMemory(size, 16); -} - -void VertexLoader::operator delete (void *p) -{ - FreeAlignedMemory(p); -} - static void LOADERDECL PosMtx_ReadDirect_UByte(VertexLoader* loader) { u8 posmtx = BoundingBox::posMtxIdx = DataReadU8() & 0x3f; @@ -66,15 +56,9 @@ static void LOADERDECL TexMtx_Write_Float2(VertexLoader* loader) static void LOADERDECL TexMtx_Write_Float3(VertexLoader* loader) { -#if _M_SSE >= 0x200 - __m128 output = _mm_cvtsi32_ss(_mm_castsi128_ps(_mm_setzero_si128()), loader->m_curtexmtx[loader->m_texmtxwrite++]); - _mm_storeu_ps((float*)g_vertex_manager_write_ptr, _mm_shuffle_ps(output, output, 0x45 /* 1, 1, 0, 1 */)); - g_vertex_manager_write_ptr += sizeof(float) * 3; -#else DataWrite(0.f); DataWrite(0.f); DataWrite(float(loader->m_curtexmtx[loader->m_texmtxwrite++])); -#endif } static void LOADERDECL SkipVertex(VertexLoader* loader) @@ -92,15 +76,13 @@ VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr) : VertexLoaderBase(vtx_desc, vtx_attr) { VertexLoader_Normal::Init(); - VertexLoader_Position::Init(); - VertexLoader_TextCoord::Init(); CompileVertexTranslator(); // generate frac factors - m_posScale[0] = m_posScale[1] = m_posScale[2] = m_posScale[3] = 1.0f / (1U << m_VtxAttr.PosFrac); + m_posScale = 1.0f / (1U << m_VtxAttr.PosFrac); for (int i = 0; i < 8; i++) - m_tcScale[i][0] = m_tcScale[i][1] = 1.0f / (1U << m_VtxAttr.texCoord[i].Frac); + m_tcScale[i] = 1.0f / (1U << m_VtxAttr.texCoord[i].Frac); for (int i = 0; i < 2; i++) m_colElements[i] = m_VtxAttr.color[i].Elements; -- cgit v1.2.3 From 80617ec6bd9c654835865780831e58fb434be90e Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Tue, 20 Jan 2015 00:24:18 +0100 Subject: VertexLoader: remove weird line --- Source/Core/VideoCommon/VertexLoader.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'Source/Core/VideoCommon/VertexLoader.cpp') diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp index 732f0db696..f764aae478 100644 --- a/Source/Core/VideoCommon/VertexLoader.cpp +++ b/Source/Core/VideoCommon/VertexLoader.cpp @@ -270,7 +270,6 @@ void VertexLoader::CompileVertexTranslator() } else { - components |= VB_HAS_UV0 << i; // have to include since using now m_native_vtx_decl.texcoords[i].components = 3; nat_offset += 12; WriteCall(TexMtx_Write_Float3); -- cgit v1.2.3 From 46ab5d63d62ccb70b3502fbdfffcbd04a3eefb65 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Tue, 20 Jan 2015 01:58:11 +0100 Subject: VertexLoader: never reset alpha in 8888 colors Fixes the opening menu of Xenoblade Chronicles. --- Source/Core/VideoCommon/VertexLoader.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'Source/Core/VideoCommon/VertexLoader.cpp') diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp index f764aae478..4edb6a89ef 100644 --- a/Source/Core/VideoCommon/VertexLoader.cpp +++ b/Source/Core/VideoCommon/VertexLoader.cpp @@ -83,9 +83,6 @@ VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr) m_posScale = 1.0f / (1U << m_VtxAttr.PosFrac); for (int i = 0; i < 8; i++) m_tcScale[i] = 1.0f / (1U << m_VtxAttr.texCoord[i].Frac); - - for (int i = 0; i < 2; i++) - m_colElements[i] = m_VtxAttr.color[i].Elements; } void VertexLoader::CompileVertexTranslator() -- cgit v1.2.3