summaryrefslogtreecommitdiff
path: root/src/mesa/main/image.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-09-06 02:56:51 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-09-06 02:56:51 +0000
commitc0b4b9fc3e51c09a864fe5e3d439da95f8f0edc5 (patch)
treeadfd491565717a1fa1f4162e6873600e17f63167 /src/mesa/main/image.c
parente2399effa03a706d8f63fa9a27e985ca7e3dc3cd (diff)
remove DEFARRAY, CHECKARRAY stuff
Diffstat (limited to 'src/mesa/main/image.c')
-rw-r--r--src/mesa/main/image.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 12f8352c2d..93521a79bd 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5
*
- * 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"),
@@ -1049,18 +1049,14 @@ _mesa_pack_rgba_span_float( GLcontext *ctx,
if (transferOps) {
/* make copy of incoming data */
- DEFMARRAY(GLfloat, rgbaCopy, MAX_WIDTH, 4); /* mac 32k limitation */
- CHECKARRAY(rgbaCopy, return); /* mac 32k limitation */
-
+ GLfloat rgbaCopy[MAX_WIDTH][4];
_mesa_memcpy(rgbaCopy, rgbaIn, n * 4 * sizeof(GLfloat));
_mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgbaCopy);
rgba = (const GLfloat (*)[4]) rgbaCopy;
if ((transferOps & IMAGE_MIN_MAX_BIT) && ctx->MinMax.Sink) {
- UNDEFARRAY(rgbaCopy); /* mac 32k limitation */
return;
}
- UNDEFARRAY(rgbaCopy); /* mac 32k limitation */
}
else {
/* use incoming data, not a copy */
@@ -2020,9 +2016,7 @@ _mesa_pack_rgba_span_chan( GLcontext *ctx,
else {
/* general solution */
GLuint i;
- DEFMARRAY(GLfloat, rgba, MAX_WIDTH, 4); /* mac 32k limitation */
- CHECKARRAY(rgba, return); /* mac 32k limitation */
-
+ GLfloat rgba[MAX_WIDTH][4];
assert(n <= MAX_WIDTH);
/* convert color components to floating point */
for (i = 0; i < n; i++) {
@@ -2034,7 +2028,6 @@ _mesa_pack_rgba_span_chan( GLcontext *ctx,
_mesa_pack_rgba_span_float(ctx, n, (const GLfloat (*)[4]) rgba,
dstFormat, dstType, dstAddr,
dstPacking, transferOps);
- UNDEFARRAY(rgba); /* mac 32k limitation */
}
}
@@ -2943,8 +2936,7 @@ _mesa_unpack_color_span_chan( GLcontext *ctx,
GLint dstComponents;
GLint dstRedIndex, dstGreenIndex, dstBlueIndex, dstAlphaIndex;
GLint dstLuminanceIndex, dstIntensityIndex;
- DEFMARRAY(GLfloat, rgba, MAX_WIDTH, 4); /* mac 32k limitation */
- CHECKARRAY(rgba, return); /* mac 32k limitation */
+ GLfloat rgba[MAX_WIDTH][4];
dstComponents = _mesa_components_in_format( dstFormat );
/* source & dest image formats should have been error checked by now */
@@ -2973,7 +2965,6 @@ _mesa_unpack_color_span_chan( GLcontext *ctx,
for (i = 0; i < n; i++) {
dest[i] = (GLchan) (indexes[i] & 0xff);
}
- UNDEFARRAY(rgba); /* mac 32k limitation */
return;
}
else {
@@ -3041,7 +3032,6 @@ _mesa_unpack_color_span_chan( GLcontext *ctx,
break;
default:
_mesa_problem(ctx, "bad dstFormat in _mesa_unpack_chan_span()");
- UNDEFARRAY(rgba); /* mac 32k limitation */
return;
}
@@ -3105,7 +3095,6 @@ _mesa_unpack_color_span_chan( GLcontext *ctx,
dst += dstComponents;
}
}
- UNDEFARRAY(rgba); /* mac 32k limitation */
}
}
@@ -3171,8 +3160,7 @@ _mesa_unpack_color_span_float( GLcontext *ctx,
GLint dstComponents;
GLint dstRedIndex, dstGreenIndex, dstBlueIndex, dstAlphaIndex;
GLint dstLuminanceIndex, dstIntensityIndex;
- DEFMARRAY(GLfloat, rgba, MAX_WIDTH, 4); /* mac 32k limitation */
- CHECKARRAY(rgba, return); /* mac 32k limitation */
+ GLfloat rgba[MAX_WIDTH][4];
dstComponents = _mesa_components_in_format( dstFormat );
/* source & dest image formats should have been error checked by now */
@@ -3201,7 +3189,6 @@ _mesa_unpack_color_span_float( GLcontext *ctx,
for (i = 0; i < n; i++) {
dest[i] = (GLchan) (indexes[i] & 0xff);
}
- UNDEFARRAY(rgba); /* mac 32k limitation */
return;
}
else {
@@ -3264,7 +3251,6 @@ _mesa_unpack_color_span_float( GLcontext *ctx,
break;
default:
_mesa_problem(ctx, "bad dstFormat in _mesa_unpack_color_span_float()");
- UNDEFARRAY(rgba); /* mac 32k limitation */
return;
}
@@ -3326,7 +3312,6 @@ _mesa_unpack_color_span_float( GLcontext *ctx,
dst += dstComponents;
}
}
- UNDEFARRAY(rgba); /* mac 32k limitation */
}
}