From bd89bee2f21c24e9a396a7bae914e4d6df7dc340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Mon, 12 Dec 2016 10:52:31 +0200 Subject: [PATCH] Fix/Hack: call XInitThreads() before XOpenDisplay This makes following tests pass consistently for me: dEQP-EGL.functional.multithread.pbuffer_single_window dEQP-EGL.functional.multithread.pbuffer_single_window_context dEQP-EGL.functional.sharing.gles2.multithread otherwise there are strange misc X related errors. I believe correct fix would be to only call it when test requires/uses threads, I haven't found a nice solution to do this. --- framework/platform/X11/tcuX11.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/platform/X11/tcuX11.cpp b/framework/platform/X11/tcuX11.cpp index c60c95e..f56565b 100644 --- a/framework/platform/X11/tcuX11.cpp +++ b/framework/platform/X11/tcuX11.cpp @@ -64,6 +64,8 @@ Display::Display (EventState& eventState, const char* name) , m_display (DE_NULL) , m_deleteAtom (DE_NULL) { + XInitThreads(); + m_display = XOpenDisplay((char*)name); // Won't modify argument string. if (!m_display) throw ResourceError("Failed to open display", name, __FILE__, __LINE__); -- 2.9.3