Remix.run Logo
g7r 18 hours ago

Ah, nice story!

This reminds me of another story with FPU involved. I was a game developer once. We were making a game that consistently triggered assertion failures related to FPU calculations, but only on a single PC in the whole office. The game was explicitly setting FPU precision to 32 bits at the start to make all calculations more consistent. However, on that particular PC, there was a fancy hand writing input software that injected its DLL into every process. As you've probably already guessed, that DLL did FPU mode reset to the default in the event handling loop (i.e., main thread). I had to shift FPU mode setting code from process initialization to the event handling loop to be able to deal with the damage that third party DLLs could inflict.

djmips 12 hours ago | parent [-]

nice detective work. Global FPU state had sure caused a lot of headaches.

zokier 4 hours ago | parent [-]

I recall that D3D liked poking FPU state too, which of course had all sorts of fun results