glmark2: new package
PATCH v4 1/1 glmark2: new package
From: Spenser Gilliland <[email protected]>
---
v4: - rebased Spenser?s patch: http://patchwork.ozlabs.org/patch/278304/
- switched to new official repo, see https://launchpad.net/glmark2
this also removes fbdev support, since I can not test it
- removed Spencer?s SUNXI_MALI patches, due to lack of hardware I can not test it
- renamed options for virtual GL packages
- reworked dependencies, I hope I got all combinations right
- added patch to support current libpng
runtime-time tested on an uClibc-based system:
=======================================================
glmark2 2012.12
=======================================================
OpenGL Information
GL_VENDOR: Intel Open Source Technology Center
GL_RENDERER: Mesa DRI Intel(R) Haswell Desktop
GL_VERSION: 3.0 Mesa 10.3.1
=======================================================
package/Config.in | 1 + package/glmark2/Config.in | 31 +++++++++++++ package/glmark2/glmark2-0001-libpng16.patch | 16 +++++++ package/glmark2/glmark2.mk | 64 +++++++++++++++++++++++++++ 4 files changed, 112 insertions(+) create mode 100644 package/glmark2/Config.in create mode 100644 package/glmark2/glmark2-0001-libpng16.patch create mode 100644 package/glmark2/glmark2.mk
package/Config.in +1 -0
@@ -183,6 +183,7 @@ menu "Graphic libraries and applications (graphic/text)" comment "Graphic applications" source "package/fswebcam/Config.in" + source "package/glmark2/Config.in" source "package/gnuplot/Config.in" source "package/jhead/Config.in" source "package/mesa3d-demos/Config.in"
package/glmark2/Config.in new file +31 -0
@@ -0,0 +1,31 @@ +config BR2_PACKAGE_GLMARK2_EGL_GLES + bool + default y + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_HAS_LIBGLES + depends on BR2_PACKAGE_MESA3D || BR2_PACKAGE_XLIB_LIBX11 || BR2_PACKAGE_WAYLAND + +config BR2_PACKAGE_GLMARK2_GL + bool + default y + depends on BR2_PACKAGE_HAS_LIBGL + depends on BR2_PACKAGE_MESA3D || BR2_PACKAGE_XLIB_LIBX11 || BR2_PACKAGE_WAYLAND + +comment "glmark2 needs an OpenGL or an openGL ES and EGL backend with mesa3d, libX11 or wayland" + depends on BR2_LARGEFILE + depends on !BR2_PACKAGE_GLMARK2_GL && !BR2_PACKAGE_GLMARK2_EGL_GLES + +comment "glmark2 needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE + +config BR2_PACKAGE_GLMARK2 + bool "glmark2" + depends on BR2_LARGEFILE + depends on BR2_PACKAGE_GLMARK2_EGL_GLES || BR2_PACKAGE_GLMARK2_GL + depends on BR2_PACKAGE_MESA3D || BR2_PACKAGE_XLIB_LIBX11 || BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBPNG + help + glmark2 is an OpenGL 2.0 and ES 2.0 benchmark. + + https://github.com/glmark2/glmark2
package/glmark2/glmark2-0001-libpng16.patch new file +16 -0
@@ -0,0 +1,16 @@ +glmark2: Add support for libpng16 + +Signed-off-by: Bernd Kuhls <[email protected]> + +diff -uNr glmark2-0005100d7221190720dc130605d07cbd56e83047.org/wscript glmark2-0005100d7221190720dc130605d07cbd56e83047/wscript +--- glmark2-0005100d7221190720dc130605d07cbd56e83047.org/wscript 2014-09-26 11:14:47.000000000 +0200 ++++ glmark2-0005100d7221190720dc130605d07cbd56e83047/wscript 2014-10-17 19:40:16.011722310 +0200 +@@ -94,7 +94,7 @@ + uselib = uselib, mandatory = True) + + # Check for a supported version of libpng +- supp_png_pkgs = (('libpng12', '1.2'), ('libpng15', '1.5'),) ++ supp_png_pkgs = (('libpng12', '1.2'), ('libpng15', '1.5'), ('libpng16', '1.6'),) + have_png = False + for (pkg, atleast) in supp_png_pkgs: + try:
package/glmark2/glmark2.mk new file +64 -0
64 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH v4 1/1 glmark2: new package
Dear Bernd Kuhls,
Quoted 4 lines · Bernd Kuhls
From: Spenser Gilliland <[email protected]>
Signed-off-by Spenser Gilliland <[email protected]>Signed-off-by Bernd Kuhls <[email protected]>
Thanks for taking care of this package. However, it fails to build here, with this defconfig:
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2014.08.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_16=y
BR2_TOOLCHAIN_EXTERNAL_LARGEFILE=y
BR2_TOOLCHAIN_EXTERNAL_INET_IPV6=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_GLMARK2=y
BR2_PACKAGE_RPI_USERLAND=y
BR2_PACKAGE_WAYLAND=y
# BR2_TARGET_ROOTFS_TAR is not set
Which gives the following error:
Setting top to : /home/thomas/projets/buildroot/output/build/glmark2-0005100d7221190720dc130605d07cbd56e83047 Setting out to : /home/thomas/projets/buildroot/output/build/glmark2-0005100d7221190720dc130605d07cbd56e83047/build Checking for 'gcc' (c compiler) : /home/thomas/projets/buildroot/output/host/usr/bin/arm-linux-gcc Checking for 'g++' (c++ compiler) : /home/thomas/projets/buildroot/output/host/usr/bin/arm-linux-g++ Checking for header stdlib.h : yes Checking for header string.h : yes Checking for header unistd.h : yes Checking for header stdint.h : yes Checking for header stdio.h : yes Checking for header jpeglib.h : yes Checking for library m : yes Checking for library jpeg : yes Checking for function memset : yes Checking for function sqrt : yes Checking for program pkg-config : /home/thomas/projets/buildroot/output/host/usr/bin/pkg-config Checking for 'libpng12' >= 1.2 : not found Checking for 'libpng15' >= 1.5 : not found Checking for 'libpng16' >= 1.6 : yes Checking for 'x11' : not found Checking for 'gl' : not found Checking for 'egl' : yes Checking for 'glesv2' : yes Checking for 'libdrm' : not found Checking for 'gbm' : not found Checking for 'mirclient' : not found Checking for 'wayland-client' : yes Checking for 'wayland-egl' : not found
The configuration failed
(complete log in /home/thomas/projets/buildroot/output/build/glmark2-0005100d7221190720dc130605d07cbd56e83047/build/config.log)
make: *** [/home/thomas/projets/buildroot/output/build/glmark2-0005100d7221190720dc130605d07cbd56e83047/.stamp_configured] Erreur 1
Quoted 12 lines
package/glmark2/Config.in new file +12
-0+ depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_HAS_LIBGLES + depends on BR2_PACKAGE_MESA3D || BR2_PACKAGE_XLIB_LIBX11 || BR2_PACKAGE_WAYLAND + +config BR2_PACKAGE_GLMARK2_GL + bool + default y + depends on BR2_PACKAGE_HAS_LIBGL + depends on BR2_PACKAGE_MESA3D || BR2_PACKAGE_XLIB_LIBX11 || BR2_PACKAGE_WAYLAND + +comment "glmark2 needs an OpenGL or an openGL ES and EGL backend with mesa3d, libX11 or wayland" + depends on BR2_LARGEFILE
package/glmark2/Config.in line 25
Quoted 10 lines
package/glmark2/Config.in new file +10
-0+ depends on !BR2_PACKAGE_GLMARK2_GL && !BR2_PACKAGE_GLMARK2_EGL_GLES + +comment "glmark2 needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE + +config BR2_PACKAGE_GLMARK2 + bool "glmark2" + depends on BR2_LARGEFILE + depends on BR2_PACKAGE_GLMARK2_EGL_GLES || BR2_PACKAGE_GLMARK2_GL + depends on BR2_PACKAGE_MESA3D || BR2_PACKAGE_XLIB_LIBX11 || BR2_PACKAGE_WAYLAND
Do we need this dependency since we already have either BR2_PACKAGE_GLMARK2_EGL_GLES or BR2_PACKAGE_GLMARK2_GL ?
Quoted 18 lines
package/glmark2/Config.in new file +6
-0+ select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBPNG + help + glmark2 is an OpenGL 2.0 and ES 2.0 benchmark. + + https://github.com/glmark2/glmark2package/glmark2/glmark2-0001-libpng16.patch new file +6
-0@@ -0,0 +1,16 @@ +glmark2: Add support for libpng16 + +Signed-off-by: Bernd Kuhls <[email protected]> + +diff -uNr glmark2-0005100d7221190720dc130605d07cbd56e83047.org/wscript glmark2-0005100d7221190720dc130605d07cbd56e83047/wscript +--- glmark2-0005100d7221190720dc130605d07cbd56e83047.org/wscript 2014-09-26 11:14:47.000000000 +0200
package/glmark2/glmark2-0001-libpng16.patch line 16
Quoted 10 lines
package/glmark2/glmark2-0001-libpng16.patch new file +10
-0++++ glmark2-0005100d7221190720dc130605d07cbd56e83047/wscript 2014-10-17 19:40:16.011722310 +0200 +@@ -94,7 +94,7 @@ + uselib = uselib, mandatory = True) + + # Check for a supported version of libpng +- supp_png_pkgs = (('libpng12', '1.2'), ('libpng15', '1.5'),) ++ supp_png_pkgs = (('libpng12', '1.2'), ('libpng15', '1.5'), ('libpng16', '1.6'),) + have_png = False + for (pkg, atleast) in supp_png_pkgs: + try:
Great. Glad to see supporting a modern libpng is as simple as that. Can you submit this patch upstream?
package/glmark2/glmark2-0001-libpng16.patch
Quoted 13 lines
package/glmark2/glmark2-0001-libpng16.patch new file +13
-0+define GLMARK2_CONFIGURE_CMDS + cd $(@D) && \ + $(TARGET_MAKE_ENV) $(GLMARK2_CONF_ENV) $(TARGET_CONFIGURE_OPTS) \ + ./waf configure $(GLMARK2_CONF_OPTS) +endef + +define GLMARK2_BUILD_CMDS + cd $(@D) && $(TARGET_MAKE_ENV) ./waf +endef + +define GLMARK2_INSTALL_TARGET_CMDS + cd $(@D) && $(TARGET_MAKE_ENV) ./waf install --destdir=$(TARGET_DIR) +endef
For several of other packages that use waf (example: jack2), we had to add a dependency on host-python, because waf does not necessarily work with Python 3. So if the Python provided by the host distribution is too recent, waf will not work. Even though I hate to add too many host dependencies, shouldn't we do the same here?
Can you look into those issues, and submit an updated version?
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v4 1/1 glmark2: new package
[posted and mailed]
Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20141028193444.72b79a2d at free-electrons.com:
Quoted 1 line
Checking for 'wayland-egl' : not found
Hi,
glmark2 searches for wayland-egl.pc. Afaics the only package providing this file is mesa3d:
https://packages.debian.org/search?searchon=contents&keywords=wayland-
egl.pc&mode=path&suite=stable&arch=any
According to this posting from 2012 the RPI does not provide wayland-egl:
http://lists.freedesktop.org/archives/wayland-devel/2012-November/006216.html
As I do not have access to a RPI I would like to ask if this is still correct. If yes, I need to change the dependencies.
Regards, Bernd
PATCH v4 1/1 glmark2: new package
Dear Bernd Kuhls,
Quoted 14 lines · Bernd Kuhls
[posted and mailed]
Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20141028193444.72b79a2d at free-electrons.com:
Quoted 1 line
Checking for 'wayland-egl' : not found
Hi,
glmark2 searches for wayland-egl.pc. Afaics the only package providing this file is mesa3d:
https://packages.debian.org/search?searchon=contents&keywords=wayland-
egl.pc&mode=path&suite=stable&arch=any
Quoted 5 lines
According to this posting from 2012 the RPI does not provide wayland-egl:
http://lists.freedesktop.org/archives/wayland-devel/2012-November/006216.htmlAs I do not have access to a RPI I would like to ask if this is still correct. If yes, I need to change the dependencies.
Yann, maybe?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v4 1/1 glmark2: new package
Thomas, Bernd,
On 2014-10-28 22:00 +0100, Thomas Petazzoni spake thusly:
Quoted 15 lines · Bernd Kuhls
Quoted 14 lines
[posted and mailed]
Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20141028193444.72b79a2d at free-electrons.com:
Quoted 1 line
Checking for 'wayland-egl' : not found
Hi,
glmark2 searches for wayland-egl.pc. Afaics the only package providing this file is mesa3d:
https://packages.debian.org/search?searchon=contents&keywords=wayland-
egl.pc&mode=path&suite=stable&arch=any
Quoted 7 lines
Quoted 5 lines
According to this posting from 2012 the RPI does not provide wayland-egl:
http://lists.freedesktop.org/archives/wayland-devel/2012-November/006216.htmlAs I do not have access to a RPI I would like to ask if this is still correct. If yes, I need to change the dependencies.
Yann, maybe?
Indeed, the RPi EGL implementation does not provide the sepcific GL extension required by Wayland, so we can't do native wayland on the RPi (for now).
The weston compositor has support for the RPi, but using a specific backend, that directly uses Broadcom's APIs.
So, the best course of actions for now is to simply depend on mesa3d.
However, I was thinking a bit further about that the other day:
- having wayland stuff depend on _HAS_EGL is incorrect, because not all EGL providers has the required GL extension
- on some platforms, an additional library exists, besides the EGL lib, that provides the GL extension.
So having Wayland stuff only depend on mesa3d is not correct either (it is in Buildroot for now), because it might be possible to have an EGL provider that has the required extension (I thing the NVidia driver has it), or an additional library provides it.
The only solution I can see is to add a new virtual package (name to be discussed) BR2_PACKAGE_HAS_WAYLAND_EGL that providers could select it is they have that extension. It can even be a package different from the one that provides EGL.
But, work for later. For now, packages that require the Wayland extension can simply depend on mesa3d.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'