Mesa (master): copyteximage: Use Driver' s AllocTextureImageBuffer instead of TexImage
Jordan Justen
jljusten at kemper.freedesktop.org
Tue Jan 15 07:24:43 UTC 2013
Module: Mesa
Branch: master
Commit: ba34c1d5703f873e2f69fb1cca747f02ffba2ec9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba34c1d5703f873e2f69fb1cca747f02ffba2ec9
Author: Jordan Justen <jordan.l.justen at intel.com>
Date: Sat Jan 12 14:56:49 2013 -0800
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 at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/main/teximage.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index d62fea6..5e451e2 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)) {
More information about the mesa-commit
mailing list