summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/ppu/cell_state_vertex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/cell/ppu/cell_state_vertex.c')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_state_vertex.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_state_vertex.c b/src/gallium/drivers/cell/ppu/cell_state_vertex.c
index 69152b6cbf..4e3701cd0a 100644
--- a/src/gallium/drivers/cell/ppu/cell_state_vertex.c
+++ b/src/gallium/drivers/cell/ppu/cell_state_vertex.c
@@ -91,10 +91,26 @@ cell_set_vertex_buffers(struct pipe_context *pipe,
}
+static void
+cell_set_index_buffer(struct pipe_context *pipe,
+ const struct pipe_index_buffer *ib)
+{
+ struct cell_context *cell = cell_context(pipe);
+
+ if (ib)
+ memcpy(&cell->index_buffer, ib, sizeof(cell->index_buffer));
+ else
+ memset(&cell->index_buffer, 0, sizeof(cell->index_buffer));
+
+ /* TODO make this more like a state */
+}
+
+
void
cell_init_vertex_functions(struct cell_context *cell)
{
cell->pipe.set_vertex_buffers = cell_set_vertex_buffers;
+ cell->pipe.set_index_buffer = cell_set_index_buffer;
cell->pipe.create_vertex_elements_state = cell_create_vertex_elements_state;
cell->pipe.bind_vertex_elements_state = cell_bind_vertex_elements_state;
cell->pipe.delete_vertex_elements_state = cell_delete_vertex_elements_state;