i965: Add support for GL_EXT_texture_shared_exponent.

Only one failure in piglit on gen6, which is texwrap with bordercolor
(as usual).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Eric Anholt 2011-09-20 15:14:53 -07:00
parent 9e9a76eea1
commit 2fd8c4e3ed
4 changed files with 6 additions and 0 deletions

View File

@ -36,6 +36,7 @@ tbd
<h2>New features</h2>
<ul>
<li>GL_EXT_texture_shared_exponent (i965)
</ul>

View 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];

View 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 */

View 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;