gallium: use is_format_supported(PIPE_FORMAT_DXT5_RGBA) to check if s3tc is supported
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 21 Mar 2008 17:05:02 +0000 (11:05 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 21 Mar 2008 17:06:52 +0000 (11:06 -0600)
The PIPE_CAP_S3TC token will be deprecated.

src/mesa/state_tracker/st_extensions.c

index 9926e118c4d581d0e7b11bbb3227dad7aeb6f926..7fab4d041d0aecb1a2d8cdf967c0d55faae8d61a 100644 (file)
@@ -189,10 +189,6 @@ void st_init_extensions(struct st_context *st)
       ctx->Extensions.ATI_separate_stencil = GL_TRUE;
    }
 
-   if (screen->get_param(screen, PIPE_CAP_S3TC)) {
-      ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
-   }
-
    if (screen->get_param(screen, PIPE_CAP_ANISOTROPIC_FILTER)) {
       ctx->Extensions.EXT_texture_filter_anisotropic = GL_TRUE;
    }
@@ -217,4 +213,10 @@ void st_init_extensions(struct st_context *st)
                                    PIPE_TEXTURE)) {
       ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
    }
+
+   if (screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
+                                   PIPE_TEXTURE)) {
+      ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
+   }
+
 }