diff options
author | Bryan Cain <[email protected]> | 2011-07-25 13:30:17 -0500 |
---|---|---|
committer | Bryan Cain <[email protected]> | 2011-07-26 12:54:40 -0500 |
commit | 95739f19ccc8d3915c437238ca057ddbecd193c6 (patch) | |
tree | 3b646a647e5305ec3effb3b53ded4511f37b4687 /src/mesa/state_tracker/st_extensions.c | |
parent | b189d1635d89cd7d900e8f9a5eed88d7dc0b46cb (diff) |
st/mesa: respect force_s3tc_enable environment variable
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 99b231d9706..b5f6d356eb0 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -208,6 +208,15 @@ void st_init_limits(struct st_context *st) } +static GLboolean st_get_s3tc_override(void) +{ + const char *override = _mesa_getenv("force_s3tc_enable"); + if (override && !strcmp(override, "true")) + return GL_TRUE; + return GL_FALSE; +} + + /** * Use pipe_screen::get_param() to query PIPE_CAP_ values to determine * which GL extensions are supported. @@ -426,7 +435,7 @@ void st_init_extensions(struct st_context *st) if (screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA, PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW) && - ctx->Mesa_DXTn) { + (ctx->Mesa_DXTn || st_get_s3tc_override())) { ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE; ctx->Extensions.S3_s3tc = GL_TRUE; } |