Initialize depth pointer correctly.
authorKeith Whitwell <keith@tungstengraphics.com>
Thu, 30 Dec 2004 16:05:07 +0000 (16:05 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Thu, 30 Dec 2004 16:05:07 +0000 (16:05 +0000)
src/mesa/drivers/dri/unichrome/via_span.c

index 07d20adc0f97b9b48ab7cf6c3ad1a34002589e40..253e80cddef8d12bebee146028ed90403234c7c2 100644 (file)
     __DRIdrawablePrivate *dPriv = vmesa->driDrawable;   \
     GLuint depth_pitch = vmesa->depth.pitch;                  \
     GLuint height = dPriv->h;                           \
-    char *buf = (char *)(vmesa->depth.map)   
+    char *buf = (char *)(vmesa->depth.map + (vmesa->drawXoff * vmesa->depth.bpp/8))
 
 #define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS