summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_rebase.c
diff options
context:
space:
mode:
authorThomas Balling Sørensen <tball@tball-laptop.(none)>2010-10-26 12:49:41 +0200
committerThomas Balling Sørensen <tball@tball-laptop.(none)>2010-10-26 12:49:41 +0200
commitdbf3a15313eed930a3d8fdde12e457259c43651b (patch)
tree78bc54fa866ff1e97e61802f52dabe3f4f3380b1 /src/mesa/vbo/vbo_rebase.c
parent1dccc4cfaa423f15ab582d2a0253a84a0ae0b9fa (diff)
parent547e7619aac74ae13bdaa7fdf403a4ceb5212467 (diff)
Merge branch 'master' into pipe-video
Conflicts: src/gallium/include/pipe/p_format.h
Diffstat (limited to 'src/mesa/vbo/vbo_rebase.c')
-rw-r--r--src/mesa/vbo/vbo_rebase.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/vbo/vbo_rebase.c b/src/mesa/vbo/vbo_rebase.c
index ff7c7a6b0d5..9068ae240a6 100644
--- a/src/mesa/vbo/vbo_rebase.c
+++ b/src/mesa/vbo/vbo_rebase.c
@@ -85,6 +85,18 @@ GLboolean vbo_all_varyings_in_vbos( const struct gl_client_array *arrays[] )
return GL_TRUE;
}
+GLboolean vbo_any_varyings_in_vbos( const struct gl_client_array *arrays[] )
+{
+ GLuint i;
+
+ for (i = 0; i < VERT_ATTRIB_MAX; i++)
+ if (arrays[i]->StrideB &&
+ arrays[i]->BufferObj->Name != 0)
+ return GL_TRUE;
+
+ return GL_FALSE;
+}
+
/* Adjust primitives, indices and vertex definitions so that min_index
* becomes zero. There are lots of reasons for wanting to do this, eg:
*
@@ -104,7 +116,7 @@ GLboolean vbo_all_varyings_in_vbos( const struct gl_client_array *arrays[] )
* - can't save time by trying to upload half a vbo - typically it is
* all or nothing.
*/
-void vbo_rebase_prims( GLcontext *ctx,
+void vbo_rebase_prims( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,