summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-09-25 14:08:49 -0600
committerBrian Paul <brianp@vmware.com>2010-09-25 14:25:40 -0600
commitbd13a0d282d5468c083d06f4443dfaf375e01dda (patch)
treee16a2471f5bbf0186520ff77ea87aaee4874764a
parenteed4509b086828c6229a7b1865978ffa27377874 (diff)
softpipe: make rasterizer state functions static
-rw-r--r--src/gallium/drivers/softpipe/sp_context.c7
-rw-r--r--src/gallium/drivers/softpipe/sp_state.h7
-rw-r--r--src/gallium/drivers/softpipe/sp_state_rasterizer.c21
3 files changed, 19 insertions, 16 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index ad8975a59d..346b56aab4 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -229,14 +229,9 @@ softpipe_create_context( struct pipe_screen *screen,
/* state setters */
softpipe_init_blend_funcs(&softpipe->pipe);
+ softpipe_init_rasterizer_funcs(&softpipe->pipe);
softpipe_init_sampler_funcs(&softpipe->pipe);
-
- softpipe->pipe.create_rasterizer_state = softpipe_create_rasterizer_state;
- softpipe->pipe.bind_rasterizer_state = softpipe_bind_rasterizer_state;
- softpipe->pipe.delete_rasterizer_state = softpipe_delete_rasterizer_state;
-
softpipe_init_shader_funcs(&softpipe->pipe);
-
softpipe_init_vertex_funcs(&softpipe->pipe);
softpipe->pipe.create_stream_output_state = softpipe_create_stream_output_state;
diff --git a/src/gallium/drivers/softpipe/sp_state.h b/src/gallium/drivers/softpipe/sp_state.h
index 62a9aaa46a..8c539ca25f 100644
--- a/src/gallium/drivers/softpipe/sp_state.h
+++ b/src/gallium/drivers/softpipe/sp_state.h
@@ -121,12 +121,9 @@ softpipe_init_blend_funcs(struct pipe_context *pipe);
void
softpipe_init_sampler_funcs(struct pipe_context *pipe);
+void
+softpipe_init_rasterizer_funcs(struct pipe_context *pipe);
-void *
-softpipe_create_rasterizer_state(struct pipe_context *,
- const struct pipe_rasterizer_state *);
-void softpipe_bind_rasterizer_state(struct pipe_context *, void *);
-void softpipe_delete_rasterizer_state(struct pipe_context *, void *);
void softpipe_set_framebuffer_state( struct pipe_context *,
const struct pipe_framebuffer_state * );
diff --git a/src/gallium/drivers/softpipe/sp_state_rasterizer.c b/src/gallium/drivers/softpipe/sp_state_rasterizer.c
index c9ede09f26..3cd4acd743 100644
--- a/src/gallium/drivers/softpipe/sp_state_rasterizer.c
+++ b/src/gallium/drivers/softpipe/sp_state_rasterizer.c
@@ -33,15 +33,17 @@
-void *
+static void *
softpipe_create_rasterizer_state(struct pipe_context *pipe,
const struct pipe_rasterizer_state *rast)
{
return mem_dup(rast, sizeof(*rast));
}
-void softpipe_bind_rasterizer_state(struct pipe_context *pipe,
- void *rasterizer)
+
+static void
+softpipe_bind_rasterizer_state(struct pipe_context *pipe,
+ void *rasterizer)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
@@ -56,10 +58,19 @@ void softpipe_bind_rasterizer_state(struct pipe_context *pipe,
softpipe->dirty |= SP_NEW_RASTERIZER;
}
-void softpipe_delete_rasterizer_state(struct pipe_context *pipe,
- void *rasterizer)
+
+static void
+softpipe_delete_rasterizer_state(struct pipe_context *pipe,
+ void *rasterizer)
{
FREE( rasterizer );
}
+void
+softpipe_init_rasterizer_funcs(struct pipe_context *pipe)
+{
+ pipe->create_rasterizer_state = softpipe_create_rasterizer_state;
+ pipe->bind_rasterizer_state = softpipe_bind_rasterizer_state;
+ pipe->delete_rasterizer_state = softpipe_delete_rasterizer_state;
+}