[Wayland-bugs] [Bug 83985] Add rendernode support to headless-GL backend
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Aug 24 00:19:03 PDT 2015
https://bugs.freedesktop.org/show_bug.cgi?id=83985
Pekka Paalanen <ppaalanen at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |derekf at osg.samsung.com,
| |jonc at osg.samsung.com,
| |jonny.lamb at collabora.co.uk
--- Comment #4 from Pekka Paalanen <ppaalanen at gmail.com> ---
(In reply to Dawid Gajownik from comment #3)
> I think I have a working code now, but I'm still not sure how to test it. At
> least buffer-count-test and internal-screenshot-test works fine with a new
> renderer.
That's excellent news! I believe that already verifies that a) wl_shm clients
are rendered properly, and b) EGL-support is initialized correctly.
All that's left to test of the very basics is that hw-accelerated clients get
composited correctly, similar to the internal-screenshot-test.
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?
Even if we just use the gl-renderer on headless by default when --enable-egl, I
think that would still be an improvement for short term. Long term we really
want to test both renderers.
Note, that there could be some complications from running 'make check
BACKEND=x11-backend.so' and similar, since we want to be able to run make check
with also other backends. Although in the future with the new test harness, I
suppose we'd be listing x11-backend etc. tests separately, rather than running
the whole test suite with a certain backend. There are many open questions
there.
> Before writing a new test (it will take some time because everything is new
> to me and I have to learn almost everything) I have a question regarding
> dependencies. Now headless-backend.so requires EGL (gl-renderer.so
> dependency), libudev and libgbm. Should `./configure --disable-egl' disable
> whole headless-backend or only new rendernode-gl renderer (#ifdef new code)?
--disable-egl should definitely only disable the gl-renderer part, not headless
altogether.
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.
You can check compositor-drm.c, it already has a switch between the GL and
Pixman renderers. It even has code to switch from Pixman to GL renderer at
runtime, but I don't think that's useful for headless (except perhaps for
testing that exact feature).
I'd like to see your code to see what you use libudev and libgbm for. Ideally,
headless backend would not link to anything more than it does right now
upstream, even with --enable-egl but gl-renderer not used at runtime. OTOH, I
don't want to clutter headless backend with dlopen()'ing libudev and whatnot.
I suppose you use libudev to find the render node? 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
Are you using the EGL surfaceless platform or GBM platform? Could using the
surfaceless platform remove the direct link from headless backend to libgbm?
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?
Anyway, these are just rough plans forward. For the moment, I am happy to just
link headless-backend.so with libudev and libgbm when --enable-egl is
configured. However, I would like gl-renderer.so to be dlopen()'d only when
asked with the renderer option.
I'm adding in CC the people relevant to Weston's test suite and the Mesa
EGL_EXT_device_base implementation.
--
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/15747a2a/attachment.html>
More information about the wayland-bugs
mailing list