r600g: guard experimental s3tc code with R600_ENABLE_S3TC
authorKeith Whitwell <keithw@vmware.com>
Thu, 11 Nov 2010 14:26:52 +0000 (14:26 +0000)
committerKeith Whitwell <keithw@vmware.com>
Thu, 11 Nov 2010 14:30:09 +0000 (14:30 +0000)
src/gallium/drivers/r600/r600_texture.c

index ef5adaf6487da435aa707847e807a990b1944b22..a590858c85287c7d936c5de457e9915a9c369521 100644 (file)
@@ -832,6 +832,15 @@ uint32_t r600_translate_texformat(enum pipe_format format,
 
        /* S3TC formats. TODO */
        if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
+                static int r600_enable_s3tc = -1;
+
+                if (r600_enable_s3tc == -1)
+                        r600_enable_s3tc = 
+                                debug_get_bool_option("R600_ENABLE_S3TC", FALSE);
+
+                if (!r600_enable_s3tc)
+                        goto out_unknown;
+
                switch (format) {
                case PIPE_FORMAT_DXT1_RGB:
                case PIPE_FORMAT_DXT1_RGBA: