[vlc-devel] [RFC PATCH 0/8] VAAPI direct rendering via OpenGL

Thomas Guillem thomas at gllm.fr
Mon Feb 13 19:23:26 CET 2017



On Mon, Feb 13, 2017, at 18:31, Rémi Denis-Courmont wrote:
> Le perjantaina 10. helmikuuta 2017, 11.35.54 EET Thomas Guillem a écrit :
> > This set of patch is still experimental (or WIP) and follows the 2 following
> > patches from Petri:
> > 
> > https://patches.videolan.org/patch/14315/
> > https://patches.videolan.org/patch/14316/
> > 
> > As discussed during FOSDEM, we prefer avoiding creating a new vout for each
> > hwdec API and use the current OpenGL one (in order to benefit from 360
> > shaders, and others color conversions). So we probably won't merge the
> > va/xcb_display.c module.
> 
> Well yeah, but I really don´t like linking the OpenGL plugin to hardware 
> acceleration libraries.
> 
> And while this patch series is untestable, I strongly suspect that it
> breaks 
> VA-DRM support, especially the headless use cases.

Yes indeed I totally broke it. I'll fix that before pushing anything.

> 
> > For now, direct rendering is only working with GLX, but it's not really
> > future proof (won't work with Wayland or EGL). See the last patches comment
> > for EGL issues.
> 
> I think GLX support is totally useless. GLX is a legacy functional subset
> of 
> EGL. And EGL is supported by those graphics chips that use VA natively.

Here is a cleaner branch working with EGL:
https://github.com/tguillem/vlc/commits/vagl-2

Direct rendering is now working via EGL, using EGL images
(eglCreateImageKHR()/glEGLImageTargetTexture2DOES()) and the
EXT_image_dma_buf_import extension[1].

I got a little less CPU usage via EGL than via GLX (arround 1% for
4K30fps). I tested it on X11 and Wayland. I don't have any outputs on
wayland but logs seems OK. I suspect my setup to be highly unstable as I
don't have outputs either via classical OpenGL.

For GLX, I don't know know if we should keep it. Do all recent linux
distribs with VAAPI have the dma_buf_import EGL extension available ? If
not, we should keep GLX as a fallback (it's not a lot of code).

For EGL via X11, I need a proper way to get the X11 Display (I removed
the 2 patches touching vlc_opengl.h).

For VA-DRM, I think we can use the vaGetDisplayDRM() and the EGL
converter I did.

The branch is still WIP, I didn't test introducing filters for example.

[1]:
https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import.txt


> 
> 
> -- 
> 雷米‧德尼-库尔蒙
> https://www.remlab.net/
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list