*/
_mesa_buffer_unmap_all_mappings(ctx, obj);
- free(intel_obj->sys_buffer);
+ _mesa_align_free(intel_obj->sys_buffer);
drm_intel_bo_unreference(intel_obj->buffer);
free(intel_obj);
if (intel_obj->buffer != NULL)
release_buffer(intel_obj);
- free(intel_obj->sys_buffer);
+ _mesa_align_free(intel_obj->sys_buffer);
intel_obj->sys_buffer = NULL;
if (size != 0) {
* contents anyway.
*/
if (target == GL_ARRAY_BUFFER || target == GL_ELEMENT_ARRAY_BUFFER) {
- intel_obj->sys_buffer = malloc(size);
+ intel_obj->sys_buffer =
+ _mesa_align_malloc(size, ctx->Const.MinMapBufferAlignment);
if (intel_obj->sys_buffer != NULL) {
if (data != NULL)
memcpy(intel_obj->sys_buffer, data, size);
return;
}
- free(intel_obj->sys_buffer);
+ _mesa_align_free(intel_obj->sys_buffer);
intel_obj->sys_buffer = NULL;
}
return obj->Mappings[index].Pointer;
}
- free(intel_obj->sys_buffer);
+ _mesa_align_free(intel_obj->sys_buffer);
intel_obj->sys_buffer = NULL;
}
0, intel_obj->Base.Size,
intel_obj->sys_buffer);
- free(intel_obj->sys_buffer);
+ _mesa_align_free(intel_obj->sys_buffer);
intel_obj->sys_buffer = NULL;
intel_obj->offset = 0;
}
return intel_buffer_purgeable(intel_obj->buffer);
if (option == GL_RELEASED_APPLE) {
- free(intel_obj->sys_buffer);
+ _mesa_align_free(intel_obj->sys_buffer);
intel_obj->sys_buffer = NULL;
return GL_RELEASED_APPLE;