st/mesa: use fallback path for glCopyTexSubImage(GL_TEXTURE_1D_ARRAY)
authorBrian Paul <brianp@vmware.com>
Mon, 27 Aug 2012 15:31:18 +0000 (09:31 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 27 Aug 2012 19:32:53 +0000 (13:32 -0600)
Fixes many failing cases in piglit copyteximage test.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/mesa/state_tracker/st_cb_texture.c

index 3de96ad..ed3bbc7 100644 (file)
@@ -989,6 +989,16 @@ st_CopyTexSubImage(struct gl_context *ctx, GLuint dims,
       goto fallback;
    }
 
+   if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) {
+      /* 1D arrays might be thought of as 2D images but the actual layout
+       * might not be that way.  At some points, we convert OpenGL's 1D
+       * array 'height' into gallium 'layers' and that prevents the blit
+       * utility code from doing the right thing.  Simpy use the memcpy-based
+       * fallback.
+       */
+      goto fallback;
+   }
+
    if (matching_base_formats &&
        src_format == dest_format &&
        !do_flip) {