aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'xranby/master'Sven Gothel2019-12-043-42/+62
|\
| * VC4: Only load Broadcom EGL driver when guessVCIVUsedXerxes Rånby2019-12-043-44/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | Broadcom VC IV can be used from both console and from inside X11 When used from inside X11 rendering is done on an DispmanX overlay surface while keeping an X11 nativewindow under as input. When Broadcom VC IV is guessed only the Broadcom DispmanX EGL driver is loaded. Therefore standard TYPE_X11 EGL can not be used.
| * VC4: Broadcom uses libbrcmEGL.so, libbrcmGLESv2.so, libbrcmOpenVG.so and ↵Xerxes Rånby2019-12-022-3/+17
| | | | | | | | | | | | | | libbrcmWFC.so since 7 Jul 2016 Raspbian integration (two libGLES side-by-side) https://github.com/anholt/mesa/issues/24
* | Bug 1406: demos.Launcher0: More tests ..Sven Gothel2019-12-042-76/+14
| | | | | | | | | | | | | | | | | | | | | | | | Misc: - Remove unused SysExit.. - showFPS=true default - allow setting 'useDoubleBuffer' via '-single' - demos.es2.GearsES2: Don't be verbose on display even w/o animator IF '-noanim', issue glWindow.display() from main thread instead of using the animator thread otherwise. This shall test the swap buffering code in single threaded mode!
* | Bug 1406: DRMUtil: Probe DRM device whether it has resources attached (and ↵Sven Gothel2019-12-041-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is the desired one) First issue was that the proper DRM file had to be queries, as Raspberry 4 may have two of them: <-- /dev/dri/dri0 /dev/dri/dri0 /dev/dri/by-path/platform-fec00000.v3d-card -> ../card0 /dev/dri/by-path/platform-soc:gpu-card -> ../card1 --> This patch attempts to probe all /dev/dri/card[0..99] using this arbitrary range. The test loop ends if: - drmOpenFile succeeds and drmModeGetResources delivers non-null value - the iterated probed file doesn't even exist - 100 files has been tested ;-)
* | Bug 1405: Provide stand alone demo launcher reducing complexitySven Gothel2019-12-042-0/+743
|/ | | | The launcher script also allows inflating classes and native libs to test impact on Raspberry Pi 3 Model B+.
* Bug 1156: Remove verbose print in native CreatePointer..Sven Gothel2019-11-301-1/+1
|
* Bug 1156: LinuxKeyEventTracker, LinuxMouseTracker: Robostness (+NEWT fix)Sven Gothel2019-11-306-41/+65
| | | | | | | | commit 453f80e38bcb0945e7eac27a5917dce9bdc6446b added disabling the tracker, however the NEWT usage didn't cover all mouse tracker null pointer. Further, let's initialize and spawn off the threads only at first getSingleton() call not at class initialization earlier.
* Bug 1156: LinuxKeyEventTracker, LinuxMouseTracker: Adding property to ↵Sven Gothel2019-11-302-14/+42
| | | | | | | | | | | disable each LinuxKeyEventTracker also disable the eventX reading by default, but can be enabled via new property. The 'return bug' (crash due to underlying console) is indeed not occuring when using a VT w/o running console application underneath. As Xerxes showed, one may use chvt to a free known VT or openvt.
* Bug 1156: LinuxKeyEventTracker: Add '/dev/input/by-path/*-event-kbd' and ↵Sven Gothel2019-11-291-42/+75
| | | | more documentation
* Bug 1156: DRM/GBM: Add full PointerIcon (Cursor) SupportSven Gothel2019-11-296-40/+307
| | | | | | | | | | | | DRM allows 64x64 pixel cursor images, using GBM_FORMAT_ARGB888 only. Notable: GBM_FORMAT_ARGB888 == PixelFormat.BGRA8888 Having fixed mouse and keyboard input with previous commit, the demo com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT shows via key press - i -> pointer visible/invisible - c -> pointer icon change
* Bug 1156: LinuxKeyEventTracker: Fix 64bit InputEvent and attempt to only use ↵Sven Gothel2019-11-292-54/+123
| | | | | | | | | | | | | keyboard event files The time structure on 64bit machines uses two 8 byte long values instead of two 4 bytes int values on 32bit machines. The insufficient read on 64bit machines caused an IllegalArgument exception. This fix considers 32 or 64 bit operation. Class renamed: LinuxEventDeviceTracker -> LinuxKeyEventTracker, as it tracks key events specifically. Now the EventDeviceManager tries to only use /dev/input/by-id/*-event-kbd keyboard event files, which reduces the handling on kbd event files only.
* Bug 1156: DRM/GBM Native test: Add CursorSven Gothel2019-11-281-0/+89
|
* Bug 1200: probeSurfacelessCtx works at least since NVIDIA 430.40.Sven Gothel2019-11-281-2/+2
| | | | | | Added this version as the safe version to limit GLRendererQuirks.NoSurfacelessCtx setting. Bug 1200 - JOGL crashes on Debian8 GNU/Linux x86_64 'NVidia beta driver 355.06' @ probeSurfacelessCtx
* Bug 1156: Using EGL.eglCreatePlatformWindowSurface(..) crashes on NVIDIA ↵Sven Gothel2019-11-281-1/+4
| | | | | | 430.40 on GNU/Linux X11 Avoiding this method for now.
* Bug 1402: Standalone native test attempting to reproduce issueSven Gothel2019-11-282-0/+830
| | | | | | | | | Mesa 18.3.6 issues mixing EGL_DEFAULT_DISPLAY and GBM device on EGL_PLATFORM_GBM_KHR Interestingly, the issue is no more reproducible. Weird. However, it is advised to use a real GBM device handle for EGL display creation under EGL_PLATFORM_GBM_KHR.
* Bug 1156 - Implement DRM/GBM Support for JOGL(EGL) and NEWTSven Gothel2019-11-2820-731/+1360
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding new classes DRMLib (gluegen of drm + gbm), DRMUtil and DRMMode GBMDummyUpstreamSurfaceHook to new package jogamp.nativewindow.drm, allowing full awareness of DRM + GBM within NativeWindow for JOGL + NEWT. DRMMode replaces the previous native code of collecting drmMode* attributes: active connector, used mode, encoder etc and also supports multiple active connectors. DRMUtil handles the global static drmFd (file descriptor), currently only the GNU/Linux DRM device is supported. GBMDummyUpstreamSurfaceHook provides a simple dummy GBM surface. NativeWindow provides the new nativewindow_drm.so and nativewindow-os-drm.jar, which are included in most 'all' jar packages. build property: setup.addNativeEGLGBM -> setup.addNativeDRMGBM Changes NativeWindowFactory: - TYPE_EGL_GBM -> TYPE_DRM_GBM while keeping the package ID of '.egl.gbm' for NEWT (using EGL) - Initializing DRMUtil at initialization Changes EGLDrawableFactory: - Using native GBM device for the default EGL display creation instead of EGL_DEFAULT_DISPLAY. This resolves issues as seen in Bug 1402, as well in cases w/o surfaceless support. - GL profile mapping uses surfaceless when available for GBM, otherwise uses createDummySurfaceImpl (dummy GBM surface via GBMDummyUpstreamSurfaceHook) - createDummySurfaceImpl uses a dummy GBM surface via GBMDummyUpstreamSurfaceHook - DesktopGL not available with GBM, see Bug 1401 NEWT's DRM + GBM + EGL Driver - Using DRMLib, DRMUtil and DRMMode, removed most native code but WindowDriver swapBuffer - ScreenDriver uses DRMMode, however currently only first connected CRT. - WindowDriver aligns position and size to screen, positions other than 0/0 causes DRM failure - WindowDriver reconfigure n/a NEWT TODO: - DRM Cursor support (mouse pointer) - Pointer event handling
* Bug 1156: GBM: Bring up incl GL rendering (TODO: GBM working page flip / sync)Sven Gothel2019-11-238-103/+509
| | | | | | | | | | | | | | | | | - EGLSurface: Factor out 'eglCreate[Platform]WindowSurface' NEWT egl.gbm.WindowDriver -- Properly use GBM fourcc format and use as visualID for GBM surface creation and EGL config selection -- Create eglSurface within this class -- Hook up GBM/DRM page flip (not working yet, no visible artifacts - no swap) - ProxySurfaceImpl.surfaceSwap() call upstreamSurface's implementation if available TODO: 'Permission denied' calling: - drmSetMaster (optional) - drmModeSetCrtc - drmModePageFlip
* Bug 1156: GBM: Fixing native GBM code, surviving initializationSven Gothel2019-11-223-32/+114
|
* Bug 1156: NEWT: NewtFactory.getCustomClass(..) RobustnessSven Gothel2019-11-224-20/+11
| | | | | getCustomClass(..) shall throw all required exceptions upstream. Previous essential NEWT driver exception information got suppressed if failing, only disclosed in debug mode.
* Bug 1156: EGL-GBM: Fix NativeWindowFactory native-window-type query ↵Sven Gothel2019-11-223-59/+73
| | | | | | | | | | | | | | | | | | according to Bug 1156 - Special files like '/dev/dri/card0' can't be tested via isFile(), use exists() Order for GNU/Linux (and other unices) IMHO is 1) Display Server (Vendor neutral) 1.1) running X11 display server (DISPLAY check enough?) 1.2) running WAYLAND display server (WAYLAND_DISPLAY check enough?) 2) Console Mode Vendor Neutral 2.1) GBM (how to check?) 3) Console Mode Vendor Specific 3.1) VCIV (how to check)
* Bug 1156: EGL-GBM: [Re]use EGL Platform type for ↵Sven Gothel2019-11-222-35/+66
| | | | eglCreatePlatformWindowSurface as well (like eglGetPlatformDisplay)
* Bug 1156: GBM: FIXME: Remove scanning for desktop-GL via EGL, see commit ↵Sven Gothel2019-11-221-1/+6
| | | | e674f4fa0e795bd67335025123f9af727d856f7d
* Bug 1156: Utilize internal glGetStringi (same as glGetString) - RobostnessSven Gothel2019-11-223-81/+147
| | | | | | | | | Using EGL-GBM, using desktop GL we end up with an unsatisfied linkage error after the ProcAddressTable has been reset using the 'hasMajor' and 'hasCtxOptions'. However looking up using 'reqMajor' and 'reqCtxOptions' seems to work. Needs more analysis. This change also increases robustness for scanning through GL profiles at initialization.
* Bug 1156: EGL-GBM: Fix Cleanup (Newt package relocation / hack default GBM)Sven Gothel2019-11-212-12/+13
| | | | Now: TYPE_EGL_GBM == ".egl.gbm"
* Bug 1156: EGL-GBM: Cleanup Code & Replace Newt GBM implementationSven Gothel2019-11-2110-432/+722
| | | | | | GBM driver is now under egl/gbm subpackage and has been replaced by bcm_vc_iv boilerplate. Native code is reentrant capable and cleaned up. TODO: EGLDisplayUtil work with SharedResourceRunner
* gbm/WindowDriver: make it compile and linkXerxes Rånby2019-11-213-6/+8
|
* Bug 1156: EGL-GBM: Cherry pick changes ..Sven Gothel2019-11-211-2/+5
|
* add native gbm implementation for drm and gbm initialization.Erik De Rijcke2019-11-213-152/+117
|
* add gbm java & build modificationsErik De Rijcke2019-11-214-0/+447
|
* detect gbm platform on linux when no other display server is runningErik De Rijcke2019-11-212-6/+65
|
* make void* an opaque long in EGL generated classErik De Rijcke2019-11-211-11/+9
|
* Bug 1393: MacOS: Wait for window position setting on main-thread (blocking)Sven Gothel2019-11-213-27/+11
| | | | Also issue the orderFront0 call within createWindow1 (aligned with IOS code)
* IOS: CGL.updateContextRegister(..) call on main-thread using AppKitSven Gothel2019-11-211-2/+21
|
* MacOS: Add more debug log detailsSven Gothel2019-11-212-16/+49
|
* Bug 1393: MacOS: Implement AppKit EDTUtil operating solely on main-threadSven Gothel2019-09-162-1/+362
| | | | | | Introducing boolean property 'newt.macos.useAppKitEDTUtil', which defaults to 'false'. If enabled, the new AppKitEDTUtil is being used, operating on the AppKit main thread. This is used to ease debugging Bug 1393, minimizing thread context switches.
* Bug 1393: Adding test cases setting visibility before enabling exclusive ↵Sven Gothel2019-09-161-18/+78
| | | | | | | | | context thread animator MacOS Java11 freezes occur on 3rd NEWT window creation (orderFront) after enabling exclusive context thread animator. Here we add set visibility upfront which does not trigger the freeze on the AppKit main thread. Note: OpenJDK8 works flawlessly. For some reason, the exclusive context thread enabled animator interferes when 'orderFront' is issued.
* Bug 1394 - NEWT X11Window didn't gather inset at window creation (properly)Sven Gothel2019-09-111-16/+46
| | | | | | | | | | | | | | X11Window.c's 'NewtWindows_getFrameExtends(..)' retrieves the insets via XGetWindowProperty on _NET_FRAME_EXTENTS. Right after window creation this method fails as the WM did not yet provide the information as the window has not yet been mapped. Implementation needs to retry for a certain amount of time (250ms) and maximum number of attempts (96 XEvent). This issue surfaced while validating fix for Bug 1393, testing TestDisplayLifecycle02NEWT also on X11.
* Bug 1393: Add window position validation in TestDisplayLifecycle*NEWTSven Gothel2019-09-112-15/+45
| | | | | | | | The OSX fixes for bug 1393 spun off certain tasks like position/size gathering async to AppKit, hence we should validate whether both are valid. Further the TestDisplayLifecycle02NEWT had one bug, it retrieved 'screen.getViewportInWindowUnits()' while it was not yet initialized.
* NEWT Cleanup: WindowImpl: Drop unused 'defer' argument (state change only): ↵Sven Gothel2019-09-109-26/+21
| | | | insetsChanged + insetsVisibleChanged
* NEWT Cleanup: WindowImpl::visibleChanged(ZZ): Remove unused 'defer' ↵Sven Gothel2019-09-1018-51/+51
| | | | argument. Method only changes state.
* Bug 1393: OSXUtil: Optionally inject Apple's 'Main Thread Checker'java11iosSven Gothel2019-09-091-2/+21
| | | | | | | | To allow proper testing of whether all AppKit calls are performed on its Main-Thread where required, we inject the libMainThreadChecker.dylib when property 'nativewindow.debug.OSXUtil.MainThreadChecker' is set. See <https://developer.apple.com/documentation/code_diagnostics/main_thread_checker?language=objc> Lib-Name: /Applications/Xcode.app/Contents/Developer/usr/lib/libMainThreadChecker.dylib
* Bug 1393: MacOS/iOS: Issue updateSizePosInsets0 async to AppKit Main-ThreadSven Gothel2019-09-092-5/+22
| | | | | | Additionally, setPointerIcon0 must also be made async on AppKit (instead of wait), we have to assume/hope the user won't pull the PointerIconImpl instance in-between ;-) Hence removing the comment regarding the lifecycle.
* Bug 1393: Run orderFront0(=setVisible) async off-thread on AppKit after sync ↵Sven Gothel2019-09-096-161/+162
| | | | | | | | | | | | | | | | | AppKit NSWindow creation MacOS 10.14.6 + OpenJDK11U produces occasional freezes on AppKit Main Thread Latest manual tests after resolving Bug 1389 disclosed a few occasional freezes using NEWT + Java11. These are related to probable AWT changes since Java8, as these do not occur with Java8. Fix: Spun off orderFront0(=setVisible) async off-thread on AppKit after sync AppKit NSWindow creation. This fix also aligns the macos createWindow code with the new simplified ios implementation, see commit 004c67c73a0309158c30929cd0d6513e23f34803
* OSXUtil::IsMainThread() Utilize ThreadLocal storage flag avoiding ↵Sven Gothel2019-09-081-24/+19
| | | | unnecessary JNI calls
* Buig 1389: Fix SIGSEGV on OpenJDK11 on [NSApplicationAWT sendEvent:]Sven Gothel2019-09-086-14/+20
| | | | | | | | | | | | | | | | | | | | | | Culprit of the crash and the non propagated action on NSApp main-thread was _simply_ our OSXUtil_KickNSApp() 'kick alive' NSApplicationDefined NSEvent sent to the NSApp. Java11's NSApp code overrides sendEvent and handles NSApplicationDefined + subtype=ExecuteBlockEvent using the given data1 as a function pointer. 8-O ExecuteBlockEvent defined as 0, which we have sent. Simply passing subtype=8888 avoids this side-effect. Whether it is still required to KickNSApp() is another question. +++ Further, make code a bit more robuts regarding the offscreenSurfaceLayer at JAWTWindow invalidate. I.e. if still not detached, do the late cleanup there. This just in case the OSX Context callback to disassociate the drawable has been missed.
* Bug 1392: Simplify CapabilitiesFilter: Criteria -> Test, remove ↵Sven Gothel2019-09-073-31/+28
| | | | RemovalCriteria as all Test definitions may be used for anything.
* Bug 1392: X11PixmapGLXDrawable::createPixmap() requires ↵Sven Gothel2019-09-071-2/+2
| | | | | | | X11GLXGraphicsConfiguration having a valid XVisualInfo Therefor X11GLXGraphicsConfiguration::GLXFBConfig2GLCapabilities(..) also needs to clean the GLGraphicsConfigurationUtil.BITMAP_BIT from drawableTypeBits and if all removed, drop the FBConfig.
* Bug 1391 Bug 1392: Implement GLRendererQuirks DontChooseFBConfigBestMatch ↵Sven Gothel2019-09-0710-103/+257
| | | | | | | | | and No10BitColorCompOffscreen Further enhance unit tests TestGLProfile03NEWTOffscreen, i.e. test all meta profile types on all offscreen drawable types (fbo, pbuffer and bitmap). Align unit test name numbers of TestGLProfile01NEWT to TestGLProfile03NEWTOffscreen.
* Bug 1392: Add CapabilitiesFilter and GLCapabilitiesFilter supporting diverse ↵Sven Gothel2019-09-072-0/+237
| | | | | | | | reusable [GL]CapabilitiesImmutable list filter To implement fix for Bug 1392, we have to remove certain GLCapabilitiesImmutable from the availability list. These filter provide a a clean reusable utility for the fix.