[Mesa-dev] [PATCH 01/10] i965: Re-disable EXT_texture_float pre-gen5.

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


Texture filtering is not supported on floating-point textures until
gen5, which showed up as failures in texwrap in particular.
---
 src/mesa/drivers/dri/intel/intel_extensions.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 7a5ef3e..5212168 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -93,8 +93,14 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Const.GLSLVersion = 120;
    _mesa_override_glsl_version(ctx);
 
-   if (intel->gen >= 5)
+   if (intel->gen >= 5) {
       ctx->Extensions.EXT_timer_query = true;
+#ifdef TEXTURE_FLOAT_ENABLED
+      ctx->Extensions.ARB_texture_float = true;
+      ctx->Extensions.EXT_texture_shared_exponent = true;
+      ctx->Extensions.EXT_packed_float = true;
+#endif
+   }
 
    if (intel->gen >= 4) {
       ctx->Extensions.ARB_color_buffer_float = true;
@@ -107,11 +113,6 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Extensions.ARB_point_sprite = true;
       ctx->Extensions.ARB_seamless_cube_map = true;
       ctx->Extensions.ARB_shader_texture_lod = true;
-#ifdef TEXTURE_FLOAT_ENABLED
-      ctx->Extensions.ARB_texture_float = true;
-      ctx->Extensions.EXT_texture_shared_exponent = true;
-      ctx->Extensions.EXT_packed_float = true;
-#endif
       ctx->Extensions.ARB_texture_compression_rgtc = true;
       ctx->Extensions.ARB_texture_rg = true;
       ctx->Extensions.EXT_draw_buffers2 = true;
-- 
1.7.7



More information about the mesa-dev mailing list