VirtualBox

Ignore:
Timestamp:
Mar 12, 2012 3:41:16 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
76771
Message:

crOpenGL: more TLS data handling fixes

Location:
trunk/src/VBox/Additions/common/crOpenGL/array
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/array/arrayspu.c

    r33540 r40431  
    880880#endif
    881881}
     882
     883static void ARRAYSPU_APIENTRY
     884arrayspu_VBoxAttachThread()
     885{
     886    crStateVBoxAttachThread();
     887    array_spu.child.VBoxAttachThread();
     888}
     889
     890static void ARRAYSPU_APIENTRY
     891arrayspu_VBoxDetachThread()
     892{
     893    crStateVBoxDetachThread();
     894    array_spu.child.VBoxDetachThread();
     895}
     896
    882897
    883898SPUNamedFunctionTable _cr_array_table[] = {
     
    924939    { "DestroyContext", (SPUGenericFunction) arrayspu_DestroyContext},
    925940    { "UseProgram", (SPUGenericFunction) arrayspu_UseProgram},
     941    { "VBoxAttachThread", (SPUGenericFunction) arrayspu_VBoxAttachThread},
     942    { "VBoxDetachThread", (SPUGenericFunction) arrayspu_VBoxDetachThread},
    926943    { NULL, NULL }
    927944};
  • trunk/src/VBox/Additions/common/crOpenGL/array/arrayspu_init.c

    r39507 r40431  
    8585    return 1;
    8686}
    87 
    88 #ifdef RT_OS_WINDOWS
    89 #define WIN32_LEAN_AND_MEAN
    90 #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
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette