diff options
author | Brian Paul <[email protected]> | 2000-02-25 14:59:46 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-02-25 14:59:46 +0000 |
commit | bb7e2e846cc9eb963a6d6101849952a8e5d770f7 (patch) | |
tree | 85c0792001b51b2fce6e9ec41f6e3784a77e4ce8 /src/mesa/drivers | |
parent | eaba005f189d73995fc13920e523d66e814f8326 (diff) |
fixed front/back buffer stride problem for XF86DRI
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/glide/fxdd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index 6fd6a1e69e1..bc1e55a5fff 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -446,8 +446,13 @@ static GLboolean fxDDDrawBitMap(GLcontext *ctx, GLint px, GLint py, { const GLint winX = fxMesa->x_offset; const GLint winY = fxMesa->y_offset + fxMesa->height - 1; + /* The dest stride depends on the hardware and whether we're drawing + * to the front or back buffer. This compile-time test seems to do + * the job for now. + */ #ifdef XF86DRI - const GLint dstStride = fxMesa->screen_width; + const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) + ? (fxMesa->screen_width) : (info.strideInBytes / 2); #else const GLint dstStride = info.strideInBytes / 2; /* stride in GLushorts */ #endif |