aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/x11/glx
Commit message (Collapse)AuthorAgeFilesLines
* Findbugs: Use inner static class where possibleSven Gothel2014-07-081-1/+1
|
* Findbugs: Use Integer.parseInt(string) for int values to avoid boxing and ↵Sven Gothel2014-07-081-4/+4
| | | | unboxing
* Code Clean-Up based on our Recommended Settings (jogamp-scripting ↵Sven Gothel2014-07-0313-242/+242
| | | | | | | | | | | | | c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
* Bug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-units; ↵Sven Gothel2014-05-213-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add HiDPI for AWT GLCanvas w/ OSX CALayer Core API Change: To support HiDPI thoroughly in JOGL (NativeWindow, JOGL, NEWT) we need to separate window- and pixel units. NativeWindow and NativeSurface now have distinguished access methods for window units and pixel units. NativeWindow: Using window units - getWindowWidth() * NEW Method * - getWindowHeight() * NEW Method * - getX(), getY(), ... NativeSurface: Using pixel units - getWidth() -> getSurfaceWidth() * RENAMED * - getHeight() -> getSurfaceHeight() * RENAMED * GLDrawable: Using pixel units - getWidth() -> getSurfaceWidth() * RENAMED, aligned w/ NativeSurface * - getHeight() -> getSurfaceHeight() * RENAMED, aligned w/ NativeSurface * Above changes also removes API collision w/ other windowing TK, e.g. AWT's getWidth()/getHeight() in GLCanvas and the same method names in GLDrawable before this change. +++ Now preliminary 'working': - AWT GLCanvas - AWT GLJPanel Tested manually on OSX w/ and w/o HiDPI Retina: java com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT -manual -noanim -time 1000000 java com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT -manual -noanim -time 1000000 +++ TODO: - NEWT - Change Window.setSize(..) to use pixel units ? - OSX HiDPI support - Testing .. - API refinement
* X11/WGL GLContext Impl: setGLFunctionAvailability(..) w/ ↵Sven Gothel2014-04-011-2/+2
| | | | | | | | withinGLVersionsMapping:=true if null == sharedContext .. otherwise no quirk could be set on non ARB ctx GL implementations. null == sharedContext, always for first context creation, i.e. indeed within GL version mapping.
* Bug 961: Stabilize glXGetFBConfigAttrib(..) and glXChooseFBConfig(..) Usage ↵Sven Gothel2014-03-102-9/+38
| | | | | | | | | | | | | | | | Against OpenGL Bugs ; Fix glXGetFBConfigs - glXChooseFBConfig(..) - Remove NULL FBConfig pointer from result in native code, which has been observed in Mesa 8.0.5-4 libgl1-mesa-swx11 (Debian-7). - glXGetFBConfigs - Add manual implementation similar to glXChooseFBConfig - glXGetFBConfigAttrib(..) - glXGetFBConfig(..) - Returns boolean reflecting success, don't throw exception - caller handles error - Caller ignore failure if not essential (i.e. already chosen config)
* GLDrawableFactory: destroy() -> shutdownImpl() - Add DEBUG output in ↵Sven Gothel2013-11-281-1/+4
| | | | implementation
* Bug 888 / Bug 891 - Enhance GLCapabilities-Query: Apply changes of commit ↵Sven Gothel2013-11-051-1/+3
| | | | | | | 613e33ee8ffc1f2b9c5db1e1b5bb5253a159ed6d to EGL and WGL. Note: WGL config query is already performed as a bulk operation. Note: OSX does not perform such queries.
* Bug 888 - Validate CPU Runtime Performance: ↵Sven Gothel2013-11-042-61/+129
| | | | | | | | | | | | | | | | | | | | X11GLXGraphicsConfiguration.GLXFBConfig2GLCapabilities(..) X11GLXGraphicsConfiguration.GLXFBConfig2GLCapabilities(..) ran over all FB configs and for each it grabbed native config values separately. Fetching them in bulk mode saves around 7% of this function's cost. Also reuse XRenderPictFormat instance for 'XRenderDirectFormat XRenderFindVisualFormat(..)' call, saving a few NIO creation cycles w/ StructAccessor. Biggest savior is X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationFBConfig()'s fast path w/o chooser and usable 1st FBConfig. Here we only issue 'GLXFBConfig2GLCapabilities(..)' on the first valid entry. Test w/ 50 X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationFBConfig() invocations: - pre change: 1.708 ms - post change: 650 ms Time is no spent almost solely on native glXChooseFBConfig (546ms).
* GLContextImpl: Move sharedContextHandle check to makeCurrentWithinLock(..) ↵Sven Gothel2013-11-022-22/+14
| | | | and let it fail there instead of within impl. class, only pass the handle - simplifies and removes redundancy.
* Bug 875: Safeguard setGLFunctionAvailability(.. strictMatch=false.. ) ↵Sven Gothel2013-10-302-2/+6
| | | | operation, throw InternalError if failing
* Bug 867 OSX [Common Code]: Trigger GLRendererQuirks.GL4NeedsGL3Request and ↵Sven Gothel2013-10-252-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | make it sticky; Only alias profiles if HW-Accelerated! Only alias profiles if HW-Accelerated! GLContextImpl.mapGLVersions(..) shall not map a higher profile to a lower if it is a software renderer. +++ GLContextImpl.mapGLVersions(..) attempts to trigger GLRendererQuirks.GL4NeedsGL3Request if OSX 10.9 by creating a GL3 core context first. +++ GLContextImpl.setGLFunctionAvailability(): - On OSX 10.9: Detect GLRendererQuirks.GL4NeedsGL3Request and make it sticky (per device) while 'withinGLVersionsMapping' - Merge sticky quirks w/ local quirks +++ TestGearsES2NEWT: Add cmdline '-gl2' to force GL2 profile.
* jogl: add missing @Override annotationsHarvey Harrison2013-10-173-0/+4
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* jogl: remove all trailing whitespaceHarvey Harrison2013-10-178-114/+114
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Fix Bug 839: Clarify whether resetStates(..) shall clearStates() - Pass ↵Sven Gothel2013-09-211-2/+2
| | | | 'isInit' flag.
* Fix SharedResourceRunner's potential race-conditions. Use top-level ↵Sven Gothel2013-09-181-12/+4
| | | | synchronization simplifying code and better robustness.
* Revert commit 4beef4fe856690b070ba06a6caf4515aebd7171b manually for testing ↵Sven Gothel2013-09-021-2/+2
| | | | purposes .. (ATI fglrx driver issues)
* X11GLXDrawableFactory.Shutdown: Disable shared context destruction since it ↵Sven Gothel2013-09-021-2/+2
| | | | | | | | | may lead to a JVM freeze .. .. on ATI fglrx driver 32bit on 64bit w/ a frozen shared GL context involved. Hence we have to rely on the driver cleanup when JVM hits 'exit', equal to the Windows implementation.
* Animator/GLWindow: Catch 'ThreadDeath/Throwable' and dump info in DEBUG mode ↵Sven Gothel2013-09-021-1/+1
| | | | (cosmetic change only); Typo in comment; TestSharedContextListNEWT2: Stop animator.
* X11GLXContext: Remove redundant manual aliasing of ext. names in ↵Sven Gothel2013-07-171-10/+0
| | | | isExtensionAvailable() - impl. uses a mapping.
* Fix OSX GL-core lack of pbuffer: GLDrawableFactory.canCreateGLPbuffer(..) ↵Sven Gothel2013-07-171-2/+2
| | | | | | add GLProfile argument, similar to canCreateFBO(..) In case a compatible non-core profile is requests, canCreateGLPbuffer(..) returns false on OSX.
* Add Support for GL 4.3 (Bug 716) and ES 3.0 (Bug 717)Sven Gothel2013-07-151-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ES3 / GL4.3: - Update all EGL, GLX, WGL and GL (desktop and mobile) khronos headers to latest version. - GL3/gl3* -> GL/glcorearb* - Explicitly preserve ES2_compatibility and ES3_compatibility in header, most extension grouping was removed in new headers. - Always load all GLHeader to ensure proper extension association across all profiles. - Unified method signatures - Added GL_EXT_map_buffer_range to core - Using common 'glMapBufferImpl(..)' for all glMapBuffer(..) and glMapBufferRange(..) impl. - Init necessary fields of GL instances via 'finalizeInit()' called by reflection, if exist. This allows removing initialization checks, i.e. for all buffer validations. - BuildStaticGLInfo: Can handle new GL header structure, i.e. one CPP extenstion block incl. define + funcs. - GLJavaMethodBindingEmitter: Simply print the - No GL duplication due to new intermediate interfaces, see below - OO lineare inheritance (Added GL2ES3, GL3ES3 and GL4ES3 intemediates): GLBase - GL - GL2ES2 - GLES2 GLBase - GL - GL2ES2 - GL2GL3 - [ GL2, GL3 ] GLBase - GL - GL2ES2 - GL2ES3 - GL3ES3 - [ GL3 ] GLBase - GL - GL2ES2 - GL2ES3 - GL3ES3 - GL4ES3 - [ GLES3, GL4, .. ] - Expose 'usable' intermediate interfaces GL3ES3 and GL4ES3 in GLBase/GLProfile/GLContext via is*() and get*(). - GLContext*: - isGL3core() is true if [ GL4, GL3, GLES3 ] (added GLES3) - Added ctxProfile argument to allow handling ES versions: - getMaxMajor(..), getMaxMinor(..), isValidGLVersion(..) and decrementGLVersion(..) - mapGLVersions(..) prepared for ES ARB/KHR validation - EGLContext checks ES3 (via old ctx's GL_VERSION) - ExtensionAvailabilityCache adds GL_ES_Version_X_Y for ES. - Prelim tests w/ Mesa 9.1.3 GL Version 3.0 (ES profile, ES2 compat, ES3 compat, FBO, hardware) - OpenGL ES 3.0 Mesa 9.1.3 [GL 3.0.0, vendor 9.1.3 (Mesa 9.1.3)] - TODO: - Use KHR_create_context in EGLContext.createContextARBImpl(..) - More tests (Mobile, ..) +++ Misc: - GLContext*: - Complete glAllocateMemoryNV w/ glFreeMemoryNV.
* Security: Apply security changes from GlueGenSven Gothel2013-06-212-14/+21
| | | | | | | | | GlueGen related commits - 23341a2df2d2ea36784a16fa1db8bc7385351a12 - 2d8e25398e929f553c4524e9c57f083d90ba4e08 - 8cabcd2de8b46c42dffcaaf46ccc2dc4d092ebba - f69831574d4927d03d40c330d0b047d8c89622a4 - eb842815498f5926828b49c48fffce22fc9586a2
* GLDynamicLibraryBundleInfo.shallLinkGlobal(): Defaults to 'true' now, ↵Sven Gothel2013-06-181-9/+0
| | | | | | | | allowing to remove specialized values. - Windows always used global - The OpenGL library is always available by all processes system wide. - Tested on OSX (was using local, previously).
* Fix GLX: X11GLXContext used wrong FBConfig n/a query; X11GLX*: If FBConfig ↵Sven Gothel2013-05-063-5/+22
| | | | is n/a force GLX (server) version down to 1.1 to avoid crashes w/ old GLX server (i.e. Mesa 4.*).
* Simplify GLDrawableFactory's SharedResource Query Methods; Move ↵Sven Gothel2013-04-263-38/+13
| | | | | | | | | | | | | | | | | | | | | | | | WindowsWGLDrawableFactory Quirks to GLRendererQuirks (NeedCurrCtx4ARBPixFmtQueries, NeedCurrCtx4ARBCreateContext); Bug 706: Confine NeedCurrCtx4ARBCreateContext to [Windows, ATI, driver < 12.102.3); Avoid possible NPE @ GLContext.getGLVendorVersionNumber() - Simplify GLDrawableFactory's SharedResource Query Methods - Moving common methods to GLDrawableFactory/GLDrawableFactoryImpl while reusing common methods to SharedResourceRunner.Resource. - All factories SharedResources impl. SharedResourceRunner.Resource. - Move WindowsWGLDrawableFactory Quirks to GLRendererQuirks (NeedCurrCtx4ARBPixFmtQueries, NeedCurrCtx4ARBCreateContext) - For better maintenance, move the mentioned quirks from the windows factory to our common place, being detected within GLContextImpl after each context creation. - Bug 706: Confine NeedCurrCtx4ARBCreateContext to [Windows, ATI, driver < 12.102.3) - Before we added this quirk if [Windows, ATI], however, we have hopes that the new drivers will suffice for all as tested successful on my test machine (AMD Radeon HD 6300M Series, amd_catalyst_13.5_mobility_beta2). - Avoid possible NPE @ GLContext.getGLVendorVersionNumber() - GLContext.getGLVendorVersionNumber() never returns 'null' but a zero version instance instead! - Add API doc. - Use mixed case names in GLContextImpl.setRendererQuirks(..).
* Fix Bug 706 and Bug 520: Certain ATI GPU/driver require a current context ↵Sven Gothel2013-04-251-7/+7
| | | | | | | | when calling wglCreateContextAttribsARB (Windows) See discussion at https://jogamp.org/bugzilla/show_bug.cgi?id=520 https://jogamp.org/bugzilla/show_bug.cgi?id=706
* X11GLXContext: Issue XSync(..) after forcing X11ErrorHandle and before ↵Sven Gothel2013-04-231-0/+2
| | | | | | | glXCreateContextAttribsARB(..) - Mitigate driver bugs Ensures the error handler is in place and previous X11 cmds are being executed before the 'critical' glXCreateContextAttribsARB(..) call which might lead to erroneous behavior w/ buggy drivers.
* Bug 718: WindowsBitmapWGLDrawable: Requires GLProfile.GL2, fix BITMAP GLCaps ↵Sven Gothel2013-04-181-24/+28
| | | | | | | | | ASAP at Ctor instead of setRealized(true); WindowsWGLContext: Exclude ARB creation for BITMAP Unit Test TestGLAutoDrawableFactoryGLnBitmapCapsNEWT added using BITMAP on GLProfile.getDefault() Also: X11GLXContext, WindowsWGLContext: Cleanup formatting in createImpl(..)
* Fix Bug 720: Unify all platform specific GLContextImpl specializations; Fix ↵Sven Gothel2013-04-189-231/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 719 - Windows BITMAP Offscreen Orientation is not propagated through API Fix Bug 719 - Windows BITMAP Offscreen Orientation is not propagated through API Depends on Bug 720, since cleaning up GLContextImpl* is required to move property 'GLContext.isGLOrientationFlippedVertical()' to 'GLDrawable.isGLOriented()' where it belongs! Windows BITMAP GLDrawable impl. isGLOriented() shall return false, while we keep the BITMAPINFOHEADER's height field negative to remove the need for vertical flip when used w/ AWT or Windows, .. Then property 'GLDrawable.isGLOriented()' has to be recognized throughout the utility functions, i.e. TextureData's mustFlipVertically and hence TextureIO writer. Fix Bug 720: Unify all platform specific GLContextImpl specializations GLContextImpl shall have only _one_ unique platform derivative to allow proper swapping of GLDrawables of any type via: - 'GLAutoDrawable.setContext(GLContext newCtx, boolean destroyPrevCtx)', which calls - 'GLContext.setGLDrawable(GLDrawable readWrite, boolean setWriteOnly)' Exception: External context may be specialized. All drawable specific property handling shall be provided and implemented (if possible) via GLDrawable specializations. - GLContext.isGLOrientationFlippedVertical() -> GLDrawable.isGLOriented() - PNGImage.createFromData() takes 'isGLOriented' to properly handle vertical flipping simply by line ordering - TextureIO's PNG writer passes TextureData's getMustFlipVertically() as isGLOriented to PNGImage.createFromData() - GLReadBufferUtil respects GLDrawable's isGLOriented() when creating TextureData instance. - Screenshot respects GLDrawable's isGLOriented() - Screenshot is deprecated, use GLReadBufferUtil. - Removed all PBuffer attributes, i.e. floatingPoint, RenderToTexture and RenderToTextureRectangle. - Allows removal of special pbuffer handling in GLContext* implementations. - Removed also from GLCapabilities* - Removed from deprecated GLPbuffer Impact: - Low, users who desire to render into a texture shall use our FBO GLOffscreenDrawable. - Only use case was the deprecated GLPbuffer - floating point framebuffer technology is still patented anyways :) - Removed Java2DGLContext, which was only used for OSX's GLJPanel Java2D bridge, which is no more supported anyways.
* Fix Bug 705 - Cleanup & Generalize Commit ↵Sven Gothel2013-04-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | 5b47372590ec715647ebbd75d70c41ec7a64485a ; Close X11 Display in isDeviceSupported() - Moved GL vendor version parsing to GLVersionNumber - Moved X11Util.markAllDisplaysUnclosable() trigger into SharedResource creation of - X11GLXDrawableFactory - EGLDrawableFactory - GLProfile is back to pre 5b47372590ec715647ebbd75d70c41ec7a64485a, i.e. contains no quirk artifact (clean) - Close X11 Display in X11GLXDrawableFactory.isDeviceSupported() Regression of 9a4fcc7ea4ec61e4ceed791acced734ac04ea270 - TODO: Remove X11Util markAllDisplaysUnclosable detection code ? Notes to Martin: - Use TAB == 4 SPACES - No author names into source code, git commit log is enough. - No need to tag your edits, the diff is enough.
* GLDrawable: Refine API doc; GLDrawableImpl: Balance ↵Sven Gothel2013-04-101-2/+2
| | | | | | | | | | | | | | | | | | createHandle()/destroyHandle(); Handle LOCK_SURFACE_CHANGED in lockSurface() ; GLContextImpl.makeCurrent(): Fix drawable handle validation. GLDrawable: Refine API doc (realized/handle) - Lifecycle of the drawable handle was not clear - Ephasizing handle's dependency on NativeSurface's lock state and drawable's realization GLDrawableImpl: Balance createHandle()/destroyHandle() - updateHandle() -> createHandle() - ensure both are balance, see below GLDrawableImpl: Handle LOCK_SURFACE_CHANGED in GLDrawableImpl's lockSurface() - call destroyHandle() and createHandle() GLContextImpl.makeCurrent(): Validate drawable handle if realized only. - it is valid to have an invalid drawable handle if not realized (see above)
* Debug Messages: Unify getThreadName() usage and 'Catched Exception' messagesSven Gothel2013-04-101-1/+1
|
* Complete 9a4fcc7ea4ec61e4ceed791acced734ac04ea270: ↵Sven Gothel2013-03-271-3/+0
| | | | SharedResourceRunner.Impl.createSharedResource(..): isGLXAvailableOnServer(..) call redundant since checked upfront at isDeviceSupported(..)
* SharedRessourceRunner: Add isDeviceSupported(..) query before spawn off ↵Sven Gothel2013-03-271-0/+16
| | | | thread, allowing a more gracefull detection of n/a GLX on X11
* *External*Context Impl: Remove unused 'lastContext' field, incl. their ↵Sven Gothel2013-03-131-20/+0
| | | | | | | makeCurrent() and release() override. Semantics of 'lastContext' are plain wrong, since release() override does claim the previous 'lastContext' is current at the end - however, it wasn't technically made current.
* X11/WGL: Better Exception Message for failed ARB context creation if profile ↵Sven Gothel2013-02-161-1/+1
| | | | > GL2 (OpenGL >= 3.0.1) was requested.
* GLContext: *TRACE_SWITCH spacingSven Gothel2013-02-111-1/+1
|
* [EGL/X11]Context: Enhance DEBUG output for failed makeCurrentImpl(..)Sven Gothel2013-01-261-2/+7
|
* Fix Bug 669: Recursive GLContext makeCurrent()/release()Sven Gothel2013-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | Culprit: GLContext's makeCurrent() didn't clear the boolean flag 'unlockContextAndSurface' in case the context is already current (-> recursion). Above case was detected within a code block tailed by a finally block, which acted on mentioned flag, i.e. called lock.unlock() and hence decremented the lock count even though the method return w/ successful state. Fixed. Added debug code: GLContext.release() debug code (DEBUG | TRACE_SWITCH), recording stack trace of last release() call, which is dumped in case no current was current. Added 2 unit tests: - Simple recursive GLContext makeCurrent()/release() from within GLEventListener's display(). Test also validates lock count and lock ownership. - GLAutoDrawable display() of another GLAutoDrawable from within GLEventListener's display(..).
* *Drawable impl. DEBUG: Add getThreadName() to debug out.Sven Gothel2012-12-223-5/+9
|
* GLContextImpl: Make createContextARBImpl/setGLFunctionAvailability more ↵Sven Gothel2012-12-212-3/+3
| | | | robost while detecting erroneous queried GL version
* Cleanup GLContext special entries: getOffscreenContextPixelDataType(), ↵Sven Gothel2012-12-152-30/+1
| | | | | | | | | | | | | | | | | | | | | | | getOffscreenContextReadBuffer(), .. ; Add GLFBODrawable API entries for multi buffering (no impl. yet); GLJPanel 1st simplification using offscreen drawable - Cleanup GLContext special entries: getOffscreenContextPixelDataType(), getOffscreenContextReadBuffer(), .. ; - add: getDefaultReadBuffer() (-> exposed via GLBase as well) - add: isGLOrientationFlippedVertical() - add: getDefaultPixelDataType() - removed impl: getOffscreenContextPixelDataType() - removed impl: getOffscreenContextReadBuffer() - removed impl: offscreenImageNeedsVerticalFlip() - Add GLFBODrawable API entries for multi buffering (no impl. yet); - TODO: Add implementation code in GLFBODrawableImpl - GLJPanel 1st simplification using FBO - Use above new GL/GLContext entries - Fix: getNativeSurface() and getHandle() - TODO: - Remove distinction of 'pbuffer' and 'software', - Use GLDrawableFactory.createOffscreenDrawable(..) - Use GL for FBO swapping
* GLX/GLXExt Robustness: Use NIODirectOnly for all bindings. For these ↵Sven Gothel2012-10-308-159/+185
| | | | internal APIs, critical array is not required, hence redundant.
* NativeWindowFactory: Remove 'remedy' of Bug 613 Commit ↵Sven Gothel2012-10-021-16/+4
| | | | | | 92398025abdabb2fdef0d78edd41e730991a6f94 GlobalToolkitLock for create/destroy Turns out on it has no effect and ATI prop. driver still has XCB failures at this point.
* Relax Bug 613 workaround of commit 92398025abdabb2fdef0d78edd41e730991a6f94Sven Gothel2012-10-023-32/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | Utilizing a GlobalToolkitLock in general to lock the display connection results in deadlock situations where locked surfaces signal other [offscreen] surfaces to render. We have to see whether we find a better solution, for now sporadic XCB assertion still happen. But it is preferrable to point to the root cause, then to jumping through hoops to complicate locking or even to deadlock. Locking: - X11GLXGraphicsConfigurationFactory add missing device locking in: - getAvailableCapabilities - chooseGraphicsConfigurationStatic - Newt/X11Window: Discard display events after window close. Relax ATI XCB/threading bug workaround: - ToolkitProperties: requiresGlobalToolkitLock() -> hasThreadingIssues() - NativeWindowFactory: Don't use GlobalToolkitLock in case of 'threadingIssues' the impact is too severe (see above) - NativeWindowFactory: Add getGlobalToolkitLockIfRequired(): To be used for small code blocks. If having 'threadingIssues' a GlobalToolkitLock is returned, otherwise NullToolkitLock. - X11GLXContext: [create/destroy]ContextARBImpl: Use 'NativeWindowFactory.getGlobalToolkitLockIfRequired()' for extra locking Misc Cleanup: - *DrawableFactory createMutableSurface: Also create new device if type is not suitable - *DrawableFactory createDummySurfaceImpl: Pass chosenCaps and use it (preserves orig. requested user caps)
* Workaround for Bug 623: Sporadic XCB assertion failures w/ ATI proprietary ↵Sven Gothel2012-09-301-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | driver and w/o native X11 locking The proprietary ATI X11 driver does not handle multi-threaded [GL] clients well, i.e. triggers an XCB assertion 'from time to time'. It almost seems like that the driver either: - aliases all display connections to it's connection name, i.e. server; or - utilizes a build-in display connection w/o locking, used for some reason +++ - X11Lib: Add QueryExtension(dpy, name) allowing early driver determination w/o GL - X11Util detects 'requiresGlobalToolkitLock' and 'markAllDisplaysUnclosable' via X11 extensions. In case certain ATI extensions are available, both are set to true. - X11GLXDrawableFactory: Dropped setting 'markAllDisplaysUnclosable', using X11Util's detection (see above). - New GlobalToolkitLock to satisfy certain driver restrictions (ATI's XCB multithreading bug) - NativeWindowFactory handles new property requiresGlobalToolkitLock, in which case the new GlobalToolkitLock is being used instead of ResourceToolkitLock. - JAWTUtil ToolkitLock locks GlobalToolkitLock 1st to match new 'requiresGlobalToolkitLock' property. - Document static method requirement of X11Util, GDIUtil and OSXUtil via marker interface ToolkitProperties - ToolkitLock: New method 'validateLocked()', allowing use to validate whether the device/toolkit is properly locked and hence to detect implementation bugs. See unit test class: ValidateLockListener
* Misc X11: Add GLX_MESA_swap_control; GLXExtensions (private); X11GLXContext ↵Sven Gothel2012-09-291-15/+34
| | | | commented out GLX_MESA_swap_control; native test of Mesa context-retarget bug, cannot reproduce yet.
* Adding Mesa Quirk 'NoSetSwapIntervalPostRetarget': SIGSEGV on ↵Sven Gothel2012-09-281-1/+0
| | | | | | | | | | | | setSwapInterval() after changing the context's drawable w/ 'Mesa 8.0.4' dri2SetSwapInterval/DRI2 (soft & intel) Analyzing 'TestGLContextDrawableSwitchNEWT' crash at setSwapInterval -> dri2SetSwapInterval after retargeting the context (new drawable association). Turns out Mesa's dri2SetSwapInterval may have a bug. +++ GLContext TRACE_SWITCH: Add drawable handle to debug/trace output.
* GLXUtil: Lock X11 DeviceSven Gothel2012-09-283-48/+98
|