softpipe: make clip state functions static
authorBrian Paul <brianp@vmware.com>
Sat, 25 Sep 2010 20:15:11 +0000 (14:15 -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_clip.c

index c2b35942021ed3c3909786208dac0dd29c3e6881..36aa8546efd4590f2a1cfd4f42bc508b9a868d15 100644 (file)
@@ -229,18 +229,14 @@ softpipe_create_context( struct pipe_screen *screen,
 
    /* state setters */
    softpipe_init_blend_funcs(&softpipe->pipe);
+   softpipe_init_clip_funcs(&softpipe->pipe);
    softpipe_init_rasterizer_funcs(&softpipe->pipe);
    softpipe_init_sampler_funcs(&softpipe->pipe);
    softpipe_init_shader_funcs(&softpipe->pipe);
    softpipe_init_streamout_funcs(&softpipe->pipe);
    softpipe_init_vertex_funcs(&softpipe->pipe);
 
-   softpipe->pipe.set_clip_state = softpipe_set_clip_state;
    softpipe->pipe.set_framebuffer_state = softpipe_set_framebuffer_state;
-   softpipe->pipe.set_polygon_stipple = softpipe_set_polygon_stipple;
-   softpipe->pipe.set_scissor_state = softpipe_set_scissor_state;
-
-   softpipe->pipe.set_viewport_state = softpipe_set_viewport_state;
 
    softpipe->pipe.draw_vbo = softpipe_draw_vbo;
    softpipe->pipe.draw_stream_output = softpipe_draw_stream_output;
index d6a435d2de3b6de393edda5ba47d2a75119f6085..a7dcde28a89e2747f501e3579f7f22ba486a1ca8 100644 (file)
@@ -118,6 +118,9 @@ struct sp_so_state {
 void
 softpipe_init_blend_funcs(struct pipe_context *pipe);
 
+void
+softpipe_init_clip_funcs(struct pipe_context *pipe);
+
 void
 softpipe_init_sampler_funcs(struct pipe_context *pipe);
 
@@ -131,25 +134,12 @@ softpipe_init_streamout_funcs(struct pipe_context *pipe);
 void softpipe_set_framebuffer_state( struct pipe_context *,
                                      const struct pipe_framebuffer_state * );
 
-void softpipe_set_clip_state( struct pipe_context *,
-                              const struct pipe_clip_state * );
-
 void
 softpipe_init_shader_funcs(struct pipe_context *pipe);
 
 void
 softpipe_init_vertex_funcs(struct pipe_context *pipe);
 
-void softpipe_set_polygon_stipple( struct pipe_context *,
-                                   const struct pipe_poly_stipple * );
-
-void softpipe_set_scissor_state( struct pipe_context *,
-                                 const struct pipe_scissor_state * );
-
-
-void softpipe_set_viewport_state( struct pipe_context *,
-                                  const struct pipe_viewport_state * );
-
 
 void softpipe_update_derived( struct softpipe_context *softpipe );
 
index 4946c776e3eb5e803763c9f33d1d2612b8855217..f3a4c234e27c0edc92b725854f2532cff7566590 100644 (file)
@@ -32,8 +32,9 @@
 #include "draw/draw_context.h"
 
 
-void softpipe_set_clip_state( struct pipe_context *pipe,
-                            const struct pipe_clip_state *clip )
+static void
+softpipe_set_clip_state(struct pipe_context *pipe,
+                        const struct pipe_clip_state *clip)
 {
    struct softpipe_context *softpipe = softpipe_context(pipe);
 
@@ -42,8 +43,9 @@ void softpipe_set_clip_state( struct pipe_context *pipe,
 }
 
 
-void softpipe_set_viewport_state( struct pipe_context *pipe,
-                                  const struct pipe_viewport_state *viewport )
+static void
+softpipe_set_viewport_state(struct pipe_context *pipe,
+                            const struct pipe_viewport_state *viewport)
 {
    struct softpipe_context *softpipe = softpipe_context(pipe);
 
@@ -55,8 +57,9 @@ void softpipe_set_viewport_state( struct pipe_context *pipe,
 }
 
 
-void softpipe_set_scissor_state( struct pipe_context *pipe,
-                                 const struct pipe_scissor_state *scissor )
+static void
+softpipe_set_scissor_state(struct pipe_context *pipe,
+                           const struct pipe_scissor_state *scissor)
 {
    struct softpipe_context *softpipe = softpipe_context(pipe);
 
@@ -67,8 +70,9 @@ void softpipe_set_scissor_state( struct pipe_context *pipe,
 }
 
 
-void softpipe_set_polygon_stipple( struct pipe_context *pipe,
-                                   const struct pipe_poly_stipple *stipple )
+static void
+softpipe_set_polygon_stipple(struct pipe_context *pipe,
+                             const struct pipe_poly_stipple *stipple)
 {
    struct softpipe_context *softpipe = softpipe_context(pipe);
 
@@ -77,3 +81,13 @@ void softpipe_set_polygon_stipple( struct pipe_context *pipe,
    softpipe->poly_stipple = *stipple; /* struct copy */
    softpipe->dirty |= SP_NEW_STIPPLE;
 }
+
+
+void
+softpipe_init_clip_funcs(struct pipe_context *pipe)
+{
+   pipe->set_clip_state = softpipe_set_clip_state;
+   pipe->set_viewport_state = softpipe_set_viewport_state;
+   pipe->set_scissor_state = softpipe_set_scissor_state;
+   pipe->set_polygon_stipple = softpipe_set_polygon_stipple;
+}