[Mesa-dev] [PATCH 2/8] mesa: add Driver.InvalidateBufferSubData

Ian Romanick idr at freedesktop.org
Tue Jan 12 16:45:56 PST 2016


This patch is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 01/12/2016 08:06 AM, Nicolai Hähnle wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
> 
> ---
>  src/mesa/main/bufferobj.c | 12 ++++--------
>  src/mesa/main/dd.h        |  5 +++++
>  2 files changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
> index 63d563e..e8baf05 100644
> --- a/src/mesa/main/bufferobj.c
> +++ b/src/mesa/main/bufferobj.c
> @@ -3980,10 +3980,8 @@ _mesa_InvalidateBufferSubData(GLuint buffer, GLintptr offset,
>        return;
>     }
>  
> -   /* We don't actually do anything for this yet.  Just return after
> -    * validating the parameters and generating the required errors.
> -    */
> -   return;
> +   if (ctx->Driver.InvalidateBufferSubData)
> +      ctx->Driver.InvalidateBufferSubData(ctx, bufObj, offset, length);
>  }
>  
>  void GLAPIENTRY
> @@ -4020,8 +4018,6 @@ _mesa_InvalidateBufferData(GLuint buffer)
>        return;
>     }
>  
> -   /* We don't actually do anything for this yet.  Just return after
> -    * validating the parameters and generating the required errors.
> -    */
> -   return;
> +   if (ctx->Driver.InvalidateBufferSubData)
> +      ctx->Driver.InvalidateBufferSubData(ctx, bufObj, 0, bufObj->Size);
>  }
> diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
> index e5281ce..70ed563 100644
> --- a/src/mesa/main/dd.h
> +++ b/src/mesa/main/dd.h
> @@ -634,6 +634,11 @@ struct dd_function_table {
>                                GLintptr readOffset, GLintptr writeOffset,
>                                GLsizeiptr size );
>  
> +   void (*InvalidateBufferSubData)( struct gl_context *ctx,
> +                                    struct gl_buffer_object *obj,
> +                                    GLintptr offset,
> +                                    GLsizeiptr length );
> +
>     /* Returns pointer to the start of the mapped range.
>      * May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
>      */
> 



More information about the mesa-dev mailing list