mesa: added gl_buffer_object::Written flag (for debug purposes)

The flag is set when we data has been written into the buffer object.
This commit is contained in:
Brian Paul
2009-05-06 15:23:09 -06:00
parent b9d0f947f2
commit dcca97a3e3
2 changed files with 7 additions and 0 deletions

View File

@@ -962,6 +962,8 @@ _mesa_BufferDataARB(GLenum target, GLsizeiptrARB size,
ASSERT(ctx->Driver.BufferData);
bufObj->Written = GL_TRUE;
/* Give the buffer object to the driver! <data> may be null! */
ctx->Driver.BufferData( ctx, target, size, data, usage, bufObj );
}
@@ -982,6 +984,8 @@ _mesa_BufferSubDataARB(GLenum target, GLintptrARB offset,
return;
}
bufObj->Written = GL_TRUE;
ASSERT(ctx->Driver.BufferSubData);
ctx->Driver.BufferSubData( ctx, target, offset, size, data, bufObj );
}
@@ -1046,6 +1050,8 @@ _mesa_MapBufferARB(GLenum target, GLenum access)
}
bufObj->Access = access;
if (access == GL_WRITE_ONLY_ARB || access == GL_READ_WRITE_ARB)
bufObj->Written = GL_TRUE;
return bufObj->Pointer;
}