From: Jordan Justen Date: Sat, 12 Jan 2013 22:56:49 +0000 (-0800) Subject: copyteximage: Use Driver's AllocTextureImageBuffer instead of TexImage X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba34c1d5703f873e2f69fb1cca747f02ffba2ec9;p=mesa.git 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 Reviewed-by: Eric Anholt Reviewed-by: Ian Romanick --- diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index d62fea6e4f5..5e451e235d4 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -3365,9 +3365,7 @@ copyteximage(struct gl_context *ctx, GLuint dims, border, internalFormat, texFormat); /* Allocate texture memory (no pixel data yet) */ - ctx->Driver.TexImage(ctx, dims, texImage, - GL_NONE, GL_NONE, - NULL, &ctx->Unpack); + ctx->Driver.AllocTextureImageBuffer(ctx, texImage); if (_mesa_clip_copytexsubimage(ctx, &dstX, &dstY, &srcX, &srcY, &width, &height)) {