summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_vbo.c
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-11-07 10:34:00 -0800
committerCorbin Simpson <[email protected]>2009-11-07 11:53:14 -0800
commit746c01b3b2f77d8d8ba14fc517d04dbaf080d77d (patch)
tree8c5e63df29623823dc2c9ab6985565efe888b4d1 /src/gallium/drivers/r300/r300_vbo.c
parentb6c3954138ef70ea7d2cbd3ba9519f404ef616d7 (diff)
r300g: Moar vbo cleanup.
Diffstat (limited to 'src/gallium/drivers/r300/r300_vbo.c')
-rw-r--r--src/gallium/drivers/r300/r300_vbo.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/gallium/drivers/r300/r300_vbo.c b/src/gallium/drivers/r300/r300_vbo.c
index be74a49eb8c..cec79ec97e0 100644
--- a/src/gallium/drivers/r300/r300_vbo.c
+++ b/src/gallium/drivers/r300/r300_vbo.c
@@ -118,13 +118,16 @@ static INLINE int get_buffer_offset(struct r300_context *r300,
*/
static void setup_vertex_buffers(struct r300_context *r300)
{
- for (int i=0; i<r300->aos_count; i++)
+ struct pipe_vertex_element *vert_elem;
+ int i;
+
+ for (i = 0; i < r300->aos_count; i++)
{
- struct pipe_vertex_element *vert_elem = &r300->vertex_element[i];
- if (!format_is_supported(vert_elem->src_format, vert_elem->nr_components))
- {
+ vert_elem = &r300->vertex_element[i];
+ if (!format_is_supported(vert_elem->src_format,
+ vert_elem->nr_components)) {
+ /* XXX use translate module to convert the data */
assert(0);
- /* use translate module to convert the data */
/*
struct pipe_buffer *buf;
const unsigned int max_index = r300->vertex_buffers[vert_elem->vertex_buffer_index].max_index;
@@ -132,9 +135,10 @@ static void setup_vertex_buffers(struct r300_context *r300)
*/
}
- if (get_buffer_offset(r300, vert_elem->vertex_buffer_index, vert_elem->src_offset) % 4 != 0)
- {
- /* need to align buffer */
+ if (get_buffer_offset(r300,
+ vert_elem->vertex_buffer_index,
+ vert_elem->src_offset) % 4) {
+ /* XXX need to align buffer */
assert(0);
}
setup_vertex_array(r300, vert_elem);