diff options
author | Marek Olšák <[email protected]> | 2012-01-03 21:33:55 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-01-05 18:29:11 +0100 |
commit | 2b851526c1c047bba7ebb7e51706b1694f027947 (patch) | |
tree | c0b26f65f3a1212cce9b3e707494129fe09eb8cc /src/gallium/auxiliary | |
parent | 64242b23c1893dd6e1c048beee0e1573aeaf1abc (diff) |
u_vbuf: cleanup variable names to be consistent
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/util/u_vbuf.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index 4e94e40269b..5dfee42bcbd 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -164,11 +164,9 @@ void u_vbuf_destroy(struct u_vbuf *mgrb) } static void -u_vbuf_translate_buffers(struct u_vbuf_priv *mgr, - struct translate_key *key, - unsigned vb_mask, - unsigned out_vb, - int start, unsigned count) +u_vbuf_translate_buffers(struct u_vbuf_priv *mgr, struct translate_key *key, + unsigned vb_mask, unsigned out_vb, + int start_vertex, unsigned num_vertices) { struct translate *tr; struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = {0}; @@ -183,13 +181,13 @@ u_vbuf_translate_buffers(struct u_vbuf_priv *mgr, for (i = 0; i < mgr->b.nr_vertex_buffers; i++) { if (vb_mask & (1 << i)) { struct pipe_vertex_buffer *vb = &mgr->b.vertex_buffer[i]; - unsigned offset = vb->buffer_offset + vb->stride * start; + unsigned offset = vb->buffer_offset + vb->stride * start_vertex; uint8_t *map; if (u_vbuf_resource(vb->buffer)->user_ptr) { map = u_vbuf_resource(vb->buffer)->user_ptr + offset; } else { - unsigned size = vb->stride ? count * vb->stride + unsigned size = vb->stride ? num_vertices * vb->stride : sizeof(double)*4; if (offset+size > vb->buffer->width0) { @@ -206,15 +204,15 @@ u_vbuf_translate_buffers(struct u_vbuf_priv *mgr, /* Create and map the output buffer. */ u_upload_alloc(mgr->b.uploader, - key->output_stride * start, - key->output_stride * count, + key->output_stride * start_vertex, + key->output_stride * num_vertices, &out_offset, &out_buffer, (void**)&out_map); - out_offset -= key->output_stride * start; + out_offset -= key->output_stride * start_vertex; /* Translate. */ - tr->run(tr, 0, count, 0, out_map); + tr->run(tr, 0, num_vertices, 0, out_map); /* Unmap all buffers. */ for (i = 0; i < mgr->b.nr_vertex_buffers; i++) { @@ -298,7 +296,7 @@ u_vbuf_translate_begin(struct u_vbuf_priv *mgr, 0 /* CONST */ }; - unsigned count[VB_NUM] = { + unsigned num[VB_NUM] = { num_vertices, /* VERTEX */ num_instances, /* INSTANCE */ 1 /* CONST */ @@ -378,7 +376,7 @@ u_vbuf_translate_begin(struct u_vbuf_priv *mgr, if (key[type].nr_elements) { u_vbuf_translate_buffers(mgr, &key[type], mask[type], mgr->fallback_vbs[type], - start[type], count[type]); + start[type], num[type]); /* Fixup the stride for constant attribs. */ if (type == VB_CONST) { |