mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 20:50:09 +01:00
swrast: remove MAX_WIDTH arrays in s_depth.c
This commit is contained in:
parent
837b55517e
commit
237b2fca7a
1 changed files with 9 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue