Re: Strange float bug?
"Daniel Vogel" <[email protected]>
| Newsgroups | gmane.games.devel.windows |
|---|---|
| Message-ID | <071201c4047b$9fa18df0$6501a8c0@vogellaptop> |
> 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.
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Gamedevlists-windows mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=555