llvmpipe: make rasterizer-related functions static, clean-up initializations
authorBrian Paul <brianp@vmware.com>
Wed, 28 Apr 2010 20:19:15 +0000 (14:19 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 28 Apr 2010 21:25:50 +0000 (15:25 -0600)
src/gallium/drivers/llvmpipe/lp_context.c
src/gallium/drivers/llvmpipe/lp_state.h
src/gallium/drivers/llvmpipe/lp_state_rasterizer.c

index 8159daaae680430db7ca5156d14f2676a0eb397b..3c223cc9efe165aa4d597921faf953a183a9d645 100644 (file)
@@ -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 );
 
    /*
index 8ce34c611b30be1f6a07a9d6196cb0eac9629cc5..18143807c915136af46c8b588a5428d0b7d1808f 100644 (file)
@@ -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
index 3fba5e4e75dbe87b8b47aea989ae0aa7a8c88feb..622eb47ff4535629c2863155e40af2ef1539137b 100644 (file)
@@ -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;
+}