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

2018-01-23 Thread Emil Velikov
On 22 January 2018 at 18:02, Chuck Atkins wrote: > Hi Emil, > >> Fixes: a4be2bcee2f ("swr: allow a single swr architecture to be builtin") > > > It doesn't fix anything that was broken from that commit. The issues with > error handling were already present before then,

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

2018-01-22 Thread Kyriazis, George
Chuck, Change verified on my end; check-in coming coming up soon. George On Jan 22, 2018, at 2:11 PM, Kyriazis, George > wrote: On Jan 22, 2018, at 12:02 PM, Chuck Atkins >

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

2018-01-22 Thread Kyriazis, George
On Jan 22, 2018, at 12:02 PM, Chuck Atkins > wrote: Hi Emil, Fixes: a4be2bcee2f ("swr: allow a single swr architecture to be builtin") It doesn't fix anything that was broken from that commit. The issues with error handling were

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

2018-01-22 Thread Chuck Atkins
Hi Emil, Fixes: a4be2bcee2f ("swr: allow a single swr architecture to be builtin") > It doesn't fix anything that was broken from that commit. The issues with error handling were already present before then, it's just that the changes in a4be2bcee2f were substantial so this commit works off the

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

2018-01-22 Thread Emil Velikov
On 22 January 2018 at 17:03, Chuck Atkins 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); >> >>

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

2018-01-22 Thread Chuck Atkins
This makes the following changes to address cleanup issues: - Error conditions now return NULL instead of calling exit() - swr_creen is now freed upon error, rather than leak. - Library handle from dlopen is now closed upon swr_screen destruction v2: Added additional context in commit msg and

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

2018-01-22 Thread Chuck Atkins
This makes the followingt changes to address cleanup issues: - Error conditions now return null instead of calling exit() - swr_creen is now freed upon error, rather than leak. - Library handle from dlopen is now closed upon swr_screen destruction v2: Added additional context in commit msg and

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

2018-01-22 Thread Chuck Atkins
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

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

2018-01-22 Thread Emil Velikov
On 22 January 2018 at 15:12, Chuck Atkins wrote: > Signed-off-by: Chuck Atkins Please include your follow-up reply/context as commit message. > // arch-specific dll entry point > PUBLIC struct pipe_screen *swr_create_screen_internal(struct

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

2018-01-22 Thread Chuck Atkins
For context, without this, the library handle from dlopen never get's closed, even under successful operation, and the swr_screen created never get's freed on error. Also error conditions resulted in exit() rather than NULL return. - Chuck On Mon, Jan 22, 2018 at 10:12 AM, Chuck Atkins

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

2018-01-22 Thread Chuck Atkins
Signed-off-by: Chuck Atkins --- src/gallium/drivers/swr/swr_loader.cpp | 100 + src/gallium/drivers/swr/swr_public.h | 6 +- src/gallium/drivers/swr/swr_screen.cpp | 26 +++-- src/gallium/drivers/swr/swr_screen.h | 3 + 4

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

2018-01-22 Thread Chuck Atkins
Signed-off-by: Chuck Atkins --- src/gallium/drivers/swr/swr_loader.cpp | 100 + src/gallium/drivers/swr/swr_public.h | 6 +- src/gallium/drivers/swr/swr_screen.cpp | 26 +++-- src/gallium/drivers/swr/swr_screen.h | 3 + 4