From 722b846ac5205ec3e9a2940abfefa273fa4219d4 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 9 Jun 2024 21:10:46 +0200 Subject: egl: assume implicit modifiers are available for old drivers fixes #6367 --- src/render/OpenGL.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/render/OpenGL.cpp') diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index d4e8faa6..406ffdd0 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -92,7 +92,7 @@ std::vector CHyprOpenGLImpl::getModsForFormat(EGLint format) { } if (len <= 0) - return {}; + return {DRM_FORMAT_MOD_LINEAR, DRM_FORMAT_MOD_INVALID}; // assume the driver can do linear and implicit. std::vector mods; std::vector external; @@ -190,6 +190,10 @@ void CHyprOpenGLImpl::initDRMFormats() { Debug::log(LOG, "EGL: {} formats found in total. Some modifiers may be omitted as they are external-only.", dmaFormats.size()); + if (dmaFormats.size() == 0) + Debug::log(WARN, + "EGL: WARNING: No dmabuf formats were found, dmabuf will be disabled. This will degrade performance, but is most likely a driver issue or a very old GPU."); + drmFormats = dmaFormats; } -- cgit v1.2.3