From b65b1c3148ad7ebaaca422bc572dead0864dcd6a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 3 Jun 2013 15:12:49 -0700 Subject: mesa: Hide weirdness of 1D_ARRAY textures from Driver.CopyTexSubImage(). Intel had brokenness here, and I'd like to continue moving Mesa toward hiding 1D_ARRAY's ridiculousness inside of the core, like we did with MapTextureImage. Fixes copyteximage 1D_ARRAY on intel. There's still an impedance mismatch in meta when falling back to read and texsubimage, since texsubimage expects coordinates into 1D_ARRAY as (width, slice, 0) instead of (width, 0, slice). v2: Fix offset of scanline reads from the source. (Thanks Brian!), replace dd.h comment with Paul's text and replace early exit with an assert. Reviewed-by: Brian Paul (v1) Reviewed-by: Kenneth Graunke (v1) Reviewed-by: Paul Berry (v1) --- src/mesa/main/dd.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/dd.h') diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 6d564b25274..e2519780ab2 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -248,10 +248,16 @@ struct dd_function_table { /** * Called by glCopyTex[Sub]Image[123]D(). + * + * This function should copy a rectangular region in the rb to a single + * destination slice, specified by @slice. In the case of 1D array + * textures (where one GL call can potentially affect multiple destination + * slices), core mesa takes care of calling this function multiple times, + * once for each scanline to be copied. */ void (*CopyTexSubImage)(struct gl_context *ctx, GLuint dims, struct gl_texture_image *texImage, - GLint xoffset, GLint yoffset, GLint zoffset, + GLint xoffset, GLint yoffset, GLint slice, struct gl_renderbuffer *rb, GLint x, GLint y, GLsizei width, GLsizei height); -- cgit v1.2.3