Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/mit/xorg enable EGL and glamor. partly from maya@.



details:   https://anonhg.NetBSD.org/src/rev/46c25911686d
branches:  trunk
changeset: 450531:46c25911686d
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Apr 16 21:21:51 2019 +0000

description:
enable EGL and glamor.  partly from maya@.

for x86 and evbarm:
- install headers and libEGL
- install xorg-server glamoregl component
- link xorg drivers against gbm/egl

bonus fix:
- fix some wrongly marked compatx11file files

build tested on shark, sgimips, evbarm64-el, amd64 and i386.
run tested on radeon, intel and nvidia on amd64, including
'modesetting' driver on amd64.  however, my systems disable
it due to llvmpipe so i'm not sure what is happening.

diffstat:

 external/mit/xorg/lib/libEGL/Makefile                               |  120 ++++++++++
 external/mit/xorg/server/xorg-server/hw/xfree86/glamor_egl/Makefile |   38 +++
 2 files changed, 158 insertions(+), 0 deletions(-)

diffs (166 lines):

diff -r 87ccccf42f38 -r 46c25911686d external/mit/xorg/lib/libEGL/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/xorg/lib/libEGL/Makefile     Tue Apr 16 21:21:51 2019 +0000
@@ -0,0 +1,120 @@
+#      $NetBSD: Makefile,v 1.1 2019/04/16 21:21:51 mrg Exp $
+
+.include <bsd.own.mk>
+
+LIB=           EGL
+LIBISCXX=      yes
+
+SHLIB_MAJOR=   0
+SHLIB_MINOR=   0
+
+#SUBDIR=               internal
+
+# egl
+.PATH:         ${X11SRCDIR.Mesa}/src/egl/main
+SRCS.egl= \
+       eglapi.c \
+       eglarray.c \
+       eglconfig.c \
+       eglcontext.c \
+       eglcurrent.c \
+       egldevice.c \
+       egldisplay.c \
+       egldriver.c \
+       eglfallbacks.c \
+       eglglobals.c \
+       eglimage.c \
+       egllog.c \
+       eglsurface.c \
+       eglsync.c
+
+.PATH:         ${X11SRCDIR.Mesa}/src/egl/drivers/dri2
+SRCS.drivers/dri2= \
+       egl_dri2.c \
+       platform_x11.c \
+       platform_drm.c
+
+# XXX notyet
+#SRCS.drivers/dri2+= \
+#      platform_x11_dri3.c
+
+BUILDSYMLINKS+= ${X11SRCDIR.Mesa}/src/util/debug.c UTILdebug.c
+SRCS.util=      \
+       UTILdebug.c
+CPPFLAGS.UTILdebug.c+=          -I${X11SRCDIR.Mesa}/src/util \
+                               -I${X11SRCDIR.Mesa}/src/mesa \
+                               -I${X11SRCDIR.Mesa}/src \
+                               -I${X11SRCDIR.Mesa}/src/gallium/include
+
+.PATH:         ${X11SRCDIR.Mesa}/include/EGL
+INCS=  \
+       egl.h \
+       eglext.h \
+       eglextchromium.h \
+       eglmesaext.h \
+       eglplatform.h
+INCSDIR=${X11INCDIR}/EGL
+
+SRCS+= ${SRCS.egl} ${SRCS.drivers/dri2} ${SRCS.util}
+
+CPPFLAGS+= \
+       -I${X11SRCDIR.Mesa}/include \
+       -I${X11SRCDIR.Mesa}/include/drm-uapi \
+       -I${X11SRCDIR.Mesa}/src/gbm/main \
+       -I${X11SRCDIR.Mesa}/src/egl/main \
+       -I${X11SRCDIR.Mesa}/src/gbm/backends/dri \
+       -I${X11SRCDIR.Mesa}/src/loader \
+       -I${X11SRCDIR.Mesa}/src \
+       -I${DESTDIR}${X11INCDIR}/libdrm
+
+EGL_DRIVER_INSTALL_DIR=${X11ROOTDIR}/lib
+CPPFLAGS+= \
+       -DDEFAULT_DRIVER_DIR=\"${X11USRLIBDIR}/modules/dri\" \
+       -D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11 \
+       -D_EGL_DRIVER_SEARCH_DIR=\"$(EGL_DRIVER_INSTALL_DIR)\" \
+       -D_EGL_OS_UNIX=1
+
+CPPFLAGS+=     ${X11FLAGS.THREADLIB} \
+               -DHAVE_X11_PLATFORM \
+               -DHAVE_DRM_PLATFORM \
+               -DHAVE_TIMESPEC_GET \
+               -DHAVE_PTHREAD \
+               -DHAVE_LIBDRM \
+               -DHAVE_MINCORE
+
+.include "../libloader.mk"
+
+CFLAGS+=       -fvisibility=hidden -fno-strict-aliasing -fno-builtin-memcmp
+CFLAGS+=       -pthread
+
+# XXX missing: xcb-present
+LIBDPLIBS=     Xext            ${.CURDIR}/../libXext \
+               X11             ${.CURDIR}/../libX11/dynamic \
+               Xfixes          ${.CURDIR}/../libXfixes \
+               Xdamage         ${.CURDIR}/../libXdamage \
+               Xdmcp           ${.CURDIR}/../libXdmcp \
+               glapi           ${.CURDIR}/../libglapi \
+               drm             ${.CURDIR}/../libdrm \
+               gbm             ${.CURDIR}/../libgbm \
+               xshmfence       ${.CURDIR}/../libxshmfence \
+               X11-xcb         ${.CURDIR}/../libX11/libX11-xcb \
+               xcb-dri2        ${.CURDIR}/../libxcb/dri2 \
+               xcb-glx         ${.CURDIR}/../libxcb/glx \
+               xcb-xfixes      ${.CURDIR}/../libxcb/xfixes \
+               xcb-sync        ${.CURDIR}/../libxcb/sync \
+               xcb             ${.CURDIR}/../libxcb/libxcb \
+               expat           ${NETBSDSRCDIR}/external/mit/expat/lib/libexpat \
+               m               ${NETBSDSRCDIR}/lib/libm
+
+MKLINT=no
+
+PKGCONFIG=     egl
+PKGDIST.egl=   ${X11SRCDIR.Mesa}/src/egl/main
+.include "${.CURDIR}/../libGL/mesa-ver.mk"
+PKGCONFIG_VERSION.egl= ${MESA_VER}
+
+CWARNFLAGS.clang+=     -Wno-tautological-compare -Wno-format -Wno-constant-conversion
+
+.include <bsd.x11.mk>
+.include <bsd.lib.mk>
+.include <bsd.subdir.mk>
diff -r 87ccccf42f38 -r 46c25911686d external/mit/xorg/server/xorg-server/hw/xfree86/glamor_egl/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/xorg/server/xorg-server/hw/xfree86/glamor_egl/Makefile       Tue Apr 16 21:21:51 2019 +0000
@@ -0,0 +1,38 @@
+#      $NetBSD: Makefile,v 1.1 2019/04/16 21:21:51 mrg Exp $
+
+XMODULEDIR=    ${X11USRLIBDIR}/modules
+
+.include "../../../Makefile.serverlib"
+.include "../../../Makefile.servermod"
+
+LIB=   glamoregl
+
+.PATH: ${X11SRCDIR.xorg-server}/glamor
+.PATH: ${X11SRCDIR.xorg-server}/hw/xfree86/glamor_egl
+SRCS=  glamor_egl.c \
+       glamor_eglmodule.c \
+       glamor_xf86_xv.c
+
+CPPFLAGS+=     \
+       -I${X11SRCDIR.xorg-server}/hw/xfree86/common \
+       -I${X11SRCDIR.xorg-server}/Xext \
+       -I${X11SRCDIR.xorg-server}/mi \
+       -I${X11SRCDIR.xorg-server}/include \
+       -I${X11SRCDIR.xorg-server}/glamor \
+       -I${X11SRCDIR.xorg-server}/../include \
+       -I${DESTDIR}${X11INCDIR}/X11 \
+       -I${DESTDIR}${X11INCDIR}/pixman-1 \
+       -I${DESTDIR}${X11INCDIR}/xorg \
+       -I${DESTDIR}${X11INCDIR}/libdrm \
+       -I${X11SRCDIR.xorg-server}/hw/xfree86/ddc \
+       -I${X11SRCDIR.xorg-server}/hw/xfree86/i2c
+
+CPPFLAGS+=     \
+       -DGLAMOR_HAS_GBM
+
+LIBDPLIBS=     \
+       gbm     ${.CURDIR}/../../../../../lib/libgbm
+
+.include <bsd.x11.mk>
+LIBDIR=        ${XMODULEDIR}
+.include <bsd.lib.mk>



Home | Main Index | Thread Index | Old Index