[Wayland-bugs] [Bug 83985] Add rendernode support to headless-GL backend

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Aug 24 05:43:13 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=83985

--- Comment #6 from Dawid Gajownik <gajownik at gmail.com> ---
(In reply to Pekka Paalanen from comment #4)
> We will want to run all headless backend tests with the Pixman renderer by
> default, and if EGL is enabled, re-run the screenshot and EGL related tests
> with the gl-renderer. I'm not sure how easy that is with the current test
> harness, and the new test harness is still lacking the client helpers and
> could use converting buffer-count-test and internal-screenshot-test over
> before it's clear how to do this. So that may need to wait for later. Or
> maybe you already implemented this?

As for now I've been only changing/adding 'server_parameters' string in the
tests.

> --disable-egl should definitely only disable the gl-renderer part, not
> headless altogether.

OK, I'll fix the code.

> I don't think we should have it as a build time option only, either. Of
> course, --disable-egl prevents gl-renderer from being built, but linking it
> in should be a runtime option.

That's how I implemented it. I based my code a lot on compositor-drm and
compositor-fbdev.

> I'd like to see your code to see what you use libudev and libgbm for.

I'll attach the patch shortly.

> I suppose you use libudev to find the render node?

Exactly, that's how it is used right now. First I used mesa approach to iterate
through /dev/dri/renderD* files, but then I found out libudev from waffle
source code.
https://github.com/waffle-gl/waffle/blob/master/src/waffle/gbm/wgbm_display.c#L67

> I think that could be
> replaced with EGL_EXT_device_base and EGL_EXT_device_drm extensions, which
> are WIP for Mesa still:
> http://lists.freedesktop.org/archives/mesa-dev/2015-July/089783.html

Thanks, I'll take a look at it.

> Are you using the EGL surfaceless platform or GBM platform? Could using the
> surfaceless platform remove the direct link from headless backend to libgbm?

GBM platfrom like in EGL_MESA_platform_gbm/EGL_KHR_platform_gbm example
https://www.khronos.org/registry/egl/extensions/MESA/EGL_MESA_platform_gbm.txt

The main difference is that:
1) I'm using renderD<num> device instead of card0
2) file is opened with "O_RDWR | O_CLOEXEC" not "O_RDWR | FD_CLOEXEC" flags.

On one of my systems FD_CLOEXEC was segfaulting nouveau_dri.so.

I did not experiment more with EGL_surfaceless platform because that it's not
widely available yet and would require more work in gl-renderer. 

> Oh, I suppose our gl-renderer API does not account for rendering into an FBO
> off-screen. It always requires an EGLNativeWindowType to create an
> EGLSurface for. Do you know if there is anything we could pass in with
> surfaceless to get a working EGLSurface, or would it always force us to use
> an FBO because the EGLSurface is a dummy?

As far as I remember I stuck on creating an EGLsurface without gbm_surface
*surface. My knowledge was so small that I started reading "OpenGL ES 3.0
Programming Guide" about EGL and FBO. In the meantime you mentioned this bug so
I left #83984 and surfaceless platform for later.

Right now I don't know if it's possible but back then I was going into
conclusion that FBOs need to be used instead of EGLSurface.

Anyway, many thanks for the all of this information. Such a mentoring helps me
a lot :-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20150824/1b64c5c0/attachment-0001.html>


More information about the wayland-bugs mailing list