Mesa (master): draw: use the vertex size

Zack Rusin zack at kemper.freedesktop.org
Sat Aug 3 00:15:32 UTC 2013


Module: Mesa
Branch: master
Commit: 2e46a1dcb33618f2873ebaaeb3ffe238f11a31a3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2e46a1dcb33618f2873ebaaeb3ffe238f11a31a3

Author: Zack Rusin <zackr at vmware.com>
Date:   Fri Aug  2 01:48:36 2013 -0400

draw: use the vertex size

Instead of using the magical 4 use the above computed
vertex size. Doesn't change the behavior, just makes the code
a bit cleaner.

Signed-off-by: Zack Rusin <zackr at vmware.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Reviewed-by: Jose Fonseca <jfonseca at vmware.com>

---

 src/gallium/auxiliary/draw/draw_pipe_vbuf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
index d3b38eb..092440e 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
@@ -250,7 +250,7 @@ vbuf_start_prim( struct vbuf_stage *vbuf, uint prim )
    }
 
    hw_key.nr_elements = vbuf->vinfo->num_attribs;
-   hw_key.output_stride = vbuf->vinfo->size * 4;
+   hw_key.output_stride = vbuf->vertex_size;
 
    /* Don't bother with caching at this stage:
     */




More information about the mesa-commit mailing list