Ian Romanick wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Chris Wilson wrote: > >> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c >> index 52c4995..08633a9 100644 >> --- a/src/mesa/main/bufferobj.c >> +++ b/src/mesa/main/bufferobj.c >> @@ -37,6 +37,8 @@ >> #include "image.h" >> #include "context.h" >> #include "bufferobj.h" >> +#include "fbobject.h" >> +#include "texobj.h" >> >> >> /* Debug flags */ >> @@ -1655,3 +1657,351 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr >> offset, GLsizeiptr length) >> if (ctx->Driver.FlushMappedBufferRange) >> ctx->Driver.FlushMappedBufferRange(ctx, target, offset, length, >> bufObj); >> } >> + >> +#if FEATURE_APPLE_object_purgeable >> +static GLenum >> +_mesa_RenderObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option) >> +{ >> + struct gl_renderbuffer *bufObj; >> + GLenum retval; >> + >> + bufObj = _mesa_lookup_renderbuffer(ctx, name); >> + if (!bufObj) { >> + _mesa_error(ctx, GL_INVALID_VALUE, >> + "glObjectUnpurgeable(name = 0x%x)", name); >> + return 0; >> + } >> + >> + if (bufObj->Purgeable) { >> + _mesa_error(ctx, GL_INVALID_OPERATION, >> + "glObjectPurgeable(name = 0x%x) is already purgeable", >> name); >> + return GL_VOLATILE_APPLE; >> + } >> + >> + bufObj->Purgeable = GL_TRUE; >> + >> + retval = GL_VOLATILE_APPLE; >> + if (ctx->Driver.ObjectPurgeable_RenderObject) >> + retval = ctx->Driver.ObjectPurgeable_RenderObject(ctx, bufObj, >> option); >> + >> + return retval; >> +} >> + >> +static GLenum >> +_mesa_TextureObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option) > > Usually, only functions that are connected directly to the dispatch > table get camel case. Functions that are only used internally are > usually named _mesa_texture_object_purgeable. > > I don't know if it's worth changing these. Brian may have an opinion > about this.
Yes, that's what I'd prefer. The idea is if you're looking for code related to glBindTexture() you can grep for "BindTexture", for example. When I see _mesa_TextureObjectPurgeable() I'm thinking "is there an API entrypoint named glTextureObjectPurgeable()? (there isn't) -Brian ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel