aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl/egl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-04-15 03:44:12 +0200
committerSven Gothel <[email protected]>2010-04-15 03:44:12 +0200
commit2ae28d54858ff684bc2368e0476a7a357dc63432 (patch)
tree41524bc7be69f029d2b183128cc0c8b89ec4754c /src/jogl/classes/com/jogamp/opengl/impl/egl
parent2df3bea10859ee2f2c4b3622f3b610b17a5749d6 (diff)
Further ATI (fglrx) X11Display bug workaround/cleanup
- See https://bugzilla.mozilla.org/show_bug.cgi?id=486277 - Calling XCloseDisplay occasionally leads to a SIGSEGV, even thought the reference is valid and OK. Workaround is not to close any X11Display, but to hold them stashed and reuse them. Since we already pipeline all X11Display's via Nativewindow's X11Util, an added referenceCounter and a global active/passive list solved this problem. This workaround is only active in case 'isVendorATI()'. NEWT/NativeWindow X11: - Let XIOErrorHandler and invalid display references fail hard with FatalError, otherwise we won't see the stack trace - and those bugs are indeed fatal. NativeWindow X11: - Install XIOErrorHandler, which stays active. - X11Util.X11Display: - Add reference counter - Add global active/passive list. Passive if reference count == 0 and marked as 'un-closeable' (-> ATI). Reusing passive members when create a new display. - JOGL: - Use DeleteLocalRef() calls to free temp NIO buffer in manual *Copied implementation. - GLDrawableFactoryImpl: Be serious about the shutdown() semantics - *GraphicsConfiguration: - Fix the invalid Onscreen/PBuffer/Pixmap determination (X11/EGL/WGL) - Just return null if not valid - X11GLXGraphicsConfigurationFactory - FBConfig - Determine recommendedIndex properly .. - Don't bail out if a FBConfig is invalid .. - Use Chooser in case nothing is recommended .. - X11OffscreenGLXDrawable fixes bugs: - wrong (int) cast of parent window in XCreatePixmap call - setting display to zero too early in destruction, ie before XCloseDisplay - X11GLXDrawableFactory is using [singleton] shared dummy resources for - Screen, Drawable and Context which are utilized in case they are needed .. They are removed at shutdown call - GLXVersion gathering in GLXUtil now .. - DefaultGLCapabilitiesChooser: Respect PBuffer selection Tests: - Add DrawableFactory shutdown() - Add various Offscreen Capabilties - Add Offscreen and non-pbuffer case - JUnit Passed (Linux64bit: NVidia/ATI) - demos.jrefract.JRefract passed (Linux64bit: NVidia/ATI)
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/egl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfiguration.java19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfiguration.java
index c8bc4fe0d..2d5154442 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfiguration.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfiguration.java
@@ -122,10 +122,11 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple
if ( onscreen ) {
res = ( 0 != (val & EGL.EGL_WINDOW_BIT) ) ;
} else {
- res = ( 0 != (val & EGL.EGL_PIXMAP_BIT) ) || usePBuffer ;
- }
- if ( usePBuffer ) {
- res = res && ( 0 != (val & EGL.EGL_PBUFFER_BIT) ) ;
+ if ( usePBuffer ) {
+ res = ( 0 != (val & EGL.EGL_PBUFFER_BIT) ) ;
+ } else {
+ res = ( 0 != (val & EGL.EGL_PIXMAP_BIT) ) ;
+ }
}
return res;
@@ -187,17 +188,13 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple
caps.setOnscreen( 0 != (val[0] & EGL.EGL_WINDOW_BIT) );
caps.setPBuffer ( 0 != (val[0] & EGL.EGL_PBUFFER_BIT) );
} else {
- throw new GLException("EGL_SURFACE_TYPE does not match !!!");
- }
- } else {
- if(relaxed) {
if(DEBUG) {
- System.err.println("Could not determine EGL_SURFACE_TYPE !!!");
+ System.err.println("EGL_SURFACE_TYPE does not match: req(onscrn "+onscreen+", pbuffer "+usePBuffer+"), got(onscreen "+( 0 != (val[0] & EGL.EGL_WINDOW_BIT) )+", pbuffer "+( 0 != (val[0] & EGL.EGL_PBUFFER_BIT) )+", pixmap "+( 0 != (val[0] & EGL.EGL_PIXMAP_BIT) )+")");
}
return null;
- } else {
- throw new GLException("Could not determine EGL_SURFACE_TYPE !!!");
}
+ } else {
+ throw new GLException("Could not determine EGL_SURFACE_TYPE !!!");
}
return caps;