llvmpipe: make clip-related functions static, clean-up initializations
authorBrian Paul <brianp@vmware.com>
Wed, 28 Apr 2010 20:09:32 +0000 (14:09 -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_clip.c

index 73d2ac0bf611a717b20a82a1d69c0119c89bae2a..a5d8c9167cbedac5afeb146d1f579d66ed10c2c1 100644 (file)
@@ -112,18 +112,14 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv )
    llvmpipe->pipe.bind_vs_state   = llvmpipe_bind_vs_state;
    llvmpipe->pipe.delete_vs_state = llvmpipe_delete_vs_state;
 
-   llvmpipe->pipe.set_clip_state = llvmpipe_set_clip_state;
    llvmpipe->pipe.set_constant_buffer = llvmpipe_set_constant_buffer;
    llvmpipe->pipe.set_framebuffer_state = llvmpipe_set_framebuffer_state;
-   llvmpipe->pipe.set_polygon_stipple = llvmpipe_set_polygon_stipple;
-   llvmpipe->pipe.set_scissor_state = llvmpipe_set_scissor_state;
-
-   llvmpipe->pipe.set_viewport_state = llvmpipe_set_viewport_state;
 
    llvmpipe->pipe.clear = llvmpipe_clear;
    llvmpipe->pipe.flush = llvmpipe_flush;
 
    llvmpipe_init_blend_funcs(llvmpipe);
+   llvmpipe_init_clip_funcs(llvmpipe);
    llvmpipe_init_draw_funcs(llvmpipe);
    llvmpipe_init_sampler_funcs(llvmpipe);
    llvmpipe_init_query_funcs( llvmpipe );
index 23d71c1213c17c81f648abfd6afafdbee08d334e..ce7ea41dca1298a705e0a9a1b591a39fd95551ca 100644 (file)
@@ -131,9 +131,6 @@ void llvmpipe_delete_rasterizer_state(struct pipe_context *, void *);
 void llvmpipe_set_framebuffer_state( struct pipe_context *,
                                      const struct pipe_framebuffer_state * );
 
-void llvmpipe_set_clip_state( struct pipe_context *,
-                              const struct pipe_clip_state * );
-
 void llvmpipe_set_constant_buffer(struct pipe_context *,
                                   uint shader, uint index,
                                   struct pipe_resource *buf);
@@ -147,15 +144,6 @@ void *llvmpipe_create_vs_state(struct pipe_context *,
 void llvmpipe_bind_vs_state(struct pipe_context *, void *);
 void llvmpipe_delete_vs_state(struct pipe_context *, void *);
 
-void llvmpipe_set_polygon_stipple( struct pipe_context *,
-                                   const struct pipe_poly_stipple * );
-
-void llvmpipe_set_scissor_state( struct pipe_context *,
-                                 const struct pipe_scissor_state * );
-
-void llvmpipe_set_viewport_state( struct pipe_context *,
-                                  const struct pipe_viewport_state * );
-
 void llvmpipe_update_fs(struct llvmpipe_context *lp);
 
 void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe );
@@ -180,4 +168,8 @@ llvmpipe_init_vertex_funcs(struct llvmpipe_context *llvmpipe);
 void
 llvmpipe_init_draw_funcs(struct llvmpipe_context *llvmpipe);
 
+void
+llvmpipe_init_clip_funcs(struct llvmpipe_context *llvmpipe);
+
+
 #endif
index df68f27acc972287f9c843f0aa8496bc878edd11..32ae079cc153eb302f8e97e20be53b4b61411b4c 100644 (file)
@@ -32,8 +32,9 @@
 #include "draw/draw_context.h"
 
 
-void llvmpipe_set_clip_state( struct pipe_context *pipe,
-                            const struct pipe_clip_state *clip )
+static void
+llvmpipe_set_clip_state(struct pipe_context *pipe,
+                        const struct pipe_clip_state *clip)
 {
    struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
 
@@ -42,8 +43,9 @@ void llvmpipe_set_clip_state( struct pipe_context *pipe,
 }
 
 
-void llvmpipe_set_viewport_state( struct pipe_context *pipe,
-                                  const struct pipe_viewport_state *viewport )
+static void
+llvmpipe_set_viewport_state(struct pipe_context *pipe,
+                            const struct pipe_viewport_state *viewport)
 {
    struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
 
@@ -55,8 +57,9 @@ void llvmpipe_set_viewport_state( struct pipe_context *pipe,
 }
 
 
-void llvmpipe_set_scissor_state( struct pipe_context *pipe,
-                                 const struct pipe_scissor_state *scissor )
+static void
+llvmpipe_set_scissor_state(struct pipe_context *pipe,
+                           const struct pipe_scissor_state *scissor)
 {
    struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
 
@@ -67,8 +70,9 @@ void llvmpipe_set_scissor_state( struct pipe_context *pipe,
 }
 
 
-void llvmpipe_set_polygon_stipple( struct pipe_context *pipe,
-                                   const struct pipe_poly_stipple *stipple )
+static void
+llvmpipe_set_polygon_stipple(struct pipe_context *pipe,
+                             const struct pipe_poly_stipple *stipple)
 {
    struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
 
@@ -77,3 +81,14 @@ void llvmpipe_set_polygon_stipple( struct pipe_context *pipe,
    llvmpipe->poly_stipple = *stipple; /* struct copy */
    llvmpipe->dirty |= LP_NEW_STIPPLE;
 }
+
+
+
+void
+llvmpipe_init_clip_funcs(struct llvmpipe_context *llvmpipe)
+{
+   llvmpipe->pipe.set_clip_state = llvmpipe_set_clip_state;
+   llvmpipe->pipe.set_polygon_stipple = llvmpipe_set_polygon_stipple;
+   llvmpipe->pipe.set_scissor_state = llvmpipe_set_scissor_state;
+   llvmpipe->pipe.set_viewport_state = llvmpipe_set_viewport_state;
+}