summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-04-28 14:19:15 -0600
committerBrian Paul <[email protected]>2010-04-28 15:25:50 -0600
commit8975ade13b7efdea2273e91e05cc6ecbda6ca454 (patch)
tree962da2a645e80c47b9d8f70ef0f86a5f71d0da57 /src/gallium
parent965a604306e9371379cccebc5f83120e99d18548 (diff)
llvmpipe: make rasterizer-related functions static, clean-up initializations
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_context.c5
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state.h13
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_rasterizer.c17
3 files changed, 17 insertions, 18 deletions
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;
+}