Summary:
Method doesn't do anything. If at some point we want to resolve egl
functions again, it should be done in the Platform, just like
glxResolveFunctions is nowadays done in the platform.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3391
Summary:
KWin still resolves some OpenGL function pointers. For that it needs to
use either eglGetProcAddress or glxGetProcAddress. With other words the
method to resolve needs to know whether it is egl or glx and needs both
a dependency to egl and glx. Especially the dependency to glx is ugly as
that pulls in XLib into our library.
The way so far was to pass an enum value to the initGL method to know
whether it's EGL or GLX. With this change the enum value is removed and
replaced by a function pointer to resolve the methods.
This simplifies the resolve code and allows to completely remove the glx
variant we still had in the library. Thus kwinglutils library is now glx
and XLib free.
Test Plan: nested KWin with OpenGL/EGL still works
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3336
Summary:
No need to resolve glx methods through the shared lib. At the moment
this duplicates some code, but will be cleaned up with a follow up
change.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3335
For the functions from GL_FOO_robustness we want to resolve it by
ourselves in order to add a custom implementation if it's not available.
Unfortunately once epoxy.h is included this breaks as epoxy defines the
names and so through the preprocessor epoxy always wins.
So we need different names: all functions from robustness get a "kwin"
prefix and the usage is changed everywhere in kwin source code.
REVIEW: 125883
So far it was bound to whether we build for GLES. But this is
semantically wrong. It might be possible that even on desktop gl
epoxy is built without GLX support, thus we need to reflect this.
This change ensures that epoxy/glx.h is only included if available,
that relevant code is bound to it and that checks are in place to
enforce EGL if not build with glx support.
In addtion the glxbackend.cpp is now only included in the build set
if available.
It doesn't make much sense any more as we do no longer link EGL since the
switch to epoxy. And epoxy pulls it in at runtime if needed.
Even more on Wayland it's just plain stupid to have EGL disabled. So
removing the option just simplifies our code base without any
disadvantages.
REVIEW: 124695
Remove the manually written GL dispatch code, and use libepoxy
to resolve functions.
The only exceptions are GLX_MESA_swap_control, which is not in
the XML API registry, and GL_ARB_robustness/GL_EXT_robustness.
For the latter we want to resolve the functions to the same names
on both GLES and desktop GL, and plug in our own implementations
when the extension is not supported.
On GLES, check for OES_texture_3D extension for color correction
Remove a block of ugly hack code that was supposedly needed to build
with OpenGL ES.
Convert the lookup texture data to uint8 on OpenGL ES before sending it
via glTexImage3D, because uint16 is not supported.
Check if the shaders have been reinitialized successfuly when trying to
activate color correction, prevent black screens when there are issues
with the shaders.
BUG: 315419
REVIEW: 111225
(cherry picked from commit 68c68ee3c2b54f968c4d8275f1e8a2e0ccc90dd7)
On GLES, check for OES_texture_3D extension for color correction
Remove a block of ugly hack code that was supposedly needed to build
with OpenGL ES.
Convert the lookup texture data to uint8 on OpenGL ES before sending it
via glTexImage3D, because uint16 is not supported.
Check if the shaders have been reinitialized successfuly when trying to
activate color correction, prevent black screens when there are issues
with the shaders.
BUG: 315419
REVIEW: 111225
This reduces the size of the geometry that needs to be uploaded by
one-third, and allows kwin to take advantage of the post-transform
cache in the GPU.
Only the subset of functions available in core contexts is resolved,
except for glGetnTexImageARB() and glGetnUniformivARB(), which are
not used by kwin.
Instead of setting the function pointers to NULL when the extension isn't
supported, kwin provides its own implementations that call the non-robust
versions of the functions. This is so callers don't have to check if the
extension is supported before calling the functions.
Note to me: always rebuild with all possible build options if something
is changed.
Sorry for the inconvenience and thanks to the early report of the issue.
BUG: 307866
FIXED-IN: 4.10
According to the OpenGL ABI for Linux GLX 1.3 is a minimum requirement.
Therefore we do not need to resolve the symbols which are present in that
version.
KWin did always require at least 1.3, for all the resolved functions
there were checks in the Scene, but they might have been incorrect.
Instead now the GLX version is checked and OpenGL compositing is blocked
if there is not at least GLX 1.3.
REVIEW: 106704
glBlendColor has been added to OpenGL 1.2 which means it is part of
the OpenGL ABI defined for Linux.
See http://www.opengl.org/registry/ABI/ section 3.4.
The Egl backend is decoupled from the OpenGL ES build option which makes
it possible to use it as a replacement for glx.
To make this possible a new build flag is added when egl is available at
compile time and any egl specific code is now ifdefed with this flag
instead of the gles flag. In addition at runtime a windowing system enum
value is passed to the various detect methods to have egl/glx specific
detection for e.g. function pointer resolving.
By default egl is used if compiled with OpenGL ES, otherwise glx is used.
But in the non-gles case the windowing system can be selected through the
new environment variable KWIN_OPENGL_INTERFACE. Setting this variable to
"egl" the EglOnXBackend is used.
REVIEW: 106632
The EGL path had no support for presenting sub-regions of the screen, we can
leverage EGL_NV_post_sub_buffer for that. This wouldn't be a win if we didn't
have to opt-out of flipping.
REVIEW: 102889
Second part of cleaning up the lib directory: the effects library
now lives in libkwineffects/ directory.
For existing effects nothing changes as the install path is unchanged.
The change obsoletes the lib/ directory.
As glplatform.h has not yet been exported I dared to export it and
adjust the places where it is used.
CCMAIL: kwin@kde.org