SW skinning (ARM32, x86): Don't convert more bone matrices than necessary

Was already fixed on ARM64.
This commit is contained in:
Henrik Rydgard 2015-10-25 00:51:47 +02:00
parent b86394d0a6
commit 56814ad52d
2 changed files with 2 additions and 3 deletions

View File

@ -227,7 +227,7 @@ JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec, int
MOVP2R(R4, bones);
MOVP2R(R5, boneMask);
VLD1(F_32, Q3, R5, 2, ALIGN_128);
for (int i = 0; i < 8; i++) {
for (int i = 0; i < dec.nweights; i++) {
VLD1(F_32, Q4, R3, 2); // Load 128 bits even though we just want 96
VMUL(F_32, Q4, Q4, Q3);
ADD(R3, R3, 12);

View File

@ -189,11 +189,10 @@ JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec, int
// Add code to convert matrices to 4x4.
// Later we might want to do this when the matrices are loaded instead.
// This is mostly proof of concept.
int boneCount = 0;
if (dec.weighttype && g_Config.bSoftwareSkinning && dec.morphcount == 1) {
MOVAPS(XMM4, M(&threeMasks));
for (int i = 0; i < 8; i++) {
for (int i = 0; i < dec.nweights; i++) {
MOVUPS(XMM0, M((gstate.boneMatrix + 12 * i)));
MOVUPS(XMM1, M((gstate.boneMatrix + 12 * i + 3)));
MOVUPS(XMM2, M((gstate.boneMatrix + 12 * i + 3 * 2)));