mesa: Hide weirdness of 1D_ARRAY textures from Driver.CopyTexSubImage().
authorEric Anholt <eric@anholt.net>
Mon, 3 Jun 2013 22:12:49 +0000 (15:12 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 17 Jun 2013 22:26:20 +0000 (15:26 -0700)
commitb65b1c3148ad7ebaaca422bc572dead0864dcd6a
tree8812998b539c593f38d2f71b1a296a5882132832
parent9e8400f4c95bde1f955c7977066583b507159a10
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 <brianp@vmware.com> (v1)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
Reviewed-by: Paul Berry <stereotype441@gmail.com> (v1)
src/mesa/drivers/common/meta.c
src/mesa/drivers/common/meta.h
src/mesa/drivers/dri/intel/intel_tex_copy.c
src/mesa/drivers/dri/radeon/radeon_tex_copy.c
src/mesa/main/dd.h
src/mesa/main/teximage.c
src/mesa/state_tracker/st_cb_texture.c