summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_depth.c
diff options
context:
space:
mode:
authorNicolai Hähnle <nhaehnle@gmail.com>2009-10-07 20:39:22 +0200
committerNicolai Hähnle <nhaehnle@gmail.com>2009-10-07 20:39:22 +0200
commit5b4c0b864a25fa193e7ba828cf5ce483ca05bd4e (patch)
treef462528c24889bee0665451e9e32664ecf2add3c /src/mesa/swrast/s_depth.c
parent3f5a316f36e2d376104640033c8bcefef3810ef4 (diff)
parent9fde81bb20bbfd2f8da80749cb84d890843a7bc2 (diff)
Merge branch 'mesa_7_6_branch'
Diffstat (limited to 'src/mesa/swrast/s_depth.c')
-rw-r--r--src/mesa/swrast/s_depth.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 1a428fb1a2..17e00dda4f 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -1238,6 +1238,7 @@ _swrast_read_depth_span_float( GLcontext *ctx, struct gl_renderbuffer *rb,
if (!rb) {
/* really only doing this to prevent FP exceptions later */
_mesa_bzero(depth, n * sizeof(GLfloat));
+ return;
}
ASSERT(rb->_BaseFormat == GL_DEPTH_COMPONENT);
@@ -1300,7 +1301,8 @@ _swrast_read_depth_span_uint( GLcontext *ctx, struct gl_renderbuffer *rb,
{
if (!rb) {
/* really only doing this to prevent FP exceptions later */
- _mesa_bzero(depth, n * sizeof(GLfloat));
+ _mesa_bzero(depth, n * sizeof(GLuint));
+ return;
}
ASSERT(rb->_BaseFormat == GL_DEPTH_COMPONENT);