summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/teximage.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 5516005a510..8d9d7cfc14d 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -4242,9 +4242,17 @@ _mesa_CopyTextureSubImage3D(GLuint texture, GLint level,
return;
}
- _mesa_copy_texture_sub_image(ctx, 3, texObj, texObj->Target, level,
- xoffset, yoffset, zoffset,
- x, y, width, height, self);
+ if (texObj->Target == GL_TEXTURE_CUBE_MAP) {
+ /* Act like CopyTexSubImage2D */
+ _mesa_copy_texture_sub_image(ctx, 2, texObj,
+ GL_TEXTURE_CUBE_MAP_POSITIVE_X + zoffset,
+ level, xoffset, yoffset, 0,
+ x, y, width, height, self);
+ }
+ else
+ _mesa_copy_texture_sub_image(ctx, 3, texObj, texObj->Target, level,
+ xoffset, yoffset, zoffset,
+ x, y, width, height, self);
}
static bool