diff options
Diffstat (limited to 'src/jogl')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java | 29 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 15 |
2 files changed, 41 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java index a643d81a9..cc709c96b 100644 --- a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java +++ b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java @@ -30,6 +30,8 @@ package com.jogamp.opengl; import java.util.IdentityHashMap; import javax.media.nativewindow.AbstractGraphicsDevice; +import javax.media.opengl.GLCapabilitiesImmutable; +import javax.media.opengl.GLDrawableFactory; import com.jogamp.common.os.Platform; @@ -289,15 +291,38 @@ public class GLRendererQuirks { */ public static final int SingletonEGLDisplayOnly = 16; + /** + * With certain drivers no reliable MSAA / FSAA + * {@link GLCapabilitiesImmutable#getSampleBuffers() multi} + * {@link GLCapabilitiesImmutable#getNumSamples() sampling} is available, read <i>a crash</i> may occur. + * <p> + * Appears on: + * <ul> + * <li>GL_VENDOR nouveau</li> + * <li>GL_RENDERER Gallium 0.4 on NV34</li> + * </ul> + * TODO: We have to determine the exact version range, i.e. not adding the quirk with fixed driver version! + * </p> + * TODO: Since we currently don't handle this quirk internally, a user may need to do the following: + * <pre> + * final AbstractGraphicsDevice adevice = GLDrawableFactory.getDesktopFactory(); // or similar + * if( GLRendererQuirks.existStickyDeviceQuirk(adevice, GLRendererQuirks.NoMultiSamplingBuffers) ) { + * // don't use MSAA + * } + * </pre> + */ + public static final int NoMultiSamplingBuffers = 17; + /** Number of quirks known. */ - public static final int COUNT = 17; + public static final int COUNT = 18; private static final String[] _names = new String[] { "NoDoubleBufferedPBuffer", "NoDoubleBufferedBitmap", "NoSetSwapInterval", "NoOffscreenBitmap", "NoSetSwapIntervalPostRetarget", "GLSLBuggyDiscard", "GLNonCompliant", "GLFlushBeforeRelease", "DontCloseX11Display", "NeedCurrCtx4ARBPixFmtQueries", "NeedCurrCtx4ARBCreateContext", "NoFullFBOSupport", "GLSLNonCompliant", "GL4NeedsGL3Request", - "GLSharedContextBuggy", "GLES3ViaEGLES2Config", "SingletonEGLDisplayOnly" + "GLSharedContextBuggy", "GLES3ViaEGLES2Config", "SingletonEGLDisplayOnly", + "NoMultiSamplingBuffers" }; private static final IdentityHashMap<String, GLRendererQuirks> stickyDeviceQuirks = new IdentityHashMap<String, GLRendererQuirks>(); diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 9ccd78589..04ecba262 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -1869,13 +1869,26 @@ public abstract class GLContextImpl extends GLContext { quirks[i++] = quirk; } if( glRenderer.contains( MesaRendererIntelsp ) && - vendorVersion.compareTo(mesaIntelBuggySharedCtx921) >= 0 && isX11 ) { + vendorVersion.compareTo(mesaIntelBuggySharedCtx921) >= 0 && isX11 ) { // FIXME: When is it fixed ? final int quirk = GLRendererQuirks.GLSharedContextBuggy; if(DEBUG) { System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: X11 / Renderer " + glRenderer + " / Mesa-Version "+vendorVersion); } quirks[i++] = quirk; } + if( glVendor.contains( "nouveau" ) + // FIXME: && vendorVersion.compareTo(nouveauBuggyMSAAFixed) < 0 + ) { + final int quirk = GLRendererQuirks.NoMultiSamplingBuffers; + if(DEBUG) { + System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: X11 / Renderer " + glRenderer + " / Vendor "+glVendor); + } + quirks[i++] = quirk; + if( withinGLVersionsMapping ) { + // Thread safe due to single threaded initialization! + GLRendererQuirks.addStickyDeviceQuirks(adevice, quirks, i-1, 1); + } + } if( isWindows && glRenderer.contains("SVGA3D") ) { final VersionNumber mesaSafeFBOVersion = new VersionNumber(8, 0, 0); if ( vendorVersion.compareTo(mesaSafeFBOVersion) < 0 ) { // includes: vendorVersion.isZero() |