mesa/swrast: implement EXT_texture_sRGB_decode

This implements the extension by choosing a different set of texture
fetch functions when the texture parameter changes.

Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie
2011-01-13 12:12:21 +10:00
committed by Dave Airlie
parent ac6334145e
commit edc2dd8e47
8 changed files with 88 additions and 2 deletions

View File

@@ -197,6 +197,7 @@ static const struct extension extension_table[] = {
{ "GL_EXT_texture_rectangle", o(NV_texture_rectangle), GL },
{ "GL_EXT_texture_shared_exponent", o(EXT_texture_shared_exponent), GL },
{ "GL_EXT_texture_sRGB", o(EXT_texture_sRGB), GL },
{ "GL_EXT_texture_sRGB_decode", o(EXT_texture_sRGB_decode), GL },
{ "GL_EXT_texture_swizzle", o(EXT_texture_swizzle), GL },
{ "GL_EXT_texture_type_2_10_10_10_REV", o(dummy_true), ES2 },
{ "GL_EXT_timer_query", o(EXT_timer_query), GL },
@@ -488,6 +489,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.EXT_texture_lod_bias = GL_TRUE;
#if FEATURE_EXT_texture_sRGB
ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
ctx->Extensions.EXT_texture_sRGB_decode = GL_TRUE;
#endif
ctx->Extensions.EXT_texture_swizzle = GL_TRUE;
#if FEATURE_EXT_transform_feedback