diff options
author | Markus Härer <markus.haerer@gmx.net> | 2024-10-09 23:58:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-09 23:58:23 +0200 |
commit | ed8f18b779b28ee62e5e1154e839479680612700 (patch) | |
tree | ceca8ad809acaf07d5249ffc2698dbda87c34e60 | |
parent | bf45dda56f7db137303db478073c25e5e0a99cbb (diff) | |
parent | 54b9ccdb4fd8c6397846cd35887292dbb31cf3b1 (diff) |
Merge pull request #25588 from hbiyik/egl_async_rendering_fixes
Egl async rendering fixes
-rw-r--r-- | xbmc/utils/EGLFence.cpp | 8 | ||||
-rw-r--r-- | xbmc/windowing/gbm/drm/DRMAtomic.cpp | 8 |
2 files changed, 7 insertions, 9 deletions
diff --git a/xbmc/utils/EGLFence.cpp b/xbmc/utils/EGLFence.cpp index 9d0065bdaf..58a9ec1683 100644 --- a/xbmc/utils/EGLFence.cpp +++ b/xbmc/utils/EGLFence.cpp @@ -133,11 +133,7 @@ void CEGLFence::WaitSyncCPU() if (!m_kmsFence) return; - EGLint status{EGL_FALSE}; - - while (status != EGL_CONDITION_SATISFIED_KHR) - status = m_eglClientWaitSyncKHR(m_display, m_kmsFence, 0, EGL_FOREVER_KHR); - - m_eglDestroySyncKHR(m_display, m_kmsFence); + if (m_eglClientWaitSyncKHR(m_display, m_kmsFence, 0, EGL_FOREVER_KHR) != EGL_FALSE) + m_eglDestroySyncKHR(m_display, m_kmsFence); } #endif diff --git a/xbmc/windowing/gbm/drm/DRMAtomic.cpp b/xbmc/windowing/gbm/drm/DRMAtomic.cpp index ff7f137d60..70ae92e948 100644 --- a/xbmc/windowing/gbm/drm/DRMAtomic.cpp +++ b/xbmc/windowing/gbm/drm/DRMAtomic.cpp @@ -149,6 +149,11 @@ void CDRMAtomic::DrmAtomicCommit(int fb_id, int flags, bool rendered, bool video { CLog::Log(LOGERROR, "CDRMAtomic::{} - atomic commit failed: {}", __FUNCTION__, strerror(errno)); + m_atomicRequestQueue.pop_back(); + } + else if (m_atomicRequestQueue.size() > 1) + { + m_atomicRequestQueue.pop_front(); } if (m_inFenceFd != -1) @@ -164,9 +169,6 @@ void CDRMAtomic::DrmAtomicCommit(int fb_id, int flags, bool rendered, bool video strerror(errno)); } - if (m_atomicRequestQueue.size() > 1) - m_atomicRequestQueue.pop_back(); - m_atomicRequestQueue.emplace_back(std::make_unique<CDRMAtomicRequest>()); m_req = m_atomicRequestQueue.back().get(); } |