[Mesa-dev] [PATCH] swr: refactor swr_create_screen to allow for proper cleanup on error

Emil Velikov emil.l.velikov at gmail.com
Mon Jan 22 16:07:43 UTC 2018


On 22 January 2018 at 15:12, Chuck Atkins <chuck.atkins at kitware.com> wrote:
> Signed-off-by: Chuck Atkins <chuck.atkins at kitware.com>
Please include your follow-up reply/context as commit message.

>  // arch-specific dll entry point
>  PUBLIC struct pipe_screen *swr_create_screen_internal(struct sw_winsys *winsys);
>
> +// cleanup for failed screen creation
> +PUBLIC void swr_destroy_screen_internal(struct swr_screen **screen);
> +

I'm fairly sure you don't need to make this function public. It's used
within the same binary - libmesaswr.la. Regardless if built-in or
separate DSO's are used.

With the above two suggestions:

Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

-Emil


More information about the mesa-dev mailing list