diff options
author | wm4 <wm4@mplayer2.org> | 2011-12-27 00:26:48 +0100 |
---|---|---|
committer | wm4 <wm4@mplayer2.org> | 2012-03-17 21:06:30 +0100 |
commit | da4dd6d14ba9e29cb9d519f8e4dfec6966121450 (patch) | |
tree | 5ab74e7838a0cdbba411875ade0ec4d0f0f76bd0 | |
parent | 1575ba6293b5c5e7aa8f353c30794af59257ee05 (diff) | |
download | mpv-da4dd6d14ba9e29cb9d519f8e4dfec6966121450.tar.bz2 mpv-da4dd6d14ba9e29cb9d519f8e4dfec6966121450.tar.xz |
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.
-rw-r--r-- | libvo/vo_direct3d.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libvo/vo_direct3d.c b/libvo/vo_direct3d.c index 765d787f31..061c4e750e 100644 --- a/libvo/vo_direct3d.c +++ b/libvo/vo_direct3d.c @@ -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, |