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
This commit is contained in:
James Ross-Gowan
2019-10-10 19:41:55 +11:00
parent 5cbbd25090
commit 6002e2705f

View File

@@ -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)