diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/bufferobj.c | 9 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 7 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 998228e8008..84af8158ad2 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.2 * * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * @@ -592,8 +592,11 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids) } /* decrement refcount and delete if <= 0 */ - bufObj->DeletePending = GL_TRUE; - bufObj->RefCount--; + if (!bufObj->DeletePending) { + bufObj->DeletePending = GL_TRUE; + bufObj->RefCount--; + } + if (bufObj->RefCount <= 0) { /* buffer should not be bound anymore! */ ASSERT(ctx->Array.ArrayBufferObj != bufObj); diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 3e5c04415d2..be6882f203f 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1574,10 +1574,11 @@ struct program_parameter_list; struct program { GLuint Id; - GLubyte *String; /* Null-terminated program text */ - GLenum Target; - GLenum Format; /* String encoding format */ + GLubyte *String; /**< Null-terminated program text */ + GLboolean DeletePending; /**< User called glDeletePrograms? */ GLint RefCount; + GLenum Target; + GLenum Format; /**< String encoding format */ GLboolean Resident; GLfloat LocalParams[MAX_PROGRAM_LOCAL_PARAMS][4]; GLuint NumInstructions; /* GL_ARB_vertex/fragment_program */ |