diff options
author | Jerome Glisse <[email protected]> | 2010-12-03 20:47:02 -0500 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2010-12-06 15:50:50 -0500 |
commit | fa86fc564aea4e40c89f6fc889e6a5bf817634b3 (patch) | |
tree | 01ee2a066008b93387562771563cf1b83e2a4230 /src/gallium/drivers/r600/r600_buffer.c | |
parent | a9fa0f3a2f318a7c57163491abe931e86b2cd4c3 (diff) |
r600g: build fetch shader from vertex elements
Vertex elements change are less frequent than draw call, those to
avoid rebuilding fetch shader to often build the fetch shader along
vertex elements. This also allow to move vertex buffer setup out
of draw path and make update to it less frequent.
Shader update can still be improved to only update SPI regs (based
on some rasterizer state like flat shading or point sprite ...).
Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_buffer.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_buffer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_buffer.c b/src/gallium/drivers/r600/r600_buffer.c index 51b8abaaa12..03a61a3213c 100644 --- a/src/gallium/drivers/r600/r600_buffer.c +++ b/src/gallium/drivers/r600/r600_buffer.c @@ -267,10 +267,11 @@ int r600_upload_user_buffers(struct r600_pipe_context *rctx) int i, nr; nr = rctx->vertex_elements->count; + nr = rctx->nvertex_buffer; for (i = 0; i < nr; i++) { - struct pipe_vertex_buffer *vb = - &rctx->vertex_buffer[rctx->vertex_elements->elements[i].vertex_buffer_index]; +// struct pipe_vertex_buffer *vb = &rctx->vertex_buffer[rctx->vertex_elements->elements[i].vertex_buffer_index]; + struct pipe_vertex_buffer *vb = &rctx->vertex_buffer[i]; if (r600_buffer_is_user_buffer(vb->buffer)) { struct pipe_resource *upload_buffer = NULL; |