summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Haag <haagch@frickel.club>2017-08-20 01:59:43 +0200
committerIlia Mirkin <imirkin@alum.mit.edu>2017-08-20 17:01:48 -0400
commit87556a650ad363b41d86f4e25d5c4696f9af4550 (patch)
tree8fe9e44667d034320a66357ce3f0a7197afd11bf
parentf24cf82d6db290a88abfff0669d2c5e2aa463901 (diff)
mesa: only copy requested compressed teximage cubemap faces
This is analogous to commit 2259b11 which only fixed the regular case Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102308 Signed-off-by: Christoph Haag <haagch+mesadev@frickel.club> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: mesa-stable@lists.freedesktop.org
-rw-r--r--src/mesa/main/teximage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 7bcd734204c..e5dc469437f 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -4968,13 +4968,13 @@ compressed_tex_sub_image(unsigned dim, GLenum target, GLuint texture,
}
/* Copy in each face. */
- for (int i = 0; i < 6; ++i) {
+ for (int i = zoffset; i < zoffset + depth; ++i) {
texImage = texObj->Image[i][level];
assert(texImage);
compressed_texture_sub_image(ctx, 3, texObj, texImage,
texObj->Target, level, xoffset, yoffset,
- zoffset, width, height, 1, format,
+ 0, width, height, 1, format,
imageSize, pixels);
/* Compressed images don't have a client format */