Nozomi Kodama : d3dx9: Avoid useless computations.
Alexandre Julliard
julliard at winehq.org
Wed Feb 20 14:01:14 CST 2013
Module: wine
Branch: master
Commit: de852879d1c9c3678307bb94ed2dda4b3a6d66fd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=de852879d1c9c3678307bb94ed2dda4b3a6d66fd
Author: Nozomi Kodama <nozomi.kodama at yahoo.com>
Date: Fri Feb 15 23:04:25 2013 -1000
d3dx9: Avoid useless computations.
---
dlls/d3dx9_36/math.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c
index 10623f7..69c3297 100644
--- a/dlls/d3dx9_36/math.c
+++ b/dlls/d3dx9_36/math.c
@@ -388,10 +388,16 @@ D3DXMATRIX* WINAPI D3DXMatrixMultiply(D3DXMATRIX *pout, const D3DXMATRIX *pm1, c
D3DXMATRIX* WINAPI D3DXMatrixMultiplyTranspose(D3DXMATRIX *pout, const D3DXMATRIX *pm1, const D3DXMATRIX *pm2)
{
+ D3DXMATRIX temp;
+ int i, j;
+
TRACE("pout %p, pm1 %p, pm2 %p\n", pout, pm1, pm2);
- D3DXMatrixMultiply(pout, pm1, pm2);
- D3DXMatrixTranspose(pout, pout);
+ for (i = 0; i < 4; i++)
+ for (j = 0; j < 4; j++)
+ temp.u.m[j][i] = pm1->u.m[i][0] * pm2->u.m[0][j] + pm1->u.m[i][1] * pm2->u.m[1][j] + pm1->u.m[i][2] * pm2->u.m[2][j] + pm1->u.m[i][3] * pm2->u.m[3][j];
+
+ *pout = temp;
return pout;
}
More information about the wine-cvs
mailing list