intel: Move S3TC extension enable bits to intel_extensions.c
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 22 Aug 2011 20:18:06 +0000 (13:18 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 9 Sep 2011 21:02:20 +0000 (14:02 -0700)
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/intel/intel_context.c
src/mesa/drivers/dri/intel/intel_extensions.c

index 165720fa107ae00575df2cc13955e07c06e177cc..2589ee54a2ecbd9ac17f8c047d57ed2b39f0aa7d 100644 (file)
@@ -856,13 +856,6 @@ intelInitContext(struct intel_context *intel,
 
    intel_fbo_init(intel);
 
-   if (intel->ctx.Mesa_DXTn) {
-      _mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
-      _mesa_enable_extension(ctx, "GL_S3_s3tc");
-   }
-   else if (driQueryOptionb(&intel->optionCache, "force_s3tc_enable")) {
-      _mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
-   }
    intel->use_texture_tiling = driQueryOptionb(&intel->optionCache,
                                               "texture_tiling");
    intel->use_early_z = driQueryOptionb(&intel->optionCache, "early_z");
index 43b767f34458d42336c2de33ab8c0cfdef1f578e..3727b05dcdc65f95659b0900d2535e1aa54da15d 100644 (file)
@@ -165,4 +165,12 @@ intelInitExtensions(struct gl_context *ctx)
       if (driQueryOptionb(&intel->optionCache, "stub_occlusion_query"))
         ctx->Extensions.ARB_occlusion_query = true;
    }
+
+   if (intel->ctx.Mesa_DXTn) {
+      ctx->Extensions.EXT_texture_compression_s3tc = true;
+      ctx->Extensions.S3_s3tc = true;
+   }
+   else if (driQueryOptionb(&intel->optionCache, "force_s3tc_enable")) {
+      ctx->Extensions.EXT_texture_compression_s3tc = true;
+   }
 }