softpipe_create_blend_state(struct pipe_context *pipe,
const struct pipe_blend_state *blend)
{
- /* means that we just want pipe_blend_state and don't have
- * anything specific */
- return 0;
+ struct pipe_blend_state *state = malloc(sizeof(struct pipe_blend_state));
+ memcpy(state, blend, sizeof(struct pipe_blend_state));
+ return state;
}
void softpipe_bind_blend_state( struct pipe_context *pipe,
}
void softpipe_delete_blend_state(struct pipe_context *pipe,
- void *blend )
+ void *blend)
{
- /* do nothing */
+ free(blend);
}
softpipe_create_alpha_test_state(struct pipe_context *pipe,
const struct pipe_alpha_test_state *alpha)
{
- return 0;
+ struct pipe_alpha_test_state *state = malloc(sizeof(struct pipe_alpha_test_state));
+ memcpy(state, alpha, sizeof(struct pipe_alpha_test_state));
+ return state;
}
void
softpipe_delete_alpha_test_state(struct pipe_context *pipe,
void *alpha)
{
- /* do nothing */
+ free(alpha);
}
void *
softpipe_create_depth_stencil_state(struct pipe_context *pipe,
const struct pipe_depth_stencil_state *depth_stencil)
{
- return 0;
+ struct pipe_depth_stencil_state *state =
+ malloc(sizeof(struct pipe_depth_stencil_state));
+ memcpy(state, depth_stencil, sizeof(struct pipe_depth_stencil_state));
+ return state;
}
void
void
softpipe_delete_depth_stencil_state(struct pipe_context *pipe, void *depth)
{
- /* do nothing */
+ free(depth);
}
* that now.
*/
- return 0;
+ struct pipe_shader_state *state = malloc(sizeof(struct pipe_shader_state));
+ memcpy(state, templ, sizeof(struct pipe_shader_state));
+ return state;
}
void softpipe_bind_fs_state(struct pipe_context *pipe, void *fs)
void softpipe_delete_fs_state(struct pipe_context *pipe,
void *shader)
{
+ free(shader);
}
softpipe_create_rasterizer_state(struct pipe_context *pipe,
const struct pipe_rasterizer_state *setup)
{
- return 0;
+ struct pipe_rasterizer_state *state =
+ malloc(sizeof(struct pipe_rasterizer_state));
+ memcpy(state, setup, sizeof(struct pipe_rasterizer_state));
+ return state;
}
void softpipe_bind_rasterizer_state(struct pipe_context *pipe,
void softpipe_delete_rasterizer_state(struct pipe_context *pipe,
void *rasterizer)
{
- /* do nothing */
+ free(rasterizer);
}
softpipe_create_sampler_state(struct pipe_context *pipe,
const struct pipe_sampler_state *sampler)
{
- return 0;
+ struct pipe_sampler_state *state = malloc(sizeof(struct pipe_sampler_state));
+ memcpy(state, sampler, sizeof(struct pipe_sampler_state));
+ return state;
}
void
softpipe_delete_sampler_state(struct pipe_context *pipe,
void *sampler)
{
- /* do nothing */
+ free(sampler);
}