summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-04-11 03:06:07 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-04-11 03:06:07 +0000
commitff3e00320e3d9a9a047dd8516ae92cadaa1e21fc (patch)
treeb73eaaeb099eecdac5ea927ba2f715f176df37fb /src/mesa/drivers
parent43d8e2123f32c8d07f33f4a86f44951bb221837c (diff)
fixed stride problem in read_R5G6B5_span
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/glide/fxddspan.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/glide/fxddspan.c b/src/mesa/drivers/glide/fxddspan.c
index 8939b1eea6..c6fcb2ea2e 100644
--- a/src/mesa/drivers/glide/fxddspan.c
+++ b/src/mesa/drivers/glide/fxddspan.c
@@ -370,10 +370,14 @@ static void read_R5G6B5_span(const GLcontext *ctx,
&info)) {
const GLint winX = fxMesa->x_offset;
const GLint winY = fxMesa->y_offset + fxMesa->height - 1;
- const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT)
+#ifdef XF86DRI
+ const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT)
? (fxMesa->screen_width) : (info.strideInBytes / 2);
+#else
+ const GLint srcStride = info.strideInBytes / 2; /* stride in GLushorts */
+#endif
const GLushort *data16 = (const GLushort *) info.lfbPtr
- + (winY - y) * dstStride
+ + (winY - y) * srcStride
+ (winX + x);
const GLuint *data32 = (const GLuint *) data16;
GLuint i, j;