}
}
- FREE( llvmpipe );
+ align_free( llvmpipe );
}
static unsigned int
struct pipe_context *
llvmpipe_create( struct pipe_screen *screen )
{
- struct llvmpipe_context *llvmpipe = CALLOC_STRUCT(llvmpipe_context);
+ struct llvmpipe_context *llvmpipe;
uint i;
+ llvmpipe = align_malloc(sizeof(struct llvmpipe_context), 16);
+ if (!llvmpipe)
+ return NULL;
+
util_init_math();
+ memset(llvmpipe, 0, sizeof *llvmpipe);
+
llvmpipe->pipe.winsys = screen->winsys;
llvmpipe->pipe.screen = screen;
llvmpipe->pipe.destroy = llvmpipe_destroy;
static void
shade_destroy(struct quad_stage *qs)
{
- FREE( qs );
+ align_free( qs );
}
{
struct quad_shade_stage *qss;
- qss = CALLOC_STRUCT(quad_shade_stage);
+ qss = align_malloc(sizeof(struct quad_shade_stage), 16);
if (!qss)
return NULL;
+ memset(qss, 0, sizeof *qss);
+
qss->stage.llvmpipe = llvmpipe;
qss->stage.begin = shade_begin;
qss->stage.run = shade_quads;
void setup_destroy_context( struct setup_context *setup )
{
- FREE( setup );
+ align_free( setup );
}
*/
struct setup_context *setup_create_context( struct llvmpipe_context *llvmpipe )
{
- struct setup_context *setup = CALLOC_STRUCT(setup_context);
+ struct setup_context *setup;
unsigned i;
+ setup = align_malloc(sizeof(struct setup_context), 16);
+ if (!setup)
+ return NULL;
+
+ memset(setup, 0, sizeof *setup);
setup->llvmpipe = llvmpipe;
for (i = 0; i < MAX_QUADS; i++) {
struct llvmpipe_tile_cache *tc;
uint pos;
- tc = CALLOC_STRUCT( llvmpipe_tile_cache );
+ tc = align_malloc( sizeof(struct llvmpipe_tile_cache), 16 );
if (tc) {
+ memset(tc, 0, sizeof *tc);
tc->screen = screen;
for (pos = 0; pos < NUM_ENTRIES; pos++) {
tc->entries[pos].addr.bits.invalid = 1;
screen->tex_transfer_destroy(tc->tex_trans);
}
- FREE( tc );
+ align_free( tc );
}