<div dir="ltr">I also need it in teximage.c for Texture Buffer objects.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 3, 2015 at 5:24 PM, Fredrik Höglund <span dir="ltr"><<a href="mailto:fredrik@kde.org" target="_blank">fredrik@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wednesday 04 March 2015, Anuj Phogat wrote:<br>
> On Fri, Feb 27, 2015 at 4:07 PM, Laura Ekstrand <<a href="mailto:laura@jlekstrand.net">laura@jlekstrand.net</a>> wrote:<br>
> > ---<br>
> > src/mesa/main/bufferobj.c | 19 +++++++++++++++++++<br>
> > src/mesa/main/bufferobj.h | 4 ++++<br>
> > 2 files changed, 23 insertions(+)<br>
> ><br>
> > diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c<br>
> > index f026fc3..617242b 100644<br>
> > --- a/src/mesa/main/bufferobj.c<br>
> > +++ b/src/mesa/main/bufferobj.c<br>
> > @@ -1006,6 +1006,25 @@ _mesa_lookup_bufferobj_locked(struct gl_context *ctx, GLuint buffer)<br>
> > _mesa_HashLookupLocked(ctx->Shared->BufferObjects, buffer);<br>
> > }<br>
> ><br>
> > +/**<br>
> > + * A convenience function for direct state access functions that throws<br>
> > + * GL_INVALID_OPERATION if buffer is not the name of a buffer object in the<br>
> > + * hash table.<br>
> > + */<br>
> > +struct gl_buffer_object *<br>
> > +_mesa_lookup_bufferobj_err(struct gl_context *ctx, GLuint buffer,<br>
> > + const char *caller)<br>
> > +{<br>
> > + struct gl_buffer_object *bufObj;<br>
> > +<br>
> > + bufObj = _mesa_lookup_bufferobj(ctx, buffer);<br>
> > + if (!bufObj)<br>
> > + _mesa_error(ctx, GL_INVALID_OPERATION,<br>
> > + "%s(non-generated buffer name %u)", caller, buffer);<br>
> > +<br>
> > + return bufObj;<br>
> > +}<br>
> > +<br>
> ><br>
> > void<br>
> > _mesa_begin_bufferobj_lookups(struct gl_context *ctx)<br>
> > diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h<br>
> > index fe294fc..8e53bfd 100644<br>
> > --- a/src/mesa/main/bufferobj.h<br>
> > +++ b/src/mesa/main/bufferobj.h<br>
> > @@ -89,6 +89,10 @@ _mesa_lookup_bufferobj(struct gl_context *ctx, GLuint buffer);<br>
> > extern struct gl_buffer_object *<br>
> > _mesa_lookup_bufferobj_locked(struct gl_context *ctx, GLuint buffer);<br>
> ><br>
> > +extern struct gl_buffer_object *<br>
> > +_mesa_lookup_bufferobj_err(struct gl_context *ctx, GLuint buffer,<br>
> > + const char *caller);<br>
> > +<br>
> This function is used just inside teximage.c in patch 5/6. So, it can be made<br>
> static.<br>
<br>
</div></div>No, I'm using it in arrayobj.c in my arb-direct-state-access branch.<br>
<div class="HOEnZb"><div class="h5"><br>
> > extern void<br>
> > _mesa_begin_bufferobj_lookups(struct gl_context *ctx);<br>
> ><br>
> > --<br>
> > 2.1.0<br>
> ><br>
> > _______________________________________________<br>
> > mesa-dev mailing list<br>
> > <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> > <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
><br>
<br>
</div></div></blockquote></div><br></div>