mirror of https://github.com/mpv-player/mpv
vo_direct3d: stop D3D from switching the FPU to single precision mode
Add the flag D3DCREATE_FPU_PRESERVE, which tells Direct3D not to switch the FPU to single precision mode. Single precision mode would mean that all floating point calculations are done in float precision, even if using double variables. The MSDN documentation seems to discourage use of this flag with scary warnings about bad performance and stability, but I suspect in practice switching off this completely unreasonable behavior is fine.
This commit is contained in:
parent
1575ba6293
commit
da4dd6d14b
|
@ -796,7 +796,8 @@ static bool change_d3d_backbuffer(d3d_priv *priv)
|
|||
if (FAILED(IDirect3D9_CreateDevice(priv->d3d_handle,
|
||||
D3DADAPTER_DEFAULT,
|
||||
DEVTYPE, vo_w32_window,
|
||||
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
|
||||
D3DCREATE_SOFTWARE_VERTEXPROCESSING
|
||||
| D3DCREATE_FPU_PRESERVE,
|
||||
&present_params, &priv->d3d_device)))
|
||||
{
|
||||
mp_msg(MSGT_VO, MSGL_V,
|
||||
|
|
Loading…
Reference in New Issue