[Mesa-dev] [PATCH 4/4] dri: Add a default drirc to be installed to provide application workarounds.
Eric Anholt
eric at anholt.net
Wed Jan 25 14:29:10 PST 2012
Specifially, this being present works around a bug in Unigine
Sanctuary on i965 which previously resulted in bad rendering.
---
configure.ac | 1 +
src/mesa/drivers/dri/Makefile.am | 2 +-
src/mesa/drivers/dri/common/Makefile.am | 22 ++++++++++++++++++++++
src/mesa/drivers/dri/common/drirc | 7 +++++++
src/mesa/drivers/dri/common/xmlpool/options.h | 12 ++++++------
5 files changed, 37 insertions(+), 7 deletions(-)
create mode 100644 src/mesa/drivers/dri/common/Makefile.am
create mode 100644 src/mesa/drivers/dri/common/drirc
diff --git a/configure.ac b/configure.ac
index 2472cc1..b3cdf13 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1948,6 +1948,7 @@ AC_CONFIG_FILES([configs/autoconf
src/gbm/main/gbm.pc
src/mesa/drivers/dri/dri.pc
src/mesa/drivers/dri/Makefile
+ src/mesa/drivers/dri/common/Makefile
src/mesa/drivers/dri/i915/Makefile
src/mesa/drivers/dri/i965/Makefile
src/mesa/drivers/dri/nouveau/Makefile
diff --git a/src/mesa/drivers/dri/Makefile.am b/src/mesa/drivers/dri/Makefile.am
index 3722082..8dea0ac 100644
--- a/src/mesa/drivers/dri/Makefile.am
+++ b/src/mesa/drivers/dri/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS=
+SUBDIRS=common
if HAVE_I915_DRI
SUBDIRS+=i915
diff --git a/src/mesa/drivers/dri/common/Makefile.am b/src/mesa/drivers/dri/common/Makefile.am
new file mode 100644
index 0000000..3b5324d
--- /dev/null
+++ b/src/mesa/drivers/dri/common/Makefile.am
@@ -0,0 +1,22 @@
+# Copyright © 2012 Intel Corporation
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+sysconf_DATA = drirc
diff --git a/src/mesa/drivers/dri/common/drirc b/src/mesa/drivers/dri/common/drirc
new file mode 100644
index 0000000..7abc646
--- /dev/null
+++ b/src/mesa/drivers/dri/common/drirc
@@ -0,0 +1,7 @@
+<driconf>
+ <device screen="0" driver="i965">
+ <application name="Sanctuary">
+ <option name="force_glsl_extensions_warn" value="true" />
+ </application>
+ </device>
+</driconf>
diff --git a/src/mesa/drivers/dri/common/xmlpool/options.h b/src/mesa/drivers/dri/common/xmlpool/options.h
index a5890af..75c887e 100644
--- a/src/mesa/drivers/dri/common/xmlpool/options.h
+++ b/src/mesa/drivers/dri/common/xmlpool/options.h
@@ -629,10 +629,10 @@ DRI_CONF_OPT_END
#define DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(def) \
DRI_CONF_OPT_BEGIN(force_glsl_extensions_warn,bool,def) \
- DRI_CONF_DESC(en,"Force GLSL extension default behavior to \"warn\"") \
- DRI_CONF_DESC(de,"Force GLSL extension default behavior to \"warn\"") \
- DRI_CONF_DESC(es,"Force GLSL extension default behavior to \"warn\"") \
- DRI_CONF_DESC(nl,"Force GLSL extension default behavior to \"warn\"") \
- DRI_CONF_DESC(fr,"Force GLSL extension default behavior to \"warn\"") \
- DRI_CONF_DESC(sv,"Force GLSL extension default behavior to \"warn\"") \
+ DRI_CONF_DESC(en,"Force GLSL extension default behavior to 'warn'") \
+ DRI_CONF_DESC(de,"Force GLSL extension default behavior to 'warn'") \
+ DRI_CONF_DESC(es,"Force GLSL extension default behavior to 'warn'") \
+ DRI_CONF_DESC(nl,"Force GLSL extension default behavior to 'warn'") \
+ DRI_CONF_DESC(fr,"Force GLSL extension default behavior to 'warn'") \
+ DRI_CONF_DESC(sv,"Force GLSL extension default behavior to 'warn'") \
DRI_CONF_OPT_END
--
1.7.7.3
More information about the mesa-dev
mailing list