Plasma 6.0.1 + some provides

OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks/kwin6?expand=0&rev=6
This commit is contained in:
Fabian Vogt 2024-03-06 15:50:25 +00:00 committed by Git OBS Bridge
parent c3221c5b5f
commit 3b337711c8
7 changed files with 36 additions and 158 deletions

View File

@ -1,133 +0,0 @@
From 0dc3f4906fd7cdaaeb740b2b29213acd5d2989fa Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Thu, 29 Feb 2024 19:17:55 +0200
Subject: [PATCH] opengl: Harden GLRenderTimeQuery against opengl providing bad
timestamps
The end render timestamp can be slightly in the past before the start
render timestamp. This results in negative render times, which can make
kwin wait way more than just one vblank interval before starting the
next frame.
It appears that there is no way to detect if the gpu has performed a
disjoint operation in OpenGL. It's available only in GLES. As a way
around, this change makes the GLRenderTimeQuery insert two probes: one
queries gl timestamps when starting rendering and ending rendering;
another one just queries std::steady_clock before and after painting.
This hardens the GLRenderTimeQuery against OpenGL providing nonsensical
results sometimes.
BUG: 481721
---
src/opengl/glrendertimequery.cpp | 42 +++++++++++++++-----------------
src/opengl/glrendertimequery.h | 16 +++++++++---
2 files changed, 32 insertions(+), 26 deletions(-)
diff --git a/src/opengl/glrendertimequery.cpp b/src/opengl/glrendertimequery.cpp
index e299c358e14..cf6fbb49a72 100644
--- a/src/opengl/glrendertimequery.cpp
+++ b/src/opengl/glrendertimequery.cpp
@@ -15,36 +15,33 @@ namespace KWin
GLRenderTimeQuery::GLRenderTimeQuery()
{
if (GLPlatform::instance()->supports(GLFeature::TimerQuery)) {
- glGenQueries(1, &m_query);
+ glGenQueries(1, &m_gpuProbe.query);
}
}
GLRenderTimeQuery::~GLRenderTimeQuery()
{
- if (m_query) {
- glDeleteQueries(1, &m_query);
+ if (m_gpuProbe.query) {
+ glDeleteQueries(1, &m_gpuProbe.query);
}
}
void GLRenderTimeQuery::begin()
{
- if (m_query) {
- GLint64 nanos = 0;
- glGetInteger64v(GL_TIMESTAMP, &nanos);
- m_cpuStart = std::chrono::nanoseconds(nanos);
- } else {
- m_cpuStart = std::chrono::steady_clock::now().time_since_epoch();
+ if (m_gpuProbe.query) {
+ glGetInteger64v(GL_TIMESTAMP, &m_gpuProbe.start);
}
+ m_cpuProbe.start = std::chrono::steady_clock::now().time_since_epoch();
}
void GLRenderTimeQuery::end()
{
- if (m_query) {
- glQueryCounter(m_query, GL_TIMESTAMP);
- } else {
- m_cpuEnd = std::chrono::steady_clock::now().time_since_epoch();
- }
m_hasResult = true;
+
+ if (m_gpuProbe.query) {
+ glQueryCounter(m_gpuProbe.query, GL_TIMESTAMP);
+ }
+ m_cpuProbe.end = std::chrono::steady_clock::now().time_since_epoch();
}
std::chrono::nanoseconds GLRenderTimeQuery::result()
@@ -53,16 +50,15 @@ std::chrono::nanoseconds GLRenderTimeQuery::result()
return std::chrono::nanoseconds::zero();
}
m_hasResult = false;
- if (m_query) {
- uint64_t nanos = 0;
- glGetQueryObjectui64v(m_query, GL_QUERY_RESULT, &nanos);
- if (nanos == 0) {
- return std::chrono::nanoseconds::zero();
- }
- return std::chrono::nanoseconds(nanos) - m_cpuStart;
- } else {
- return m_cpuEnd - m_cpuStart;
+
+ if (m_gpuProbe.query) {
+ glGetQueryObjecti64v(m_gpuProbe.query, GL_QUERY_RESULT, &m_gpuProbe.end);
}
+
+ const std::chrono::nanoseconds gpuTime(m_gpuProbe.end - m_gpuProbe.start);
+ const std::chrono::nanoseconds cpuTime = m_cpuProbe.end - m_cpuProbe.start;
+
+ return std::max(gpuTime, cpuTime);
}
}
diff --git a/src/opengl/glrendertimequery.h b/src/opengl/glrendertimequery.h
index 7850985d603..0778fd5c7bd 100644
--- a/src/opengl/glrendertimequery.h
+++ b/src/opengl/glrendertimequery.h
@@ -31,10 +31,20 @@ public:
std::chrono::nanoseconds result();
private:
- GLuint m_query = 0;
bool m_hasResult = false;
- std::chrono::nanoseconds m_cpuStart = std::chrono::nanoseconds::zero();
- std::chrono::nanoseconds m_cpuEnd = std::chrono::nanoseconds::zero();
+
+ struct
+ {
+ std::chrono::nanoseconds start = std::chrono::nanoseconds::zero();
+ std::chrono::nanoseconds end = std::chrono::nanoseconds::zero();
+ } m_cpuProbe;
+
+ struct
+ {
+ GLuint query = 0;
+ GLint64 start = 0;
+ GLint64 end = 0;
+ } m_gpuProbe;
};
}
--
GitLab

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b1947c2b44de6190908462c81e8ac89ff9c7326a87641feb65e6ccd85262a4db
size 8830980

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE4KPrIC+OV1KOE+cv11dEg7tXsY0FAmXXGWEACgkQ11dEg7tX
sY2QYw//VjREEjELzQCeIH14IrKRgSvbyHe3S0Z0sg2SI05WYbd/exi0MEU64TIj
RUzquD0pouxCRG0AA2kaDgw1WVKz2oDLH1f0xHOY7H7C3kMmT+6vtlCj745ixUNB
O/5gDUaR9HeO+AdpRpGPAXCyb5tsSyeNbUKKo3XPHBloGNdjk7ksPk5U8qcpcnUb
yZUkcyIY/R1AlS5VlIzruIx/gdS4I31MtvlNyF2JmJXugr5sgnGEoRoPnDYlqtAe
aaIvvyc6zbcZvCQro2zlr3A7wvQqDSvnCqncTTWffGL4et8oxvAtinJk13bJ3Abw
DLKrLonVx/oMjZOqG3uGjlOhrgaL73TnrLVKp9H2a7rqaNqdehs24N85vMXUvcdJ
LWxYZC2Jb9QXLFRLbMOz0a/PkSx9n5G4OqwjVC0jY5aOwOKPKgGU9a2TaDo230N0
1elDR+zOBokeCOE9hT0XWDe1wcAs0t5LdG2QHUhESUzCYJtK4AcW58yWdO11bbE8
SxT3mCxWAZIcADhT9V0euftfS8hOLmyqkzrd3GCYo4MHgfyE+4vyxuFUgQfxz4f9
1FrB6wgJWk6IVNN/nooWUtg22DLNk/OOyFS+QA++H6mUXf6+hizbukdRFWKkTCDd
fLFzcgGL5a3auTK4QuSdhEYoFbT9JDOMXv34Aw0OuK8XU0GaopY=
=ccZD
-----END PGP SIGNATURE-----

3
kwin-6.0.1.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6e61857c5030b7b3953cc0da5ee94a243755999a4ce007a00311f91db8975f04
size 8833120

16
kwin-6.0.1.tar.xz.sig Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE4KPrIC+OV1KOE+cv11dEg7tXsY0FAmXnnk8ACgkQ11dEg7tX
sY0piA/8Cir6e7z1pBYK+YoP4Uii3Esq9vAgPA3p0AzrBDaISR1ta2/otp8mYmME
42s1JXxkfI7Miu1YDZ2JOFKPwooTNCCEl0Yum6lnm8gMp9yvwOrjDGjZHzhEhwDa
QUUbVT0X70aXKEjVhs/WNDsOV4tmujub5BUnZR3wP3eaj7LPZDs7uPv0HqkTVOgo
qBm++Vy+HgXjIhFzk3e/q2ljrd8xlruFvndThUb/ylBbN0SUCkfJddic4y+y7kAL
Pa9MeT/O1pvIMx4s4PK/onVAAh4rAv07Xt2Zv/viuRazBJY8hulT8w1+KHI8RzaU
HEbetO2sWeRHue6Alb2nxHnsHkf3vGOGJsfUxUaDIKLvFUDKcUWhF3zducuBmoWU
UDCcqiuvTwyrZLnB43d8AliFj6O+aN8jxw9w5ZHTd2ekvRk/f58SH+IUwJkZzp8b
QfJE8xpxU5N/IFlkzNCF3RqYAIHSiDtkbYQtQby3nQthUrVukT/XuRXUPQ7V23oE
Hi20YRrrjXEGGR+TYZ7vUcyTn1kPiHicdPyxlgxklJxN8qpDmLC45rlFsfrgJzkk
lOEjfkyyX+KQ2XLbFtdXpvQRmcRb5mxgNPHmtVlybT++hl+qToP7/4HidrNnBZfu
ioG1h1IS8WlU0vRoazjfwP3f18Y1Avw/CoU+lIAaynst55RYOZY=
=mpBU
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Mar 6 08:40:28 UTC 2024 - Fabian Vogt <fabian@ritter-vogt.de>
- Update to 6.0.1:
* New bugfix release
* For more details see https://kde.org/announcements/plasma/6/6.0.1
- Too many changes to list here
- Drop patches, now upstream:
* intel-compositor-freeze.patch
-------------------------------------------------------------------
Mon Mar 4 20:05:29 UTC 2024 - Christophe Marin <christophe@krop.fr>

View File

@ -29,17 +29,16 @@
%{!?_plasma6_version: %define _plasma6_version %(echo %{_plasma6_bugfix} | awk -F. '{print $1"."$2}')}
%bcond_without released
Name: kwin6
Version: 6.0.0
Version: 6.0.1
Release: 0
Summary: KDE Window Manager
License: GPL-2.0-or-later AND GPL-3.0-or-later
URL: https://www.kde.org
Source: %{rname}-%{version}.tar.xz
Source: https://download.kde.org/stable/plasma/%{version}/%{rname}-%{version}.tar.xz
%if %{with released}
Source1: %{rname}-%{version}.tar.xz.sig
Source1: https://download.kde.org/stable/plasma/%{version}/%{rname}-%{version}.tar.xz.sig
Source2: plasma.keyring
%endif
Patch0: intel-compositor-freeze.patch
BuildRequires: fdupes
BuildRequires: kf6-extra-cmake-modules >= %{kf6_version}
BuildRequires: libcap-progs
@ -145,8 +144,9 @@ Provides: kwin5 = %{version}
Obsoletes: kwin5 < %{version}
Obsoletes: kwin5-lang < %{version}
# /usr/share/kwin/tabbox/thumbnail_grid/metadata.json conflicts with plasma5-addons
Conflicts: plasma5-addons
Conflicts: plasma5-addons-lang
# (Use a version check as plasma6-addons provides plasma5-addons)
Conflicts: plasma5-addons < 6.0
Conflicts: plasma5-addons-lang < 6.0
# Needed to show dialogs
Requires: kdialog
Provides: qt6qmlimport(org.kde.kwin)
@ -254,6 +254,7 @@ This package provides development files.
%{_kf6_knsrcfilesdir}/*.knsrc
%{_kf6_libdir}/kconf_update_bin/kwin5_update_default_rules
%{_kf6_libdir}/kconf_update_bin/kwin-6.0-delete-desktop-switching-shortcuts
%{_kf6_libdir}/kconf_update_bin/kwin-6.0-remove-breeze-tabbox-default
%{_kf6_libdir}/kconf_update_bin/kwin-6.0-reset-active-mouse-screen
%{_kf6_libdir}/libkcmkwincommon.so.6
%{_kf6_libdir}/libkcmkwincommon.so.*