diff options
author | James Ross-Gowan <rossy@jrg.systems> | 2019-10-10 19:41:55 +1100 |
---|---|---|
committer | James Ross-Gowan <rossy@jrg.systems> | 2019-10-10 19:52:19 +1100 |
commit | 6002e2705f5e77de4a22fc24e94734dd3500feb7 (patch) | |
tree | bf6dd1174982411ee8361dc15fdae37f660a72cb /video/out/d3d11 | |
parent | 5cbbd250908099b94cfaf7853adf8d5a5bb346e1 (diff) | |
download | mpv-6002e2705f5e77de4a22fc24e94734dd3500feb7.tar.bz2 mpv-6002e2705f5e77de4a22fc24e94734dd3500feb7.tar.xz |
vo_gpu: d3d11: use linear filtering for wrapped textures
This affects hwdec_dxva2dxgi, which uses ra_d3d11_wrap_tex to wrap RGB
video frames that are shared with a D3D9 device. Without it, mpv uses
nearest instead of bilinear scaling with --scale=bilinear (the default)
and --hwdec=dxva2. It's kind of hard to believe this bug has gone
unnoticed for almost two years, but that seems to have been the case.
Fixes: #7042
Diffstat (limited to 'video/out/d3d11')
-rw-r--r-- | video/out/d3d11/ra_d3d11.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/d3d11/ra_d3d11.c b/video/out/d3d11/ra_d3d11.c index 74cd0f6552..b14f3a48fa 100644 --- a/video/out/d3d11/ra_d3d11.c +++ b/video/out/d3d11/ra_d3d11.c @@ -566,8 +566,10 @@ struct ra_tex *ra_d3d11_wrap_tex(struct ra *ra, ID3D11Resource *res) goto error; } - if (bind_flags & D3D11_BIND_SHADER_RESOURCE) + if (bind_flags & D3D11_BIND_SHADER_RESOURCE) { params->render_src = params->blit_src = true; + params->src_linear = params->format->linear_filter; + } if (bind_flags & D3D11_BIND_RENDER_TARGET) params->render_dst = params->blit_dst = true; if (bind_flags & D3D11_BIND_UNORDERED_ACCESS) |