diff options
author | Vaxry <[email protected]> | 2024-08-03 17:33:14 +0200 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-08-03 18:23:44 +0200 |
commit | 48cd2dfd0fe6138f9d50b217f8408fff9957eaea (patch) | |
tree | cbdec4f88b6d85040a968ef7dce29cd4c97a8fcd | |
parent | 753b1b5a43bd82d15a157013167134c33fd70fed (diff) | |
download | Hyprland-48cd2dfd0fe6138f9d50b217f8408fff9957eaea.tar.gz Hyprland-48cd2dfd0fe6138f9d50b217f8408fff9957eaea.zip |
real ass fixes
-rw-r--r-- | src/helpers/sync/SyncReleaser.cpp | 2 | ||||
-rw-r--r-- | src/render/OpenGL.cpp | 6 | ||||
-rw-r--r-- | src/render/Renderer.cpp | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/helpers/sync/SyncReleaser.cpp b/src/helpers/sync/SyncReleaser.cpp index 8de68f75..198495ab 100644 --- a/src/helpers/sync/SyncReleaser.cpp +++ b/src/helpers/sync/SyncReleaser.cpp @@ -1,4 +1,6 @@ #include "SyncReleaser.hpp" +#include "SyncTimeline.hpp" +#include "../../render/OpenGL.hpp" CSyncReleaser::CSyncReleaser(WP<CSyncTimeline> timeline_, uint64_t point_) : timeline(timeline_), point(point_) { ; diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index d2c389e3..a693658c 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -2986,14 +2986,14 @@ float SRenderModifData::combinedScale() { } CEGLSync::~CEGLSync() { + if (m_iFd >= 0) + close(m_iFd); + if (sync == EGL_NO_SYNC_KHR) return; if (g_pHyprOpenGL->m_sProc.eglDestroySyncKHR(g_pHyprOpenGL->m_pEglDisplay, sync) != EGL_TRUE) Debug::log(ERR, "eglDestroySyncKHR failed"); - - if (m_iFd >= 0) - close(m_iFd); } int CEGLSync::fd() { diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 30239ba6..861a5025 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1407,7 +1407,10 @@ bool CHyprRenderer::commitPendingAndDoExplicitSync(CMonitor* pMonitor) { static auto PENABLEEXPLICIT = CConfigValue<Hyprlang::INT>("render:explicit_sync"); // apply timelines for explicit sync + // save inFD otherwise reset will reset it + auto inFD = pMonitor->output->state->state().explicitInFence; pMonitor->output->state->resetExplicitFences(); + pMonitor->output->state->setExplicitInFence(inFD); bool ok = pMonitor->state.commit(); if (!ok) { |