diff options
author | Marek Olšák <[email protected]> | 2011-09-25 18:13:50 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-09-26 15:25:04 +0200 |
commit | 0b3270b9b72c2ca4fad172752045d8fa93c1ad6e (patch) | |
tree | 0b7033979780969ded358fde8c1f635cb4837f26 /src/gallium/drivers/r600 | |
parent | 455a19b1b3d7ca0a40c65d89e45209dbd8ac7b35 (diff) |
u_vbuf_mgr: cleanup original vs real vertex buffer arrays
It can now override both buffer offsets and strides in additions to resources.
Overriding buffer offsets was kinda hackish and could cause issues with
non-native vertex formats.
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/r600_state_common.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index a331b0a4a56..559e75a8f11 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -506,13 +506,13 @@ static void r600_vertex_buffer_update(struct r600_pipe_context *rctx) /* one resource per vertex elements */ unsigned vbuffer_index; vbuffer_index = rctx->vertex_elements->elements[i].vertex_buffer_index; - vertex_buffer = &rctx->vbuf_mgr->vertex_buffer[vbuffer_index]; - rbuffer = (struct r600_resource*)rctx->vbuf_mgr->real_vertex_buffer[vbuffer_index]; + vertex_buffer = &rctx->vbuf_mgr->real_vertex_buffer[vbuffer_index]; + rbuffer = (struct r600_resource*)vertex_buffer->buffer; offset = rctx->vertex_elements->vbuffer_offset[i]; } else { /* bind vertex buffer once */ - vertex_buffer = &rctx->vbuf_mgr->vertex_buffer[i]; - rbuffer = (struct r600_resource*)rctx->vbuf_mgr->real_vertex_buffer[i]; + vertex_buffer = &rctx->vbuf_mgr->real_vertex_buffer[i]; + rbuffer = (struct r600_resource*)vertex_buffer->buffer; offset = 0; } if (vertex_buffer == NULL || rbuffer == NULL) |