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.
This commit is contained in:
Bryan Cain 2011-07-20 17:35:22 -05:00
parent 95739f19cc
commit 860c51d827

View file

@ -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;
}