From 36e985e96e6da817042ba1b2dfadf96f85e32afb Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Fri, 20 Mar 2009 13:06:28 +0100 Subject: [PATCH] winsys/gdi: Init state tracker's per-thread data. --- src/gallium/winsys/gdi/gdi_softpipe_winsys.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c index 440666d835e..d5d9431865c 100644 --- a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c +++ b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c @@ -312,9 +312,20 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) { switch (fdwReason) { case DLL_PROCESS_ATTACH: - return st_init(&stw_winsys); + if (!st_init(&stw_winsys)) { + return FALSE; + } + return st_init_thread(); + + case DLL_THREAD_ATTACH: + return st_init_thread(); + + case DLL_THREAD_DETACH: + st_cleanup_thread(); + break; case DLL_PROCESS_DETACH: + st_cleanup_thread(); st_cleanup(); break; } -- 2.30.2