Mesa (master): mesa: remove unneedded is_srgb_teximage() function
Brian Paul
brianp at kemper.freedesktop.org
Thu Oct 29 16:53:32 UTC 2009
Module: Mesa
Branch: master
Commit: cf7040594e7987c021903f022784e2c6dae2db36
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf7040594e7987c021903f022784e2c6dae2db36
Author: Brian Paul <brianp at vmware.com>
Date: Thu Oct 29 09:31:29 2009 -0600
mesa: remove unneedded is_srgb_teximage() function
Use _mesa_get_format_color_encoding() function instead.
---
src/mesa/main/texgetimage.c | 26 ++------------------------
1 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 1338d45..9a88ec9 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -45,29 +45,6 @@
#if FEATURE_EXT_texture_sRGB
/**
- * Test if given texture image is an sRGB format.
- */
-static GLboolean
-is_srgb_teximage(const struct gl_texture_image *texImage)
-{
- switch (texImage->TexFormat) {
- case MESA_FORMAT_SRGB8:
- case MESA_FORMAT_SRGBA8:
- case MESA_FORMAT_SARGB8:
- case MESA_FORMAT_SL8:
- case MESA_FORMAT_SLA8:
- case MESA_FORMAT_SRGB_DXT1:
- case MESA_FORMAT_SRGBA_DXT1:
- case MESA_FORMAT_SRGBA_DXT3:
- case MESA_FORMAT_SRGBA_DXT5:
- return GL_TRUE;
- default:
- return GL_FALSE;
- }
-}
-
-
-/**
* Convert a float value from linear space to a
* non-linear sRGB value in [0, 255].
* Not terribly efficient.
@@ -224,7 +201,8 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
}
}
#if FEATURE_EXT_texture_sRGB
- else if (is_srgb_teximage(texImage)) {
+ else if (_mesa_get_format_color_encoding(texImage->TexFormat)
+ == GL_SRGB) {
/* special case this since need to backconvert values */
/* convert row to RGBA format */
GLfloat rgba[MAX_WIDTH][4];
More information about the mesa-commit
mailing list