mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user