diff options
author | Sven Gothel <[email protected]> | 2023-01-16 01:02:47 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-01-16 01:02:47 +0100 |
commit | a8bb3295b467d35d26bc33c11797b516ba775903 (patch) | |
tree | 576e245bcb9585944fc14a328b4c4213b9658992 /src | |
parent | a1514cb44f2d9e82e737cc6a6f7e3477bb0fbbcc (diff) |
X11GLXContext.getPlatformExtensionsStringImpl(): Add comment from pull request regarding GLX extensions
https://github.com/sgothel/jogl/pull/107
Return either glXQueryClientString or glXQueryExtensionsString when getting the GLX extensions
ndjojo:
glXQueryExtensionsString will make a request for glXQueryServerString if needed and will append the necessary client-side extensions.
This doc, under the section "Using GLS Extensions", also suggests checking the glXQueryExtensionsString before using GLX extensions.
+++
aschleck:
For some more context this came up with the release of Mesa 20.3.0,
which has client support for GLX_EXT_swap_control but no server support.
The current JOGL behavior of appending the client extensions to the server extensions is incorrect.
They should instead be intersected (with client-only extensions then appended) as the doc Nicole linked above says,
which is precisely what glXQueryExtensionsString does.
With the current extension querying behavior JOGL thinks glXSwapIntervalEXT is available under Mesa/llvmpipe
even though it is not, causing a segfault at JOGL initialization time.
I originally filed this as a Mesa bug (https://gitlab.freedesktop.org/mesa/mesa/-/issues/4128)
along with some code that repro'd JOGL's checking behavior but it became apparent that Mesa is fine and the checking behavior is incorrect.
Diffstat (limited to 'src')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java index 1204432b4..ec1230894 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java @@ -551,6 +551,10 @@ public class X11GLXContext extends GLContextImpl { ", server: "+ GLXUtil.getGLXServerVersionNumber(x11Device)); } if(((X11GLXDrawableFactory)drawable.getFactoryImpl()).isGLXVersionGreaterEqualOneOne(x11Device)) { + /** + * Return either glXQueryClientString or glXQueryExtensionsString when getting the GLX extensions + * https://github.com/sgothel/jogl/pull/107 + */ if (ns.getScreenIndex() < 0) { final String ret = GLX.glXGetClientString(x11Device.getHandle(), GLX.GLX_EXTENSIONS); if (DEBUG) { |