aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_depth.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-02-27 07:24:18 +0100
committermarha <marha@users.sourceforge.net>2012-02-27 07:24:18 +0100
commitc4f44c07c6662d1ce08603945ccc4fa5afaa742a (patch)
tree5daa31bcbf8c90e74d99d679611a2d44f3ccede1 /mesalib/src/mesa/swrast/s_depth.c
parent5fb4fb602bde5140dcea45464e3b70a49078ad2e (diff)
downloadvcxsrv-c4f44c07c6662d1ce08603945ccc4fa5afaa742a.tar.gz
vcxsrv-c4f44c07c6662d1ce08603945ccc4fa5afaa742a.tar.bz2
vcxsrv-c4f44c07c6662d1ce08603945ccc4fa5afaa742a.zip
fontconfig pixman mesa git update 27 Feb 2012
Diffstat (limited to 'mesalib/src/mesa/swrast/s_depth.c')
-rw-r--r--mesalib/src/mesa/swrast/s_depth.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/mesalib/src/mesa/swrast/s_depth.c b/mesalib/src/mesa/swrast/s_depth.c
index c90388209..26126a932 100644
--- a/mesalib/src/mesa/swrast/s_depth.c
+++ b/mesalib/src/mesa/swrast/s_depth.c
@@ -419,9 +419,15 @@ _swrast_depth_bounds_test( struct gl_context *ctx, SWspan *span )
const GLuint count = span->end;
GLuint i;
GLboolean anyPass = GL_FALSE;
- GLuint zBufferTemp[MAX_WIDTH];
+ GLuint *zBufferTemp;
const GLuint *zBufferVals;
+ zBufferTemp = (GLuint *) malloc(count * sizeof(GLuint));
+ if (!zBufferTemp) {
+ /* don't generate a stream of OUT_OF_MEMORY errors here */
+ return GL_FALSE;
+ }
+
if (span->arrayMask & SPAN_XY)
zStart = NULL;
else
@@ -453,6 +459,8 @@ _swrast_depth_bounds_test( struct gl_context *ctx, SWspan *span )
}
}
+ free(zBufferTemp);
+
return anyPass;
}