st/mesa: require all s3tc formats for EXT_texture_compression_s3tc
authorMarek Olšák <maraeo@gmail.com>
Sun, 22 Jan 2012 17:47:21 +0000 (18:47 +0100)
committerMarek Olšák <maraeo@gmail.com>
Wed, 25 Jan 2012 11:35:19 +0000 (12:35 +0100)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_extensions.c

index 527e56d18bd9b87d312ecd787373a3527651a919..809d6c170c14c1435f688b7eaa6758ed02cbdec2 100644 (file)
@@ -436,7 +436,16 @@ void st_init_extensions(struct st_context *st)
    }
 
    /* s3tc support */
-   if (screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
+   if (screen->is_format_supported(screen, PIPE_FORMAT_DXT1_RGB,
+                                   PIPE_TEXTURE_2D, 0,
+                                   PIPE_BIND_SAMPLER_VIEW) &&
+       screen->is_format_supported(screen, PIPE_FORMAT_DXT1_RGBA,
+                                   PIPE_TEXTURE_2D, 0,
+                                   PIPE_BIND_SAMPLER_VIEW) &&
+       screen->is_format_supported(screen, PIPE_FORMAT_DXT3_RGBA,
+                                   PIPE_TEXTURE_2D, 0,
+                                   PIPE_BIND_SAMPLER_VIEW) &&
+       screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
                                    PIPE_TEXTURE_2D, 0,
                                    PIPE_BIND_SAMPLER_VIEW) &&
        (ctx->Mesa_DXTn || st_get_s3tc_override())) {