mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
fixed stride problem in read_R5G6B5_span
This commit is contained in:
parent
43d8e2123f
commit
ff3e00320e
1 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue