features.txt can be updated.
Marek On Sat, Sep 8, 2018 at 12:34 AM Timothy Arceri <tarc...@itsqueeze.com> wrote: > > This is available in ARB_buffer_storage when > EXT_direct_state_access is present. > --- > src/mapi/glapi/gen/gl_API.xml | 7 +++++++ > src/mesa/main/bufferobj.c | 15 +++++++++++++++ > src/mesa/main/bufferobj.h | 3 +++ > src/mesa/main/tests/dispatch_sanity.cpp | 1 + > 4 files changed, 26 insertions(+) > > diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml > index 8403c80eb37..e65b24a1dbb 100644 > --- a/src/mapi/glapi/gen/gl_API.xml > +++ b/src/mapi/glapi/gen/gl_API.xml > @@ -8271,6 +8271,13 @@ > <param name="data" type="const GLvoid *"/> > <param name="flags" type="GLbitfield"/> > </function> > + > + <function name="NamedBufferStorageEXT"> > + <param name="buffer" type="GLuint" /> > + <param name="size" type="GLsizeiptr" /> > + <param name="data" type="const GLvoid *" /> > + <param name="flags" type="GLbitfield" /> > + </function> > </category> > > <xi:include href="ARB_clear_texture.xml" > xmlns:xi="http://www.w3.org/2001/XInclude"/> > diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c > index aa8d7062cb6..de809d31f35 100644 > --- a/src/mesa/main/bufferobj.c > +++ b/src/mesa/main/bufferobj.c > @@ -1930,6 +1930,21 @@ _mesa_BufferStorage(GLenum target, GLsizeiptr size, > const GLvoid *data, > false, false, false, "glBufferStorage"); > } > > +void GLAPIENTRY > +_mesa_NamedBufferStorageEXT(GLuint buffer, GLsizeiptr size, > + const GLvoid *data, GLbitfield flags) > +{ > + GET_CURRENT_CONTEXT(ctx); > + > + struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); > + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, > + &bufObj, "glNamedBufferStorageEXT")) > + return; > + > + inlined_buffer_storage(GL_NONE, buffer, size, data, flags, GL_NONE, 0, > + true, false, false, "glNamedBufferStorageEXT"); > +} > + > > void GLAPIENTRY > _mesa_BufferStorageMemEXT(GLenum target, GLsizeiptr size, > diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h > index 74124649bb6..6b35d70606f 100644 > --- a/src/mesa/main/bufferobj.h > +++ b/src/mesa/main/bufferobj.h > @@ -189,6 +189,9 @@ void GLAPIENTRY > _mesa_BufferStorage(GLenum target, GLsizeiptr size, const GLvoid *data, > GLbitfield flags); > void GLAPIENTRY > +_mesa_NamedBufferStorageEXT(GLuint buffer, GLsizeiptr size, > + const GLvoid *data, GLbitfield flags); > +void GLAPIENTRY > _mesa_BufferStorageMemEXT(GLenum target, GLsizeiptr size, > GLuint memory, GLuint64 offset); > void GLAPIENTRY > diff --git a/src/mesa/main/tests/dispatch_sanity.cpp > b/src/mesa/main/tests/dispatch_sanity.cpp > index 1b8dec18c20..5a0cdfd78f2 100644 > --- a/src/mesa/main/tests/dispatch_sanity.cpp > +++ b/src/mesa/main/tests/dispatch_sanity.cpp > @@ -1304,6 +1304,7 @@ const struct function > common_desktop_functions_possible[] = { > > /* GL_ARB_buffer_storage */ > { "glBufferStorage", 43, -1 }, > + { "glNamedBufferStorageEXT", 43, -1 }, > > /* GL_ARB_clear_texture */ > { "glClearTexImage", 13, -1 }, > -- > 2.17.1 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev