From 2c4114b50f4023843073acf6d4cea223fb491e7e Mon Sep 17 00:00:00 2001
From: Sven Gothel
- * Currently, Mesa >= 9.1.3 (may extend back as far as 9.0) OpenGL 3.1 compatibility
- * context is not compliant. Most programs will give completely broken output (or no
- * output at all. For now, this context is not trusted.
+ * Mesa versions in the range [9.1.3 .. 18.2.0[ are not fully compliant with the
+ * OpenGL 3.1 compatibility profile.
+ * Most programs will give completely broken output (or no
+ * output at all.
*
* The above has been confirmed for the following Mesa 9.* GL_RENDERER strings:
*
*
*
- * It still has to be verified whether the AMD OpenGL 3.1 core driver is compliant enought. + * Default implementation sets this quirk on all Mesa < 18.2.0 drivers. + *
*/ public static final int GL3CompatNonCompliant = 6; @@ -233,9 +234,6 @@ public class GLRendererQuirks { ** Also enabled via {@link #BuggyColorRenderbuffer}. *
- *
- * Quirk can also be enabled via property: jogl.fbo.force.min
.
- *
* Note: GLFBODrawable always uses texture attachments if set. *
- *
- * Quirk can also be enabled via property: jogl.fbo.force.nocolorrenderbuffer
.
- *
* Some drivers wrongly claim to support pbuffers * with accumulation buffers. However, the creation of such pbuffer fails: - *
+ ** com.jogamp.opengl.GLException: pbuffer creation error: Couldn't find a suitable pixel format ** @@ -487,8 +482,17 @@ public class GLRendererQuirks { */ public static final int NoSurfacelessCtx = 22; + /** + * No FBO support at all. + *+ * This quirk currently exist to be injected by the user via the properties only, + * see {@link GLRendererQuirks.Override}. + *
+ */ + public static final int NoFBOSupport = 23; + /** Return the number of known quirks, aka quirk bit count. */ - public static final int getCount() { return 23; } + public static final int getCount() { return 24; } private static final String[] _names = new String[] { "NoDoubleBufferedPBuffer", "NoDoubleBufferedBitmap", "NoSetSwapInterval", "NoOffscreenBitmap", "NoSetSwapIntervalPostRetarget", "GLSLBuggyDiscard", @@ -497,7 +501,8 @@ public class GLRendererQuirks { "NoFullFBOSupport", "GLSLNonCompliant", "GL4NeedsGL3Request", "GLSharedContextBuggy", "GLES3ViaEGLES2Config", "SingletonEGLDisplayOnly", "NoMultiSamplingBuffers", "BuggyColorRenderbuffer", "NoPBufferWithAccum", - "NeedSharedObjectSync", "NoARBCreateContext", "NoSurfacelessCtx" + "NeedSharedObjectSync", "NoARBCreateContext", "NoSurfacelessCtx", + "NoFBOSupport" }; private static final IdentityHashMapstickyDeviceQuirks = new IdentityHashMap (); @@ -592,6 +597,10 @@ public class GLRendererQuirks { static { _bitmaskOverrideForce = _queryQuirkMaskOfPropertyList("jogl.quirks.force", Override.FORCE); _bitmaskOverrideIgnore = _queryQuirkMaskOfPropertyList("jogl.quirks.ignore", Override.IGNORE); + if( 0 != ( _bitmaskOverrideForce & GLRendererQuirks.BuggyColorRenderbuffer) ) { + _bitmaskOverrideForce |= GLRendererQuirks.NoFullFBOSupport; + } + final int uniqueTest = _bitmaskOverrideForce & _bitmaskOverrideIgnore; if( 0 != uniqueTest ) { throw new InternalError("Override properties force 0x"+Integer.toHexString(_bitmaskOverrideForce)+ diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 4e7987327..aba9054d0 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -1081,7 +1081,7 @@ public abstract class GLContextImpl extends GLContext { validateProfileBits(profile, "profile"); validateProfileBits(resCtp, "resCtp"); - if(FORCE_NO_FBO_SUPPORT) { + if( GLRendererQuirks.existStickyDeviceQuirk(device, GLRendererQuirks.NoFBOSupport) ) { resCtp &= ~CTX_IMPL_FBO ; } if(DEBUG) { @@ -2162,7 +2162,7 @@ public abstract class GLContextImpl extends GLContext { hasCtxProfileBits |= CTX_IMPL_FP32_COMPAT_API; } - if(FORCE_NO_FBO_SUPPORT) { + if( glRendererQuirks.exist(GLRendererQuirks.NoFBOSupport) ) { hasCtxProfileBits &= ~CTX_IMPL_FBO ; } @@ -2499,26 +2499,6 @@ public abstract class GLContextImpl extends GLContext { } } - // - // Property related quirks - // - if( FORCE_NO_COLOR_RENDERBUFFER ) { - final int quirk = GLRendererQuirks.BuggyColorRenderbuffer; - if(DEBUG) { - System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: property"); - } - quirks.addQuirk( quirk ); - } - if( FORCE_MIN_FBO_SUPPORT || quirks.exist(GLRendererQuirks.BuggyColorRenderbuffer) ) { - final int quirk = GLRendererQuirks.NoFullFBOSupport; - if(DEBUG) { - final String causeProps = FORCE_MIN_FBO_SUPPORT ? "property, " : ""; - final String causeQuirk = quirks.exist(GLRendererQuirks.BuggyColorRenderbuffer) ? "BuggyColorRenderbuffer" : ""; - System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: "+causeProps+causeQuirk); - } - quirks.addQuirk( quirk ); - } - if(DEBUG) { System.err.println("Quirks local.0: "+quirks); } -- cgit v1.2.3