summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_drawpix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast/s_drawpix.c')
-rw-r--r--src/mesa/swrast/s_drawpix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 5050ad92c23..c5466ddbd72 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -513,6 +513,7 @@ fast_draw_depth_stencil(struct gl_context *ctx, GLint x, GLint y,
const GLenum type = GL_UNSIGNED_INT_24_8;
struct gl_renderbuffer *rb =
ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer;
+ struct swrast_renderbuffer *srb = swrast_renderbuffer(rb);
GLubyte *src, *dst;
GLint srcRowStride, dstRowStride;
GLint i;
@@ -522,7 +523,7 @@ fast_draw_depth_stencil(struct gl_context *ctx, GLint x, GLint y,
srcRowStride = _mesa_image_row_stride(unpack, width, format, type);
dst = _swrast_pixel_address(rb, x, y);
- dstRowStride = rb->RowStrideBytes;
+ dstRowStride = srb->RowStride;
for (i = 0; i < height; i++) {
_mesa_pack_uint_24_8_depth_stencil_row(rb->Format, width,