From a971476cc7913edde1944f33f164cd507199e1dd Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 27 Aug 2012 09:31:18 -0600 Subject: [PATCH] st/mesa: use fallback path for glCopyTexSubImage(GL_TEXTURE_1D_ARRAY) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes many failing cases in piglit copyteximage test. Reviewed-by: José Fonseca --- src/mesa/state_tracker/st_cb_texture.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 3de96adf3ed..ed3bbc72584 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -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) { -- 2.30.2