| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
EGLDrawableFactory.mapAvailableEGLESConfig(..): Clarify
|
|
|
|
| |
this is a rewrite of previous GLBufferSizeTracker)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
block until all master's GLEventListener.init(..) methods have been called
Better shared GLAutoDrawable synchronization.
Block slave instances to also block until all master's GLEventListener.init(..) methods have been called
- GLSharedContextSetter: Add areAllGLEventListenerInitialized()
- GLCanvas (SWT, AWT)
- GLJPanel
- GLAutoDrawableBase (GLWindow, ..)
- GLDrawableHelper's isSharedGLContextPending(..)
takes 'areAllGLEventListenerInitialized()' into consideration
allowing to block the slave creation until master is completed.
This solves teh use case, where the master creates resources in it's
GLEventListener initialization (buffers), which are shared with
it's slaves.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
synchronized and secure [1/2]
GLBufferSizeTracker becomes GLBufferObjectTracker
and tracks the buffer's data store, GLBufferStorage, accurately, synchronized and secure.
Synchronization is required, since the GLBufferStorage can be
shared across many GLContext on multiple threads.
This requires all GLBufferStorage lifecycle affecting GL functions
to utilize synchronized GLBufferObjectTracker methods
while passing a native GL-func callback.
These GL functions are:
- glBufferData, glBufferStorage (GL 4.4), glNamedBufferDataEXT
Creating the GLBufferStorage object
- glMapBuffer, glMapBufferRange, and their *Named*EXT variants
- glUnmapBuffer, glUnmapNamedBufferEXT
'glDeleteBuffers' can simply notify the GLBufferObjectTracker
No more HashMap is required to associate the mapped buffer address
to the mapped ByteBuffer.
GLBufferObjectTracker simply utilizes a
buffer-name (int) -> GLBufferStorage
map.
+++
The security aspect shall be implemented by validating all arguments
whether they match the required GL constraints,
as well as validating tracked states like 'size'.
The following functions will throw an GLException accordingly:
- glBufferData, glNamedBufferDataEXT
* @throws GLException if size is less-than zero
* @throws GLException if a native GL-Error occurs
- glBufferStorage (GL 4.4)
* @throws GLException if size is less-or-eqaul zero
* @throws GLException if a native GL-Error occurs
- glMapBuffer, and it's *Named*EXT variant
* @throws GLException if buffer is not bound to target
* @throws GLException if buffer is not tracked
* @throws GLException if buffer is already mapped
* @throws GLException if buffer has invalid store size, i.e. less-than zero
- glMapBufferRange, and it's *Named*EXT variant
* @throws GLException if buffer is not bound to target
* @throws GLException if buffer is not tracked
* @throws GLException if buffer is already mapped
* @throws GLException if buffer has invalid store size, i.e. less-than zero
* @throws GLException if buffer mapping range does not fit, incl. offset
- glMapBufferRange, and it's *Named*EXT variant
Only clear mapped buffer reference of GLBufferStorage
if native unmap was successful.
Further more special error handling shall be applied to:
- glMapBuffer, and it's *Named*EXT variant,
glMapBuffer, and it's *Named*EXT variant
- A zero GLBufferStorage size will avoid a native call and
returns null
- A null native mapping result indicating an error will
not cause a GLException but returns null
This allows the user to handle this case.
|
|
|
|
| |
targets
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit f8a74c9831c65725a699320c27e62161a0378241 reverted
commit 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1
due to the fact that the buffer binding itself is _not_
shared across shared GLContext!
Apply uncritical changes of 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1:
+++
Simplify GLBufferSizeTracker creation @ GLContextImpl ctor,
make it final.
+++
Clear the GLBufferSizeTracker (@destruction) only if no more
created shares are left!
+++
Refine API doc.
+++
|
|
|
|
|
|
| |
and GLBufferSizeTracker (simplification)"
This reverts commit 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLBufferSizeTracker (simplification)
Due to future mapped buffer tracking, the GLBufferStateTracker instance shall be shared
across shared GLContextImpl instances similar to GLSizeStateTracker!
This allows us to merge GLSizeStateTracker code into GLBufferStateTracker
to simplify the implementation.
+++
Clear the GLBufferStateTracker (@destruction) only if no more
created shares are left!
+++
|
|
|
|
|
|
| |
Re-adding 'equals(..)' method erroneously removed with commit 8457bf35fee253d9af29ff1150a9671f6896fc17.
'equals(..)' is important to allow the HashMap<> for glMapBuffer(..) work properly!
|
|
|
|
|
|
|
|
| |
!drawable.isRealized() - similar to it's recreateDrawable() and test only _after_ having the surface lock!
Only after the surface lock we are thread safe.
In case drawable has been pulled, do nothing ..
|
|
|
|
| |
obsolete 'getPrivateGraphicsConfiguration()'
|
|
|
|
| |
~2 kB)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GL4NeedsGL3Request not set
GL3 core version validation failed due to missing braces around 'isES' _and_ term,
where the latter consist out of 2 _or_ terms testing version mismatch.
On OSX we validate a GL3 core context first and expect it to return a GL4 version if available,
which in turn triggers the quirk GL4NeedsGL3Request.
This behavior was disabled due to above mentioned bug, where the unqual major version caused
the validation to fail.
TestGLProfile01NEWT: Fixed 'GL4ES3' test, where 'GL4ES3' is only available
if extension <code>GL_ARB_ES3_compatibility</code> is available as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Map ES2 -> ES3 GLProfile, if available
- EGLDrawableFactory: Don't query ES2 if ES3 is available
- Fix queries and get methods (GL, GLContext and GLProfile):
- glES3.isGLES2()==true and glES3.getGLES2()!=null
- ctxES3.isGLES2()==true,
- glES3Profile.isGLES2()==true
- Enhance Unit test: TestGLProfile01NEWT
- Test all GLProfile availability combinations
based on implementing GLProfile
- Test all GLProfile's isGL*()
based on highest GLProfile identity
- Test all GL's isGL*()
based on highest GL identity.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
validation
Refine GLContextImpl.setGLFunctionAvailability(..)'s ES version validation:
+ // - fail if ES major-version mismatch:
+ // - request 1, >= 3 must be equal
+ // - request 2 must be [2..3]
i.e. the following is accepted, otherwise fails:
request has
1 1
2 2,3
3 3
4 4
...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EGL_OPENGL_ES3_BIT_KHR
Add Quirk 'GLES3ViaEGLES2Config': ES3 Context is used via EGL_OPENGL_ES2_BIT and 'version 2' for create context attributes.
- GLContextImpl.setGLFunctionAvailability(..)'s ES version validation
only fails if requested major version == 1 and doesn't match.
Hence requesting major==2 and having version 3 is tolerated.
- GLContextImpl.setGLFunctionAvailability(..)'s Quirks:
requested-major < has-major -> Adding GLES3ViaEGLES2Config
- EGLDrawableFactory.mapAvailableEGLESConfig(..):
Reflects has-major version, i.e. GLES3ViaEGLES2Config situation where
an ES2 request leads to an ES3 version.
Note: All workarounds can be found via lookup of GLES3ViaEGLES2Config (as usual when using quirks).
|
|
|
|
| |
GLContextImpl's default VAO.
|
|
|
|
| |
8a032a2c1f247819bdb08382fbebcc4cd896b3f2
|
|
|
|
| |
Signed-off-by: Xerxes Rånby <[email protected]>
|
|
|
|
|
|
| |
(camera or other sources may not have duration)
Regression of commit 8a8ed735f6631b2da7bf605c5c3dda4e0fc13905
|
|
|
|
|
|
|
|
|
|
| |
- stopImpl() shall always issue alSourceStop(..) if state is not STOPPED
- Remove 'flush' hint for dequeueBuffer(..), we perform proper flush in respective method, see below
- flush() needs to issue:
- stopImpl() - which should already dequeue all buffers
- Explicitly dequeue all buffers: via 'alSourcei(alSource[0], AL.AL_BUFFER, 0)'
- Then dequeue manually processed buffers: dequeueBuffer( false /* wait */ );
- And dequeue _all_ buffers: dequeueForceAll();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
; Fallback for EOS Detection ; MovieSimple uses full GLEventListener for 'Audio Only' as well to test seek
Determine StreamWorker usage after init
- To support audio only files, we need to determine to use StreamWorker
after completion of stream-init.
Fix seek(..)
- FFMPeg: pos0 needs to use aPTS for audio-only
- Clip target time [0..duration[
Fallback for EOS Detection
In case the backend does not report proper EOS:
- Utilize 'nullFramesCount >= MAX' -> EOS,
where MAX is number of frames for 3s play duraction
and where 'nullFramesCount' is increased if no valid packet is available
and no decoded-video or -audio in the queue.
- Utilize pts > duration -> EOS
MovieSimple uses full GLEventListener for 'Audio Only' as well to test seek
- Matroska seek for audio-only leads to EOS ..
http://video.webmfiles.org/big-buck-bunny_trailer.webm
- MP4 audio-only seek works
http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4
MovieSimple/MovieCube:
- Use audio-pts in audio-only to calc target time
Tested:
- A, V and A+V
- Pause, Stop and Seek
- GNU/Linux
|
|
|
|
|
|
|
|
|
| |
(seek) - Tested w/ seeking 'Audio Only' and Matroska
Test stream was default of MovieSimple:
http://video.webmfiles.org/big-buck-bunny_trailer.webm
while disabling video (-vid -2)
|
|
|
|
|
|
|
|
| |
'getNextTexture(..)' is issued here!
Thanks to Xerxes to analyze this issue thoroughly.
TODO: Implement EOS for 'Audio Only' and test seek, pause, etc .. - Apply manual tests in MovieSimple
|
|
|
|
| |
considered in AWTTilePainter: 'Origin of GL image is still on Bottom'
|
|
|
|
| |
implementation
|
|
|
|
| |
decode proper file-scheme if applicable - otherwise encoded ASCII URI.
|
|
|
|
|
|
| |
Version if requested context or string-version is >= 3.0
.. otherwise, spec doesn't require integer based version to work!
|
| |
|
|
|
|
|
|
|
|
| |
(!skipCapsChooser mode)
Regression of commit cf1163fc88976e7087d3a17524a49139e35a4708:
Commit dropped seeking recommendedIndex of chosenPFDID within cleaned-up availableCaps
when in !skipCapsChooser mode.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Validate isGLES*() usage and definition ; Add and use ShaderCode.createExtensionDirective(..)
- Fix GLES3 Profile Mapping, i.e. GL2ES2 queries and mappings
- GLProfile: Add GL2ES2 -> ES3 mapping
- EGLContext: Reuqest major '3' for ES3
- EGLGLCapabilities/EGLGraphicsConfiguration: Consider EGLExt.EGL_OPENGL_ES3_BIT_KHR
- Validate isGLES*() usage and definition
- Fix BuildComposablePipeline's isGLES() code
- For GLSL related queries use isGLES() instead of isGLES2(),
which would exclude ES3
- Add and use ShaderCode.createExtensionDirective(..)
- Supporting creating GLSL extension directives while reusing strings from GLExtensions
- Minor cleanup of GLContextImpl.setGLFuncAvail(..)
|
|
|
|
| |
device does _not_ require locking on global shared device.
|
|
|
|
|
|
|
|
| |
unified gl- and glx-extension strings.
- HashMap is more efficient than HashSet
- No need to use sub HashSet's .. we can use global HashMap.
'Loosing' duplicate GLX entries due to GL duplicates is acceptable.
|
|
|
|
|
|
|
| |
613e33ee8ffc1f2b9c5db1e1b5bb5253a159ed6d to EGL and WGL.
Note: WGL config query is already performed as a bulk operation.
Note: OSX does not perform such queries.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
and let it fail there instead of within impl. class, only pass the handle - simplifies and removes redundancy.
|
|
|
|
|
|
|
| |
'Hisilicon Immersion.16')
Note: Even though Mesa Intel driver crashes w/ heavy multithreading (Bug 873),
it works well w/ our multithreaded GLMediaPlayer.
|
|
|
|
|
|
|
|
|
|
|
|
| |
multiple media textures (Android) or shared GL context are not usable.
- GLMediaPlayer:
- TEXTURE_COUNT_MIN is the new minimum: '1' - i.e. no multithreading, single threaded player
- TEXTURE_COUNT_DEFAULT is '4' - multithreaded
- GLMediaPlayerImpl:
- Add Single threaded mode, but perform initStreamImpl(..) off-thread.
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(spec doesn't mention it, and it does not show results w/ CPU sourced rendering) ; Clean up GLBuffer*Tracker
+ * Note that VAO initialization does unbind the VBO .. since otherwise they are still bound
+ * and the CPU_SRC test will fail!<br/>
+ * The OpenGL spec does not mention that unbinding a VAO will also unbind the bound VBOs
+ * during their setup.<br/>
+ * Local tests here on NV and AMD proprietary driver resulted in <i>no ourput image</i>
+ * when not unbinding said VBOs before the CPU_SRC tests.<br/>
+ * Hence Bug 692 Comment 5 is invalid, i.e. <https://jogamp.org/bugzilla/show_bug.cgi?id=692#c5>,
+ * and we should throw an exception to give users a hint!
Leaving uncommented code in GLBufferStateTracker ..
+++
- Clean up GLBuffer*Tracker
- Use final
- Use static final keyNotFound value.
|
|
|
|
|
|
|
| |
use EGLDummyUpstreamSurfaceHook .. a pbuffer offscreen
fixOffscreenBitOnly(..) may yield FBO queries / chosing .. usually doesn't matter (on devices here),
but not accurate.
|
|
|
|
| |
GLCapabilitiesChooser instead of GLProfile, allowing using same or similar caps - important for sharing ctx
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
strictMatch minor) and reuse isES; EGLContext: Use strictMatch for setGLFunctionAvailability() and handle failure; EGLDrawableFactory: Either detect ES3 or ES2.
- Cleanup branch using VersionNumber (fix 'Int' check strictMatch minor) and reuse isES
- EGLContext: Use strictMatch for setGLFunctionAvailability() and handle failure
On ES, we require strictMatch, cleanup if failing.
- EGLDrawableFactory: Either detect ES3 or ES2.
Both only available with proper EGL context creation for ES profiles (TODO)
|
|
|
|
| |
operation, throw InternalError if failing
|
|\
| |
| | |
Fix #875 - ES version should be strictly validated
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When initializing the context in GLContextImpl.setGLFuncAvailability
ES devices must be validated by strictly matching the major version,
otherwise on ES3 devices we were mixing ES1 implementation with ES3
contexts, ultimately crashing in a safeguard.
Signed-off-by: Brice Figureau <[email protected]>
|
| |
| |
| |
| |
| |
| | |
instance of GLArrayHandler of same type; Simplify GLArrayHandler inheritance.
Refines commit 9f2a9df0a4b7093925c8854b37fba053469a4b35
|
| |
| |
| |
| | |
field usage; GLDrawableImpl: Make read-only fields final.
|
| |
| |
| |
| |
| |
| |
| | |
convenience
Added:
GLAutoDrawable createDummyAutoDrawable(AbstractGraphicsDevice deviceReq, boolean createNewDevice, GLProfile glp)
|