i965: Add support for GL_EXT_texture_shared_exponent.
authorEric Anholt <eric@anholt.net>
Tue, 20 Sep 2011 22:14:53 +0000 (15:14 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 22 Sep 2011 17:58:34 +0000 (10:58 -0700)
Only one failure in piglit on gen6, which is texwrap with bordercolor
(as usual).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
docs/relnotes-7.12.html
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/intel/intel_context.c
src/mesa/drivers/dri/intel/intel_extensions.c

index 3d3df594e1349bbb71e7cc7d6e6037ccf8af5159..f469f104533e468752312ec252d40d5b0005d83c 100644 (file)
@@ -36,6 +36,7 @@ tbd
 
 <h2>New features</h2>
 <ul>
+<li>GL_EXT_texture_shared_exponent (i965)
 </ul>
 
 
index 1df2202b939a2dc0d616acd63eb1d793a5744e0f..20e726581f6ee4e5b6ca74a43d1781eb6cf3094a 100644 (file)
@@ -121,6 +121,7 @@ brw_format_for_mesa_format(gl_format mesa_format)
       [MESA_FORMAT_SIGNED_RED_RGTC1] = BRW_SURFACEFORMAT_BC4_SNORM,
       [MESA_FORMAT_RG_RGTC2] = BRW_SURFACEFORMAT_BC5_UNORM,
       [MESA_FORMAT_SIGNED_RG_RGTC2] = BRW_SURFACEFORMAT_BC5_SNORM,
+      [MESA_FORMAT_RGB9_E5_FLOAT] = BRW_SURFACEFORMAT_R9G9B9E5_SHAREDEXP,
    };
    assert(mesa_format < MESA_FORMAT_COUNT);
    return table[mesa_format];
index 2589ee54a2ecbd9ac17f8c047d57ed2b39f0aa7d..ada503fff4116988870687cc61931f8deda55198 100644 (file)
@@ -730,6 +730,9 @@ intelInitContext(struct intel_context *intel,
    ctx->TextureFormatSupported[MESA_FORMAT_LUMINANCE_FLOAT32] = GL_TRUE;
    ctx->TextureFormatSupported[MESA_FORMAT_ALPHA_FLOAT32] = GL_TRUE;
    ctx->TextureFormatSupported[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32] = GL_TRUE;
+
+   /* GL_EXT_texture_shared_exponent */
+   ctx->TextureFormatSupported[MESA_FORMAT_RGB9_E5_FLOAT] = GL_TRUE;
 #endif
 
 #endif /* !I915 */
index 5c3442a2b7b4ac8f388a0810a53f0c4a19f751e8..43f0d83f14d6a4d9961984798a329c329d3fb492 100644 (file)
@@ -132,6 +132,7 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Extensions.ARB_shader_texture_lod = true;
 #ifdef TEXTURE_FLOAT_ENABLED
       ctx->Extensions.ARB_texture_float = true;
+      ctx->Extensions.EXT_texture_shared_exponent = true;
 #endif
       ctx->Extensions.ARB_texture_compression_rgtc = true;
       ctx->Extensions.ARB_texture_rg = true;