#include "utils.h"
#include "util/driconf.h" /* for symbolic values of enum-type options */
+#include "util/u_memory.h"
/* Return various strings for glGetString().
*/
assert(screen);
/* Allocate the R200 context */
- rmesa = calloc(1, sizeof(*rmesa));
+ rmesa = align_calloc(sizeof(*rmesa), 16);
if ( !rmesa ) {
*error = __DRI_CTX_ERROR_NO_MEMORY;
return GL_FALSE;
if (!radeonInitContext(&rmesa->radeon, api, &functions,
glVisual, driContextPriv,
sharedContextPrivate)) {
- free(rmesa);
+ align_free(rmesa);
*error = __DRI_CTX_ERROR_NO_MEMORY;
return GL_FALSE;
}
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
#include "tnl/tnl.h"
+#include "util/u_memory.h"
#ifndef RADEON_DEBUG
int RADEON_DEBUG = (0);
fclose(track);
}
#endif
- free(radeon);
+ align_free(radeon);
}
/* Force the context `c' to be unbound from its buffer.
#include "utils.h"
#include "util/driconf.h" /* for symbolic values of enum-type options */
+#include "util/u_memory.h"
extern const struct tnl_pipeline_stage _radeon_render_stage;
extern const struct tnl_pipeline_stage _radeon_tcl_stage;
assert(screen);
/* Allocate the Radeon context */
- rmesa = calloc(1, sizeof(*rmesa));
+ rmesa = align_calloc(sizeof(*rmesa), 16);
if ( !rmesa ) {
*error = __DRI_CTX_ERROR_NO_MEMORY;
return GL_FALSE;
if (!radeonInitContext(&rmesa->radeon, api, &functions,
glVisual, driContextPriv,
sharedContextPrivate)) {
- free(rmesa);
+ align_free(rmesa);
*error = __DRI_CTX_ERROR_NO_MEMORY;
return GL_FALSE;
}