diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_image.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c index c110df478f..329af0d1b0 100644 --- a/src/mesa/drivers/dri/intel/intel_tex.c +++ b/src/mesa/drivers/dri/intel/intel_tex.c @@ -1,5 +1,6 @@ #include "swrast/swrast.h" #include "texobj.h" +#include "teximage.h" #include "mipmap.h" #include "intel_context.h" #include "intel_mipmap_tree.h" @@ -71,7 +72,7 @@ intelFreeTextureImageData(GLcontext * ctx, struct gl_texture_image *texImage) } if (texImage->Data) { - free(texImage->Data); + _mesa_free_texmemory(texImage->Data); texImage->Data = NULL; } } diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 3d2fc24357..dd8fbeaa91 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -360,7 +360,8 @@ intelTexImage(GLcontext * ctx, assert(!texImage->Data); } else if (texImage->Data) { - _mesa_align_free(texImage->Data); + _mesa_free_texmemory(texImage->Data); + texImage->Data = NULL; } /* If this is the only texture image in the tree, could call @@ -481,7 +482,7 @@ intelTexImage(GLcontext * ctx, sizeInBytes = depth * dstRowStride * postConvHeight; } - texImage->Data = malloc(sizeInBytes); + texImage->Data = _mesa_alloc_texmemory(sizeInBytes); } DBG("Upload image %dx%dx%d row_len %d " |