summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_tex_image.c
diff options
context:
space:
mode:
authorMichal Wajdeczko <Michal.Wajdeczko@intel.com>2008-03-26 13:33:34 -0700
committerEric Anholt <eric@anholt.net>2008-03-26 13:33:34 -0700
commit76430815a73559c55e2061ceb2634406d1284f03 (patch)
tree46a9046a3e87883089d8ca7e71efade52a42eb84 /src/mesa/drivers/dri/intel/intel_tex_image.c
parentb4cbf6983e0e6d6502c1260f60c463841ab74590 (diff)
[intel] Use mesa texmemory functions to allocate teximage Data.
Failure to consistently do so resulted in mismatched aligned versus unaligned alloc/free.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_tex_image.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c5
1 files changed, 3 insertions, 2 deletions
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 "