Mesa (7.11): util: enable S3TC support when the force_s3tc_enable env var is set to "true"

Bryan Cain bryanc at kemper.freedesktop.org
Tue Jul 26 18:29:32 UTC 2011


Module: Mesa
Branch: 7.11
Commit: fd461c5888565a3f4b444b2ac76964b28a05160a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fd461c5888565a3f4b444b2ac76964b28a05160a

Author: Bryan Cain <bryancain3 at gmail.com>
Date:   Wed Jul 20 17:35:22 2011 -0500

util: enable S3TC support when the force_s3tc_enable env var is set to "true"

NOTE: This is a candidate for the 7.10 and 7.11 branches.

---

 src/gallium/auxiliary/util/u_format_s3tc.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_format_s3tc.c b/src/gallium/auxiliary/util/u_format_s3tc.c
index bb989c2..d8a7c0d 100644
--- a/src/gallium/auxiliary/util/u_format_s3tc.c
+++ b/src/gallium/auxiliary/util/u_format_s3tc.c
@@ -119,8 +119,15 @@ util_format_s3tc_init(void)
 
    library = util_dl_open(DXTN_LIBNAME);
    if (!library) {
-      debug_printf("couldn't open " DXTN_LIBNAME ", software DXTn "
-         "compression/decompression unavailable\n");
+      if (getenv("force_s3tc_enable") &&
+          !strcmp(getenv("force_s3tc_enable"), "true")) {
+         debug_printf("couldn't open " DXTN_LIBNAME ", enabling DXTn due to "
+            "force_s3tc_enable=true environment variable\n");
+         util_format_s3tc_enabled = TRUE;
+      } else {
+         debug_printf("couldn't open " DXTN_LIBNAME ", software DXTn "
+            "compression/decompression unavailable\n");
+      }
       return;
    }
 




More information about the mesa-commit mailing list