Hi On Sun, Dec 1, 2013 at 6:21 AM, Zbigniew Jędrzejewski-Szmek <zbys...@in.waw.pl> wrote: > On Wed, Nov 27, 2013 at 07:48:46PM +0100, David Herrmann wrote: >> The test-gl helper shows how sd_gfx_card can be used to get a full OpenGL >> context on the device. It is not added to the build-tools as it requires >> mesa and might break on Khronos header-updates (yes, they break API *and* >> ABI compatibility often!). >> --- >> .gitignore | 1 + >> Makefile.am | 18 +++ >> configure.ac | 3 + >> src/libsystemd-gfx/test-gl.c | 342 >> +++++++++++++++++++++++++++++++++++++++++++ >> 4 files changed, 364 insertions(+) >> create mode 100644 src/libsystemd-gfx/test-gl.c >> >> diff --git a/.gitignore b/.gitignore >> index a61f68d..c856412 100644 >> --- a/.gitignore >> +++ b/.gitignore >> @@ -116,6 +116,7 @@ >> /test-event >> /test-fileio >> /test-gfx >> +/test-gl >> /test-hashmap >> /test-hostname >> /test-id128 >> diff --git a/Makefile.am b/Makefile.am >> index aa17876..1e8aeed 100644 >> --- a/Makefile.am >> +++ b/Makefile.am >> @@ -3886,6 +3886,19 @@ test_gfx_LDADD = \ >> libsystemd-shared.la \ >> libsystemd-gfx.la >> >> +test_gl_SOURCES = \ >> + src/libsystemd-gfx/test-gl.c >> + >> +test_gl_CFLAGS = \ >> + $(AM_CFLAGS) \ >> + $(GFX_GL_CFLAGS) >> + >> +test_gl_LDADD = \ >> + $(GFX_GL_LIBS) \ >> + libsystemd-bus-internal.la \ >> + libsystemd-shared.la \ >> + libsystemd-gfx.la >> + >> test_kbd_SOURCES = \ >> src/libsystemd-gfx/test-kbd.c >> >> @@ -3903,6 +3916,11 @@ tests += \ >> test-gfx \ >> test-kbd >> >> +if HAVE_GFX_GL >> +# Uncomment this to enable test-gl builds >> +#tests += test-gl >> +endif > Telling people to edit the makefile doesn't seem right. Maybe add a configure > swith a la bd441fa27a? Then the GFX_GL switch below could be changed to > actually > error out if any of those modules are not found.
Yeah, I think I will remove it entirely instead. It was just a proof-of-concept that you can use sd_gfx_card with OpenGL. Doesn't make much sense to keep it. >> src/libsystemd-gfx/unifont.bin: make-unifont.py >> src/libsystemd-gfx/unifont.hex >> $(AM_V_GEN)cat $(top_srcdir)/src/libsystemd-gfx/unifont.hex | >> $(PYTHON) $< >$@ > src/libsystemd-gfx/unifont.bin: src/libsystemd-gfx/unifont.hex make-unifont.py > $(AM_V_at)$(MKDIR_P) $(dir $@) > $(AM_V_GEN)$(PYTHON) $+ >$@ > > ... and make make-unitfont.py accept an arg. > mkdir -p is needed for out of tree builds. Hm, "make update-unifont" should only be used by maintainers to update the hex-file. You actually need to download the file and rename it to src/libsystemd-gfx/unifont.hex for this to make sense. So is there any reason to support out-of-tree builds for that? Doesn't make sense to me, as you only want to call it if you check the result into git. Argument seems fine, I will try to fix it up (if I only knew python better..). >> + r = sd_gfx_card_new(&card, "/dev/dri/card0", gl_fd, event); > Maybe 'argv[1] ?: "/dev/dri/card0"' for manual testing? The other tests already use udev, I should fix this either up or remove it, yepp. Thanks for reviewing! David _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel