diff options
author | Maciej Cencora <m.cencora@gmail.com> | 2009-06-12 19:08:44 +0200 |
---|---|---|
committer | Maciej Cencora <m.cencora@gmail.com> | 2009-06-12 19:08:44 +0200 |
commit | 41091087396f935d4acf70b018ba54889fcf55a1 (patch) | |
tree | 139b2c1892f1e8fff6d35bb35625df1f610c7647 /src/mesa/drivers/dri/radeon | |
parent | d0b0df380ac6a9b421dc63531a180b3fd3017621 (diff) |
r300: add support for EXT_texture_sRGB
Tested with glean/texture_srgb and wine/d3d9 tests on RV535
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texture.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 0d87f152e9..3fc750c005 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -477,6 +477,26 @@ const struct gl_texture_format *radeonChooseTextureFormat(GLcontext * ctx, case GL_DEPTH_STENCIL_EXT: case GL_DEPTH24_STENCIL8_EXT: return &_mesa_texformat_s8_z24; + + /* EXT_texture_sRGB */ + case GL_SRGB: + case GL_SRGB8: + case GL_SRGB_ALPHA: + case GL_SRGB8_ALPHA8: + case GL_COMPRESSED_SRGB: + case GL_COMPRESSED_SRGB_ALPHA: + return &_mesa_texformat_srgba8; + + case GL_SLUMINANCE: + case GL_SLUMINANCE8: + case GL_COMPRESSED_SLUMINANCE: + return &_mesa_texformat_sl8; + + case GL_SLUMINANCE_ALPHA: + case GL_SLUMINANCE8_ALPHA8: + case GL_COMPRESSED_SLUMINANCE_ALPHA: + return &_mesa_texformat_sla8; + default: _mesa_problem(ctx, "unexpected internalFormat 0x%x in %s", |