copyteximage: Use Driver's AllocTextureImageBuffer instead of TexImage
authorJordan Justen <jordan.l.justen@intel.com>
Sat, 12 Jan 2013 22:56:49 +0000 (14:56 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Tue, 15 Jan 2013 04:50:31 +0000 (20:50 -0800)
commitba34c1d5703f873e2f69fb1cca747f02ffba2ec9
tree5b5a9fa6b55fa289716128367a5c44ae48babc90
parent91ec623bd264a72579f438b18c8577764d346462
copyteximage: Use Driver's AllocTextureImageBuffer instead of TexImage

Call Driver.AllocTextureImageBuffer rather than calling
Driver.TexImage with NULL data, format=GL_NONE and type=GL_NONE.

This avoids setting ctx->Unpack, which can lead to incorrectly
trying to upload data.

The GLES3 GTF program's packed_pixels_pbo test was triggering
an error for i965 with the previous code.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/teximage.c