Currently, data from client buffer EGLStream is copied to a surface
texture. An fbo is used for that purpose. The main issue with it is that
it doesn't restore the old framebuffer binding.
The surface texture can be updated in the middle of a compositing cycle.
If the framebuffer binding is not restored, any window that must be
rendered in an offscreen texture won't be rendered to the offscreen
texture.
This change makes EglStreamSurfaceTextureWayland restore the fbo binding
so the DeformEffect and software screen rotation work as expected with
the proprietary NVIDIA driver.
BUG: 442697
This makes the compositingPossible() output more elaborative,
and adjusts their priorities to qCWarning.
I thought about dropping the "Compositing is not possible"
(qCCritical) message. It's not critical for X11 and Wayland
depends on OpenGL. OTOH it's from a different component. So in
the end I settled for qCWarning again; there is no real way
to know, if the platform will consider this a critical problem
(and eventually abort).
Then I saw X11StandalonePlatform::compositingNotPossibleReason,
which has more user friendly, QT Richtext / HTML encoded output,
but this seems overkill for the terminal; now I would like to
know, where this is actually used...
While at it report "manually" suspended compositing via qCInfo
instead of qCDebug.
After updating my Debian buster to bullseye, I noticed missing
shadows / composite for KDE, which made overlapping windows hard
to recognize.
.xsession-errors just had "kwin_core: Compositing is not possible".
Using the suggested QT_LOGGING_RULES="kwin_*.debug=true" didn't
provide any more clues; nothing I tried did.
Eventually I ended reading the kwin source and found, that
disabled composite via kwinrc :: [Compositing] :: OpenGLIsUnsafe
was not reported.
IMHO all these disabling cases should use qCCritical(KWIN_CORE),
like the "Compositing is not possible" message, but for the time
being, this simply logs the OpenGLIsUnsafe reason, just like all
the others.
There are some unresolved issues where driving outputs can fail because
of bandwidth constraints. These don't appear to happen with implicit
modifiers, or at least they don't happen as often.
By supporting all the required attributes in the DecorationThemeMetaData class
the custom struct can be dropped.
Task: https://phabricator.kde.org/T14744
b38bb416 introduced flicker when restarting compositing because the
DrmGpu::findWorkingCombination method usually creates new buffers for
the commit, without rendering into them. Instead of that, re-use
existing buffers where possible
The configs returned by eglChooseConfig are sorted from highest to lowest buffer sizes.
Filter the configs to find a suitable candidate that matches the requested attributes of the surface.
This fixes the corrupted Aurorae window decorations on Wayland with the proprietary Nvidia driver.
Instead of setting pipelines one by one, use DrmGpu::updateOutputs to
set all the outputs on a GPU with a single atomic commit. This makes
the switch both faster, more reliable and in case the other drm master
changes the output configuration, prevents blanking.
eglCreateWindowSurface() wants a Window (unsigned long), but with
EGL_NO_PLATFORM_SPECIFIC_TYPES, EGLNativeWindowType is defined as an
opaque pointer, i.e. void*.
BUG: 440372
If a property blob got created by another drm master we can't rely on
re-using it, so create a new blob of our own with the data copied over
when the kernel destroys it.
Also free property blob objects when we don't need them anymore.
BUG: 440294
At the moment we were checking for size difference between the buffers
which works for rotation but not for flipped or up-side down screens.
This changes how we check it by comparing the effective transform vs the
supported one in drm to see if they differ.
Fixes https://invent.kde.org/plasma/plasma-phone-components/-/issues/112
The current implementation sometimes will leave the screens unusable,
therefore KWIN_DRM_SW_ROTATIONS_ONLY=1 is default.
Use KWIN_DRM_SW_ROTATIONS_ONLY=0 to test hardware DRM operations.
Not all combinations of connectors, crtcs and planes will work
on all hardware, so we need to test the pipelines before using
them.
BUG: 433107
CCBUG: 435265
In order to accomodate crtc or primary plane changes on outputs we
need to dynamically recreate rendering resources with EglStreams as
the stream is tied to the crtc or plane currently in use.
Instead of using setTransformInternal directly, have DrmOutput
set it in updateTransform, like with the other setters. Also use
updateTransform instead of setTransformInternal in DrmBackend, so
that hardware rotation can be used where possible.
This makes shadow texture coordinates consistent with surface and
decoration texture coords and allows reusing window quads between
kwin items and qtquick items more easily.
no_use_linear: dropping the gbm GBM_BO_USE_LINEAR flag on allocation
explicit_modifiers: moving from the modifier-less api to the modifier
aware one with explicit modifiers