aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_extensions.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-02-27 03:20:58 +0100
committerMarek Olšák <[email protected]>2010-02-28 00:46:36 +0100
commitaa4d47f68f992f8bbe843822c9f75dce9e8706f8 (patch)
tree7e2df40ab6b56864327dbfdf0cde824b8263b683 /src/mesa/state_tracker/st_extensions.c
parentd36e3952c21240cde19dac7f16cc37aac7174673 (diff)
st/mesa: do not advertise S3TC if the external lib is not available
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r--src/mesa/state_tracker/st_extensions.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index d5f58546613..e9ee65576d5 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -299,8 +299,12 @@ void st_init_extensions(struct st_context *st)
/* s3tc support */
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
- PIPE_TEXTURE_2D,
- PIPE_TEXTURE_USAGE_SAMPLER, 0)) {
+ PIPE_TEXTURE_2D,
+ PIPE_TEXTURE_USAGE_SAMPLER, 0) &&
+ (ctx->Mesa_DXTn ||
+ screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
+ PIPE_TEXTURE_2D,
+ PIPE_TEXTURE_USAGE_RENDER_TARGET, 0))) {
ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
ctx->Extensions.S3_s3tc = GL_TRUE;
}