summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-03-20 13:06:28 +0100
committerMichal Krol <michal@vmware.com>2009-03-20 13:06:28 +0100
commit36e985e96e6da817042ba1b2dfadf96f85e32afb (patch)
tree90c75aa7864a06a7c6376a9260d244c290a37e11 /src/gallium/winsys
parent4489f9efee58f2cba374298f2d43c96e5cd2ff41 (diff)
winsys/gdi: Init state tracker's per-thread data.
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/gdi/gdi_softpipe_winsys.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c
index 440666d835..d5d9431865 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;
}