[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: ANN: LuaJIT 1.1.0 / Re: Lua x DirectX
- From: "Framework Studios: Hugo" <hugo@...>
- Date: Thu, 16 Mar 2006 09:35:08 +0100
Hi,
I'm using the DirectX9c SDK from Feb. 2006 (the latest). Imho maybe we can
assume the people behind DirectX have a good reason to do something as
potentially 'dangerous' to other libraries as setting the FPU to single
precision.
A google search can also produce pages about the loss of speed when using
the 'preserve FPU' flag, like
http://discuss.microsoft.com/SCRIPTS/WA-MSD.EXE?A2=ind0504b&L=directxdev&D=1&P=4524
(quote: "For games, you typically don't want the performance hit of having
the FP unit working in double-precision.").
With SSE of course it can be avoided, but what about DX drivers on a CPU
without SSE? Btw, can 32-bit float-s really benefit from SSE2 over 64-bit
double-s? Or maybe double-s are faster than float-s on 64-bit CPUs?
So for now I'm sticking with having DirectX setting the (perhaps not so very
deprecated :) FPU to single precision and prefering float over double in our
game engine until DirectX itself converts to using double-s.
Anyway, today I got LuaJIT to work, big thanks to Roberto for this tip!
luaconf.h:544
- #if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) && !defined(__SSE2__)
&& \
- (defined(__i386) || defined (_M_IX86) || defined(__i386__))
+ #if 0
cheers,
Hugo
----- Original Message -----
From: "SevenThunders" <mattcbro@earthlink.net>
To: <lua@bazar2.conectiva.com.br>
Sent: Thursday, March 16, 2006 6:27 AM
Subject: Re: ANN: LuaJIT 1.1.0
Although I don't know much about DirectX, it is the SSE2 instructions that
see a large boost using 32 bit floats, since they can do twice as many
multiplies per clock cycle. Moreover if the modern Directx drivers are
using the CPU I would be surprised if they are not using the more modern
SSE
and SSE2 instructions over the old x86 FPU. Thus one would never have to
employ the nasty switch to single precision on the FPU (which probably
sucks
up a lot of clock cycles in it's own right).
Perhaps the question is what version of DirectX are you using? Actually a
google search produces this link
http://blogs.msdn.com/tmiller/archive/2004/06/01/145596.aspx
Tell your DirectX to leave the deprecated FPU alone!
--
View this message in context:
http://www.nabble.com/ANN%3A-LuaJIT-1.1.0-t1273815.html#a3430294
Sent from the Lua - General forum at Nabble.com.