[Mesa-dev] [PATCH] mesa: initialize stencilMap, Stride if stencilRb==depthRb

Brian Paul brianp at vmware.com
Wed Nov 16 08:59:06 PST 2011


---
 src/mesa/main/readpix.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 0b41de6..86b8753 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -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];
-- 
1.7.3.4



More information about the mesa-dev mailing list