Author: akhaldi Date: Sun Sep 7 11:52:18 2014 New Revision: 64057
URL: http://svn.reactos.org/svn/reactos?rev=64057&view=rev Log: [OPENGL32/MESA] * Zap unused nonlinear_to_linear(). CORE-7499
Modified: trunk/reactos/dll/opengl/mesa/main/format_unpack.c
Modified: trunk/reactos/dll/opengl/mesa/main/format_unpack.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/format... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/format_unpack.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/format_unpack.c [iso-8859-1] Sun Sep 7 11:52:18 2014 @@ -36,35 +36,6 @@ #define EXPAND_5_8(X) ( ((X) << 3) | ((X) >> 2) )
#define EXPAND_6_8(X) ( ((X) << 2) | ((X) >> 4) ) - - -/** - * Convert an 8-bit sRGB value from non-linear space to a - * linear RGB value in [0, 1]. - * Implemented with a 256-entry lookup table. - */ -static inline GLfloat -nonlinear_to_linear(GLubyte cs8) -{ - static GLfloat table[256]; - static GLboolean tableReady = GL_FALSE; - if (!tableReady) { - /* compute lookup table now */ - GLuint i; - for (i = 0; i < 256; i++) { - const GLfloat cs = UBYTE_TO_FLOAT(i); - if (cs <= 0.04045) { - table[i] = cs / 12.92f; - } - else { - table[i] = (GLfloat) pow((cs + 0.055) / 1.055, 2.4); - } - } - tableReady = GL_TRUE; - } - return table[cs8]; -} -
/**********************************************************************/ /* Unpack, returning GLfloat colors */