[Mesa-dev] [PATCH 18/23] main: Add entry point for FlushMappedNamedBufferRange.

Fredrik Höglund fredrik at kde.org
Mon Mar 16 13:04:32 PDT 2015


This patch is:

Reviewed-by: Fredrik Höglund <fredrik at kde.org>

On Thursday 12 February 2015, Laura Ekstrand wrote:
> ---
>  src/mapi/glapi/gen/ARB_direct_state_access.xml |  6 ++++++
>  src/mesa/main/bufferobj.c                      | 16 ++++++++++++++++
>  src/mesa/main/bufferobj.h                      |  4 ++++
>  src/mesa/main/tests/dispatch_sanity.cpp        |  1 +
>  4 files changed, 27 insertions(+)
> 
> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> index 281646d..27938c5 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 @@
>        <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">
> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
> index 992e940..9b3d2ea 100644
> --- a/src/mesa/main/bufferobj.c
> +++ b/src/mesa/main/bufferobj.c
> @@ -2493,6 +2493,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 f51bf36..0b77bff 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 de52e69..dc6c257 100644
> --- a/src/mesa/main/tests/dispatch_sanity.cpp
> +++ b/src/mesa/main/tests/dispatch_sanity.cpp
> @@ -965,6 +965,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 },
> 



More information about the mesa-dev mailing list