diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_surfaces.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/failover/fo_context.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/failover/fo_state.c | 32 | ||||
-rw-r--r-- | src/gallium/drivers/i965/brw_curbe.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/i965/brw_state_batch.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/identity/id_context.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/identity/id_drm.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_scene.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_context.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_drm.c | 2 | ||||
-rw-r--r-- | src/gallium/winsys/i915/sw/i915_sw_buffer.c | 2 |
11 files changed, 30 insertions, 30 deletions
diff --git a/src/gallium/auxiliary/util/u_surfaces.c b/src/gallium/auxiliary/util/u_surfaces.c index 0be4609a20..0248120f55 100644 --- a/src/gallium/auxiliary/util/u_surfaces.c +++ b/src/gallium/auxiliary/util/u_surfaces.c @@ -105,7 +105,7 @@ util_surfaces_destroy(struct util_surfaces *us, struct pipe_resource *pt, void ( if(ps) destroy_surface(ps); } - free(us->u.array); + FREE(us->u.array); us->u.array = NULL; } } diff --git a/src/gallium/drivers/failover/fo_context.c b/src/gallium/drivers/failover/fo_context.c index 236c50f4d9..9515cd8938 100644 --- a/src/gallium/drivers/failover/fo_context.c +++ b/src/gallium/drivers/failover/fo_context.c @@ -39,7 +39,7 @@ static void failover_destroy( struct pipe_context *pipe ) { struct failover_context *failover = failover_context( pipe ); - free( failover ); + FREE( failover ); } diff --git a/src/gallium/drivers/failover/fo_state.c b/src/gallium/drivers/failover/fo_state.c index b682ce6750..ff6c59f410 100644 --- a/src/gallium/drivers/failover/fo_state.c +++ b/src/gallium/drivers/failover/fo_state.c @@ -53,7 +53,7 @@ static void * failover_create_blend_state( struct pipe_context *pipe, const struct pipe_blend_state *blend ) { - struct fo_state *state = malloc(sizeof(struct fo_state)); + struct fo_state *state = MALLOC(sizeof(struct fo_state)); struct failover_context *failover = failover_context(pipe); state->sw_state = failover->sw->create_blend_state(failover->sw, blend); @@ -85,7 +85,7 @@ failover_delete_blend_state( struct pipe_context *pipe, failover->hw->delete_blend_state(failover->hw, state->hw_state); state->sw_state = 0; state->hw_state = 0; - free(state); + FREE(state); } static void @@ -129,7 +129,7 @@ static void * failover_create_depth_stencil_state(struct pipe_context *pipe, const struct pipe_depth_stencil_alpha_state *templ) { - struct fo_state *state = malloc(sizeof(struct fo_state)); + struct fo_state *state = MALLOC(sizeof(struct fo_state)); struct failover_context *failover = failover_context(pipe); state->sw_state = failover->sw->create_depth_stencil_alpha_state(failover->sw, templ); @@ -161,7 +161,7 @@ failover_delete_depth_stencil_state(struct pipe_context *pipe, failover->hw->delete_depth_stencil_alpha_state(failover->hw, state->hw_state); state->sw_state = 0; state->hw_state = 0; - free(state); + FREE(state); } static void @@ -181,7 +181,7 @@ static void * failover_create_fs_state(struct pipe_context *pipe, const struct pipe_shader_state *templ) { - struct fo_state *state = malloc(sizeof(struct fo_state)); + struct fo_state *state = MALLOC(sizeof(struct fo_state)); struct failover_context *failover = failover_context(pipe); state->sw_state = failover->sw->create_fs_state(failover->sw, templ); @@ -212,14 +212,14 @@ failover_delete_fs_state(struct pipe_context *pipe, failover->hw->delete_fs_state(failover->hw, state->hw_state); state->sw_state = 0; state->hw_state = 0; - free(state); + FREE(state); } static void * failover_create_vs_state(struct pipe_context *pipe, const struct pipe_shader_state *templ) { - struct fo_state *state = malloc(sizeof(struct fo_state)); + struct fo_state *state = MALLOC(sizeof(struct fo_state)); struct failover_context *failover = failover_context(pipe); state->sw_state = failover->sw->create_vs_state(failover->sw, templ); @@ -252,7 +252,7 @@ failover_delete_vs_state(struct pipe_context *pipe, failover->hw->delete_vs_state(failover->hw, state->hw_state); state->sw_state = 0; state->hw_state = 0; - free(state); + FREE(state); } @@ -262,7 +262,7 @@ failover_create_vertex_elements_state( struct pipe_context *pipe, unsigned count, const struct pipe_vertex_element *velems ) { - struct fo_state *state = malloc(sizeof(struct fo_state)); + struct fo_state *state = MALLOC(sizeof(struct fo_state)); struct failover_context *failover = failover_context(pipe); state->sw_state = failover->sw->create_vertex_elements_state(failover->sw, count, velems); @@ -295,7 +295,7 @@ failover_delete_vertex_elements_state( struct pipe_context *pipe, failover->hw->delete_vertex_elements_state(failover->hw, state->hw_state); state->sw_state = 0; state->hw_state = 0; - free(state); + FREE(state); } static void @@ -315,7 +315,7 @@ static void * failover_create_rasterizer_state(struct pipe_context *pipe, const struct pipe_rasterizer_state *templ) { - struct fo_state *state = malloc(sizeof(struct fo_state)); + struct fo_state *state = MALLOC(sizeof(struct fo_state)); struct failover_context *failover = failover_context(pipe); state->sw_state = failover->sw->create_rasterizer_state(failover->sw, templ); @@ -348,7 +348,7 @@ failover_delete_rasterizer_state(struct pipe_context *pipe, failover->hw->delete_rasterizer_state(failover->hw, state->hw_state); state->sw_state = 0; state->hw_state = 0; - free(state); + FREE(state); } @@ -369,7 +369,7 @@ static void * failover_create_sampler_state(struct pipe_context *pipe, const struct pipe_sampler_state *templ) { - struct fo_state *state = malloc(sizeof(struct fo_state)); + struct fo_state *state = MALLOC(sizeof(struct fo_state)); struct failover_context *failover = failover_context(pipe); state->sw_state = failover->sw->create_sampler_state(failover->sw, templ); @@ -443,7 +443,7 @@ failover_delete_sampler_state(struct pipe_context *pipe, void *sampler) failover->hw->delete_sampler_state(failover->hw, state->hw_state); state->sw_state = 0; state->hw_state = 0; - free(state); + FREE(state); } @@ -452,7 +452,7 @@ failover_create_sampler_view(struct pipe_context *pipe, struct pipe_resource *texture, const struct pipe_sampler_view *templ) { - struct fo_sampler_view *view = malloc(sizeof(struct fo_sampler_view)); + struct fo_sampler_view *view = MALLOC(sizeof(struct fo_sampler_view)); struct failover_context *failover = failover_context(pipe); view->sw = failover->sw->create_sampler_view(failover->sw, texture, templ); @@ -478,7 +478,7 @@ failover_sampler_view_destroy(struct pipe_context *pipe, failover->hw->sampler_view_destroy(failover->hw, fo_view->hw); pipe_resource_reference(&fo_view->base.texture, NULL); - free(fo_view); + FREE(fo_view); } static void diff --git a/src/gallium/drivers/i965/brw_curbe.c b/src/gallium/drivers/i965/brw_curbe.c index 323af16b14..a701de33f5 100644 --- a/src/gallium/drivers/i965/brw_curbe.c +++ b/src/gallium/drivers/i965/brw_curbe.c @@ -168,7 +168,7 @@ static enum pipe_error prepare_curbe_buffer(struct brw_context *brw) if (sz == 0) { if (brw->curbe.last_buf) { - free(brw->curbe.last_buf); + FREE(brw->curbe.last_buf); brw->curbe.last_buf = NULL; brw->curbe.last_bufsz = 0; } diff --git a/src/gallium/drivers/i965/brw_state_batch.c b/src/gallium/drivers/i965/brw_state_batch.c index 7d212e5c24..ce5ed0a9ed 100644 --- a/src/gallium/drivers/i965/brw_state_batch.c +++ b/src/gallium/drivers/i965/brw_state_batch.c @@ -84,8 +84,8 @@ void brw_clear_batch_cache( struct brw_context *brw ) while (item) { struct brw_cached_batch_item *next = item->next; - free((void *)item->header); - free(item); + FREE((void *)item->header); + FREE(item); item = next; } diff --git a/src/gallium/drivers/identity/id_context.c b/src/gallium/drivers/identity/id_context.c index 630cdb5e49..0bc8bf2196 100644 --- a/src/gallium/drivers/identity/id_context.c +++ b/src/gallium/drivers/identity/id_context.c @@ -42,7 +42,7 @@ identity_destroy(struct pipe_context *_pipe) pipe->destroy(pipe); - free(id_pipe); + FREE(id_pipe); } static void @@ -708,7 +708,7 @@ identity_create_sampler_view(struct pipe_context *pipe, struct identity_resource *id_resource = identity_resource(texture); struct pipe_context *pipe_unwrapped = id_pipe->pipe; struct pipe_resource *texture_unwrapped = id_resource->resource; - struct identity_sampler_view *view = malloc(sizeof(struct identity_sampler_view)); + struct identity_sampler_view *view = MALLOC(sizeof(struct identity_sampler_view)); view->sampler_view = pipe_unwrapped->create_sampler_view(pipe_unwrapped, texture_unwrapped, @@ -736,7 +736,7 @@ identity_sampler_view_destroy(struct pipe_context *pipe, view_unwrapped); pipe_resource_reference(&view->texture, NULL); - free(view); + FREE(view); } static struct pipe_transfer * diff --git a/src/gallium/drivers/identity/id_drm.c b/src/gallium/drivers/identity/id_drm.c index d332c36af2..a9d41af18c 100644 --- a/src/gallium/drivers/identity/id_drm.c +++ b/src/gallium/drivers/identity/id_drm.c @@ -68,7 +68,7 @@ identity_drm_destroy(struct drm_api *_api) struct drm_api *api = id_api->api; api->destroy(api); - free(id_api); + FREE(id_api); } struct drm_api * diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c index 0b185c4c41..71d9529230 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.c +++ b/src/gallium/drivers/llvmpipe/lp_scene.c @@ -74,7 +74,7 @@ lp_scene_create( struct pipe_context *pipe, /** - * Free all data associated with the given scene, and free(scene). + * Free all data associated with the given scene, and the scene itself. */ void lp_scene_destroy(struct lp_scene *scene) diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index 8216c06260..71ba1e909d 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -1142,12 +1142,12 @@ trace_context_set_vertex_buffers(struct pipe_context *_pipe, trace_dump_arg_end(); if (num_buffers) { - struct pipe_vertex_buffer *_buffers = malloc(num_buffers * sizeof(*_buffers)); + struct pipe_vertex_buffer *_buffers = MALLOC(num_buffers * sizeof(*_buffers)); memcpy(_buffers, buffers, num_buffers * sizeof(*_buffers)); for (i = 0; i < num_buffers; i++) _buffers[i].buffer = trace_resource_unwrap(tr_ctx, buffers[i].buffer); pipe->set_vertex_buffers(pipe, num_buffers, _buffers); - free(_buffers); + FREE(_buffers); } else { pipe->set_vertex_buffers(pipe, num_buffers, NULL); } diff --git a/src/gallium/drivers/trace/tr_drm.c b/src/gallium/drivers/trace/tr_drm.c index eaa47df406..0dc8cca264 100644 --- a/src/gallium/drivers/trace/tr_drm.c +++ b/src/gallium/drivers/trace/tr_drm.c @@ -73,7 +73,7 @@ trace_drm_destroy(struct drm_api *_api) if (api->destroy) api->destroy(api); - free(tr_api); + FREE(tr_api); } struct drm_api * diff --git a/src/gallium/winsys/i915/sw/i915_sw_buffer.c b/src/gallium/winsys/i915/sw/i915_sw_buffer.c index 9a27da5e1a..df17568886 100644 --- a/src/gallium/winsys/i915/sw/i915_sw_buffer.c +++ b/src/gallium/winsys/i915/sw/i915_sw_buffer.c @@ -27,7 +27,7 @@ i915_sw_buffer_create(struct i915_winsys *iws, buf->magic = 0xDEAD1337; buf->name = name; buf->type = type; - buf->ptr = calloc(size, 1); + buf->ptr = CALLOC(size, 1); if (!buf->ptr) goto err; |