From: Pauli Nieminen Date: Tue, 2 Feb 2010 18:50:22 +0000 (+0200) Subject: swrast/sse: Fix _mesa_sse_transform_pointsX_3d_no_rot X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f1b07f0220bd71c86c977ba04cf20cf90d5e8958;p=mesa.git 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 66d09e4a2a6b770ddb which is not even close of correct fix for the bug. --- diff --git a/src/mesa/x86/sse_xform2.S b/src/mesa/x86/sse_xform2.S index 91b82e72971..a443dad35cc 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 1fc79ef21bd..4bc22d8a545 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 */