Changeset 40431 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Mar 12, 2012 3:41:16 PM (13 years ago)
- Location:
- trunk/src/VBox/Additions/common/crOpenGL
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/array/arrayspu.c
r33540 r40431 880 880 #endif 881 881 } 882 883 static void ARRAYSPU_APIENTRY 884 arrayspu_VBoxAttachThread() 885 { 886 crStateVBoxAttachThread(); 887 array_spu.child.VBoxAttachThread(); 888 } 889 890 static void ARRAYSPU_APIENTRY 891 arrayspu_VBoxDetachThread() 892 { 893 crStateVBoxDetachThread(); 894 array_spu.child.VBoxDetachThread(); 895 } 896 882 897 883 898 SPUNamedFunctionTable _cr_array_table[] = { … … 924 939 { "DestroyContext", (SPUGenericFunction) arrayspu_DestroyContext}, 925 940 { "UseProgram", (SPUGenericFunction) arrayspu_UseProgram}, 941 { "VBoxAttachThread", (SPUGenericFunction) arrayspu_VBoxAttachThread}, 942 { "VBoxDetachThread", (SPUGenericFunction) arrayspu_VBoxDetachThread}, 926 943 { NULL, NULL } 927 944 }; -
trunk/src/VBox/Additions/common/crOpenGL/array/arrayspu_init.c
r39507 r40431 85 85 return 1; 86 86 } 87 88 #ifdef RT_OS_WINDOWS89 #define WIN32_LEAN_AND_MEAN90 #include <windows.h>91 BOOL WINAPI DllMain(HINSTANCE hDLLInst, DWORD fdwReason, LPVOID lpvReserved)92 {93 (void) lpvReserved;94 95 switch (fdwReason)96 {97 case DLL_THREAD_ATTACH:98 {99 crStateOnThreadAttachDetach(GL_TRUE);100 break;101 }102 103 case DLL_THREAD_DETACH:104 {105 crStateOnThreadAttachDetach(GL_FALSE);106 break;107 }108 109 case DLL_PROCESS_ATTACH:110 case DLL_PROCESS_DETACH:111 default:112 break;113 }114 115 return TRUE;116 }117 #endif -
trunk/src/VBox/Additions/common/crOpenGL/feedback/feedback_state_special
r19099 r40431 62 62 MakeCurrent 63 63 DestroyContext 64 VBoxAttachThread 65 VBoxDetachThread -
trunk/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu_init.c
r39507 r40431 85 85 return 1; 86 86 } 87 88 #ifdef RT_OS_WINDOWS89 #define WIN32_LEAN_AND_MEAN90 #include <windows.h>91 BOOL WINAPI DllMain(HINSTANCE hDLLInst, DWORD fdwReason, LPVOID lpvReserved)92 {93 (void) lpvReserved;94 95 switch (fdwReason)96 {97 case DLL_THREAD_ATTACH:98 {99 crStateOnThreadAttachDetach(GL_TRUE);100 break;101 }102 103 case DLL_THREAD_DETACH:104 {105 crStateOnThreadAttachDetach(GL_FALSE);106 break;107 }108 109 case DLL_PROCESS_ATTACH:110 case DLL_PROCESS_DETACH:111 default:112 break;113 }114 115 return TRUE;116 }117 #endif -
trunk/src/VBox/Additions/common/crOpenGL/load.c
r40281 r40431 1339 1339 /* debugging: this is to be able to catch first-chance notifications 1340 1340 * for exceptions other than EXCEPTION_BREAKPOINT in kernel debugger */ 1341 # define VDBG_VEHANDLER1341 //# define VDBG_VEHANDLER 1342 1342 #endif 1343 1343 … … 1426 1426 case DLL_PROCESS_DETACH: 1427 1427 { 1428 /* do exactly the same thing as for DLL_THREAD_DETACH since 1429 * DLL_THREAD_DETACH is not called for the thread doing DLL_PROCESS_DETACH according to msdn docs */ 1430 stubSetCurrentContext(NULL); 1431 if (stub_initialized) 1432 { 1433 CRASSERT(stub.spu); 1434 stub.spu->dispatch_table.VBoxDetachThread(); 1435 } 1436 1428 1437 stubSPUSafeTearDown(); 1429 1438 … … 1440 1449 case DLL_THREAD_ATTACH: 1441 1450 { 1442 #if 01443 1451 if (stub_initialized) 1444 1452 { 1445 1453 CRASSERT(stub.spu); 1446 stub.spu->dispatch_table.VBoxPackAttachThread(); 1447 } 1448 #endif 1454 stub.spu->dispatch_table.VBoxAttachThread(); 1455 } 1449 1456 break; 1450 1457 } … … 1453 1460 { 1454 1461 stubSetCurrentContext(NULL); 1455 #if 01456 1462 if (stub_initialized) 1457 1463 { 1458 1464 CRASSERT(stub.spu); 1459 stub.spu->dispatch_table.VBoxPackDetachThread(); 1460 } 1461 #endif 1465 stub.spu->dispatch_table.VBoxDetachThread(); 1466 } 1462 1467 break; 1463 1468 } -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_misc.c
r39507 r40431 479 479 } 480 480 481 void PACKSPU_APIENTRY packspu_VBox PackAttachThread()481 void PACKSPU_APIENTRY packspu_VBoxAttachThread() 482 482 { 483 483 #if 0 … … 495 495 496 496 crSetTSD(&_PackTSD, NULL); 497 } 498 499 void PACKSPU_APIENTRY packspu_VBoxPackDetachThread() 497 498 crStateVBoxAttachThread(); 499 } 500 501 void PACKSPU_APIENTRY packspu_VBoxDetachThread() 500 502 { 501 503 int i; … … 558 560 crUnlockMutex(&_PackMutex); 559 561 } 562 563 crStateVBoxDetachThread(); 560 564 } 561 565 … … 583 587 584 588 case DLL_THREAD_ATTACH: 585 {586 packspu_VBoxPackAttachThread();587 crStateOnThreadAttachDetach(GL_TRUE);588 break;589 }590 591 589 case DLL_THREAD_DETACH: 592 {593 packspu_VBoxPackDetachThread();594 crStateOnThreadAttachDetach(GL_FALSE);595 break;596 }597 598 590 default: 599 591 break; -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_special
r38772 r40431 105 105 VBoxPackGetInjectID 106 106 VBoxPackSetInjectID 107 VBox PackAttachThread108 VBox PackDetachThread107 VBoxAttachThread 108 VBoxDetachThread 109 109 ChromiumParameteriCR 110 110 CompressedTexImage1DARB
Note:
See TracChangeset
for help on using the changeset viewer.