|
From: <axl...@us...> - 2009-03-02 21:07:22
|
Revision: 166
http://hgengine.svn.sourceforge.net/hgengine/?rev=166&view=rev
Author: axlecrusher
Date: 2009-03-02 21:07:12 +0000 (Mon, 02 Mar 2009)
Log Message:
-----------
fix broken SSE vector multiply
Modified Paths:
--------------
Mercury2/src/MercuryMath.cpp
Modified: Mercury2/src/MercuryMath.cpp
===================================================================
--- Mercury2/src/MercuryMath.cpp 2009-03-02 20:36:05 UTC (rev 165)
+++ Mercury2/src/MercuryMath.cpp 2009-03-02 21:07:12 UTC (rev 166)
@@ -4,7 +4,7 @@
void TransposeMatrix( FloatRow* m )
{
float tmp;
- float *_m = *m;
+ float *_m = (float*)m;
tmp = _m[1];
_m[1] = _m[4];
@@ -284,14 +284,14 @@
//compute term 1 and term 2 and store them in the low order
//of outxmm[0]
- out[0] = Hadd4( _mm_mul_ps( matrix[1], *p ) );
- tmp = Hadd4( _mm_mul_ps( matrix[2], *p ) );
+ out[0] = Hadd4( _mm_mul_ps( matrix[0], *p ) );
+ tmp = Hadd4( _mm_mul_ps( matrix[1], *p ) );
out[0] = _mm_unpacklo_ps(out[0], tmp);
//compute term 3 and term 4 and store them in the high order
//of outxmm[1]
- out[1] = Hadd4( _mm_mul_ps( matrix[3], *p ) );
- tmp = Hadd4( _mm_mul_ps( matrix[4], *p ) );
+ out[1] = Hadd4( _mm_mul_ps( matrix[2], *p ) );
+ tmp = Hadd4( _mm_mul_ps( matrix[3], *p ) );
out[1] = _mm_unpacklo_ps(out[1], tmp);
//shuffle the low order of outxmm[0] into the loworder of tmp
@@ -304,9 +304,9 @@
r = (FloatRow)_mm_setzero_ps();
}
-FloatRow Float2FloatRow(const float* f, , FloatRow* r)
+void Float2FloatRow(const float* f, FloatRow* r)
{
- r = _mm_load_ps( f );
+ *r = _mm_load_ps( f );
}
void FloatRow2Float( const FloatRow* fr, float* f)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|