diff options
| author | Matt Turner <mattst88@gmail.com> | 2014-06-10 19:16:13 -0700 |
|---|---|---|
| committer | Matt Turner <mattst88@gmail.com> | 2014-06-11 20:47:49 -0700 |
| commit | d2efd107a82ca9301c6d9c2ab00f565880b3e4ea (patch) | |
| tree | a72848a9940bcf163f81b1b008842ac57783fd1f | |
| parent | cc4c7acb8870f17e605c5787c45e1120a78cf360 (diff) | |
i965/build: Add configure option to build i965_dri.so for a single Gen.single-i965-genexperiment/single-i965-gen
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.
| -rw-r--r-- | configure.ac | 11 | ||||
| -rw-r--r-- | src/mesa/drivers/dri/i965/Makefile.am | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index d897ac66665..4b274559467 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 53ca47d1838..721c9ef5592 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 \ |
