[Piglit] [PATCH] glx: make sure contexts are destroyed before we exit the test

Timothy Arceri tarceri at itsqueeze.com
Fri Apr 12 06:23:39 UTC 2019


Without this the last two contexts that are created will not
have been destroyed when exiting the test. This creates a race
condition in Mesa between any threads that might be using
glsl_types and the atexit() callback that destroys these types.
---
 tests/glx/glx-multithread-shader-compile.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/glx/glx-multithread-shader-compile.c b/tests/glx/glx-multithread-shader-compile.c
index f24e1761f..1e428da22 100644
--- a/tests/glx/glx-multithread-shader-compile.c
+++ b/tests/glx/glx-multithread-shader-compile.c
@@ -87,6 +87,7 @@ thread_func(void *arg)
 		glUseProgram(program);
 		piglit_check_gl_error(GL_NO_ERROR);
 
+		glXMakeCurrent(dpy, None, None);
 		glXDestroyContext(dpy, ctx);
 	}
 
-- 
2.20.1



More information about the Piglit mailing list