mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 11:20:41 +01:00
Fix long-standing FP exception bug in _mesa_x86_cliptest_points4().
This commit is contained in:
parent
d29e9dfe93
commit
53e4ebd4e3
2 changed files with 17 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: x86.c,v 1.21 2001/03/30 14:44:43 gareth Exp $ */
|
||||
/* $Id: x86.c,v 1.22 2001/05/13 18:55:15 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -85,7 +85,6 @@ void _mesa_init_x86_transform_asm( void )
|
|||
ASSIGN_XFORM_GROUP( x86, 3 );
|
||||
ASSIGN_XFORM_GROUP( x86, 4 );
|
||||
|
||||
/* XXX this function has been found to cause FP overflow exceptions */
|
||||
_mesa_clip_tab[4] = _mesa_x86_cliptest_points4;
|
||||
_mesa_clip_np_tab[4] = _mesa_x86_cliptest_points4_np;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: x86_cliptest.S,v 1.6 2001/03/28 20:44:44 gareth Exp $ */
|
||||
/* $Id: x86_cliptest.S,v 1.7 2001/05/13 18:55:15 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -149,7 +149,12 @@ LLBL( ctp4_clip_table_ready ):
|
|||
ALIGNTEXT16
|
||||
LLBL( ctp4_top ):
|
||||
|
||||
FLD1 /* F3 */
|
||||
MOV_L( SRC(3), ECX )
|
||||
FLD1 /* F3 */
|
||||
|
||||
TEST_L( ECX, ECX ) /* GH: If src[3] is zero, abort */
|
||||
JZ( LLBL( ctp4_noproj ) )
|
||||
|
||||
FDIV_S( SRC(3) )
|
||||
|
||||
MOV_L( SRC(3), EBP )
|
||||
|
|
@ -198,7 +203,15 @@ LLBL( ctp4_top ):
|
|||
|
||||
JZ( LLBL( ctp4_proj ) )
|
||||
|
||||
FSTP( ST(0) ) /* */
|
||||
LLBL( ctp4_noproj ):
|
||||
|
||||
FLDZ /* F0 F3 */
|
||||
|
||||
FST_S( DST(0) ) /* F0 F3 */
|
||||
FST_S( DST(1) ) /* F0 F3 */
|
||||
FSTP_S( DST(2) ) /* F3 */
|
||||
FSTP_S( DST(3) ) /* */
|
||||
|
||||
JMP( LLBL( ctp4_next ) )
|
||||
|
||||
LLBL( ctp4_proj ):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue