summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_drawpix.c
diff options
context:
space:
mode:
authorKarl Schultz <[email protected]>2004-09-28 18:53:44 +0000
committerKarl Schultz <[email protected]>2004-09-28 18:53:44 +0000
commitfa569c0a73576d3cca7cd1d0363064be099a6a22 (patch)
treeadf1a57fd7e8d2df7da8421969c891e0eeb69036 /src/mesa/swrast/s_drawpix.c
parentf30d53e0498a558100a1b9d9651ff375a7b3c7b4 (diff)
Fix bug in glDrawPixels when writing color indexed images on color indexed
devices. In draw_index_pixels(), use the correct variables for the span Y and span end values.
Diffstat (limited to 'src/mesa/swrast/s_drawpix.c')
-rw-r--r--src/mesa/swrast/s_drawpix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 510261f7199..141054c2f66 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -521,12 +521,12 @@ draw_index_pixels( GLcontext *ctx, GLint x, GLint y,
const GLint spanEnd = (width - skipPixels > MAX_WIDTH)
? MAX_WIDTH : (width - skipPixels);
ASSERT(spanEnd <= MAX_WIDTH);
- for (row = 0; row < height; row++, span.y++) {
+ for (row = 0; row < height; row++, spanY++) {
const GLvoid *source = _mesa_image_address(unpack, pixels,
width, height,
GL_COLOR_INDEX, type,
0, row, skipPixels);
- _mesa_unpack_index_span(ctx, span.end, GL_UNSIGNED_INT,
+ _mesa_unpack_index_span(ctx, spanEnd, GL_UNSIGNED_INT,
span.array->index, type, source, unpack,
ctx->_ImageTransferState);