Mesa (master): softpipe: make clip state functions static

Brian Paul brianp at kemper.freedesktop.org
Sat Sep 25 13:26:34 PDT 2010


Module: Mesa
Branch: master
Commit: 63a5b7d7cc92bd7b670e02225f355ed2f8341022
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=63a5b7d7cc92bd7b670e02225f355ed2f8341022

Author: Brian Paul <brianp at vmware.com>
Date:   Sat Sep 25 14:15:11 2010 -0600

softpipe: make clip state functions static

---

 src/gallium/drivers/softpipe/sp_context.c    |    6 +----
 src/gallium/drivers/softpipe/sp_state.h      |   16 ++-----------
 src/gallium/drivers/softpipe/sp_state_clip.c |   30 +++++++++++++++++++-------
 3 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index c2b3594..36aa854 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -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;
diff --git a/src/gallium/drivers/softpipe/sp_state.h b/src/gallium/drivers/softpipe/sp_state.h
index d6a435d..a7dcde2 100644
--- a/src/gallium/drivers/softpipe/sp_state.h
+++ b/src/gallium/drivers/softpipe/sp_state.h
@@ -119,6 +119,9 @@ 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);
 
 void
@@ -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 );
 
diff --git a/src/gallium/drivers/softpipe/sp_state_clip.c b/src/gallium/drivers/softpipe/sp_state_clip.c
index 4946c77..f3a4c23 100644
--- a/src/gallium/drivers/softpipe/sp_state_clip.c
+++ b/src/gallium/drivers/softpipe/sp_state_clip.c
@@ -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;
+}



More information about the mesa-commit mailing list