Re: [GD-Windows] Strange float bug?
Brought to you by:
vexxed72
From: Daniel V. <vo...@ep...> - 2004-03-07 19:42:58
|
> D3DCREATE_FPU_PRESERVE flag to CreateDevice() - it will impact performance > slightly though since it makes D3D save, change and restore the control word > for every call that might change the control word. Does anyone have any horror stories of this noticeably affecting performance? We've been using this flag for years and never noticed a measurable performance difference. > > We make games for PS2 and GCN and are Windows amateurs, but I > > hate the idea of not understanding what went wrong and how to > > properly handle this. Has anybody ever encountered something > > like this before? We actually just ran into something slightly related the other day. We had some code that did something like Clamp( 0.f / 0.f, 0.f, 1.f ) with the implementation of Clamp being template< class T > inline T Clamp( const T X, const T Min, const T Max ) { return X<Min ? Min : X<Max ? X : Max; } and it was returning 1.f (Max) if being compiled with VS.NET 2003 but 0.f/0.f (X) if you use gcc which was consistent across several versions used for Linux (2.95.3) and Mac (3.something). We ended up just fixing the code instead of looking into what causes the differences in handling QNaNs so I can't provide any further insight. -- Daniel, Epic Games Inc. |