From 70c6a54fa2b8dec880b5808d87b31f4afb09dd3b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 29 Jul 2014 05:41:47 +0200 Subject: Bug 1036: NVidia Windows Driver 'Threaded optimization' workaround. [3/3] Commit 5166d6a6b617ccb15c40fcb8d4eac2800527aa7b added a workaround for NVidia's Windows Driver Threaded optimization bug existing in NVidia driver 260.99 for Window from 2010-12-11. Commit 007f120cd8d33e4231ef4d207b85ed156d1e0c82 fixed the workaround and made it optional, default: turned off! Rational of turning the workaround off was due to testing against the original test-case 'Applet and Webstart' with drivers >= 266.58 from 2011-01-24, which did not reproduce this issue. However, our unit tests reproduced the issue, e.g. test: com.jogamp.opengl.test.junit.jogl.caps.TestTranslucencyNEWT Hence we have to re-enable the workaround per default. Added the following documentation of the issue: +++ Since NV driver 260.99 from 2010-12-11 a 'Threaded optimization' feature has been introduced. The driver spawns off a dedicated thread to off-load certain OpenGL tasks from the calling thread to perform them async and off-thread. If 'Threaded optimization' is manually enabled 'on', the driver may crash with JOGL's consistent multi-threaded usage - this is a driver bug. If 'Threaded optimization' is manually disabled 'off', the driver always works correctly. 'Threaded optimization' default setting is 'auto' and the driver may crash without this workaround. If setting the process affinity to '1' (1st CPU) while initialization and launching the SharedResourceRunner, the driver does not crash anymore in 'auto' mode. This might be either because the driver does not enable 'Threaded optimization' or because the driver's worker thread is bound to the same CPU. Property integer value jogl.debug.windows.cpu_affinity_mode: 0 - none (no affinity, may cause driver crash with 'Threaded optimization' = ['auto', 'on']) 1 - process affinity (default, workaround for driver crash for 'Threaded optimization' = 'auto', still crashes if set to 'on') +++ Note: WindowsThreadAffinity does _not_ work. --- make/scripts/tests-x32-dbg.bat | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'make/scripts/tests-x32-dbg.bat') diff --git a/make/scripts/tests-x32-dbg.bat b/make/scripts/tests-x32-dbg.bat index fbef1532c..a37dd7b7b 100755 --- a/make/scripts/tests-x32-dbg.bat +++ b/make/scripts/tests-x32-dbg.bat @@ -27,7 +27,9 @@ echo CP_ALL %CP_ALL% REM set D_ARGS="-Djogl.debug.GLDrawable" "-Djogl.debug.GLContext" "-Djogl.debug.FBObject" "-Djogl.enable.ANGLE" REM set D_ARGS="-Djogl.debug.GLDrawable" "-Djogl.debug.EGLDrawableFactory.DontQuery" REM set D_ARGS="-Djogl.debug.GLDrawable" "-Djogl.debug.EGLDrawableFactory.QueryNativeTK" -REM set D_ARGS="-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all" +REM set D_ARGS="-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all" "-Djogl.debug.windows.cpu_affinity_mode=0" "-Djogl.debug.GLContext.TraceSwitch" "-Djogl.debug.GLContext" +REM set D_ARGS="-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all" "-Djogl.debug.GLContext.TraceSwitch" "-Djogl.debug.GLContext" +REM set D_ARGS="-Djogl.debug.GLDrawable" "-Djogl.debug.windows.cpu_affinity_mode=0" REM set D_ARGS="-Djogamp.debug.IOUtil" "-Djogl.debug.GLSLCode" "-Djogl.debug.GLMediaPlayer" REM set D_ARGS="-Djogl.debug.ExtensionAvailabilityCache" "-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all" "-Djogamp.debug.ProcAddressHelper=true" "-Djogamp.debug.NativeLibrary=true" "-Djogamp.debug.NativeLibrary.Lookup=true" REM set D_ARGS="-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all" "-Djogamp.debug.NativeLibrary=true" @@ -41,7 +43,7 @@ REM set D_ARGS="-Djogl.debug.DebugGL" "-Djogl.debug.TraceGL" "-Djogl.debug=all" REM set D_ARGS="-Dnewt.debug.Window" "-Dnewt.debug.Display" "-Dnewt.test.Window.reparent.incompatible=true" REM set D_ARGS="-Dnewt.debug.Window.MouseEvent" REM set D_ARGS="-Dnewt.debug.Window.KeyEvent" -set D_ARGS="-Djogl.debug.GLMediaPlayer" "-Djogl.debug.GLMediaPlayer.Native" +REM set D_ARGS="-Djogl.debug.GLMediaPlayer" "-Djogl.debug.GLMediaPlayer.Native" REM set D_ARGS="-Xcheck:jni" "-Xint" "-verbose:jni" set X_ARGS="-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true" -- cgit v1.2.3