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);
failover->hw->delete_blend_state(failover->hw, state->hw_state);
state->sw_state = 0;
state->hw_state = 0;
- free(state);
+ FREE(state);
}
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);
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
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);
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);
failover->hw->delete_vs_state(failover->hw, state->hw_state);
state->sw_state = 0;
state->hw_state = 0;
- free(state);
+ FREE(state);
}
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);
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
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);
failover->hw->delete_rasterizer_state(failover->hw, state->hw_state);
state->sw_state = 0;
state->hw_state = 0;
- free(state);
+ FREE(state);
}
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);
failover->hw->delete_sampler_state(failover->hw, state->hw_state);
state->sw_state = 0;
state->hw_state = 0;
- free(state);
+ FREE(state);
}
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);
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