On AMD hardware (at least Polaris and Raven), playing some videos with vdpau
can result in a green screen.
Steps to reproduce:
- download https://www.libde265.org/hevc-bitstreams/bbb-1920x1080-cfg02.mkv
- use x11 (ie not wayland)
- mpv --vo=opengl --hwdec=vdpau bbb-1920x1080-cfg02.mkv
This is a regression that started with commit:
cb446dc0fa5c68f681108f4613560543aa4cf553 (from MR
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1226)
Reverting the commits from this MR on master fixes the issue.
AFAIU the problem is this line:
/* do we have different screen objects ? */
if (res->screen != st->pipe->screen) {
_mesa_error(ctx, GL_INVALID_OPERATION, "VDPAUMapSurfacesNV")
Before this MR the screen objects were identical but now there are different.