https://bugs.kde.org/show_bug.cgi?id=481721

Vlad Zahorodnii <vlad.zahorod...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
                   |ma/kwin/-/commit/0dc3f4906f |ma/kwin/-/commit/aa741db0e7
                   |d7cdaaeb740b2b29213acd5d298 |40cfc6df7561e1938fb90fed2b5
                   |9fa                         |b68

--- Comment #18 from Vlad Zahorodnii <vlad.zahorod...@kde.org> ---
Git commit aa741db0e740cfc6df7561e1938fb90fed2b5b68 by Vlad Zahorodnii.
Committed on 29/02/2024 at 18:16.
Pushed by vladz into branch 'Plasma/6.0'.

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.


(cherry picked from commit 0dc3f4906fd7cdaaeb740b2b29213acd5d2989fa)

M  +19   -23   src/opengl/glrendertimequery.cpp
M  +13   -3    src/opengl/glrendertimequery.h

https://invent.kde.org/plasma/kwin/-/commit/aa741db0e740cfc6df7561e1938fb90fed2b5b68

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to