return;
}
- if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) {
- depth = height;
- height = 1;
- }
-
- assert(zoffset + depth <= texImage->Depth);
for (img = 0; img < depth; img++) {
GLubyte *srcMap;
GLint srcRowStride;
assert(type == GL_UNSIGNED_INT_24_8 ||
type == GL_FLOAT_32_UNSIGNED_INT_24_8_REV);
- assert(zoffset + depth <= texImage->Depth);
for (img = 0; img < depth; img++) {
GLubyte *srcMap;
GLint rowstride;
{
GLint img, row;
- assert(zoffset + depth <= texImage->Depth);
for (img = 0; img < depth; img++) {
GLubyte *srcMap;
GLint rowstride;
bool needsRebase;
void *rgba = NULL;
- if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) {
- depth = height;
- height = 1;
- zoffset = yoffset;
- yoffset = 0;
- }
-
/* Depending on the base format involved we may need to apply a rebase
* transform (for example: if we download to a Luminance format we want
* G=0 and B=0).
pixels = ADD_POINTERS(buf, pixels);
}
+ /* for all array textures, the Z axis selects the layer */
+ if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) {
+ depth = height;
+ height = 1;
+ zoffset = yoffset;
+ yoffset = 0;
+ assert(zoffset + depth <= texImage->Height);
+ } else {
+ assert(zoffset + depth <= texImage->Depth);
+ }
+
if (get_tex_memcpy(ctx, xoffset, yoffset, zoffset, width, height, depth,
format, type, pixels, texImage)) {
/* all done */