diff options
author | Marek Olšák <[email protected]> | 2011-01-29 13:58:02 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-01-30 03:29:48 +0100 |
commit | 8d0a540020f6389ca5efcd0e1fbef45a4a1f5b6a (patch) | |
tree | 54070b8a3580e174536d742a6a273a0add5b6cb1 /src/gallium/drivers/r300/r300_state.c | |
parent | 77900843b42d9672c6b10f49c177a172041f6a8d (diff) |
r300g: rework vertex format fallback
1) Only translate the [min_index, max_index] range.
2) Upload translated vertices via the uploader.
3) Rename valid_vertex_buffer[] to real_vertex_buffer[]
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index ba456d413f6..dad41ab91ed 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1560,21 +1560,22 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe, /* Reference our buffer. */ pipe_resource_reference(&r300->vertex_buffer[i].buffer, vbo->buffer); if (vbo->buffer && r300_is_user_buffer(vbo->buffer)) { - pipe_resource_reference(&r300->valid_vertex_buffer[i], NULL); + pipe_resource_reference(&r300->real_vertex_buffer[i], NULL); } else { - pipe_resource_reference(&r300->valid_vertex_buffer[i], vbo->buffer); + pipe_resource_reference(&r300->real_vertex_buffer[i], vbo->buffer); } } - for (; i < r300->vertex_buffer_count; i++) { + for (; i < r300->real_vertex_buffer_count; i++) { /* Dereference any old buffers. */ pipe_resource_reference(&r300->vertex_buffer[i].buffer, NULL); - pipe_resource_reference(&r300->valid_vertex_buffer[i], NULL); + pipe_resource_reference(&r300->real_vertex_buffer[i], NULL); } memcpy(r300->vertex_buffer, buffers, sizeof(struct pipe_vertex_buffer) * count); r300->vertex_buffer_count = count; + r300->real_vertex_buffer_count = count; } static void r300_set_index_buffer(struct pipe_context* pipe, |