Mesa (master): vbo: minor clean-ups for vbo_exec_fixup_vertex()

Brian Paul brianp at kemper.freedesktop.org
Tue Oct 13 14:58:04 UTC 2015


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

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Oct 12 10:58:49 2015 -0600

vbo: minor clean-ups for vbo_exec_fixup_vertex()

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/mesa/vbo/vbo_exec_api.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 3943523..a99887a 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -375,13 +375,16 @@ vbo_exec_wrap_upgrade_vertex(struct vbo_exec_context *exec,
  * This is when a vertex attribute transitions to a different size.
  * For example, we saw a bunch of glTexCoord2f() calls and now we got a
  * glTexCoord4f() call.  We promote the array from size=2 to size=4.
+ * \param newSize  size of new vertex (number of 32-bit words).
  */
 static void
-vbo_exec_fixup_vertex(struct gl_context *ctx, GLuint attr, GLuint newSize, GLenum newType)
+vbo_exec_fixup_vertex(struct gl_context *ctx, GLuint attr,
+                      GLuint newSize, GLenum newType)
 {
    struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
 
-   if (newSize > exec->vtx.attrsz[attr] || newType != exec->vtx.attrtype[attr]) {
+   if (newSize > exec->vtx.attrsz[attr] ||
+       newType != exec->vtx.attrtype[attr]) {
       /* New size is larger.  Need to flush existing vertices and get
        * an enlarged vertex format.
        */




More information about the mesa-commit mailing list