[Mesa-dev] [PATCH 03/10] intel: Expose GL_EXT_texture_integer when GL 3.0 override is set.

Eric Anholt eric at anholt.net
Fri Nov 4 15:01:24 PDT 2011


This will let the feature be incrementally developed, hidden behind
the flag we're all using as we work on GL 3.0 support.
---
 src/mesa/drivers/dri/intel/intel_extensions.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 5212168..effa3bf 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -41,6 +41,14 @@ void
 intelInitExtensions(struct gl_context *ctx)
 {
    struct intel_context *intel = intel_context(ctx);
+   char *override = getenv("MESA_GL_VERSION_OVERRIDE");
+   int override_major, override_minor;
+   int override_version = 0;
+
+   if (override &&
+       sscanf(override, "%u.%u", &override_major, &override_minor) == 2) {
+      override_version = override_major * 10 + override_minor;
+   }
 
    ctx->Extensions.ARB_draw_elements_base_vertex = true;
    ctx->Extensions.ARB_explicit_attrib_location = true;
@@ -118,6 +126,8 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Extensions.EXT_draw_buffers2 = true;
       ctx->Extensions.EXT_framebuffer_sRGB = true;
       ctx->Extensions.EXT_texture_array = true;
+      if (override_version >= 30)
+	 ctx->Extensions.EXT_texture_integer = true;
       ctx->Extensions.EXT_texture_snorm = true;
       ctx->Extensions.EXT_texture_sRGB = true;
       ctx->Extensions.EXT_texture_sRGB_decode = true;
-- 
1.7.7



More information about the mesa-dev mailing list