[Mesa-dev] [PATCH 15/42] mesa: add KHR_no_error support for glBindTextureUnit()

Timothy Arceri tarceri at itsqueeze.com
Tue Jun 27 23:24:45 UTC 2017


5-15:

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

On 27/06/17 21:20, Samuel Pitoiset wrote:
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>   src/mapi/glapi/gen/ARB_direct_state_access.xml | 2 +-
>   src/mesa/main/texobj.c                         | 8 ++++++++
>   src/mesa/main/texobj.h                         | 3 +++
>   3 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> index c9031c1a1ac..860bbbd28ab 100644
> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> @@ -518,7 +518,7 @@
>         <param name="texture" type="GLuint" />
>      </function>
>   
> -   <function name="BindTextureUnit">
> +   <function name="BindTextureUnit" no_error="true">
>         <param name="unit" type="GLuint" />
>         <param name="texture" type="GLuint" />
>      </function>
> diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
> index 5337f0513e4..30d3c961e6e 100644
> --- a/src/mesa/main/texobj.c
> +++ b/src/mesa/main/texobj.c
> @@ -1741,6 +1741,14 @@ bind_texture_unit(struct gl_context *ctx, GLuint unit, GLuint texture,
>   
>   
>   void GLAPIENTRY
> +_mesa_BindTextureUnit_no_error(GLuint unit, GLuint texture)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   bind_texture_unit(ctx, unit, texture, true);
> +}
> +
> +
> +void GLAPIENTRY
>   _mesa_BindTextureUnit(GLuint unit, GLuint texture)
>   {
>      GET_CURRENT_CONTEXT(ctx);
> diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h
> index 1c68bd8ec7d..a82c9722639 100644
> --- a/src/mesa/main/texobj.h
> +++ b/src/mesa/main/texobj.h
> @@ -190,6 +190,9 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures );
>   extern void GLAPIENTRY
>   _mesa_BindTexture( GLenum target, GLuint texture );
>   
> +void GLAPIENTRY
> +_mesa_BindTextureUnit_no_error(GLuint unit, GLuint texture);
> +
>   extern void GLAPIENTRY
>   _mesa_BindTextureUnit(GLuint unit, GLuint texture);
>   
> 


More information about the mesa-dev mailing list