Created attachment 483 [details] Debug trace generated by my application Hi, I found some issues when running my application under Linux (Fedora 19 Beta) with AMD RS880 chipset using the latest aggregated build of Jogl2. the main issue is that i dont get to render anything on screen. Not from my rendering routines and not from any of jogl routines (like text rendering). I also tried the demos, and even though they run, i dont get to see anything rendered in the windows. On IRC, sgothel helped me debug my application and so I got the debug log that I am attaching to this report. Also, when discussing the log with Sven Gothel, he recommended me to modify GLContextImpl.java The diff of the modification is the following (sorry if this is not the best way to share it. I'm still new to git and all this patching thing) diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index cab629c..22eb5c2 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -1640,7 +1640,7 @@ public abstract class GLContextImpl extends GLContext { } quirks[i++] = quirk; } - if( glRenderer.contains("Intel(R)") && compatCtx && ( major > 3 || major == 3 && minor >= 1 ) ) + if( ( major > 3 || major == 3 && minor >= 1 ) ) { // FIXME: Apply vendor version constraints! final int quirk = GLRendererQuirks.GLNonCompliant; Doing that and compiling Jogl again, allowed my application to render the textures again. Sven also recommended to try with: if( compatCtx && ( major > 3 || major == 3 && minor >= 1 ) ) But that crashed the application as soon as the GLWindow was created. (Still need to look into the exact error on that one) Let me know if there is any other test I should run to help fix this issue. Thanks
So, in order to better target the constraint the right modification should be as stated by this diff: diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index cab629c..7d30018 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -1640,7 +1640,7 @@ public abstract class GLContextImpl extends GLContext { } quirks[i++] = quirk; } - if( glRenderer.contains("Intel(R)") && compatCtx && ( major > 3 || major == 3 && minor >= 1 ) ) + if( ((glRenderer.contains("Intel(R)") && compatCtx) || glRenderer.contains("AMD")) && ( major > 3 || major == 3 && minor >= 1 ) ) { // FIXME: Apply vendor version constraints! final int quirk = GLRendererQuirks.GLNonCompliant;
manually merged.
Created attachment 488 [details] GLFW program showing output on Mesa 9.1.3, AMD 3.1 context
The attached amdcontext.zip program (in C using GLFW) does show output on: renderer : Gallium 0.4 on AMD RV730 version : 3.1 (Core Profile) Mesa 9.1.3 vendor : X.Org So this may be a JOGL problem, a Mesa development problem, a hardware problem...
Created attachment 489 [details] Mesa compatibility context mess
Created attachment 490 [details] Mesa core context
Created attachment 491 [details] Patch to weaken quirk for Mesa contexts
Ok, I've been prodding this and it seems to be the fault of Mesa's compatibility context. TestGearsES2NEWT.test01_GL2ES2 gives the following output: https://jogamp.org/bugzilla/attachment.cgi?id=489 The same code running in a core context gives: https://jogamp.org/bugzilla/attachment.cgi?id=490 The core context looks like this: GL:X11GLXContext [Version 3.1 (hardware) - 3.1 (Core Profile) Mesa 9.1.3 [GL 3.1.0, vendor 9.1.3 ( (Core Profile) Mesa 9.1.3)], options 0x305, this 0x734c4b73, handle 0x7ffc94003b50, jogamp.opengl.gl4.GL4bcImpl@15eda628, quirks: [NoDoubleBufferedPBuffer, NoSetSwapIntervalPostRetarget], Drawable: X11OnscreenGLXDrawable[Realized true, Factory jogamp.opengl.x11.glx.X11GLXDrawableFactory@4f8a6f26, Handle 0x1e00002, Surface jogamp.newt.driver.x11.WindowDriver[Config X11GLXGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x7ffcb40e4d30, owner true, ResourceToolkitLock[obj 0x9875096, isOwner false, <12bbacbd, 5f49b5e6>[count 1, qsz 0, owner <main-Animator>]]], idx 0], visualID 0x21c, fbConfigID 0xb6, requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL3/GL3.hw], on-scr[.]], chosen GLCaps[glx vid 0x21c, fbc 0xb6: rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/0/0, dbl, mono , hw, GLProfile[GL3/GL3.hw], on-scr[.]]] , NEWT-Screen[.x11_:0.0-1-s0, idx 0, refCount 1, vsize [ 0 / 0 1440 x 900 ], X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x7ffcb40c2810, owner true, ResourceToolkitLock[obj 0x60453fe9, isOwner false, <62670b5f, 5b1bbc71>[count 0, qsz 0, owner <NULL>]]], idx 0], NEWT-Display[.x11_:0.0-1, excl false, refCount 1, hasEDT true, edtRunning true, X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x7ffcb40c2810, owner true, ResourceToolkitLock[obj 0x60453fe9, isOwner false, <62670b5f, 5b1bbc71>[count 0, qsz 0, owner <NULL>]]]], monitors: [Monitor[Id 0x0, 410 x 257 mm, viewport [ 0 / 0 1440 x 900 ], orig [Id 0x55, [ 1440 x 900 x 32 bpp ] @ 59.88 Hz, flags [], 0 degr], curr [Id 0x55, [ 1440 x 900 x 32 bpp ] @ 59.88 Hz, flags [], 0 degr], modeChanged false, modeCount 76]]] , ParentWindow null , ParentWindowHandle 0x0 (false) , WindowHandle 0x1e00002 , SurfaceHandle 0x1e00002 (lockedExt window true, surface true) , Pos 137/352 (auto false), size 640x480 , Visible true, focus true , Undecorated false (false) , AlwaysOnTop false, Fullscreen false , WrappedSurface null , ChildWindows 0, SurfaceUpdatedListeners num 0 [], WindowListeners num 3 [com.jogamp.newt.opengl.GLWindow$2@79f0cd71, com.jogamp.opengl.test.junit.util.QuitAdapter@303ff442, com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT$2@36bd31cd, ], MouseListeners num 2 [com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT$4@3f10a5ce, com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2$GearsMouseAdapter@5df597ba, ], KeyListeners num 3 [com.jogamp.opengl.test.junit.util.QuitAdapter@303ff442, com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT$3@26bc6487, com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2$GearsKeyAdapter@1a6beeef, ], windowLock <24139a76, 301cb7b>[count 2, qsz 0, owner <main-Animator>], surfaceLockCount 1]], direct true] , 3.1 (hardware) - 3.1 (Core Profile) Mesa 9.1.3 The following patch reduces the scope of the quirk to allow Mesa 3.1 (and above) core contexts: https://jogamp.org/bugzilla/attachment.cgi?id=491 I've tested this locally against Mesa 9.1.3, but not on Intel yet.
The patch is against 3a32a59045ced338b2c5098cfb1102f847420efc