summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2009-03-22 12:01:21 +1000
committerDave Airlie <airlied@linux.ie>2009-03-22 12:01:21 +1000
commit2d26d4ac66e8c3e48b73d3e172d0e0d2a2ad31a5 (patch)
tree6b0d899db605b28e10b9b953d181b09bf40bb472 /src/gallium/winsys
parent407e8ae5b167b0193e1e5b1266a5d61ed836dfb5 (diff)
parent699897e81c623e53be51fba0488f535b0a8d7761 (diff)
Merge remote branch 'origin/master' into HEAD
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;
}