OSDN Git Service

mesa: only copy the requested teximage faces
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 27 Aug 2015 19:28:24 +0000 (15:28 -0400)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 31 Aug 2015 12:16:22 +0000 (13:16 +0100)
commit896ef5cb95557fbf68c75600d2bcbb01f8933b98
tree5a364d786704b1a3e67c6ca8c45f16f8fdc376b8
parent594388e5776312c1bdc9d5613369ed530bb7fbbc
mesa: only copy the requested teximage faces

Cube maps are special in that they have separate teximages for each
face. We handled that by copying the data to them separately, but in
case zoffset != 0 or depth != 6 we would read off the end of the client
array or modify the wrong images.

zoffset/depth have already been verified by the time the code gets to
this stage, so no need to double-check.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 2259b111003f2e8c55cae42677ec45345fb1b6e3)
src/mesa/main/teximage.c