summaryrefslogtreecommitdiff
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-09-30 15:39:43 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-09-30 15:39:43 +0000
commitba467e86fe2a6f6e34221e5f3f718f9c708df1b4 (patch)
treee951d3432119968e351161b06160b022c69d6315 /src/mesa/swrast
parent6a2ca962db23f6affb4b93458211849db5a73044 (diff)
set span.y prior to each span write in draw_depth_pixels, like Karl's other fix
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_drawpix.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 141054c2f6..205022a89d 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.1
+ * Version: 6.2
*
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
@@ -659,17 +659,17 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
&& ctx->Visual.rgbMode
&& width <= MAX_WIDTH) {
/* Special case: directly write 16-bit depth values */
- GLint row;
- span.x = x;
- span.y = y;
- span.end = width;
- for (row = 0; row < height; row++, span.y++) {
+ GLint row, spanY = y;
+ for (row = 0; row < height; row++, spanY++) {
const GLushort *zSrc = (const GLushort *)
_mesa_image_address(unpack, pixels, width, height,
GL_DEPTH_COMPONENT, type, 0, row, 0);
GLint i;
for (i = 0; i < width; i++)
span.array->z[i] = zSrc[i];
+ span.x = x;
+ span.y = spanY;
+ span.end = width;
_swrast_write_rgba_span(ctx, &span);
}
}
@@ -681,11 +681,8 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
&& width <= MAX_WIDTH) {
/* Special case: shift 32-bit values down to ctx->Visual.depthBits */
const GLint shift = 32 - ctx->Visual.depthBits;
- GLint row;
- span.x = x;
- span.y = y;
- span.end = width;
- for (row = 0; row < height; row++, span.y++) {
+ GLint row, spanY = y;
+ for (row = 0; row < height; row++, spanY++) {
const GLuint *zSrc = (const GLuint *)
_mesa_image_address(unpack, pixels, width, height,
GL_DEPTH_COMPONENT, type, 0, row, 0);
@@ -697,6 +694,9 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
for (col = 0; col < width; col++)
span.array->z[col] = zSrc[col] >> shift;
}
+ span.x = x;
+ span.y = spanY;
+ span.end = width;
_swrast_write_rgba_span(ctx, &span);
}
}