summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/mipmap.c3
-rw-r--r--src/mesa/main/teximage.c11
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c3
3 files changed, 5 insertions, 12 deletions
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 611f3755010..cf9d522f2f1 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -1948,8 +1948,7 @@ generate_mipmap_uncompressed(struct gl_context *ctx, GLenum target,
}
/* Free old image data */
- if (dstImage->Data)
- ctx->Driver.FreeTextureImageBuffer(ctx, dstImage);
+ ctx->Driver.FreeTextureImageBuffer(ctx, dstImage);
/* initialize new image */
_mesa_init_teximage_fields(ctx, target, dstImage, dstWidth, dstHeight,
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 8fdebad1940..886e52114f2 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2456,9 +2456,7 @@ teximage(struct gl_context *ctx, GLuint dims,
else {
gl_format texFormat;
- if (texImage->Data) {
- ctx->Driver.FreeTextureImageBuffer( ctx, texImage );
- }
+ ctx->Driver.FreeTextureImageBuffer(ctx, texImage);
ASSERT(texImage->Data == NULL);
texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
@@ -2597,8 +2595,7 @@ _mesa_EGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image)
if (!texImage) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glEGLImageTargetTexture2D");
} else {
- if (texImage->Data)
- ctx->Driver.FreeTextureImageBuffer( ctx, texImage );
+ ctx->Driver.FreeTextureImageBuffer(ctx, texImage);
ASSERT(texImage->Data == NULL);
ctx->Driver.EGLImageTargetTexture2D(ctx, target,
@@ -3362,9 +3359,7 @@ compressedteximage(struct gl_context *ctx, GLuint dims,
else {
gl_format texFormat;
- if (texImage->Data) {
- ctx->Driver.FreeTextureImageBuffer( ctx, texImage );
- }
+ ctx->Driver.FreeTextureImageBuffer(ctx, texImage);
ASSERT(texImage->Data == NULL);
texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index c991da36670..e53da5fd4ae 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -444,8 +444,7 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target,
}
/* Free old image data */
- if (dstImage->Data)
- ctx->Driver.FreeTextureImageBuffer(ctx, dstImage);
+ ctx->Driver.FreeTextureImageBuffer(ctx, dstImage);
/* initialize new image */
_mesa_init_teximage_fields(ctx, target, dstImage, dstWidth, dstHeight,