D3D: minor vs constant-setting optimization, remove a stupid memcpy that doesn't do anything, don't see much benefit though :/ At least the PIX logs will be cleaner.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4301 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-09-19 10:46:25 +00:00
parent 0d9543030b
commit dae1a68bfc
9 changed files with 81 additions and 30 deletions

View File

@ -100,9 +100,8 @@ void VertexShaderManager::SetConstants()
int startn = nNormalMatricesChanged[0] / 3;
int endn = (nNormalMatricesChanged[1] + 2) / 3;
const float *pnstart = (const float*)&xfmem[XFMEM_NORMALMATRICES+3*startn];
for (int i = startn; i < endn; ++i, pnstart += 3)
SetVSConstant4fv(C_NORMALMATRICES + i, pnstart); // looks like we're reading one too much..
nNormalMatricesChanged[0] = nNormalMatricesChanged[1] = -1;
SetMultiVSConstant3fv(C_NORMALMATRICES + startn, endn - startn, pnstart);
nNormalMatricesChanged[0] = nNormalMatricesChanged[1] = -1;
}
if (nPostTransformMatricesChanged[0] >= 0)
@ -165,9 +164,7 @@ void VertexShaderManager::SetConstants()
const float *norm = (const float *)xfmem + XFMEM_NORMALMATRICES + 3 * (MatrixIndexA.PosNormalMtxIdx & 31);
SetMultiVSConstant4fv(C_POSNORMALMATRIX, 3, pos);
SetVSConstant4fv(C_POSNORMALMATRIX+3, norm);
SetVSConstant4fv(C_POSNORMALMATRIX+4, norm + 3);
SetVSConstant4fv(C_POSNORMALMATRIX+5, norm + 6);
SetMultiVSConstant3fv(C_POSNORMALMATRIX + 3, 3, norm);
}
if (bTexMatricesChanged[0])