The FPU precision should stay intact when FPU preserve flag is defined. By investigating the FPU mantissa lenght before Direct3D device creation, it tells 53 bits, which is OK. After device creation, the mantissa length is only 24 bits, and all computation gets horribly inaccurate after that.
- Creating a Direct3D device (D3D9)
- D3DCREATE_FPU_PRESERVE flag set on
- x86 application
I've investigated the mantissa length with _controlfp_s function.
We have tested this with two laptops, i5 and i3, both having Intel HD graphics, and both have the problem.
FPU preserve flag works correctly in all Ati and nVidia GPUs we have tested.
When making a x64 or AnyCPU application, the accuracy is OK, even with Intel.
The bug must be in Intel HD DirectX drivers. The driver version in i5 laptop is 220.127.116.119, dated July 28th, 2010 (the newest one through windows update)