From 2c4114b50f4023843073acf6d4cea223fb491e7e Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 23 Aug 2019 07:30:29 +0200 Subject: Bug 1384: Move remaining 'lose' property quirks into GLRendererQuirks.Override --- src/jogl/classes/com/jogamp/opengl/GLContext.java | 4 --- .../com/jogamp/opengl/GLRendererQuirks.java | 41 +++++++++++++--------- 2 files changed, 25 insertions(+), 20 deletions(-) (limited to 'src/jogl/classes/com/jogamp') diff --git a/src/jogl/classes/com/jogamp/opengl/GLContext.java b/src/jogl/classes/com/jogamp/opengl/GLContext.java index 8f030ade4..88fed4450 100644 --- a/src/jogl/classes/com/jogamp/opengl/GLContext.java +++ b/src/jogl/classes/com/jogamp/opengl/GLContext.java @@ -107,10 +107,6 @@ public abstract class GLContext { */ public static final boolean PROFILE_ALIASING = !Debug.isPropertyDefined("jogl.debug.GLContext.NoProfileAliasing", true); - protected static final boolean FORCE_NO_FBO_SUPPORT = Debug.isPropertyDefined("jogl.fbo.force.none", true); - protected static final boolean FORCE_MIN_FBO_SUPPORT = Debug.isPropertyDefined("jogl.fbo.force.min", true); - protected static final boolean FORCE_NO_COLOR_RENDERBUFFER = Debug.isPropertyDefined("jogl.fbo.force.nocolorrenderbuffer", true); - /** Reflects property jogl.debug.DebugGL. If true, the debug pipeline is enabled at context creation. */ public static final boolean DEBUG_GL = Debug.isPropertyDefined("jogl.debug.DebugGL", true); /** Reflects property jogl.debug.TraceGL. If true, the trace pipeline is enabled at context creation. */ diff --git a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java index 8f22d0238..a2dc6832e 100644 --- a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java +++ b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java @@ -38,8 +38,6 @@ import com.jogamp.common.util.PropertyAccess; import com.jogamp.opengl.egl.EGL; import com.jogamp.opengl.egl.EGLExt; -import jogamp.opengl.Debug; - /** * GLRendererQuirks contains information of known bugs of various GL renderer. * This information allows us to workaround them. @@ -122,12 +120,14 @@ public class GLRendererQuirks { public static final int GLSLBuggyDiscard = 5; /** - * Non compliant GL3 compatibility context due to a buggy implementation not suitable for use. + * Non compliant OpenGL 3.1+ compatibility profile due to a buggy implementation not suitable for use. *

- * 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. - *

*/ public static final int NoFullFBOSupport = 11; @@ -375,9 +373,6 @@ public class GLRendererQuirks { *

* Note: GLFBODrawable always uses texture attachments if set. *

- *

- * Quirk can also be enabled via property: jogl.fbo.force.nocolorrenderbuffer. - *

*/ public static final int BuggyColorRenderbuffer = 18; @@ -387,7 +382,7 @@ public class GLRendererQuirks { *

* 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 IdentityHashMap stickyDeviceQuirks = 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)+ -- cgit v1.2.3