[Mesa-dev] [PATCH v2 09/18] copyteximage: Use Driver's AllocTextureImageBuffer instead of TexImage

Jordan Justen jordan.l.justen at intel.com
Sat Jan 12 20:10:59 PST 2013


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

v2:
 * This replaces two i965 teximage changes in v1

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Cc: Eric Anholt <eric at anholt.net>
---
 src/mesa/main/teximage.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index ed52577..12c9caf 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3397,9 +3397,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)) {
-- 
1.7.10.4



More information about the mesa-dev mailing list