[Mesa-dev] [PATCH 2/2] st/mesa: move st_manager_destroy() earlier in file

Nicolai Hähnle nhaehnle at gmail.com
Tue Nov 14 16:26:44 UTC 2017


Both patches:

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>


On 11.11.2017 03:40, Brian Paul wrote:
> To avoid forward declaration.
> ---
>   src/mesa/state_tracker/st_manager.c | 28 +++++++++++++++-------------
>   1 file changed, 15 insertions(+), 13 deletions(-)
> 
> diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
> index aedbc13..8a933d4 100644
> --- a/src/mesa/state_tracker/st_manager.c
> +++ b/src/mesa/state_tracker/st_manager.c
> @@ -69,7 +69,6 @@ struct st_manager_private
>      mtx_t st_mutex;
>   };
>   
> -static void st_manager_destroy(struct st_manager *);
>   
>   /**
>    * Map an attachment to a buffer index.
> @@ -794,6 +793,21 @@ st_thread_finish(struct st_context_iface *stctxi)
>      _mesa_glthread_finish(st->ctx);
>   }
>   
> +
> +static void
> +st_manager_destroy(struct st_manager *smapi)
> +{
> +   struct st_manager_private *smPriv = smapi->st_manager_private;
> +
> +   if (smPriv && smPriv->stfbi_ht) {
> +      _mesa_hash_table_destroy(smPriv->stfbi_ht, NULL);
> +      mtx_destroy(&smPriv->st_mutex);
> +      free(smPriv);
> +      smapi->st_manager_private = NULL;
> +   }
> +}
> +
> +
>   static struct st_context_iface *
>   st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
>                         const struct st_context_attribs *attribs,
> @@ -1148,18 +1162,6 @@ st_manager_add_color_renderbuffer(struct st_context *st,
>      return TRUE;
>   }
>   
> -static void
> -st_manager_destroy(struct st_manager *smapi)
> -{
> -   struct st_manager_private *smPriv = smapi->st_manager_private;
> -
> -   if (smPriv && smPriv->stfbi_ht) {
> -      _mesa_hash_table_destroy(smPriv->stfbi_ht, NULL);
> -      mtx_destroy(&smPriv->st_mutex);
> -      free(smPriv);
> -      smapi->st_manager_private = NULL;
> -   }
> -}
>   
>   static unsigned
>   get_version(struct pipe_screen *screen,
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list