diff options
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index 04ae644ff98..f06538c75f5 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -1358,7 +1358,7 @@ void setup_prepare( struct setup_context *setup ) void setup_destroy_context( struct setup_context *setup ) { - FREE( setup ); + align_free( setup ); } @@ -1367,9 +1367,14 @@ void setup_destroy_context( struct setup_context *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++) { |