From: Laura Ekstrand Date: Thu, 12 Feb 2015 00:06:52 +0000 (-0800) Subject: main: Add entry point for FlushMappedNamedBufferRange. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1cfc18da8d3220fd6b123b6e269b3b440988027b;p=mesa.git main: Add entry point for FlushMappedNamedBufferRange. Reviewed-by: Fredrik Höglund --- diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 281646d92e8..27938c5865a 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -80,6 +80,12 @@ + + + + + + diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index d646617347c..99f14321705 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -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) diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h index f51bf366502..0b77bff8756 100644 --- a/src/mesa/main/bufferobj.h +++ b/src/mesa/main/bufferobj.h @@ -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); diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index fb077b3d5c5..3dd075115af 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -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 },