summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2025-07-29 17:55:56 +0200
committerVaxry <vaxry@vaxry.net>2025-07-29 17:55:56 +0200
commit66a6ef3859255f2a21c1e902a4b5f56562e87041 (patch)
tree680dda5260ecc2be9c8e277b30a77411b1fe3cb6 /src
parent745a671ce69603c0e52c726859f2b9a4e1632d80 (diff)
core: disable esync for non-linux kernels
ref #10437, BSD doesn't support timeline fds
Diffstat (limited to 'src')
-rw-r--r--src/Compositor.cpp5
-rw-r--r--src/render/OpenGL.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index e00c8c36..4d0a917b 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -359,6 +359,7 @@ void CCompositor::initServer(std::string socketName, int socketFd) {
m_drmFD = m_aqBackend->drmFD();
Debug::log(LOG, "Running on DRMFD: {}", m_drmFD);
+#if defined(__linux__)
if (m_drmFD >= 0) {
uint64_t cap = 0;
int ret = drmGetCap(m_drmFD, DRM_CAP_SYNCOBJ_TIMELINE, &cap);
@@ -368,6 +369,10 @@ void CCompositor::initServer(std::string socketName, int socketFd) {
m_bDrmSyncobjTimelineSupported = false;
Debug::log(LOG, "DRM syncobj timeline support: no (no DRM FD)");
}
+#else
+ Debug::log(LOG, "DRM syncobj timeline support: no (not linux)");
+ m_bDrmSyncobjTimelineSupported = false;
+#endif
if (!socketName.empty() && socketFd != -1) {
fcntl(socketFd, F_SETFD, FD_CLOEXEC);
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index 3526f622..49636965 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -347,10 +347,15 @@ CHyprOpenGLImpl::CHyprOpenGLImpl() : m_drmFD(g_pCompositor->m_drmFD) {
Debug::log(LOG, "Supported EGL display extensions: ({}) {}", std::ranges::count(EGLEXTENSIONS_DISPLAY, ' '), EGLEXTENSIONS_DISPLAY);
+#if defined(__linux__)
m_exts.EGL_ANDROID_native_fence_sync_ext = EGLEXTENSIONS_DISPLAY.contains("EGL_ANDROID_native_fence_sync");
if (!m_exts.EGL_ANDROID_native_fence_sync_ext)
Debug::log(WARN, "Your GPU does not support explicit sync via the EGL_ANDROID_native_fence_sync extension.");
+#else
+ m_exts.EGL_ANDROID_native_fence_sync_ext = false;
+ Debug::log(WARN, "Forcefully disabling explicit sync: BSD is missing support for proper timeline export");
+#endif
#ifdef USE_TRACY_GPU