softpipe: make rasterizer state functions static
authorBrian Paul <brianp@vmware.com>
Sat, 25 Sep 2010 20:08:49 +0000 (14:08 -0600)
committerBrian Paul <brianp@vmware.com>
Sat, 25 Sep 2010 20:25:40 +0000 (14:25 -0600)
src/gallium/drivers/softpipe/sp_context.c
src/gallium/drivers/softpipe/sp_state.h
src/gallium/drivers/softpipe/sp_state_rasterizer.c

index ad8975a59d3dc02ac029616d2291c3df18843b56..346b56aab494bca3fb2980fb1f3a99f78351f9d8 100644 (file)
@@ -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;
index 62a9aaa46a84aee1fe17391993ec62866a43b0b1..8c539ca25f66a54460cc87626cf3e1f867374d02 100644 (file)
@@ -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 * );
index c9ede09f2688bff1cbe4aba54b259f01eae68679..3cd4acd743232cbcad4b5bc88042e80d4bfab850 100644 (file)
 
 
 
-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;
+}