diff options
-rw-r--r-- | xc/extras/Mesa/src/teximage.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/xc/extras/Mesa/src/teximage.c b/xc/extras/Mesa/src/teximage.c index ce750512d..176edb876 100644 --- a/xc/extras/Mesa/src/teximage.c +++ b/xc/extras/Mesa/src/teximage.c @@ -1536,11 +1536,11 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat, return; } } - else if (texImage->Data) { + else if (texImage->Data && !texImage->IsClientData) { /* free the old texture data */ MESA_PBUFFER_FREE(texImage->Data); - texImage->Data = NULL; } + texImage->Data = NULL; clear_teximage_fields(texImage); /* not really needed, but helpful */ _mesa_init_teximage_fields(ctx, target, texImage, postConvWidth, 1, 1, border, internalFormat); @@ -1663,11 +1663,11 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat, return; } } - else if (texImage->Data) { + else if (texImage->Data && !texImage->IsClientData) { /* free the old texture data */ MESA_PBUFFER_FREE(texImage->Data); - texImage->Data = NULL; } + texImage->Data = NULL; clear_teximage_fields(texImage); /* not really needed, but helpful */ _mesa_init_teximage_fields(ctx, target, texImage, postConvWidth, postConvHeight, @@ -1788,10 +1788,10 @@ _mesa_TexImage3D( GLenum target, GLint level, GLenum internalFormat, return; } } - else if (texImage->Data) { + else if (texImage->Data && !texImage->IsClientData) { MESA_PBUFFER_FREE(texImage->Data); - texImage->Data = NULL; } + texImage->Data = NULL; clear_teximage_fields(texImage); /* not really needed, but helpful */ _mesa_init_teximage_fields(ctx, target, texImage, width, height, depth, border, internalFormat); @@ -2057,11 +2057,11 @@ _mesa_CopyTexImage1D( GLenum target, GLint level, return; } } - else if (texImage->Data) { + else if (texImage->Data && !texImage->IsClientData) { /* free the old texture data */ MESA_PBUFFER_FREE(texImage->Data); - texImage->Data = NULL; } + texImage->Data = NULL; clear_teximage_fields(texImage); /* not really needed, but helpful */ _mesa_init_teximage_fields(ctx, target, texImage, postConvWidth, 1, 1, @@ -2121,11 +2121,11 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat, return; } } - else if (texImage->Data) { + else if (texImage->Data && !texImage->IsClientData) { /* free the old texture data */ MESA_PBUFFER_FREE(texImage->Data); - texImage->Data = NULL; } + texImage->Data = NULL; clear_teximage_fields(texImage); /* not really needed, but helpful */ _mesa_init_teximage_fields(ctx, target, texImage, @@ -2308,10 +2308,10 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level, return; } } - else if (texImage->Data) { + else if (texImage->Data && !texImage->IsClientData) { MESA_PBUFFER_FREE(texImage->Data); - texImage->Data = NULL; } + texImage->Data = NULL; _mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1, border, internalFormat); @@ -2409,10 +2409,10 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level, return; } } - else if (texImage->Data) { + else if (texImage->Data && !texImage->IsClientData) { MESA_PBUFFER_FREE(texImage->Data); - texImage->Data = NULL; } + texImage->Data = NULL; _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1, border, internalFormat); @@ -2507,10 +2507,10 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level, return; } } - else if (texImage->Data) { + else if (texImage->Data && !texImage->IsClientData) { MESA_PBUFFER_FREE(texImage->Data); - texImage->Data = NULL; } + texImage->Data = NULL; _mesa_init_teximage_fields(ctx, target, texImage, width, height, depth, border, internalFormat); |