commit 8e9407ab74f672c2a0d1e196a3ba2e7d8743debf Author: Sven Gothel Date: Tue Sep 23 03:56:04 2014 +0200 Fix synchronization issues in Animator* Exception case Refines commit cef7ba607ad7e8eb1ff2a438d77710a29aa0bda6 - The animator monitor-lock was still hold in the post finally block issuing flushGLRunnables(), due to intrinsic monitor release (in finally): - - - Further: AnimatorBase.flushGLRunnables() acquired the lock itself (duh!) This commit removes the requirement for finally altogether by simply return a boolean from handleUncaughtException(caughtException), where false denotes the caller to propagate the exception itself (no handler). Post synchronized block then issues flushGLRunnables() and exceptation propagation as required. AnimatorBase.flushGLRunnables() 'synchronized' modifier is removed. Further, ThreadDeath is being propagated if caught. Here the finally block is also removed - redundant. commit 2fc3a60ed01501727f0645f35ffe75eb56a32aec Author: Sven Gothel Date: Mon Sep 22 23:22:57 2014 +0200 Fix GLContextImpl.setRendererQuirks(..) CTX_IMPL_ACCEL_SOFT profile state - GLContextImpl.setRendererQuirks(..) in called in GLContextImpl.setGLFunctionAvailability(..) - GLContextImpl.setRendererQuirks(..) was called before fixing CTX_IMPL_ACCEL_SOFT via isCurrentContextHardwareRasterizer(). The latter set CTX_IMPL_ACCEL_SOFT based on known software renderer string within GL_RENDERER. This lead to incorrect hwAccel assumption and hence wrong setting of GLRendererQuirks: - NoDoubleBufferedPBuffer (was selected even w/ later CTX_IMPL_ACCEL_SOFT) - BuggyColorRenderbuffer (was never selected) - Fix performs GLContextImpl.setRendererQuirks(..) _after_ fixing CTX_IMPL_ACCEL_SOFT via isCurrentContextHardwareRasterizer(). commit b13f4efae1ad14117efef6a3bd5eee47aaa98cdf Author: Sven Gothel Date: Mon Sep 22 23:17:28 2014 +0200 Fix synchronization issues in GLDrawableHelper.flushGLRunnables(), fixes rare deadlock with animator-exception and invoke(wait=true, ..) Fix synchronization issues in GLDrawableHelper.flushGLRunnables(): - Querying 'glRunnables.size()' is not synchronized, only its reference is volatile, not the instance's own states. - 'flushGLRunnable()' must operates while acquired the 'glRunnable' lock. - 'glRunnables' are no more volatile - introduced volatile 'glRunnableCount', allowing 'display(..)' method to pre-query whether blocking 'execGLRunnables(..)' must be called. This is risk (deadlock) free. Also fixes rare deadlock in animator display-exception / GLAD.invoke(wait=true, ..) case: - 'GLDrawableHelper.invoke(.., GLRunnable)' acquires the 'glRunnable' lock. - Then it queries animator state, which is blocking. - Hence animator's 'flushGLRunnable()' call must happen outside the animator lock commit 657081451f7cceac0b0a58b3c15a10a6d3b4b907 Author: Sven Gothel Date: Mon Sep 22 07:07:42 2014 +0200 Stabilize, fix regression: GLDrawable.invoke(..) and Animator* display-loop 'closure' GLDrawable.invoke(..) regression of commit c77b8f586cb2553582a42f5b90aeee5ef85f1efe: 'wait' was not set to false, if 'deferredHere' was forced to 'false'. This could lead to the situation where GLRunnableTask will catch the exception and supresses it. Animator/FPSAnimator post exception propagation code animThread = null; notifyAll(); must be complete to finalize animator state in case of an exception. Decorate 'handleUncaughtException(..)' w/ try { } finally { } where the latter ensures the mentioned 'closure'. commit a8285cf7e4673dc45cf99c0872b3f9a25599e159 Author: Sven Gothel Date: Sat Sep 20 23:01:13 2014 +0200 Adding missing applet launcher html page for GLJPanelsAndGLCanvasDemoGL2Applet commit e6f6b53127264c9792f23e13aefed097fb98d8f9 Author: Sven Gothel Date: Sat Sep 20 16:48:57 2014 +0200 TestVersionSemanticsNOUI: V221 -> V222 Add exception for GLFBODrawable.FBOMODE_DEFAULT commit 7321a2ea8964305f89f723f5c8034040da29765d Author: Sven Gothel Date: Sat Sep 20 16:48:18 2014 +0200 Add GLJPanelsAndGLCanvasDemoGL2Applet: Simple applet test for GLJPanel/GL2 testing (offscreen, ..); Clean up GL2 Gears and Teapot state enable/disable commit c68e7f9b56f08341ec4977337e3c07384c3782fb Author: Sven Gothel Date: Sat Sep 20 16:06:56 2014 +0200 FBObject: Fix depth- and stencil bit count selection for attachRenderbuffer(..); - Fix depth- and stencil bit count selection for attachRenderbuffer(..) - Add generic values: DEFAULT_BITS, REQUESTED_BITS, CHOSEN_BITS, MAXIMUM_BITS - Refactor depth- and stencil bit-count -> format into own method - Allow depth- and stencil bit-count select a higher bit-count if required (fix) - GLFBODrawable.FBOMODE_USE_DEPTH is deprecated, using GLCapabilities.[get|set]DepthBits(..) - It was an oversight to introduce the bit flag in the first place, since we should have used the capabilities depth bit-count - Graph Test: GLEventListenerButton shall use requested capabilities for FBO drawable. commit c2cbcf91af97053c4b4683e2d2c5087409edf5c4 Author: Sven Gothel Date: Sat Sep 20 08:02:32 2014 +0200 TestVersionSemanticsNOUI: Add v2.2.1 jogl-all.jar commit f9a6d3838b6ef200ba97f694809f4906a8536de0 Author: Sven Gothel Date: Sat Sep 20 07:24:06 2014 +0200 TestVersionSemanticsNOUI: Enable test V220->V221 and V221->V222 (w/ 2 extra exclusions) Enable tests: - V220->V221 - V221->V222 (w/ 2 extra exclusions) - GLRendererQuirks COUNT has been increased (-> use a method, FIXME) - Animator pauseIssued is volatile now commit b37ff990377bc5b71182c85b32569a3c6430eecd Author: Sven Gothel Date: Sat Sep 20 07:21:55 2014 +0200 GLJPanel: Fix backward compatibility, regression of commit fa6ba9d70d4fe47f05facc72608fb10c889f9d09 - bring back removed 'void dispose()' -> deprecated now commit 55ccce090453954cf8975dcb1092b53f94b4839e Author: Sven Gothel Date: Sat Sep 20 07:20:35 2014 +0200 FBObject: Fix merge issues of commit 034d843359508833094b6a87eb4b58fd5231bafa - Handle deprecated reset(..) variants return type in a backward compatible manner commit 4548c903c45ef39298e589a6070921e3e994d286 Author: Sven Gothel Date: Sat Sep 20 02:52:27 2014 +0200 TestGearsES2GLJPanelAWT: Update frame title (awt-size, pixel-size) for GLEventListener.reshape(..) commit 034d843359508833094b6a87eb4b58fd5231bafa Author: Sven Gothel Date: Sat Sep 20 02:51:44 2014 +0200 FBObject: Simplify API (init/reset); Only issue automatic resetSamplingSink(..) if required; Fix resetSamplingSink(..), isBound(), .. - Simplify API (init/reset) - use new unique methods for init and reset: - void init(final GL gl, final int newWidth, final int newHeight, final int newSamples) - does not issue resetSamplingSink(..) - boolean reset(final GL gl, final int newWidth, final int newHeight, final int newSamples) - always issues resetSamplingSink(..) - deprecated dual-use (init/reset): - boolean reset(final GL gl, final int newWidth, final int newHeight) - boolean reset(final GL gl, int newWidth, int newHeight, int newSamples, final boolean resetSamplingSink) - reset(..) no more creates a dummy 'samplingSink' instance if sampling > 0, left up to resetSamplingSink(..) - Track 'modified' state of FBObject, if size, format or any attachment has been changed since last - use(..) - syncSamplingSink(..) - resetSamplingSink(..) - Only issue resetSamplingSink(..) from syncSamplingSink(..)/use(..) if 'modified == true' +++ - Fix setSamplingSink(..), i.e. samplingSink state handling: - Validated whether given samplingSink is initialized, throws Exception if not. - Fix resetSamplingSink(..) - resets the bound state, i.e. leaves it untouched - also unbinds the samplingSink - sampleSinkDepthStencilMismatch() also returns true if this.depth/stencil == null, but samplingSink is not. - Newly created colorbuffer/-texture matches exiting colorbuffer's internal-format, if exists. - Using simplified resetSizeImpl(..) for size mismatch - Simplified samplingColorSink init check - Fix isBound() was: 'bound = bound && fbName != gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER)' fix: 'bound = bound && fbName == gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER)' - Fix detachRenderbuffer(..) validates whether detachment was successful, similar to detachColorbuffer(..) Conflicts: src/jogl/classes/com/jogamp/opengl/FBObject.java commit 577272e55c4f0d76854ee8f8a10f49796b5014f5 Author: Sven Gothel Date: Fri Sep 19 19:21:29 2014 +0200 StereoClientRenderer: Remove redundant FBObject.detachAllColorbuffer(gl) for init call commit f51ccf9974a9a0479ef3c6c6692955ce3717682d Author: Sven Gothel Date: Fri Sep 19 19:20:48 2014 +0200 FBOobject GLEL Tests: Remove redundant detachAllColorbuffer(gl) for init call commit 7bc86f21b20ebb32564d4493a445d9a1dfedb118 Author: Sven Gothel Date: Fri Sep 19 01:24:32 2014 +0200 New GLRendererQuirks.BuggyColorRenderbuffer: On Mesa 7.2 software, FBO color renderbuffer may cause a crash Workaround crash caused by Mesa 7.2 software rendering using color renderbuffer target in FBO. If Mesa < 8.0 and software - or - property 'jogl.fbo.force.nocolorrenderbuffer' is set, set quirks: - GLRendererQuirks.BuggyColorRenderbuffer - GLRendererQuirks.NoFullFBOSupport (to disable MSAA) GLFBODrawable always uses FBOMODE_USE_TEXTURE if GLRendererQuirks.BuggyColorRenderbuffer is set. +++ Crash Report: GNU C Library : 2.13 stable OpenGL : software Operating System : Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 Processor ID : x86 Family 6 Model 44 Stepping 2, GenuineIntel Abnormal termination: Segmentation violation Register State (from fault): RAX = 00000000ff1818f0 RBX = 00000000beaf8afc RCX = 0000000000000004 RDX = 00007f85ed9c9010 RSP = 00007f8252d24fd0 RBP = 00007f8252d25020 RSI = 0000000017b9b330 RDI = 0000000015bca400 R8 = 0000000000000000 R9 = 00007f81edcd3014 R10 = 00007f823565f6ce R11 = 00007f827bee49aa R12 = 0000000000001406 R13 = 0000000000000001 R14 = 00000000154d5458 R15 = 00000000154d4f10 RIP = 00007f823565f7bc EFL = 0000000000010206 CS = 0033 FS = 0000 GS = 0000 Stack Trace (from fault): [ 0] 0x00007f823565f7bc put_row_ubyte4 at /mesa/main/renderbuffer.c:665 (in /lib/libGL.so.1) [ 1] 0x00007f8235727239 _swrast_write_rgba_span at /mesa/swrast/s_span.c:1450 (in /lib/libGL.so.1) [ 2] 0x00007f823574b071 smooth_rgba_triangle at /mesa/swrast/s_tritemp.h:862 (in /lib/libGL.so.1) [ 3] 0x00007f82357155f0 _swrast_Triangle at /mesa/swrast/s_context.c:692 (in /lib/libGL.so.1) [ 4] 0x00007f8235771780 triangle_offset_twoside_rgba at /mesa/swrast_setup/ss_tritmp.h:188 (in /lib/libGL.so.1) [ 5] 0x00007f82356d2cea _tnl_render_poly_elts at /mesa/tnl/t_vb_rendertmp.h:313 (in /lib/libGL.so.1) [ 6] 0x00007f82356d335e _tnl_RenderClippedPolygon at /mesa/tnl/t_vb_render.c:244 (in /lib/libGL.so.1) [ 7] 0x00007f82356c9313 clip_tri_4 at /mesa/tnl/t_vb_cliptmp.h:230 (in /lib/libGL.so.1) [ 8] 0x00007f82356cd026 clip_render_triangles_verts at /mesa/tnl/t_vb_rendertmp.h:163 (in /lib/libGL.so.1) [ 9] 0x00007f82356d37d9 run_render at /mesa/tnl/t_vb_render.c:320 (in /lib/libGL.so.1) [ 10] 0x00007f82356c2436 _tnl_run_pipeline at /mesa/tnl/t_pipeline.c:158 (in /lib/libGL.so.1) [ 11] 0x00007f82356c37da _tnl_draw_prims at /mesa/tnl/t_draw.c:402 (in /lib/libGL.so.1) [ 12] 0x00007f82356b673a vbo_exec_DrawArrays at /mesa/vbo/vbo_exec_array.c:263 (in /lib/libGL.so.1) [ 13] 0x00007f823583e5b0 glDrawArrays at /mesa/glapi/glapitemp.h:1645 (in /lib/libGL.so.1) +++ commit 2e2a262cd59b978255ef50d877e0be0cafe37a6a Author: Sven Gothel Date: Fri Sep 19 01:15:07 2014 +0200 GLContextImpl.setRendererQuirks(..): Use GLRendererQuirks.addQuirk(int), dropping usage of .addQuirks(int[] quirks, offset, len) Directly adding a quirk allows dropping usage of erroneous fixed-sized int[] array for accumulated quirks. commit 09f9e498b193e37ea4922054be58f7dd39d0d6ba Author: Sven Gothel Date: Thu Sep 18 03:59:04 2014 +0200 GLFBODrawableImpl: Utilize common self-contained setupFBO(..) method for FBO creation incl. Bug 1020 glClear(..) ; Fixes missing fbo.unbind(gl) Utilize common self-contained setupFBO(..) method for FBO creation incl. Bug 1020 glClear(..) initialize(..) and reset(..)'s fallback code contained duplicated FBO setup/creation code. The former was updated to suite the new FBO mode bits, where the latter left untouched, hence was buggy. Now setup and creation of a single FBO has been merged into setupFBO(..). Fixes missing fbo.unbind(gl): We did no issue unbind() on each fbo instance while adding the workaround for Bug 1020. Adding fbo.markUnbound() call to all fbos but the last. Note: This might not cause any issues, since fbo.bind(gl) tests the currently bound fbo. commit 41af060fb1e60cd22bd34dc537574be2cb8c4e6a Author: Sven Gothel Date: Thu Sep 18 03:43:13 2014 +0200 GLJPanel Cleanup: Remove initial FBO reshape; Propagate reshape only if differs from panel-size; Use pre-fetched panel-size. commit fa6ba9d70d4fe47f05facc72608fb10c889f9d09 Author: Sven Gothel Date: Sun Sep 14 01:14:38 2014 +0200 GLJPanel: Allow reconfiguration of offscreen's GLCapabilitiesImmutable Offscreen's GLCapabilitiesImmutable reconfiguration will dispose a realized instance and issues recreation via initializeBackendImpl() immedietly. Implementation performs operation on AWT-EDT. Tests: - TestGearsES2GLJPanelAWT: - Toggle MSAA via 'm' - TestGearsGLJPanelAWT: - Toggle MSAA via 'm' - Toggle Bitmap via 'b' commit b084083a3d61f4e7a6a33c0c12ac529f0464f4a8 Author: Sven Gothel Date: Sun Sep 14 01:09:45 2014 +0200 Gears* Demos: Spin at same speed (0.5f tan per frame) ; GearsES2: Bring back default Z values, allow Z customization (StereoDemo01) commit a69cca1d238615590a1d2d6da5d2533c46b3abf5 Author: Sven Gothel Date: Sun Sep 14 00:44:09 2014 +0200 FPSAnimator: Remove toString() override as accidently added in commit fa0115efb3989c28af21fc5f570ae49723566107 commit bb4e996c21fbc3defe230d420d1b664535b1dff5 Author: Sven Gothel Date: Sat Sep 13 15:28:58 2014 +0200 FPSAnimator: Align code and pause/resume conditions w/ Animator, simplifying review. commit 6119c8adbb8f2f8acda470ef82b5032342c8f142 Author: Sven Gothel Date: Sat Sep 13 15:27:43 2014 +0200 AnimatorBase.finishLifecycleAction(): Non blocking call shall return true, success - otherwise pause()/.. return value is inconsistent. Caller of e.g. pause() running on the anim-thread or AWT-EDT (AWTAnimatorImpl) will be non-blocking. Before this change, a non-blocking simply did not wait until the 'hold' condition is reached and returned its negated value. This ofc is 'false', indicated unsuccessful operation. Caller use the return value to determine whether the call actually paused (or ..) the animator. Despite the non-blocking nature, the pause state was set, even if not reached. Hence a resume() would be required to continue operation after a temporary pause. +++ This change ignores the non-blocking nature's unmet condition. finishLifecycleAction() returns !nok || !blocking, i.e. either true for the reached condition (blocking) or true if non-blocking. Blocking calls with unmet condition still return false. +++ In case an animated GLAutoDrawableis being pulled after a non-blocking animator pause() call, the GLAutoDrawable's implementation thread-safety must ensure proper operation. +++ commit ec60c85314927adaacd57a56c7cfdd74c2634ce3 Author: Sven Gothel Date: Tue Sep 9 21:02:55 2014 +0200 GLBuffers.sizeof(..): Add support for ES3, reading supported glPixelStorei states commit daef835ee4a36dc16b9e631b4b43e820178626b3 Author: Sven Gothel Date: Tue Sep 9 22:18:39 2014 +0200 Fix GLPixelStorageModes: Add missing import GLContext ; Regression of commit 01c709ff0e81ddd84e3bc78ec180a53587ec855c (happens when you try to do things fast w/ line commits and w/o checking .. duh!) commit 01c709ff0e81ddd84e3bc78ec180a53587ec855c Author: Sven Gothel Date: Tue Sep 9 19:58:47 2014 +0200 Don't utilize glPixelStorei's PACK/UNPACK IMAGE_HEIGHT and SKIP_IMAGES for Desktop GL < 1.2, avoiding GL-Error Commit fc1e98790a02b4fa7922f3cdd9d437f87d7c99e5 added handling of PACK/UNPACK IMAGE_HEIGHT and SKIP_IMAGES in GLPixelStorageModes. However, it has been overseen that the four states are not available in OpenGL 1.1. Adding exclusion of the same if desktop GL < 1.2 and hence avoiding GL errors. Same applies to GLBuffers.sizeof(..) method.