aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-06-11 19:03:54 +0100
committerJosé Fonseca <[email protected]>2009-06-11 19:03:54 +0100
commit877061141ae263128eac8ec1f1077f34e52651fa (patch)
tree56572cad55e67359217ac2be6db7cb56b6a586b1 /src/mesa/vbo
parentbf89ecb6c92aaaeccd7b6f093cb8bae9fd56aaf6 (diff)
parentde413b1ba9f30771bceacdbc160192d964a1ca63 (diff)
Merge branch 'mesa_7_5_branch'
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_exec_api.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 372d6819c1f..b746a77bc19 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -51,6 +51,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#endif
+/** ID/name for immediate-mode VBO */
+#define IMM_BUFFER_NAME 0xaabbccdd
+
+
static void reset_attrfv( struct vbo_exec_context *exec );
@@ -665,7 +669,7 @@ void vbo_use_buffer_objects(GLcontext *ctx)
/* Any buffer name but 0 can be used here since this bufferobj won't
* go into the bufferobj hashtable.
*/
- GLuint bufName = 0xaabbccdd;
+ GLuint bufName = IMM_BUFFER_NAME;
GLenum target = GL_ARRAY_BUFFER_ARB;
GLenum usage = GL_STREAM_DRAW_ARB;
GLsizei size = VBO_VERT_BUFFER_SIZE;
@@ -734,7 +738,8 @@ void vbo_exec_vtx_destroy( struct vbo_exec_context *exec )
/* True VBOs should already be unmapped
*/
if (exec->vtx.buffer_map) {
- assert (exec->vtx.bufferobj->Name == 0);
+ ASSERT(exec->vtx.bufferobj->Name == 0 ||
+ exec->vtx.bufferobj->Name == IMM_BUFFER_NAME);
if (exec->vtx.bufferobj->Name == 0) {
ALIGN_FREE(exec->vtx.buffer_map);
exec->vtx.buffer_map = NULL;