diff options
author | Ian Romanick <[email protected]> | 2010-08-13 20:22:46 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-08-13 20:22:46 -0700 |
commit | 443a7e4e9a360acbc3e662c098be436f180bf81d (patch) | |
tree | 71125fc394bdcbc17cd7ed74c592b9a7761541f8 /src/gallium/drivers/nvfx/nvfx_state.c | |
parent | 2f8ee757ab324d599fcb8287789eb5f1a7890d74 (diff) | |
parent | 27041d7cb3faeaed483538a228573466363ec1c7 (diff) |
Merge branch 'master' into glsl2
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_state.c')
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_state.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_state.c b/src/gallium/drivers/nvfx/nvfx_state.c index 30322d46d93..cd58e439d71 100644 --- a/src/gallium/drivers/nvfx/nvfx_state.c +++ b/src/gallium/drivers/nvfx/nvfx_state.c @@ -555,6 +555,20 @@ nvfx_set_vertex_buffers(struct pipe_context *pipe, unsigned count, nvfx->draw_dirty |= NVFX_NEW_ARRAYS; } +static void +nvfx_set_index_buffer(struct pipe_context *pipe, + const struct pipe_index_buffer *ib) +{ + struct nvfx_context *nvfx = nvfx_context(pipe); + + if (ib) + memcpy(&nvfx->idxbuf, ib, sizeof(nvfx->idxbuf)); + else + memset(&nvfx->idxbuf, 0, sizeof(nvfx->idxbuf)); + + /* TODO make this more like a state */ +} + static void * nvfx_vtxelts_state_create(struct pipe_context *pipe, unsigned num_elements, @@ -635,4 +649,5 @@ nvfx_init_state_functions(struct nvfx_context *nvfx) nvfx->pipe.bind_vertex_elements_state = nvfx_vtxelts_state_bind; nvfx->pipe.set_vertex_buffers = nvfx_set_vertex_buffers; + nvfx->pipe.set_index_buffer = nvfx_set_index_buffer; } |