mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
gallium: s/free/FREE/ and same for friends.
Based on Stephen Johnson's feedback.
This commit is contained in:
parent
4aa4fe8e21
commit
2ce1d6696b
11 changed files with 30 additions and 30 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ static void failover_destroy( struct pipe_context *pipe )
|
|||
{
|
||||
struct failover_context *failover = failover_context( pipe );
|
||||
|
||||
free( failover );
|
||||
FREE( failover );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 *
|
||||
|
|
|
|||
|
|
@ -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 *
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 *
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue