lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Richard Ranft wrote:
D3DCREATE_FPU_PRESERVE correctly preserves the FPU state.  Without it,
the state is not preserved.

One is correct, the other is not.  Who cares about the performance
impact.

If it's a 30% reduction in performance I bet you'd care.  Microsoft wouldn't
have mentioned it if it had not been an issue at some point.

As far as "correct" goes, there is more than one way to skin a cat.  I'm
certain that with a little creative assembly (maybe not that drastic, since
Luiz mentioned another alternative) the FPU state can be pushed and popped
around the Lua VM process, the D3D render/math processing, or both.

It is the simplest fix, no doubt about it.  And if it's <1% we're talking
about in almost all cases then that's awesome.  I'd just hate to find out
that it's 10% or more in a significant portion of cases on reasonably
popular hardware....

Richard

You'd be amazed at what CPU budgets are on some projects - my entire work has to fit within 0.5% CPU, and that's an important part of the game... So any optimizations that can be made, are made, and they can only be made if we know about the impact.