Re:Quake 2 Source Code Review
by 0x0 on Tuesday September 20, 2011 @05:07PM
(#3019575)
I noticed this comment in the "notes.html":
I seem to vaguely recall reading something about some versions of Windows not preserving the FPU state across task switches. Could it be that this call to configure the FPU for every frame is a workaround for that?
[ Parent
| on HN ]
http://gafferongames.com/networking-for-game-programmers/flo...
Search for _controlfp.. seems some MS API calls could change it.
I've also experienced Windows / DirectX API's use MMX, hence the floating point code I was using (x87 FPU) required a femms instruction before it to change back from MMX state.
This just goes to show that if you need a particular state on a processor (CPU, FPU, GFX, etc) you need to set it explicitly before use.
Re:Quake 2 Source Code Review
by AshleysBrain on Tuesday September 20, 2011 @05:49PM
(#3019754)
Maybe it's because the calls to functions in DLLs could, in theory, change it?