[Mesa-dev] [PATCH 02/21] intel: Move S3TC extension enable bits to intel_extensions.c

Ian Romanick idr at freedesktop.org
Sat Aug 27 00:56:52 PDT 2011


From: Ian Romanick <ian.d.romanick at intel.com>

---
 src/mesa/drivers/dri/intel/intel_context.c    |    7 -------
 src/mesa/drivers/dri/intel/intel_extensions.c |    8 ++++++++
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 14342ef..0f0fba2 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -855,13 +855,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");
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 880ca0d..9fce737 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -166,4 +166,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;
+   }
 }
-- 
1.7.4.4



More information about the mesa-dev mailing list