summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_state_vertex.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-09-25 14:06:58 -0600
committerBrian Paul <brianp@vmware.com>2010-09-25 14:25:40 -0600
commiteed4509b086828c6229a7b1865978ffa27377874 (patch)
tree279c622742ea2547e5694abe1262083178a0d5ed /src/gallium/drivers/softpipe/sp_state_vertex.c
parentc5dd2e40e268e40335a47b86b7c4ce201e337a77 (diff)
softpipe: make vertex state functions static
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_state_vertex.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_state_vertex.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_vertex.c b/src/gallium/drivers/softpipe/sp_state_vertex.c
index b650fcaea5..7d8055f2ba 100644
--- a/src/gallium/drivers/softpipe/sp_state_vertex.c
+++ b/src/gallium/drivers/softpipe/sp_state_vertex.c
@@ -36,7 +36,7 @@
#include "draw/draw_context.h"
-void *
+static void *
softpipe_create_vertex_elements_state(struct pipe_context *pipe,
unsigned count,
const struct pipe_vertex_element *attribs)
@@ -51,7 +51,8 @@ softpipe_create_vertex_elements_state(struct pipe_context *pipe,
return velems;
}
-void
+
+static void
softpipe_bind_vertex_elements_state(struct pipe_context *pipe,
void *velems)
{
@@ -66,13 +67,15 @@ softpipe_bind_vertex_elements_state(struct pipe_context *pipe,
draw_set_vertex_elements(softpipe->draw, sp_velems->count, sp_velems->velem);
}
-void
+
+static void
softpipe_delete_vertex_elements_state(struct pipe_context *pipe, void *velems)
{
FREE( velems );
}
-void
+
+static void
softpipe_set_vertex_buffers(struct pipe_context *pipe,
unsigned count,
const struct pipe_vertex_buffer *buffers)
@@ -89,7 +92,8 @@ softpipe_set_vertex_buffers(struct pipe_context *pipe,
draw_set_vertex_buffers(softpipe->draw, count, buffers);
}
-void
+
+static void
softpipe_set_index_buffer(struct pipe_context *pipe,
const struct pipe_index_buffer *ib)
{
@@ -102,3 +106,15 @@ softpipe_set_index_buffer(struct pipe_context *pipe,
draw_set_index_buffer(softpipe->draw, ib);
}
+
+
+void
+softpipe_init_vertex_funcs(struct pipe_context *pipe)
+{
+ pipe->create_vertex_elements_state = softpipe_create_vertex_elements_state;
+ pipe->bind_vertex_elements_state = softpipe_bind_vertex_elements_state;
+ pipe->delete_vertex_elements_state = softpipe_delete_vertex_elements_state;
+
+ pipe->set_vertex_buffers = softpipe_set_vertex_buffers;
+ pipe->set_index_buffer = softpipe_set_index_buffer;
+}