* use math.setexceptionmask so the sse cw is also modified (needed at

least for darwin/x86_64)

git-svn-id: trunk@9628 -
This commit is contained in:
Jonas Maebe 2008-01-04 22:46:22 +00:00
parent 2b1f7a257a
commit 93eb99dd38

View File

@ -1573,6 +1573,11 @@ procedure FreeOpenGL;
implementation implementation
{$if defined(cpui386) or defined(cpux86_64)}
uses
math;
{$endif}
{$ifdef windows} {$ifdef windows}
function WinChoosePixelFormat(DC: HDC; p2: PPixelFormatDescriptor): Integer; extdecl; external 'gdi32' name 'ChoosePixelFormat'; function WinChoosePixelFormat(DC: HDC; p2: PPixelFormatDescriptor): Integer; extdecl; external 'gdi32' name 'ChoosePixelFormat';
{$endif} {$endif}
@ -2315,9 +2320,10 @@ initialization
{ according to bug 7570, this is necessary on all x86 platforms, { according to bug 7570, this is necessary on all x86 platforms,
maybe we've to fix the sse control word as well } maybe we've to fix the sse control word as well }
{ Yes, at least for darwin/x86_64 (JM) }
{$if defined(cpui386) or defined(cpux86_64)} {$if defined(cpui386) or defined(cpux86_64)}
Set8087CW($133F); SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide,exOverflow, exUnderflow, exPrecision]);
{$endif x86} {$endif}
{$IFDEF Windows} {$IFDEF Windows}
LoadOpenGL('opengl32.dll'); LoadOpenGL('opengl32.dll');