From 17af6ed1d0f60c111079ff19c4114fefbfd025fc Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 29 Aug 2015 17:17:17 +0200 Subject: Bug 1200: Refine fix for crash on GNU/Linux x86_64 'NVidia beta driver 355.06' @ probeSurfacelessCtx Refine commit e88216bd03a41480b81345ed9afc45ddea5ecfcd, i.e. restrict new 'NoSurfacelessCtx' NVidia-Vendor criteria in GLContextImpl.setRendererQuirks(..) to - isX11 (new) - isDriverNVIDIAGeForce (kept) - !(adevice instanceof EGLGraphicsDevice) (new) Surfaceless context seems to work on NVidia 355.06 for EGL+[ES+GL]. It does not work for GLX+GL though! TODO: Validate changing a GLContext's GLDrawable from 'onscreen' or 'offscreen' to 'zero' (Surfaceless). --- src/jogl/classes/jogamp/opengl/GLContextImpl.java | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/jogl/classes/jogamp') diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 469718995..dcab9ed5b 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -2241,6 +2241,17 @@ public abstract class GLContextImpl extends GLContext { } } } + if( isDriverNVIDIAGeForce ) { + // Bug 1200: Crash on GNU/Linux x86_64 'NVidia beta driver 355.06' @ probeSurfacelessCtx + // final VersionNumber nvSafeVersion = new VersionNumber(356, 0, 0); // FIXME: Add safe version! + if( !isES && !(adevice instanceof EGLGraphicsDevice) /* && vendorVersion.compareTo(nvSafeVersion) < 0 */ ) { + final int quirk = GLRendererQuirks.NoSurfacelessCtx; + if(DEBUG) { + System.err.print("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: !ES, !EGL, Vendor " + glVendor +", X11 Renderer " + glRenderer+", Version=[vendor " + vendorVersion + ", GL " + glVersion+"]"); + } + addStickyQuirkAtMapping(adevice, quirks, quirk, withinGLVersionsMapping); + } + } } @@ -2307,16 +2318,6 @@ public abstract class GLContextImpl extends GLContext { } quirks.addQuirk( quirk ); } - } else if( isDriverNVIDIAGeForce ) { - // Bug 1200: Crash on GNU/Linux x86_64 'NVidia beta driver 355.06' @ probeSurfacelessCtx - // final VersionNumber nvSafeVersion = new VersionNumber(356, 0, 0); // FIXME: Add safe version! - if( !esCtx /* && vendorVersion.compareTo(nvSafeVersion) < 0 */ ) { - final int quirk = GLRendererQuirks.NoSurfacelessCtx; - if(DEBUG) { - System.err.print("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: !ES, Vendor " + glVendor +", Renderer " + glRenderer); - } - addStickyQuirkAlways(adevice, quirks, quirk, withinGLVersionsMapping); - } } // -- cgit v1.2.3