summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/api_arrayelt.c16
-rw-r--r--src/mesa/main/attrib.c32
-rw-r--r--src/mesa/main/framebuffer.c3
-rw-r--r--src/mesa/main/glheader.h54
-rw-r--r--src/mesa/main/image.c55
-rw-r--r--src/mesa/main/imports.c5
-rw-r--r--src/mesa/main/imports.h6
-rw-r--r--src/mesa/main/macros.h3
-rw-r--r--src/mesa/main/pixel.c20
-rw-r--r--src/mesa/main/version.h6
10 files changed, 117 insertions, 83 deletions
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index 41adc1d1d29..bfba2b657e7 100644
--- a/src/mesa/main/api_arrayelt.c
+++ b/src/mesa/main/api_arrayelt.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.4.1
*
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -773,17 +773,17 @@ void GLAPIENTRY _ae_loopback_array_elt( GLint elt )
/* generic attributes */
for (at = actx->attribs; at->func; at++) {
- const GLubyte *src = at->array->BufferObj->Data
- + (uintptr_t) at->array->Ptr
- + elt * at->array->StrideB;
+ const GLubyte *src
+ = ADD_POINTERS(at->array->BufferObj->Data, at->array->Ptr)
+ + elt * at->array->StrideB;
at->func( at->index, src );
}
/* conventional arrays */
for (aa = actx->arrays; aa->offset != -1 ; aa++) {
- const GLubyte *src = aa->array->BufferObj->Data
- + (uintptr_t) aa->array->Ptr
- + elt * aa->array->StrideB;
+ const GLubyte *src
+ = ADD_POINTERS(aa->array->BufferObj->Data, aa->array->Ptr)
+ + elt * aa->array->StrideB;
CALL_by_offset( disp, (array_func), aa->offset,
((const void *) src) );
}
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 28456942cba..4f8b6c2d618 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.4.1
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
@@ -618,18 +618,18 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib)
_mesa_ActiveTextureARB(GL_TEXTURE0_ARB + u);
_mesa_set_enable(ctx, GL_TEXTURE_1D,
- (GLboolean) (unit->Enabled & TEXTURE_1D_BIT ? GL_TRUE : GL_FALSE));
+ (unit->Enabled & TEXTURE_1D_BIT) ? GL_TRUE : GL_FALSE);
_mesa_set_enable(ctx, GL_TEXTURE_2D,
- (GLboolean) (unit->Enabled & TEXTURE_2D_BIT ? GL_TRUE : GL_FALSE));
+ (unit->Enabled & TEXTURE_2D_BIT) ? GL_TRUE : GL_FALSE);
_mesa_set_enable(ctx, GL_TEXTURE_3D,
- (GLboolean) (unit->Enabled & TEXTURE_3D_BIT ? GL_TRUE : GL_FALSE));
+ (unit->Enabled & TEXTURE_3D_BIT) ? GL_TRUE : GL_FALSE);
if (ctx->Extensions.ARB_texture_cube_map) {
_mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP_ARB,
- (GLboolean) (unit->Enabled & TEXTURE_CUBE_BIT ? GL_TRUE : GL_FALSE));
+ (unit->Enabled & TEXTURE_CUBE_BIT) ? GL_TRUE : GL_FALSE);
}
if (ctx->Extensions.NV_texture_rectangle) {
_mesa_set_enable(ctx, GL_TEXTURE_RECTANGLE_NV,
- (GLboolean) (unit->Enabled & TEXTURE_RECT_BIT ? GL_TRUE : GL_FALSE));
+ (unit->Enabled & TEXTURE_RECT_BIT) ? GL_TRUE : GL_FALSE);
}
if (ctx->Extensions.SGI_texture_color_table) {
_mesa_set_enable(ctx, GL_TEXTURE_COLOR_TABLE_SGI,
@@ -645,10 +645,20 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib)
_mesa_TexGenfv(GL_T, GL_OBJECT_PLANE, unit->ObjectPlaneT);
_mesa_TexGenfv(GL_R, GL_OBJECT_PLANE, unit->ObjectPlaneR);
_mesa_TexGenfv(GL_Q, GL_OBJECT_PLANE, unit->ObjectPlaneQ);
- _mesa_TexGenfv(GL_S, GL_EYE_PLANE, unit->EyePlaneS);
- _mesa_TexGenfv(GL_T, GL_EYE_PLANE, unit->EyePlaneT);
- _mesa_TexGenfv(GL_R, GL_EYE_PLANE, unit->EyePlaneR);
- _mesa_TexGenfv(GL_Q, GL_EYE_PLANE, unit->EyePlaneQ);
+ /* Eye plane done differently to avoid re-transformation */
+ {
+ struct gl_texture_unit *destUnit = &ctx->Texture.Unit[u];
+ COPY_4FV(destUnit->EyePlaneS, unit->EyePlaneS);
+ COPY_4FV(destUnit->EyePlaneT, unit->EyePlaneT);
+ COPY_4FV(destUnit->EyePlaneR, unit->EyePlaneR);
+ COPY_4FV(destUnit->EyePlaneQ, unit->EyePlaneQ);
+ if (ctx->Driver.TexGen) {
+ ctx->Driver.TexGen(ctx, GL_S, GL_EYE_PLANE, unit->EyePlaneS);
+ ctx->Driver.TexGen(ctx, GL_T, GL_EYE_PLANE, unit->EyePlaneT);
+ ctx->Driver.TexGen(ctx, GL_R, GL_EYE_PLANE, unit->EyePlaneR);
+ ctx->Driver.TexGen(ctx, GL_Q, GL_EYE_PLANE, unit->EyePlaneQ);
+ }
+ }
_mesa_set_enable(ctx, GL_TEXTURE_GEN_S,
((unit->TexGenEnabled & S_BIT) ? GL_TRUE : GL_FALSE));
_mesa_set_enable(ctx, GL_TEXTURE_GEN_T,
@@ -958,7 +968,7 @@ _mesa_PopAttrib(void)
_mesa_Lightfv( lgt, GL_SPECULAR, l->Specular );
TRANSFORM_POINT( tmp, ctx->ModelviewMatrixStack.Top->inv, l->EyePosition );
_mesa_Lightfv( lgt, GL_POSITION, tmp );
- TRANSFORM_POINT( tmp, ctx->ModelviewMatrixStack.Top->m, l->EyeDirection );
+ TRANSFORM_NORMAL( tmp, l->EyeDirection, ctx->ModelviewMatrixStack.Top->m );
_mesa_Lightfv( lgt, GL_SPOT_DIRECTION, tmp );
_mesa_Lightfv( lgt, GL_SPOT_EXPONENT, &l->SpotExponent );
_mesa_Lightfv( lgt, GL_SPOT_CUTOFF, &l->SpotCutoff );
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index c3c9ca5ed2a..de44d1a8589 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -309,7 +309,8 @@ _mesa_resize_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb,
fb->Height = height;
/* to update scissor / window bounds */
- ctx->NewState |= _NEW_BUFFERS;
+ if (ctx)
+ ctx->NewState |= _NEW_BUFFERS;
}
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index ee34076fb74..90b3a81a4e7 100644
--- a/src/mesa/main/glheader.h
+++ b/src/mesa/main/glheader.h
@@ -20,7 +20,7 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.4.1
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
@@ -69,18 +69,16 @@
#include <float.h>
#include <stdarg.h>
-
/* Get typedefs for uintptr_t and friends */
-#if defined(_WIN32)
-#include <BaseTsd.h>
-#if _MSC_VER == 1200
-typedef UINT_PTR uintptr_t;
-#endif
-#if defined(__MINGW32__)
-#include <stdint.h>
-#endif
+#if defined(__MINGW32__) || defined(__NetBSD__)
+# include <stdint.h>
+#elif defined(_WIN32)
+# include <BaseTsd.h>
+# if _MSC_VER == 1200
+ typedef UINT_PTR uintptr_t;
+# endif
#else
-#include <inttypes.h>
+# include <inttypes.h>
#endif
#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP)
@@ -268,14 +266,34 @@ typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESC
#endif
/* Windows does not have the ffs() function */
-#if defined(_WIN32) && !defined(__MINGW32__)
-int INLINE ffs(int value)
+#if defined(_WIN32)
+static int INLINE
+ffs(register int value)
{
- int bit;
- if (value == 0)
- return 0;
- for (bit=1; !(value & 1); bit++)
- value >>= 1;
+ register int bit = 0;
+ if (value != 0)
+ {
+ if ((value & 0xffff) == 0)
+ {
+ bit += 16;
+ value >>= 16;
+ }
+ if ((value & 0xff) == 0)
+ {
+ bit += 8;
+ value >>= 8;
+ }
+ if ((value & 0xf) == 0)
+ {
+ bit += 4;
+ value >>= 4;
+ }
+ while ((value & 1) == 0)
+ {
+ bit++;
+ value >>= 1;
+ }
+ }
return bit;
}
#endif
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 12f8352c2d2..bd0c5ba1f85 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -1029,10 +1029,11 @@ _mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLuint transferOps,
-/*
+/**
* Used to pack an array [][4] of RGBA float colors as specified
* by the dstFormat, dstType and dstPacking. Used by glReadPixels,
* glGetConvolutionFilter(), etc.
+ * NOTE: it's assumed the incoming float colors are all in [0,1].
*/
void
_mesa_pack_rgba_span_float( GLcontext *ctx,
@@ -1237,66 +1238,66 @@ _mesa_pack_rgba_span_float( GLcontext *ctx,
switch (dstFormat) {
case GL_RED:
for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_USHORT(rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][RCOMP]);
break;
case GL_GREEN:
for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_USHORT(rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][GCOMP]);
break;
case GL_BLUE:
for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_USHORT(rgba[i][BCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][BCOMP]);
break;
case GL_ALPHA:
for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_USHORT(rgba[i][ACOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][ACOMP]);
break;
case GL_LUMINANCE:
for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_USHORT(luminance[i]);
+ UNCLAMPED_FLOAT_TO_USHORT(dst[i], luminance[i]);
break;
case GL_LUMINANCE_ALPHA:
for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_USHORT(luminance[i]);
- dst[i*2+1] = FLOAT_TO_USHORT(rgba[i][ACOMP]);
+ UNCLAMPED_FLOAT_TO_USHORT(dst[i*2+0], luminance[i]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*2+1], rgba[i][ACOMP]);
}
break;
case GL_RGB:
for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_USHORT(rgba[i][RCOMP]);
- dst[i*3+1] = FLOAT_TO_USHORT(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_USHORT(rgba[i][BCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+0], rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+1], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+2], rgba[i][BCOMP]);
}
break;
case GL_RGBA:
for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_USHORT(rgba[i][RCOMP]);
- dst[i*4+1] = FLOAT_TO_USHORT(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_USHORT(rgba[i][BCOMP]);
- dst[i*4+3] = FLOAT_TO_USHORT(rgba[i][ACOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][BCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][ACOMP]);
}
break;
case GL_BGR:
for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_USHORT(rgba[i][BCOMP]);
- dst[i*3+1] = FLOAT_TO_USHORT(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_USHORT(rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+0], rgba[i][BCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+1], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+2], rgba[i][RCOMP]);
}
break;
case GL_BGRA:
for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_USHORT(rgba[i][BCOMP]);
- dst[i*4+1] = FLOAT_TO_USHORT(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_USHORT(rgba[i][RCOMP]);
- dst[i*4+3] = FLOAT_TO_USHORT(rgba[i][ACOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][BCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][ACOMP]);
}
break;
case GL_ABGR_EXT:
for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_USHORT(rgba[i][ACOMP]);
- dst[i*4+1] = FLOAT_TO_USHORT(rgba[i][BCOMP]);
- dst[i*4+2] = FLOAT_TO_USHORT(rgba[i][GCOMP]);
- dst[i*4+3] = FLOAT_TO_USHORT(rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][ACOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][BCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][RCOMP]);
}
break;
default:
@@ -3954,7 +3955,7 @@ _mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest,
GLushort *dst = (GLushort *) dest;
GLuint i;
for (i = 0; i < n; i++) {
- dst[i] = FLOAT_TO_USHORT( depthSpan[i] );
+ CLAMPED_FLOAT_TO_USHORT(dst[i], depthSpan[i]);
}
if (dstPacking->SwapBytes) {
_mesa_swap2( (GLushort *) dst, n );
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index fec0d338448..9cdf4e347f7 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -32,7 +32,7 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.4.1
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
@@ -985,6 +985,9 @@ _mesa_error( GLcontext *ctx, GLenum error, const char *fmtString, ... )
case GL_TABLE_TOO_LARGE:
errstr = "GL_TABLE_TOO_LARGE";
break;
+ case GL_INVALID_FRAMEBUFFER_OPERATION_EXT:
+ errstr = "GL_INVALID_FRAMEBUFFER_OPERATION";
+ break;
default:
errstr = "unknown";
break;
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 2ee66d9ac9b..37e808fc489 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.4
+ * Version: 6.4.1
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
@@ -332,6 +332,7 @@ static INLINE int GET_FLOAT_BITS( float x )
*** CEILF: ceiling of float
*** FLOORF: floor of float
*** FABSF: absolute value of float
+ *** LOGF: the natural logarithm (base e) of the value
*** EXPF: raise e to the value
*** LDEXPF: multiply value by an integral power of two
*** FREXPF: extract mantissa and exponent from value
@@ -340,6 +341,7 @@ static INLINE int GET_FLOAT_BITS( float x )
#define CEILF(x) ((GLfloat) xf86ceil(x))
#define FLOORF(x) ((GLfloat) xf86floor(x))
#define FABSF(x) ((GLfloat) xf86fabs(x))
+#define LOGF(x) ((GLfloat) xf86log(x))
#define EXPF(x) ((GLfloat) xf86exp(x))
#define LDEXPF(x,y) ((GLfloat) xf86ldexp(x,y))
#define FREXPF(x,y) ((GLfloat) xf86frexp(x,y))
@@ -348,6 +350,7 @@ static INLINE int GET_FLOAT_BITS( float x )
#define CEILF(x) ceilf(x)
#define FLOORF(x) floorf(x)
#define FABSF(x) fabsf(x)
+#define LOGF(x) logf(x)
#define EXPF(x) expf(x)
#define LDEXPF(x,y) ldexpf(x,y)
#define FREXPF(x,y) frexpf(x,y)
@@ -355,6 +358,7 @@ static INLINE int GET_FLOAT_BITS( float x )
#define CEILF(x) ((GLfloat) ceil(x))
#define FLOORF(x) ((GLfloat) floor(x))
#define FABSF(x) ((GLfloat) fabs(x))
+#define LOGF(x) ((GLfloat) log(x))
#define EXPF(x) ((GLfloat) exp(x))
#define LDEXPF(x,y) ((GLfloat) ldexp(x,y))
#define FREXPF(x,y) ((GLfloat) frexp(x,y))
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index f13357d391b..a398dd812bd 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -57,9 +57,6 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256];
/** Convert GLushort in [0,65536] to GLfloat in [0.0,1.0] */
#define USHORT_TO_FLOAT(S) ((GLfloat) (S) * (1.0F / 65535.0F))
-/** Convert GLfloat in [0.0,1.0] to GLushort in [0,65536] */
-#define FLOAT_TO_USHORT(X) ((GLushort) (GLint) ((X) * 65535.0F))
-
/** Convert GLshort in [-32768,32767] to GLfloat in [-1.0,1.0] */
#define SHORT_TO_FLOAT(S) ((2.0F * (S) + 1.0F) * (1.0F/65535.0F))
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index e8912c70029..d2edd0ecb95 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -795,52 +795,52 @@ _mesa_GetPixelMapusv( GLenum map, GLushort *values )
switch (map) {
case GL_PIXEL_MAP_I_TO_I:
for (i = 0; i < mapsize; i++) {
- values[i] = FLOAT_TO_USHORT(ctx->Pixel.MapItoI[i]);
+ values[i] = (GLushort) CLAMP(ctx->Pixel.MapItoI[i], 0.0, 65535.0);
}
break;
case GL_PIXEL_MAP_S_TO_S:
for (i = 0; i < mapsize; i++) {
- values[i] = (GLushort) ctx->Pixel.MapStoS[i];
+ values[i] = (GLushort) CLAMP(ctx->Pixel.MapStoS[i], 0.0, 65535.0);
}
break;
case GL_PIXEL_MAP_I_TO_R:
for (i = 0; i < mapsize; i++) {
- values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapItoR[i] );
+ CLAMPED_FLOAT_TO_USHORT(values[i] , ctx->Pixel.MapItoR[i] );
}
break;
case GL_PIXEL_MAP_I_TO_G:
for (i = 0; i < mapsize; i++) {
- values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapItoG[i] );
+ CLAMPED_FLOAT_TO_USHORT(values[i] , ctx->Pixel.MapItoG[i] );
}
break;
case GL_PIXEL_MAP_I_TO_B:
for (i = 0; i < mapsize; i++) {
- values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapItoB[i] );
+ CLAMPED_FLOAT_TO_USHORT(values[i] , ctx->Pixel.MapItoB[i] );
}
break;
case GL_PIXEL_MAP_I_TO_A:
for (i = 0; i < mapsize; i++) {
- values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapItoA[i] );
+ CLAMPED_FLOAT_TO_USHORT(values[i] , ctx->Pixel.MapItoA[i] );
}
break;
case GL_PIXEL_MAP_R_TO_R:
for (i = 0; i < mapsize; i++) {
- values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapRtoR[i] );
+ CLAMPED_FLOAT_TO_USHORT(values[i] , ctx->Pixel.MapRtoR[i] );
}
break;
case GL_PIXEL_MAP_G_TO_G:
for (i = 0; i < mapsize; i++) {
- values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapGtoG[i] );
+ CLAMPED_FLOAT_TO_USHORT(values[i] , ctx->Pixel.MapGtoG[i] );
}
break;
case GL_PIXEL_MAP_B_TO_B:
for (i = 0; i < mapsize; i++) {
- values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapBtoB[i] );
+ CLAMPED_FLOAT_TO_USHORT(values[i] , ctx->Pixel.MapBtoB[i] );
}
break;
case GL_PIXEL_MAP_A_TO_A:
for (i = 0; i < mapsize; i++) {
- values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapAtoA[i] );
+ CLAMPED_FLOAT_TO_USHORT(values[i] , ctx->Pixel.MapAtoA[i] );
}
break;
default:
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index f2987b9f504..af20a0d0a8a 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.4
+ * Version: 6.4.1
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
@@ -30,8 +30,8 @@
/* Mesa version */
#define MESA_MAJOR 6
#define MESA_MINOR 4
-#define MESA_PATCH 0
-#define MESA_VERSION_STRING "6.4"
+#define MESA_PATCH 1
+#define MESA_VERSION_STRING "6.4.1"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))