Bug 111099 - Green video when playing a hevc video with vdpau
Summary: Green video when playing a hevc video with vdpau
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2019-07-10 07:58 UTC by Pierre-Eric Pelloux-Prayer
Modified: 2019-07-23 14:53 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Proof-of-concept fix (1.75 KB, patch)
2019-07-10 11:03 UTC, Michel Dänzer
Details | Splinter Review

Description Pierre-Eric Pelloux-Prayer 2019-07-10 07:58:08 UTC
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.
Comment 1 Michel Dänzer 2019-07-10 08:03:39 UTC
Thanks Pierre for tracking this down and for filing the report. Removing myself from the CC list, the one copy of updates I get from the dri-devel mailing list is enough. :)
Comment 2 Michel Dänzer 2019-07-10 11:03:07 UTC
Created attachment 144748 [details] [review]
Proof-of-concept fix

Does this help for you?

Note that I can only reproduce this if I artificially disable st_vdpau_video/output_surface_dma_buf(). Might be worth looking into why those aren't working for you.
Comment 3 Pierre-Eric Pelloux-Prayer 2019-07-10 11:39:27 UTC
(In reply to Michel Dänzer from comment #2)
> Created attachment 144748 [details] [review] [review]
> Proof-of-concept fix
> 
> Does this help for you?
> 

Yes the patch fixes the issue.
Comment 4 Michel Dänzer 2019-07-23 14:53:38 UTC
Thanks for the report, fixed by https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1364 .


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.