From 9c17f511266fff48a936633de280f271f0ce0c11 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 18 Mar 2013 16:33:08 +0100 Subject: libX11 mesa git update 18 Mar 2013 libX11 commit f49bb2dd6d4ea45c55bd21acc0efe2b764441020 mesa commit 2da8ee16a8b126d15f34552916c77b203be326db --- mesalib/src/mesa/main/teximage.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'mesalib/src/mesa/main/teximage.c') diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index 7d996da47..4042e7969 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -3495,19 +3495,21 @@ copyteximage(struct gl_context *ctx, GLuint dims, _mesa_init_teximage_fields(ctx, texImage, width, height, 1, border, internalFormat, texFormat); - /* Allocate texture memory (no pixel data yet) */ - ctx->Driver.AllocTextureImageBuffer(ctx, texImage); + if (width && height) { + /* Allocate texture memory (no pixel data yet) */ + ctx->Driver.AllocTextureImageBuffer(ctx, texImage); - if (_mesa_clip_copytexsubimage(ctx, &dstX, &dstY, &srcX, &srcY, - &width, &height)) { - struct gl_renderbuffer *srcRb = - get_copy_tex_image_source(ctx, texImage->TexFormat); + if (_mesa_clip_copytexsubimage(ctx, &dstX, &dstY, &srcX, &srcY, + &width, &height)) { + struct gl_renderbuffer *srcRb = + get_copy_tex_image_source(ctx, texImage->TexFormat); - ctx->Driver.CopyTexSubImage(ctx, dims, texImage, dstX, dstY, dstZ, - srcRb, srcX, srcY, width, height); - } + ctx->Driver.CopyTexSubImage(ctx, dims, texImage, dstX, dstY, dstZ, + srcRb, srcX, srcY, width, height); + } - check_gen_mipmap(ctx, target, texObj, level); + check_gen_mipmap(ctx, target, texObj, level); + } _mesa_update_fbo_texture(ctx, texObj, face, level); -- cgit v1.2.3