aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-06-09 21:10:46 +0200
committerVaxry <[email protected]>2024-06-09 21:10:46 +0200
commit722b846ac5205ec3e9a2940abfefa273fa4219d4 (patch)
treea2b0d4de6104133a47a49205e6311c2b0a92006e /src/render
parent4168b8c17b12b90873fab1ca73c2981b53f48bf5 (diff)
downloadHyprland-722b846ac5205ec3e9a2940abfefa273fa4219d4.tar.gz
Hyprland-722b846ac5205ec3e9a2940abfefa273fa4219d4.zip
egl: assume implicit modifiers are available for old drivers
fixes #6367
Diffstat (limited to 'src/render')
-rw-r--r--src/render/OpenGL.cpp6
1 files changed, 5 insertions, 1 deletions
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<uint64_t> 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<uint64_t> mods;
std::vector<EGLBoolean> 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;
}