[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 17:49:08 UTC 2018


On 22 January 2018 at 17:03, Chuck Atkins <chuck.atkins at kitware.com> wrote:
> Hi Emil,
>
>> Please include your follow-up reply/context as commit message.
>
>
> Will do.
>
>
>> > +// 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.
>
>
> You are, of course, correct.  I was conflating static with not public and
> thinking that since it's not in the same translation unit then it can't be
> static so it must be public, which is certainly not the case.
>
Hmm not your fault really - swr_create_screen_internal should have
lost it's PUBLIC notation.
Will send a patch for it in a moment.

>
>> With the above two suggestions:
>>
>> Cc: mesa-stable at lists.freedesktop.org
>
>
> I purposely left this out of mesa-stable since it requires the previous two
> commits that initially refactored swr_create_screen to allow for builtin
> arch, which were not part of stable.
>
Right this cleans up after the following commit - please include the tag.
Don't bother re-sending.

Fixes: a4be2bcee2f ("swr: allow a single swr architecture to be builtin")

Thanks
Emil


More information about the mesa-dev mailing list