Mesa (mesa_7_7_branch): swrast/sse: Fix _mesa_sse_transform_pointsX_3d_no_rot

Pauli Nieminen suokko at kemper.freedesktop.org
Thu Feb 4 11:08:58 UTC 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 7d6cbcdd9a08b9417f476fa86b8b25a4afadce8e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d6cbcdd9a08b9417f476fa86b8b25a4afadce8e

Author: Pauli Nieminen <suokkos at gmail.com>
Date:   Tue Feb  2 20:50:22 2010 +0200

swrast/sse: Fix _mesa_sse_transform_pointsX_3d_no_rot

PXOR user in code were causing the lowest SP float register to have NaN
values which made all math operations in that slot fail. Correct istruction
to clear float registers is XORPS which handles single precission floats
correctly.

Fixes progs/tests/fog in swrast SSE mode.

Now the correct commit instead of 9d9c1f17dc6bcc7a2 which is not even close
of correct fix for the bug.

---

 src/mesa/x86/sse_xform2.S |    1 +
 src/mesa/x86/sse_xform3.S |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/x86/sse_xform2.S b/src/mesa/x86/sse_xform2.S
index 91b82e7..a443dad 100644
--- a/src/mesa/x86/sse_xform2.S
+++ b/src/mesa/x86/sse_xform2.S
@@ -186,6 +186,7 @@ GLNAME(_mesa_sse_transform_points2_3d_no_rot):
     MOV_L( REGOFF(V4F_START, EDI), EDI ) 	/* ptr to first dest vertex */
     ADD_L( EDI, ECX ) 				/* count += dest ptr */
 
+    XORPS( XMM0, XMM0 )                         /* clean the working register */
 
 ALIGNTEXT32
     MOVSS    ( M(0), XMM1 )			/* - | - |  -  | m0  */
diff --git a/src/mesa/x86/sse_xform3.S b/src/mesa/x86/sse_xform3.S
index 1fc79ef..4bc22d8 100644
--- a/src/mesa/x86/sse_xform3.S
+++ b/src/mesa/x86/sse_xform3.S
@@ -198,6 +198,7 @@ GLNAME(_mesa_sse_transform_points3_3d_no_rot):
     MOV_L( REGOFF(V4F_START, EDI), EDI ) 	/* ptr to first dest vertex */
     ADD_L( EDI, ECX ) 				/* count += dest ptr */
 
+    XORPS( XMM0, XMM0 )                         /* clean the working register */
 
 ALIGNTEXT32
     MOVSS    ( M(0), XMM1 )			/* - | - |  -  | m0  */




More information about the mesa-commit mailing list