[Piglit] [PATCH] gl-framework: always destroy gl context on exit

Emil Velikov emil.l.velikov at gmail.com
Fri Jun 26 08:29:13 PDT 2015


Hmm I thought I've commented on this one, but here is goes:

On 26 May 2015 at 00:51, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> Currently a piglit_report_result in init (or earlier) would cause the
> framework to not get torn down. This ensures that the teardown happens
> on exit, which also enables usage of valgrind to detect memory leaks.
>
> This is a refinment of commit 121fb6b7d84 for winsys and commit
> 50402d6c7 which introduced the fbo framework.
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
As piglit_report_result uses exit() rather than calling back to the
gl/cl framework, one needs to explicitly call the destructor
beforehand. So the message might come as a bit misleading. Perhaps one
day piglit_report_result() will can explicitly foo->destroy(), but
until then this looks great.

Iirc older Windowses (~ Windows 2k era) had some problems with
atexit() but I'm pretty sure that Brian/Jose will give us some tips if
similar problems exist on supported platforms.

Fwiw
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>

-Emil


More information about the Piglit mailing list