added state funcs for vertex buffer/element info
authorBrian <brian.paul@tungstengraphics.com>
Wed, 15 Aug 2007 17:45:12 +0000 (11:45 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 15 Aug 2007 17:45:12 +0000 (11:45 -0600)
src/mesa/pipe/softpipe/Makefile
src/mesa/pipe/softpipe/sp_context.h
src/mesa/pipe/softpipe/sp_state.h

index 615c612e9c74e98a6ea2abbda5c01ef8ddb9b612..9c6d78c290ecd450d9e006ea849fe97b5efe0c71 100644 (file)
@@ -29,6 +29,7 @@ DRIVER_SOURCES = \
        sp_state_sampler.c \
        sp_state_setup.c \
        sp_state_surface.c \
+       sp_state_vertex.c \
        sp_tex_layout.c \
        sp_tex_sample.c \
        sp_surface.c 
index 8887c576c1faccf23fdabce55b133d0d8a745570..8b0e970ea2db3108f1e9850c648bbbc7b49a455b 100644 (file)
@@ -64,6 +64,7 @@ enum interp_mode {
 #define SP_NEW_SAMPLER     0x400
 #define SP_NEW_TEXTURE     0x800
 #define SP_NEW_STENCIL    0x1000
+#define SP_NEW_VERTEX     0x2000
 
 
 struct softpipe_context {     
@@ -88,6 +89,8 @@ struct softpipe_context {
    struct pipe_stencil_state stencil;
    struct pipe_mipmap_tree *texture[PIPE_MAX_SAMPLERS];
    struct pipe_viewport_state viewport;
+   struct pipe_vertex_buffer vertex_buffer[PIPE_ATTRIB_MAX];
+   struct pipe_vertex_element vertex_element[PIPE_ATTRIB_MAX];
    unsigned dirty;
 
    /* Setup derived state.  TODO: this should be passed in the program
index 5adf5930b85df4107ba594fbe76195e5c23b2bf3..9e5ed96901e79470450f4683f7af04b086f6af35 100644 (file)
@@ -81,6 +81,14 @@ void softpipe_set_texture_state( struct pipe_context *,
 void softpipe_set_viewport_state( struct pipe_context *,
                                   const struct pipe_viewport_state * );
 
+void softpipe_set_vertex_element(struct pipe_context *,
+                                 unsigned index,
+                                 const struct pipe_vertex_element *);
+
+void softpipe_set_vertex_buffer(struct pipe_context *,
+                                unsigned index,
+                                const struct pipe_vertex_buffer *);
+
 void softpipe_update_derived( struct softpipe_context *softpipe );
 
 #endif