mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
st/readpixels: fix accel path for skipimages.
We don't need to use the 3d image address here as that will
include SKIP_IMAGES, and we are only blitting a single
2D anyways, so just use the 2D path.
This fixes some memory overruns under CTS
packed_pixels.packed_pixels_pixelstore when PACK_SKIP_IMAGES
is used.
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 6a3e1fb958)
This commit is contained in:
parent
71fa292d48
commit
65cc30d728
1 changed files with 2 additions and 2 deletions
|
|
@ -210,9 +210,9 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y,
|
|||
GLuint row;
|
||||
|
||||
for (row = 0; row < (unsigned) height; row++) {
|
||||
GLvoid *dest = _mesa_image_address3d(pack, pixels,
|
||||
GLvoid *dest = _mesa_image_address2d(pack, pixels,
|
||||
width, height, format,
|
||||
type, 0, row, 0);
|
||||
type, row, 0);
|
||||
memcpy(dest, map, bytesPerRow);
|
||||
map += tex_xfer->stride;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue