diff options
author | Sven Gothel <[email protected]> | 2014-07-27 04:00:26 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-27 04:00:26 +0200 |
commit | 007f120cd8d33e4231ef4d207b85ed156d1e0c82 (patch) | |
tree | d04584098e9ded5144030054ec5f978d5998abd4 /make/stub_includes | |
parent | c77b8f586cb2553582a42f5b90aeee5ef85f1efe (diff) |
Fixed and Changed NVidia Windows Driver Threaded optimization bug workaround of commit 5166d6a6b617ccb15c40fcb8d4eac2800527aa7b
Commit 5166d6a6b617ccb15c40fcb8d4eac2800527aa7b added a workaround
for the NVidia driver 260.99 for Window from 2010-12-11 issue.
[1] The workaround sets a process affinity while JOGL initialization
to mitigate NVidia driver's 'Threaded optimization := On' race conditions.
The process affinity is reset reset after initialization.
[2] The process affinity reset code had a bug, i.e. instead to restore the
original process's affinity mask, we restored the system's default affinity mask.
[3] Further more, there seem to be issues with changing a process affinity mask
regarding the process group.
This patch:
- Solves issue [2] by using the original process affinity mask
- Solves issue [3] by allowing a custom
affinity mode via the property 'jogl.debug.windows.cpu_affinity_mode':
- 0 - none (default, no affinity required for Windows NV driver >= 266.58 from 2011-01-24)
- 1 - process affinity (was required w/ Windows NV driver 260.99 from 2010-12-11, see commit 5166d6a6b617ccb15c40fcb8d4eac2800527aa7b)
- 2 - thread affinity (experimental)
Hence the workaround is disabled by default,
since the crash as dicumented in commit 5166d6a6b617ccb15c40fcb8d4eac2800527aa7b
could not be reproduced with NV driver 266.58 from 2011-01-24.
Diffstat (limited to 'make/stub_includes')
-rw-r--r-- | make/stub_includes/win32/wingdi.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/make/stub_includes/win32/wingdi.h b/make/stub_includes/win32/wingdi.h index 7a88582c2..e252b3b36 100644 --- a/make/stub_includes/win32/wingdi.h +++ b/make/stub_includes/win32/wingdi.h @@ -48,8 +48,10 @@ WINUSERAPI HWND WINAPI GetParent(HWND hWnd); WINUSERAPI HWND WINAPI SetParent(HWND hWndChild,HWND hWndNewParent); WINUSERAPI HANDLE WINAPI GetCurrentProcess(void); -WINUSERAPI BOOL WINAPI GetProcessAffinityMask(HANDLE hProcess,PDWORD_PTR lpProcessAffinityMask,PDWORD_PTR lpSystemAffinityMask); -WINUSERAPI BOOL WINAPI SetProcessAffinityMask(HANDLE hProcess,DWORD_PTR dwProcessAffinityMask); +WINUSERAPI HANDLE WINAPI GetCurrentThread(void); +WINUSERAPI BOOL WINAPI GetProcessAffinityMask(HANDLE hProcess, PDWORD_PTR lpProcessAffinityMask, PDWORD_PTR lpSystemAffinityMask); +WINUSERAPI BOOL WINAPI SetProcessAffinityMask(HANDLE hProcess, DWORD_PTR dwProcessAffinityMask); +WINUSERAPI DWORD_PTR WINAPI SetThreadAffinityMask(HANDLE hThread, DWORD_PTR dwThreadAffinityMask); // Routines for changing gamma ramp of display device |