mesa: initialize stencilMap, Stride if stencilRb==depthRb
authorBrian Paul <brianp@vmware.com>
Wed, 16 Nov 2011 16:58:45 +0000 (09:58 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 16 Nov 2011 21:16:29 +0000 (14:16 -0700)
src/mesa/main/readpix.c

index 0b41de622241e28a83203655056feea66fe2d597..86b87534d31540c59d8bc3dabaf50ef784fdda12 100644 (file)
@@ -412,6 +412,10 @@ slow_read_depth_stencil_pixels_separate(struct gl_context *ctx,
                                   GL_MAP_READ_BIT, &stencilMap,
                                   &stencilStride);
    }
+   else {
+      stencilMap = depthMap;
+      stencilStride = depthStride;
+   }
 
    for (j = 0; j < height; j++) {
       GLubyte stencilVals[MAX_WIDTH];