Similarly to how we handle this in texstore, we have to remap height
to depth so that we MapTextureImage each image layer individually.
Fixes part of Intel oglconform's int-textures advanced.fbo.rtt
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Brian Paul <brianp@vmware.com>
const gl_format texFormat =
_mesa_get_srgb_format_linear(texImage->TexFormat);
const GLuint width = texImage->Width;
- const GLuint height = texImage->Height;
- const GLuint depth = texImage->Depth;
+ GLuint height = texImage->Height;
+ GLuint depth = texImage->Depth;
GLuint img, row;
GLfloat (*rgba)[4];
GLuint (*rgba_uint)[4];
return;
}
+ if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) {
+ depth = height;
+ height = 1;
+ }
+
for (img = 0; img < depth; img++) {
GLubyte *srcMap;
GLint rowstride;