<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1200</bug_id>
          
          <creation_ts>2015-08-26 01:33:40 +0200</creation_ts>
          <short_desc>JOGL crashes on Debian8 GNU/Linux x86_64 &apos;NVidia beta driver 355.06&apos; @ probeSurfacelessCtx</short_desc>
          <delta_ts>2019-12-08 02:50:21 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>core</component>
          <version>2.4.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>gouessej</cc>
    
    <cc>sgothel</cc>
    
    <cc>xerxes</cc>
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs>e88216bd03a41480b81345ed9afc45ddea5ecfcd
17af6ed1d0f60c111079ff19c4114fefbfd025fc
4fe9e1dfa67f4e5d614f48c02ad88e4cdd1ed415
bb3ee12b7aeef276a03f091333eacc68542e784b</cf_scm_refs>
          <cf_workaround>TRUE</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4993</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-08-26 01:33:40 +0200</bug_when>
    <thetext>- Debian 8 Jessie, GNU/Linux, x86_64
- NVidia beta driver 355.06

The new beta driver claims to support OpenGL 3.0 surfaceless context,
i.e.
  &apos;Added support to make an OpenGL 3.0 and above context current without making current to any drawable.&apos;

However, our probe crashes JOGL.

+++

j  jogamp.opengl.x11.glx.GLX.dispatch_glXMakeContextCurrent0(JJJJJ)Z+0
j  jogamp.opengl.x11.glx.GLX.glXMakeContextCurrent(JJJJ)Z+45
j  jogamp.opengl.x11.glx.X11GLXContext.glXMakeContextCurrent(JJJJ)Z+16
j  jogamp.opengl.x11.glx.X11GLXContext.makeCurrentImpl()V+33
j  jogamp.opengl.GLContextImpl.makeCurrentWithinLock(I)I+790
j  jogamp.opengl.GLContextImpl.makeCurrent(Z)I+488
j  jogamp.opengl.GLContextImpl.setGLDrawable(Lcom/jogamp/opengl/GLDrawable;Z)Lcom/jogamp/opengl/GLDrawable;+302
j  jogamp.opengl.GLDrawableFactoryImpl.probeSurfacelessCtx(Lcom/jogamp/opengl/GLContext;Z)Z+93
j  jogamp.opengl.x11.glx.X11GLXDrawableFactory.access$300(Ljogamp/opengl/x11/glx/X11GLXDrawableFactory;Lcom/jogamp/opengl/GLContext;Z)Z+3
j  jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Ljogamp/opengl/Sh

+++</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4994</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-08-26 01:41:36 +0200</bug_when>
    <thetext>Thx to Xerxes for finding this issue and reporting via IIRC.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4995</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-08-26 02:04:26 +0200</bug_when>
    <thetext>- Probing passes for EGL/ES 1.1 and 3.1 context.

- Probing crashes for GLX/GL 4.5 context
  at &apos;context.setGLDrawable(zeroDrawable, false)&apos;
    at 1st &apos;res = makeCurrent(true); // implicit: associateDrawable(true)&apos;

  i.e. glXMakeContextCurrent does not seem to handle the zero drawable!

+++
XXX-1: X11GLXContext [Version 4.5 (Compat profile, arb, compat[ES2, ES3, ES31], FBO, hardware) - 4.5.0 NVIDIA 355.06 [GL 4.5.0, vendor 355.6.0 (NVIDIA 355.06)], options 0x3c03, this 0x222884cd, handle 0x7f51f035e270, isShared false, jogamp.opengl.gl4.GL4bcImpl@20483fa4,
         quirks: [],
        Drawable: X11OnscreenGLXDrawable[Realized true,
        Factory   jogamp.opengl.x11.glx.X11GLXDrawableFactory@83dd33,
        Handle    0x4200002,
        Surface   WrappedSurface[ displayHandle 0x7f51f00013d0
, surfaceHandle 0x4200002
, size 64x64
, UOB[ OWNS_SURFACE | WINDOW_INVISIBLE ]
, X11GLXGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7f51f00013d0, owner true, ResourceToolkitLock[obj 0x

++</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5018</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-08-27 20:11:44 +0200</bug_when>
    <thetext>e88216bd03a41480b81345ed9afc45ddea5ecfcd:

 Since no known NVidia driver is know properly supporting surfaceless context,
 i.e. current context w/o drawable attached, we set quirk NoSurfacelessCtx
 for all NVidia drivers until a &apos;good one&apos; is known!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5021</commentid>
    <comment_count>4</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2015-08-27 21:15:59 +0200</bug_when>
    <thetext>(In reply to comment #3)
&gt; e88216bd03a41480b81345ed9afc45ddea5ecfcd:
&gt; 
&gt;  Since no known NVidia driver is know properly supporting surfaceless
&gt; context,
&gt;  i.e. current context w/o drawable attached, we set quirk NoSurfacelessCtx
&gt;  for all NVidia drivers until a &apos;good one&apos; is known!

I have a Nvidia GS somewhere, should I give it a try?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5034</commentid>
    <comment_count>5</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-08-30 02:41:48 +0200</bug_when>
    <thetext>commit 17af6ed1d0f60c111079ff19c4114fefbfd025fc

    Bug 1200: Refine fix for crash on GNU/Linux x86_64 &apos;NVidia beta driver 355.06&apos; @ probeSurfacelessCtx
    
    Refine commit e88216bd03a41480b81345ed9afc45ddea5ecfcd,
    i.e. restrict new &apos;NoSurfacelessCtx&apos; 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&apos;s GLDrawable from &apos;onscreen&apos; or &apos;offscreen&apos;
          to &apos;zero&apos; (Surfaceless).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6342</commentid>
    <comment_count>6</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2019-11-28 02:15:17 +0100</bug_when>
    <thetext>commit 4fe9e1dfa67f4e5d614f48c02ad88e4cdd1ed415

probeSurfacelessCtx works at least since NVIDIA 430.40.

Added this version as the safe version to limit GLRendererQuirks.NoSurfacelessCtx setting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6436</commentid>
    <comment_count>7</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2019-12-08 02:50:21 +0100</bug_when>
    <thetext>bb3ee12b7aeef276a03f091333eacc68542e784b
GLRendererQuirks.NoSurfacelessCtx still persists on Linux/X11 NVIDIA 440.36 using FBO
    
    Tested with com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsNewtAWT,
    which crashes in native makeCurrent of NV driver gl-core when using SurfacelessCtx.
    
    Therefor we had to revert the commit 4fe9e1dfa67f4e5d614f48c02ad88e4cdd1ed415
    enabling SurfacelessCtx with NV driver &gt;= 430.40.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>