Source-Changes-HG archive

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

[src/netbsd-7]: src/external/mit/xorg/lib/gallium Pull up revisions 1.11 and ...



details:   https://anonhg.NetBSD.org/src/rev/2b8b389a6b07
branches:  netbsd-7
changeset: 800063:2b8b389a6b07
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Dec 14 10:50:52 2016 +0000

description:
Pull up revisions 1.11 and 1.15, requested by snj in #1305:

don't look for libdrm_nouveau unless we've built it.
only build the radeon and nouveau drivers on i386/amd64/evbarm,
where they're useful.  this saves almost 2MB in text/data on shark.

diffstat:

 external/mit/xorg/lib/gallium/Makefile |  71 +++++++++++++++++++++++----------
 1 files changed, 50 insertions(+), 21 deletions(-)

diffs (123 lines):

diff -r 5629395d3bbf -r 2b8b389a6b07 external/mit/xorg/lib/gallium/Makefile
--- a/external/mit/xorg/lib/gallium/Makefile    Wed Dec 14 08:21:17 2016 +0000
+++ b/external/mit/xorg/lib/gallium/Makefile    Wed Dec 14 10:50:52 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6.2.4 2016/12/12 09:32:35 msaitoh Exp $
+# $NetBSD: Makefile,v 1.6.2.5 2016/12/14 10:50:52 martin Exp $
 
 # Link the gallium mega driver.
 
@@ -13,16 +13,7 @@
 DRIDIR=                ${X11USRLIBDIR}/modules/dri
 DRIDEBUGDIR=   ${DEBUGDIR}${X11USRLIBDIR}/modules/dri
 
-DRIVERS=       kms_swrast swrast
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
-DRIVERS+=      r600 nouveau
-.endif
-
-CPPFLAGS+= \
-       -I${DESTDIR}${X11INCDIR}/libdrm
-
-# cargo culted.
-#CPPFLAGS+= -D_NETBSD_SOURCE -DPTHREADS
+CPPFLAGS+=     -I${DESTDIR}${X11INCDIR}/libdrm
 
 GALLIUM_SUBDIRS= \
        auxiliary \
@@ -44,21 +35,44 @@
        drivers/noop \
        drivers/trace \
        drivers/rbug \
+       drivers/softpipe \
+       winsys/sw/null \
+       winsys/sw/dri \
+       winsys/sw/kms-dri \
+       state_trackers/dri
+
+GALLIUM_SUBDIRS_ATI= \
        drivers/radeon \
        drivers/r600 \
        drivers/r600/sb \
+       winsys/radeon/drm
+
+GALLIUM_SUBDIRS_NOUVEAU= \
        drivers/nouveau \
        drivers/nouveau/nv30 \
        drivers/nouveau/nv50 \
        drivers/nouveau/codegen \
        drivers/nouveau/nvc0 \
-       drivers/softpipe \
-       winsys/radeon/drm \
-       winsys/nouveau/drm \
-       winsys/sw/null \
-       winsys/sw/dri \
-       winsys/sw/kms-dri \
-       state_trackers/dri
+       winsys/nouveau/drm
+
+BUILD_RADEON=0
+BUILD_NOUVEAU=0
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+BUILD_RADEON=1
+.endif
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+BUILD_NOUVEAU=1
+.endif
+
+DRIVERS=               kms_swrast swrast
+.if ${BUILD_RADEON} == 1
+DRIVERS+=              r600
+GALLIUM_SUBDIRS+=      ${GALLIUM_SUBDIRS_ATI}
+.endif
+.if ${BUILD_NOUVEAU} == 1
+DRIVERS+=              nouveau
+GALLIUM_SUBDIRS+=      ${GALLIUM_SUBDIRS_NOUVEAU}
+.endif
 
 GALLIUM_NAMES= kms_swrast r600 swrant
 
@@ -535,10 +549,17 @@
 
 .include "../libloader.mk"
 
+
 LIBDPLIBS+=    m               ${.CURDIR}/../../../../../lib/libm
+.if ${BUILD_RADEON} == 1 || ${BUILD_NOUVEAU} == 1
 LIBDPLIBS+=    drm             ${.CURDIR}/../libdrm
+.if ${BUILD_RADEON} == 1
 LIBDPLIBS+=    drm_radeon      ${.CURDIR}/../libdrm_radeon
+.endif # ${BUILD_RADEON} == 1
+.if ${BUILD_NOUVEAU} == 1
 LIBDPLIBS+=    drm_nouveau     ${.CURDIR}/../libdrm_nouveau
+.endif # ${BUILD_NOUVEAU} == 1
+.endif # ${BUILD_RADEON} == 1 || ${BUILD_NOUVEAU} == 1
 LIBDPLIBS+=    glapi           ${.CURDIR}/../libglapi
 LIBDPLIBS+=    expat           ${.CURDIR}/../../../../../external/mit/expat/lib/libexpat
 
@@ -576,14 +597,22 @@
        -DGALLIUM_NOOP \
        -DGALLIUM_RBUG \
        -DGALLIUM_TRACE \
-       -DGALLIUM_R200 \
-       -DGALLIUM_R600 \
-       -DGALLIUM_NOUVEAU \
        -DGALLIUM_SOFTPIPE \
        -I${X11SRCDIR.MesaLib}/src/gallium/state_trackers/dri \
        -I${X11SRCDIR.MesaLib}/src/loader \
        -I${X11SRCDIR.MesaLib}/src/gallium/winsys
 
+.if ${BUILD_RADEON} == 1
+CPPFLAGS.target.c += \
+       -DGALLIUM_R200 \
+       -DGALLIUM_R600
+.endif # ${BUILD_RADEON} == 1
+
+.if ${BUILD_NOUVEAU} == 1
+CPPFLAGS.target.c += \
+       -DGALLIUM_NOUVEAU
+.endif # ${BUILD_NOUVEAU} == 1
+
 CWARNFLAGS.clang+=     -Wno-error=constant-conversion \
                        -Wno-error=tautological-constant-out-of-range-compare \
                        -Wno-error=pointer-sign \



Home | Main Index | Thread Index | Old Index