[Mesa-dev] [PATCH 7/7] i965/build: Add configure option to build i965_dri.so for a single Gen.
Matt Turner
mattst88 at gmail.com
Tue Jun 10 21:57:23 PDT 2014
Allows the compiler to cut dead code and simplify when we know the
driver will run on a single platform. Perhaps useful for distributions
wanting to ship new hardware support without the risk involved in
updating Mesa for existing hardware.
---
configure.ac | 11 +++++++++++
src/mesa/drivers/dri/i965/Makefile.am | 6 ++++++
2 files changed, 17 insertions(+)
diff --git a/configure.ac b/configure.ac
index d897ac6..4b27455 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1197,6 +1197,17 @@ AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_xlib_glx" = xyes -o \
-n "$DRI_DIRS")
dnl
+dnl i965 Generation configuration
+dnl
+AC_ARG_ENABLE([only-i965-gen],
+ [AS_HELP_STRING([--enable-only-i965-gen={4,5,6,7,8,...}],
+ [Builds i965_dri.so with support for only one generation @<:@default=all supported@:>@])],
+ [enable_only_i965_gen="$enableval"],
+ [enable_only_i965_gen=""])
+AC_SUBST([I965_GEN], "$enable_only_i965_gen")
+AM_CONDITIONAL(I965_SINGLE_GEN, test -n "$enable_only_i965_gen")
+
+dnl
dnl OSMesa configuration
dnl
diff --git a/src/mesa/drivers/dri/i965/Makefile.am b/src/mesa/drivers/dri/i965/Makefile.am
index 53ca47d..721c9ef 100644
--- a/src/mesa/drivers/dri/i965/Makefile.am
+++ b/src/mesa/drivers/dri/i965/Makefile.am
@@ -23,8 +23,14 @@
include Makefile.sources
+if I965_SINGLE_GEN
+AM_CPPFLAGS = \
+ -DSTATIC_GEN=$(I965_GEN) \
+ -DGEN='((void) brw, STATIC_GEN)'
+else
AM_CPPFLAGS = \
-DGEN='brw->gen'
+endif
AM_CFLAGS = \
-I$(top_srcdir)/include \
--
1.8.3.2
More information about the mesa-dev
mailing list