main: Add entry point for FlushMappedNamedBufferRange.
authorLaura Ekstrand <laura@jlekstrand.net>
Thu, 12 Feb 2015 00:06:52 +0000 (16:06 -0800)
committerLaura Ekstrand <laura@jlekstrand.net>
Tue, 17 Mar 2015 17:18:34 +0000 (10:18 -0700)
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
src/mapi/glapi/gen/ARB_direct_state_access.xml
src/mesa/main/bufferobj.c
src/mesa/main/bufferobj.h
src/mesa/main/tests/dispatch_sanity.cpp

index 281646d92e8a78bb15398cea72e4c7f19ab8d4de..27938c5865a2c341042ede24a88dbaf67cc72621 100644 (file)
       <param name="buffer" type="GLuint" />
    </function>
 
+   <function name="FlushMappedNamedBufferRange" offset="assign">
+      <param name="buffer" type="GLuint" />
+      <param name="offset" type="GLintptr" />
+      <param name="length" type="GLsizeiptr" />
+   </function>
+
    <!-- Texture object functions -->
 
    <function name="CreateTextures" offset="assign">
index d646617347c94c583186c100d782e62e849d92c8..99f14321705b0bb19e88e404439b7baf08dd13cf 100644 (file)
@@ -2524,6 +2524,22 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset,
                                    "glFlushMappedBufferRange");
 }
 
+void GLAPIENTRY
+_mesa_FlushMappedNamedBufferRange(GLuint buffer, GLintptr offset,
+                                  GLsizeiptr length)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   struct gl_buffer_object *bufObj;
+
+   bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
+                                       "glFlushMappedNamedBufferRange");
+   if (!bufObj)
+      return;
+
+   _mesa_flush_mapped_buffer_range(ctx, bufObj, offset, length,
+                                   "glFlushMappedNamedBufferRange");
+}
+
 
 static GLenum
 buffer_object_purgeable(struct gl_context *ctx, GLuint name, GLenum option)
index f51bf3665020bcd3a3212bf95d50c2b5f1aabed2..0b77bff87564e5a1cbc4b19ef3c7088cd82a90fd 100644 (file)
@@ -299,6 +299,10 @@ void GLAPIENTRY
 _mesa_FlushMappedBufferRange(GLenum target,
                              GLintptr offset, GLsizeiptr length);
 
+void GLAPIENTRY
+_mesa_FlushMappedNamedBufferRange(GLuint buffer, GLintptr offset,
+                                  GLsizeiptr length);
+
 GLenum GLAPIENTRY
 _mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option);
 
index fb077b3d5c519f365190e6beedbc4ccb6ad67759..3dd075115afbf212f294153297397b336c8a2741 100644 (file)
@@ -963,6 +963,7 @@ const struct function gl_core_functions_possible[] = {
    { "glMapNamedBuffer", 45, -1 },
    { "glMapNamedBufferRange", 45, -1 },
    { "glUnmapNamedBuffer", 45, -1 },
+   { "glFlushMappedNamedBufferRange", 45, -1 },
    { "glCreateTextures", 45, -1 },
    { "glTextureStorage1D", 45, -1 },
    { "glTextureStorage2D", 45, -1 },