[Mesa-dev] [PATCH 2/2] mesa: inline update_image_transfer_state() into _mesa_update_pixel()

Ian Romanick idr at freedesktop.org
Tue Jun 6 22:29:08 UTC 2017


On 06/06/2017 01:58 PM, Samuel Pitoiset wrote:
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/mesa/main/pixel.c | 19 +++++--------------
>  1 file changed, 5 insertions(+), 14 deletions(-)
> 
> diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
> index 218e9fdd6b..a3f04d5688 100644
> --- a/src/mesa/main/pixel.c
> +++ b/src/mesa/main/pixel.c
> @@ -598,12 +598,12 @@ _mesa_PixelTransferi( GLenum pname, GLint param )
>  /*****                    State Management                        *****/
>  /**********************************************************************/
>  
> -/*
> - * Return a bitmask of IMAGE_*_BIT flags which to indicate which
> - * pixel transfer operations are enabled.
> +
> +/**
> + * Update mesa pixel transfer derived state to indicate which operations are
> + * enabled.
>   */
> -static void
> -update_image_transfer_state(struct gl_context *ctx)
> +void _mesa_update_pixel( struct gl_context *ctx )

If you update this to

void
_mesa_update_pixel( struct gl_context *ctx )

then the series is

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

This formatting may seem a little weird, but Mesa uses it because it has
a really useful feature.  You can "grep -nr ^function_name" to find
exactly where a function is defined.  For functions with a lot of
callers, this is much easier than wading through a couple pages of grep
output.

>  {
>     GLuint mask = 0;
>  
> @@ -623,15 +623,6 @@ update_image_transfer_state(struct gl_context *ctx)
>  }
>  
>  
> -/**
> - * Update mesa pixel transfer derived state.
> - */
> -void _mesa_update_pixel( struct gl_context *ctx )
> -{
> -   update_image_transfer_state(ctx);
> -}
> -
> -
>  /**********************************************************************/
>  /*****                      Initialization                        *****/
>  /**********************************************************************/
> 



More information about the mesa-dev mailing list