From: Brian Paul Date: Wed, 28 Apr 2010 20:19:15 +0000 (-0600) Subject: llvmpipe: make rasterizer-related functions static, clean-up initializations X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8975ade13b7efdea2273e91e05cc6ecbda6ca454;p=mesa.git llvmpipe: make rasterizer-related functions static, clean-up initializations --- diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c index 8159daaae68..3c223cc9efe 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.c +++ b/src/gallium/drivers/llvmpipe/lp_context.c @@ -100,10 +100,6 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv ) llvmpipe->pipe.destroy = llvmpipe_destroy; /* state setters */ - llvmpipe->pipe.create_rasterizer_state = llvmpipe_create_rasterizer_state; - llvmpipe->pipe.bind_rasterizer_state = llvmpipe_bind_rasterizer_state; - llvmpipe->pipe.delete_rasterizer_state = llvmpipe_delete_rasterizer_state; - llvmpipe->pipe.set_framebuffer_state = llvmpipe_set_framebuffer_state; llvmpipe->pipe.clear = llvmpipe_clear; @@ -117,6 +113,7 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv ) llvmpipe_init_vertex_funcs(llvmpipe); llvmpipe_init_fs_funcs(llvmpipe); llvmpipe_init_vs_funcs(llvmpipe); + llvmpipe_init_rasterizer_funcs(llvmpipe); llvmpipe_init_context_resource_funcs( &llvmpipe->pipe ); /* diff --git a/src/gallium/drivers/llvmpipe/lp_state.h b/src/gallium/drivers/llvmpipe/lp_state.h index 8ce34c611b3..18143807c91 100644 --- a/src/gallium/drivers/llvmpipe/lp_state.h +++ b/src/gallium/drivers/llvmpipe/lp_state.h @@ -121,16 +121,6 @@ struct lp_velems_state }; -void * -llvmpipe_create_rasterizer_state(struct pipe_context *, - const struct pipe_rasterizer_state *); - -void -llvmpipe_bind_rasterizer_state(struct pipe_context *, void *); - -void -llvmpipe_delete_rasterizer_state(struct pipe_context *, void *); - void llvmpipe_set_framebuffer_state(struct pipe_context *, const struct pipe_framebuffer_state *); @@ -162,5 +152,8 @@ llvmpipe_init_fs_funcs(struct llvmpipe_context *llvmpipe); void llvmpipe_init_vs_funcs(struct llvmpipe_context *llvmpipe); +void +llvmpipe_init_rasterizer_funcs(struct llvmpipe_context *llvmpipe); + #endif diff --git a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c index 3fba5e4e75d..622eb47ff45 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c +++ b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c @@ -34,7 +34,7 @@ -void * +static void * llvmpipe_create_rasterizer_state(struct pipe_context *pipe, const struct pipe_rasterizer_state *rast) { @@ -46,7 +46,7 @@ llvmpipe_create_rasterizer_state(struct pipe_context *pipe, -void +static void llvmpipe_bind_rasterizer_state(struct pipe_context *pipe, void *handle) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -79,10 +79,19 @@ llvmpipe_bind_rasterizer_state(struct pipe_context *pipe, void *handle) } -void llvmpipe_delete_rasterizer_state(struct pipe_context *pipe, - void *rasterizer) +static void +llvmpipe_delete_rasterizer_state(struct pipe_context *pipe, + void *rasterizer) { FREE( rasterizer ); } + +void +llvmpipe_init_rasterizer_funcs(struct llvmpipe_context *llvmpipe) +{ + llvmpipe->pipe.create_rasterizer_state = llvmpipe_create_rasterizer_state; + llvmpipe->pipe.bind_rasterizer_state = llvmpipe_bind_rasterizer_state; + llvmpipe->pipe.delete_rasterizer_state = llvmpipe_delete_rasterizer_state; +}