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

index 346b56aab494bca3fb2980fb1f3a99f78351f9d8..c2b35942021ed3c3909786208dac0dd29c3e6881 100644 (file)
@@ -232,19 +232,15 @@ softpipe_create_context( struct pipe_screen *screen,
    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.create_stream_output_state = softpipe_create_stream_output_state;
-   softpipe->pipe.bind_stream_output_state = softpipe_bind_stream_output_state;
-   softpipe->pipe.delete_stream_output_state = softpipe_delete_stream_output_state;
-
    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.set_stream_output_buffers = softpipe_set_stream_output_buffers;
 
    softpipe->pipe.draw_vbo = softpipe_draw_vbo;
    softpipe->pipe.draw_stream_output = softpipe_draw_stream_output;
index 8c539ca25f66a54460cc87626cf3e1f867374d02..d6a435d2de3b6de393edda5ba47d2a75119f6085 100644 (file)
@@ -124,6 +124,9 @@ softpipe_init_sampler_funcs(struct pipe_context *pipe);
 void
 softpipe_init_rasterizer_funcs(struct pipe_context *pipe);
 
+void
+softpipe_init_streamout_funcs(struct pipe_context *pipe);
+
 
 void softpipe_set_framebuffer_state( struct pipe_context *,
                                      const struct pipe_framebuffer_state * );
@@ -176,20 +179,5 @@ softpipe_get_vertex_info(struct softpipe_context *softpipe);
 struct vertex_info *
 softpipe_get_vbuf_vertex_info(struct softpipe_context *softpipe);
 
-void *
-softpipe_create_stream_output_state(
-   struct pipe_context *pipe,
-   const struct pipe_stream_output_state *templ);
-void
-softpipe_bind_stream_output_state(struct pipe_context *pipe,
-                                  void *so);
-void
-softpipe_delete_stream_output_state(struct pipe_context *pipe, void *so);
-
-void
-softpipe_set_stream_output_buffers(struct pipe_context *pipe,
-                                   struct pipe_resource **buffers,
-                                   int *offsets,
-                                   int num_buffers);
 
 #endif
index cfe23f9e84616a5b9a50e30739bf1b888dd3204f..ddfa3ef765aa26c3a67c43bf9092aafc64c9e170 100644 (file)
@@ -34,7 +34,7 @@
 #include "draw/draw_context.h"
 
 
-void *
+static void *
 softpipe_create_stream_output_state(struct pipe_context *pipe,
                                     const struct pipe_stream_output_state *templ)
 {
@@ -57,7 +57,8 @@ softpipe_create_stream_output_state(struct pipe_context *pipe,
    return so;
 }
 
-void
+
+static void
 softpipe_bind_stream_output_state(struct pipe_context *pipe,
                                   void *so)
 {
@@ -72,13 +73,15 @@ softpipe_bind_stream_output_state(struct pipe_context *pipe,
       draw_set_so_state(softpipe->draw, &sp_so->base);
 }
 
-void
+
+static void
 softpipe_delete_stream_output_state(struct pipe_context *pipe, void *so)
 {
    FREE( so );
 }
 
-void
+
+static void
 softpipe_set_stream_output_buffers(struct pipe_context *pipe,
                                    struct pipe_resource **buffers,
                                    int *offsets,
@@ -122,3 +125,16 @@ softpipe_set_stream_output_buffers(struct pipe_context *pipe,
 
    draw_set_mapped_so_buffers(softpipe->draw, map_buffers, num_buffers);
 }
+
+
+
+void
+softpipe_init_streamout_funcs(struct pipe_context *pipe)
+{
+   pipe->create_stream_output_state = softpipe_create_stream_output_state;
+   pipe->bind_stream_output_state = softpipe_bind_stream_output_state;
+   pipe->delete_stream_output_state = softpipe_delete_stream_output_state;
+
+   pipe->set_stream_output_buffers = softpipe_set_stream_output_buffers;
+}
+