mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 21:30:23 +01:00
Use proper source row stride when getting depth/stencil texels.
This commit is contained in:
parent
ee8d182426
commit
b082e04619
1 changed files with 2 additions and 1 deletions
|
|
@ -159,6 +159,7 @@ get_tex_depth_stencil(struct gl_context *ctx, GLuint dimensions,
|
|||
const GLint width = texImage->Width;
|
||||
const GLint height = texImage->Height;
|
||||
const GLint depth = texImage->Depth;
|
||||
const GLint rowstride = texImage->RowStride;
|
||||
const GLuint *src = (const GLuint *) texImage->Data;
|
||||
GLint img, row;
|
||||
|
||||
|
|
@ -172,7 +173,7 @@ get_tex_depth_stencil(struct gl_context *ctx, GLuint dimensions,
|
|||
_mesa_swap4((GLuint *) dest, width);
|
||||
}
|
||||
|
||||
src += width * row + width * height * img;
|
||||
src += rowstride;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue