Failure to consistently do so resulted in mismatched aligned versus
unaligned alloc/free.
#include "swrast/swrast.h"
#include "texobj.h"
+#include "teximage.h"
#include "mipmap.h"
#include "intel_context.h"
#include "intel_mipmap_tree.h"
}
if (texImage->Data) {
- free(texImage->Data);
+ _mesa_free_texmemory(texImage->Data);
texImage->Data = NULL;
}
}
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
sizeInBytes = depth * dstRowStride * postConvHeight;
}
- texImage->Data = malloc(sizeInBytes);
+ texImage->Data = _mesa_alloc_texmemory(sizeInBytes);
}
DBG("Upload image %dx%dx%d row_len %d "