Bug 94470 - VDPAU is broken on TAHITI with MPV
Summary: VDPAU is broken on TAHITI with MPV
Status: RESOLVED DUPLICATE of bug 94675
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-09 23:52 UTC by Rafael Castillo
Modified: 2016-03-30 02:57 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Rafael Castillo 2016-03-09 23:52:23 UTC
Hi guys, i just found out MPV is broken for VDPAU on my TAHITI card (AMD Radeon R9-280), so i'm not sure when was it.

the error is as follow 
Mesa: User error: GL_INVALID_OPERATION in VDPAUMapSurfacesNV
[vo/opengl] after rendering: OpenGL error INVALID_OPERATION.
Mesa: User error: GL_INVALID_OPERATION in VDPAUMapSurfacesNV
[vo/opengl] after rendering: OpenGL error INVALID_OPERATION.
Mesa: User error: GL_INVALID_OPERATION in VDPAUMapSurfacesNV

[vo/opengl] after rendering: OpenGL error INVALID_OPERATION.
Mesa: User error: GL_INVALID_OPERATION in VDPAUMapSurfacesNV

[vo/opengl] after rendering: OpenGL error INVALID_OPERATION.
Mesa: User error: GL_INVALID_OPERATION in VDPAUMapSurfacesNV

[vo/opengl] after rendering: OpenGL error INVALID_OPERATION.
Mesa: User error: GL_INVALID_OPERATION in VDPAUMapSurfacesNV

[vo/opengl] after rendering: OpenGL error INVALID_OPERATION.
Mesa: User error: GL_INVALID_OPERATION in VDPAUMapSurfacesNV
AV: 00:00:02 / 00:20:45 (0%) A-V:  0.000


Exiting... (Quit)
[vo/opengl/vdpau-glx] Before uninitializing OpenGL interop: OpenGL error INVALID_OPERATION.

MPV settings 
-vo=opengl[-hq] --hwdec=vdpau Filename

MPV works with 
-vo=vdpau --hwdec=vdpau Filename

Mesa/LLVM: today git 3dc2630e457155a4e8c8613911fe178bc4adf743
MPV: Today git d8b27ee4de4e26d594855960a4421b99db9e76ea

If you need more information please include instructions ;) not too saavy here about Mesa debug and MESA_DEBUG=1 and LIBGL_DEBUG=verbose weren't of much help

TyVM for your hard work.
Comment 1 Andy Furniss 2016-03-10 14:04:02 UTC
(In reply to Rafael Castillo from comment #0)

> Mesa/LLVM: today git 3dc2630e457155a4e8c8613911fe178bc4adf743
> MPV: Today git d8b27ee4de4e26d594855960a4421b99db9e76ea

Not much help for you, but on those commits I can't reproduce on tonga.

Tonga uses a different kernel driver (amdgpu) though, and my kernel/libdrm are also git versions.
Comment 2 Christian König 2016-03-10 15:08:46 UTC
That sounds like VDPAU / OpenGL interop is missing.

Does "mpv -vo vdpau -hwdec vdpau $somefile" work?
Comment 3 Rafael Castillo 2016-03-10 15:12:15 UTC
yes it works and i make sure to enable vdpau in the build too just in case, so i guess there is something wrong with interop in my chip
Comment 4 Alex Deucher 2016-03-10 15:13:04 UTC
(In reply to Rafael Castillo from comment #3)
> yes it works and i make sure to enable vdpau in the build too just in case,
> so i guess there is something wrong with interop in my chip

It's a sw feature, so I suspect there is a problem with your mesa build.
Comment 5 Rafael Castillo 2016-03-10 15:18:03 UTC
Linux: Archlinux
GCC: 5.3.0
Flags: -march=native -02 and -pipe
CPU: AMD FX 6100

Mesa build configuration:
--prefix=/usr \
  --sysconfdir=/etc \
  --with-dri-driverdir=/usr/lib/xorg/modules/dri \
  --with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast \
  --with-dri-drivers=i915,i965,r200,radeon,nouveau,swrast \
  --with-egl-platforms=x11,drm,wayland \
  --with-sha1=libgcrypt \
  --enable-egl \
  --enable-gbm \
  --enable-gallium-llvm \
  --enable-llvm-shared-libs \
  --enable-shared-glapi \
  --enable-glx \
  --enable-glx-tls \
  --enable-dri \
  --enable-osmesa \
  --enable-gles1 \
  --enable-gles2 \
  --enable-texture-float \
  --enable-xa \
  --enable-vdpau \
  --enable-omx \
  --enable-nine \
  --enable-opencl \
  --enable-opencl-icd \
  --with-clang-libdir=/usr/lib

All was compiled with clean unpacked sources and no CCACHE or DISTCC used

Any recomendation for further debugging is welcome ;)
Comment 6 Christian König 2016-03-10 15:26:12 UTC
I recently committed a patch to enable VDPAU interop only when the VDPAU state tracker is compiled as well.

There is probably something going wrong with this patch. Can you check if reverting commit 37402aa4c6216eec5f60ebef8a8f24fcbd61f646 fixes the problem?
Comment 7 Rafael Castillo 2016-03-10 15:49:43 UTC
i'll test it but i had this problem before this patch landed, so i doubt it but i'll test again tonight to be sure.

Is there a way to get a verbose debug output about where exactly this GL_INVALID op is happening?

because i suspect it can be a texture negotiation format issue(i can be very very wrong here so don't take me seriously :) ) since mpv revamped the interop code too but it works on nVidia and since i'm the only reporting this i assume it works in other SI cards as well(i assume mpv is very popular this days too)
Comment 8 Rafael Castillo 2016-03-10 23:02:07 UTC
hi christian as requested i reverted the mentioned commit and the problem persist i also tried reverting 	da3963776421af4718809812b789f6722d5180d0 and reZ patches and nothing.

I also tried reverting to stable mpv and changing my enviroment variables and still persist the issue.

if you need any other info or test just tell me ;)
Comment 9 Rafael Castillo 2016-03-30 02:25:26 UTC
Guys this is fixed after DMA_buf vdpau update and xf86-video-ati update, now works like a boss.

Additionally you can un revert commit 	8a6cd4bda05b9569b3dd0a5a75b2cc385b9ecba9, i tested it without and VDPAU works perfectly fine now.

Thank you very much for your hardwork

Close when you want, in case i fail ;)
Comment 10 Michel Dänzer 2016-03-30 02:57:38 UTC

*** This bug has been marked as a duplicate of bug 94675 ***


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.