diff options
author | Sven Gothel <[email protected]> | 2010-06-10 09:35:06 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-06-10 09:35:06 +0200 |
commit | 1d333a771ce0bc7c8594e21d031703f698f06a46 (patch) | |
tree | 933d470582896320855fa1d98c1a917edc412c24 /make/scripts | |
parent | 4512900ddcb9ce9a498411d257b1b6d6010ec006 (diff) |
Fix: Locking/Threading; Common IntIntHashMap and Buffers; Fix: glMap*Buffer*; GLX/WGL/CgGL: All runtime dynamic; Misc ..
TODO: Compile and test on MacOSX ..
Fix:
=====
Multithreading/Locking:
See jogl/doc/Implementation/MultiThreading.txt
- Locking layer is not platform agnostic, ie GLContextImpl, GLDrawableImpl, ..
and NEWT: Window/Display
- No more use of JAWT global lock necessary, removed.
- No need for X11 Display lock, on the contrary,
this made the NV driver hang.
- Use common window/surface lock
- All NativeWindow surfaceLock's are recursive now
glMapBuffer: If size is 0, don't do cont with the native call.
glMapBufferRange: Fix capacity.
glNamedBufferDataEXT: Track the size.
glMapNamedBufferEXT: Manual impl. - use the tracked size
glXGetVisualFromFBConfig, glXChooseFBConfig, glXChooseVisual: Instead of
ignoring and implement a renamed version (*Copied), we just use ManualImplementation
for the proper copy-result code.
DesktopGLDynamicLookupHelper: Initialize _hasGLBinding* attributes
in the determing loadGLJNILibrary() method, which is called by super().
Otherwise static init will overwrite them after the super() call.
X11GLXDrawableFactory: Don't release anything at shutdown (removed sharedContext.destroy()),
since this caused a freeze/SEGV sometimes.
Fixed NEWT's reparentWindow() functionality incl NewtCanvasAWT usage.
- Native: if not visible, don't focus, etc
- NewtCanvasAWT: Use the container size to start with
- Run the command on the EDT
Using GlueGen's new DynamicLibraryBundle utility:
- X11, Windows and MacOSX OpenGL adapted to DynamicLibraryBundleInfo.
- X11GLXDynamicLookupHelper -> X11GLXDynamicLibraryBundleInfo
- Remove all path from lib names.
- GL order: libGL.so.1, libGL.so, GL
- shallLinkGlobal: true -> to server some 'old' DRI systems
-> http://dri.sourceforge.net/doc/DRIuserguide.html
- shallLookupGlobal: false
- Try both : glXGetProcAddressARB and glXGetProcAddress
- Using bootstrap: GLX.glXGetProcAddress(long glxGetProcAddressHandle, String glFuncName)
Found the issue with LIBGL_DRIVERS_PATH, ie if not set
no valid GL instance can be found (ie ATI fglrx/DRI).
This may happen if using a differen user than the desktop user
for whom the env var is set within some /etc/X11/Xsession.d/ script.
Enhancements:
=============
GLBufferSizeTracker: Use IntIntHashMap and add DirectState size tracking.
GLBufferStateTracker: Use IntIntHashMap.
GLStateTracker: Use IntIntHashMap.
GLDynamicLookupHelper: More generic (global loading/lookup and GetProcAddress function name list),
remove redundant code.
FIXME:
MacOSXCGLDynamicLookupHelper:
- Not tested
- Not using NSImage lookup anymore as recommended by OSX API Doc,
so dlsym is used always (to be tested)
WindowsWGLDynamicLookupHelper:
- Not tested
GLX/WGL/CgGL is all runtime-dynamic as now, ie loaded and looked-up at runtime,
no compile time dependencies to GL anymore, nor a need to specify CgGL.
Split up WGL in GDI and WGL, to allow proper dynamic runtime linkage of OpenGL32
while using static binding to GDI32
NEWT events generated by native code are enqueued and not send directly.
This should ease locking mechanisms .. if any are necessary.
NEWT: More platform specific code moved to *Impl method,
simplifying the generic code of the superclass and impl protocol.
Cleanup:
=========
Replace all InternalBufferUtil's with com.jogamp.common.nio.Buffers
Removed all InternalBufferUtil's from repository
Removed GLContextImpl notion of 'optimized' surface locking,
where the surface gets unlocked during makeCurrent/release.
This just makes no sense and would impact multithreading in a horrible way.
Diffstat (limited to 'make/scripts')
-rwxr-xr-x | make/scripts/java-run-all.sh | 17 | ||||
-rwxr-xr-x | make/scripts/java-run-newt.sh | 3 | ||||
-rw-r--r-- | make/scripts/make.jogl.all.linux-x86.sh | 18 | ||||
-rw-r--r-- | make/scripts/make.jogl.all.linux-x86_64.sh | 16 | ||||
-rw-r--r-- | make/scripts/make.jogl.all.win32.bat | 4 | ||||
-rw-r--r-- | make/scripts/make.jogl.all.win64.bat | 4 |
6 files changed, 48 insertions, 14 deletions
diff --git a/make/scripts/java-run-all.sh b/make/scripts/java-run-all.sh index 622ed1bae..0188ae5d2 100755 --- a/make/scripts/java-run-all.sh +++ b/make/scripts/java-run-all.sh @@ -17,6 +17,11 @@ if [ "$1" = "-libdir" ] ; then shift LD_LIBRARY_PATH=$PRELIB:$LD_LIBRARY_PATH export LD_LIBRARY_PATH + # Mesa/Gallium EGL driver + EGL_DRIVER=$PRELIB/egl_glx.so + export EGL_DRIVER + # unset DRI/ATI .. + unset LIBGL_DRIVERS_PATH fi if [ -z "$1" ] ; then @@ -31,19 +36,27 @@ shift MOSX=0 uname -a | grep -i Darwin && MOSX=1 -D_ARGS="-Dgluegen.debug.ProcAddressHelper=true -Dgluegen.debug.NativeLibrary=true -Djogl.debug=all" -# D_ARGS="-Dgluegen.debug.ProcAddressHelper=true -Dgluegen.debug.NativeLibrary=true -Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all" +# D_ARGS="-Djogamp.debug.ProcAddressHelper=true -Djogamp.debug.NativeLibrary=true -Djogl.debug=all" +# D_ARGS="-Djogamp.debug.ProcAddressHelper=true -Djogamp.debug.NativeLibrary=true -Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all" # D_ARGS="-Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all -Djogl.debug.GLSLState" # D_ARGS="-Dnativewindow.debug.X11Util=true -Djogl.debug.GLDrawableFactory=true" # D_ARGS="-Dnativewindow.debug.X11Util=true" # D_ARGS="-Dnewt.debug=all -Dnativewindow.debug=all" +# D_ARGS="-Djogl.debug=all -Dnewt.debug=all -Dnativewindow.debug=all" # D_ARGS="-Dnewt.debug=all" # D_ARGS="-Dnewt.debug.Window" # D_ARGS="-Dnewt.debug.Display" +# D_ARGS="-Djogl.debug=all -Djogl.debug.DynamicLookup=true -Djogamp.debug.NativeLibrary=true" # D_ARGS="-Djogl.debug=all" +# D_ARGS="-Djogamp.debug.JNILibLoader=true -Djogamp.debug.NativeLibrary=true -Djogamp.debug.NativeLibrary.Lookup=true -Djogl.debug.GLProfile=true" rm -f java-run.log +# export LIBGL_DRIVERS_PATH=/usr/lib/fglrx/dri:/usr/lib32/fglrx/dri +# export LIBGL_DEBUG=verbose echo LIBXCB_ALLOW_SLOPPY_LOCK: $LIBXCB_ALLOW_SLOPPY_LOCK 2>&1 | tee -a java-run.log +echo LIBGL_DRIVERS_PATH: $LIBGL_DRIVERS_PATH 2>&1 | tee -a java-run.log +echo LIBGL_DEBUG: $LIBGL_DEBUG 2>&1 | tee -a java-run.log echo java $X_ARGS $D_ARGS $* 2>&1 | tee -a java-run.log java $X_ARGS $D_ARGS $* 2>&1 | tee -a java-run.log + diff --git a/make/scripts/java-run-newt.sh b/make/scripts/java-run-newt.sh index 796e22da4..9fbe4e583 100755 --- a/make/scripts/java-run-newt.sh +++ b/make/scripts/java-run-newt.sh @@ -38,7 +38,8 @@ fi # D_ARGS="-Dgluegen.debug.ProcAddressHelper=true -Dgluegen.debug.NativeLibrary=true -Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all" # D_ARGS="-Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all -Djogl.debug.GLSLState" # D_ARGS="-Dnativewindow.debug.X11Util=true -Djogl.debug.GLDrawableFactory=true" -# D_ARGS="-Dnativewindow.debug.X11Util=true" +# D_ARGS="-Dnativewindow.debug.X11Util=true -Dnewt.debug.Display=true" # D_ARGS="-Dnewt.debug=all" +# D_ARGS="-Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all" java $X_ARGS -Djava.awt.headless=true $D_ARGS com.jogamp.newt.util.MainThread $* 2>&1 | tee java-run-newt.log diff --git a/make/scripts/make.jogl.all.linux-x86.sh b/make/scripts/make.jogl.all.linux-x86.sh index 5033f5f3a..76b46a03b 100644 --- a/make/scripts/make.jogl.all.linux-x86.sh +++ b/make/scripts/make.jogl.all.linux-x86.sh @@ -28,7 +28,7 @@ if [ "$1" = "-libdir" ] ; then fi -# -Djogl.cg=1 -Dx11.cg.lib=../../lib-linux-x86_64 +# -Djogl.cg=1 # -Dc.compiler.debug=true # -DuseOpenMAX=true \ # -Dbuild.noarchives=true @@ -37,19 +37,29 @@ fi # -DisLinux=true \ # -DisLinuxX86=true \ # -DisX11=true \ -# -Djogl.cg=1 -Dx11.cg.lib=../../lib-linux-x86 \ +# -Djogl.cg=1 \ #LD_LIBRARY_PATH=/opt-linux-x86_64/mesa-7.8.1/lib64 #export LD_LIBRARY_PATH +LOGF=make.jogl.all.linux-x86.log +rm -f $LOGF + +# export LIBGL_DRIVERS_PATH=/usr/lib/fglrx/dri:/usr/lib32/fglrx/dri +# export LIBGL_DEBUG=verbose +echo LIBXCB_ALLOW_SLOPPY_LOCK: $LIBXCB_ALLOW_SLOPPY_LOCK 2>&1 | tee -a $LOGF +echo LIBGL_DRIVERS_PATH: $LIBGL_DRIVERS_PATH 2>&1 | tee -a $LOGF +echo LIBGL_DEBUG: $LIBGL_DEBUG 2>&1 | tee -a $LOGF + ant \ $CUSTOMLIBDIR \ -Dbuild.noarchives=true \ -Dgluegen-cpptasks.file=`pwd`/../../gluegen/make/lib/gluegen-cpptasks-linux-32bit.xml \ -Dbuild.noarchives=true \ - -Djogl.cg=1 -Dx11.cg.lib=../../lib-linux-x86 \ + -Djogl.cg=1 \ -Drootrel.build=build-x86 \ -Dos.arch=x86 \ -DuseKD=true \ -DuseOpenMAX=true \ - $* 2>&1 | tee make.jogl.all.linux-x86.log + $* 2>&1 | tee -a $LOGF + diff --git a/make/scripts/make.jogl.all.linux-x86_64.sh b/make/scripts/make.jogl.all.linux-x86_64.sh index b17cd2f15..220848693 100644 --- a/make/scripts/make.jogl.all.linux-x86_64.sh +++ b/make/scripts/make.jogl.all.linux-x86_64.sh @@ -27,7 +27,7 @@ if [ "$1" = "-libdir" ] ; then shift fi -# -Djogl.cg=1 -Dx11.cg.lib=../../lib-linux-x86_64 +# -Djogl.cg=1 # -Dc.compiler.debug=true \ # -Dbuild.noarchives=true \ @@ -41,11 +41,21 @@ fi #LD_LIBRARY_PATH=/opt-linux-x86_64/mesa-7.8.1/lib64 #export LD_LIBRARY_PATH +LOGF=make.jogl.all.linux-x86_64.log +rm -f $LOGF + +# export LIBGL_DRIVERS_PATH=/usr/lib/fglrx/dri:/usr/lib32/fglrx/dri +# export LIBGL_DEBUG=verbose +echo LIBXCB_ALLOW_SLOPPY_LOCK: $LIBXCB_ALLOW_SLOPPY_LOCK 2>&1 | tee -a $LOGF +echo LIBGL_DRIVERS_PATH: $LIBGL_DRIVERS_PATH 2>&1 | tee -a $LOGF +echo LIBGL_DEBUG: $LIBGL_DEBUG 2>&1 | tee -a $LOGF + ant \ $CUSTOMLIBDIR \ -Dbuild.noarchives=true \ - -Djogl.cg=1 -Dx11.cg.lib=../../lib-linux-x86_64 \ + -Djogl.cg=1 \ -Drootrel.build=build-x86_64 \ -DuseKD=true \ -DuseOpenMAX=true \ - $* 2>&1 | tee make.jogl.all.linux-x86_64.log + $* 2>&1 | tee -a $LOGF + diff --git a/make/scripts/make.jogl.all.win32.bat b/make/scripts/make.jogl.all.win32.bat index cea1317a5..528e153aa 100644 --- a/make/scripts/make.jogl.all.win32.bat +++ b/make/scripts/make.jogl.all.win32.bat @@ -11,7 +11,7 @@ set CLASSPATH=.;%THISDIR%\build-win32\classes REM -Dc.compiler.debug=true
REM -DuseOpenMAX=true
REM -DuseKD=true
-REM -Djogl.cg=1 -D-Dwindows.cg.lib=C:\Cg-2.2
+REM -Djogl.cg=1
REM -Dbuild.noarchives=true
-ant -Dbuild.noarchives=true -Drootrel.build=build-win32 -Djogl.cg=1 -Dwindows.cg.lib=C:\Cg-2.2\bin %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.jogl.all.win32.log 2>&1
+ant -Dbuild.noarchives=true -Drootrel.build=build-win32 -Djogl.cg=1 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.jogl.all.win32.log 2>&1
diff --git a/make/scripts/make.jogl.all.win64.bat b/make/scripts/make.jogl.all.win64.bat index 5ce53e4a1..b8d8cc662 100644 --- a/make/scripts/make.jogl.all.win64.bat +++ b/make/scripts/make.jogl.all.win64.bat @@ -11,7 +11,7 @@ set CLASSPATH=.;%THISDIR%\build-win64\classes REM -Dc.compiler.debug=true
REM -DuseOpenMAX=true
REM -DuseKD=true
-REM -Djogl.cg=1 -D-Dwindows.cg.lib=C:\Cg-2.2
+REM -Djogl.cg=1
REM -Dbuild.noarchives=true
-ant -Dbuild.noarchives=true -Drootrel.build=build-win64 -Djogl.cg=1 -Dwindows.cg.lib=C:\Cg-2.2\bin.x64 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.jogl.all.win64.log 2>&1
+ant -Dbuild.noarchives=true -Drootrel.build=build-win64 -Djogl.cg=1 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.jogl.all.win64.log 2>&1
|