diff options
author | Vaxry <[email protected]> | 2024-09-20 10:47:34 +0100 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-09-20 10:47:41 +0100 |
commit | 9e98fb0167f8bc6c5eb4510a65b42aaa3b743421 (patch) | |
tree | 1b6cd04e1c4a822cce89063b69226b4bcf94f3f6 | |
parent | 9856378384539e35cd943604e6a4d696a9d25447 (diff) | |
download | Hyprland-9e98fb0167f8bc6c5eb4510a65b42aaa3b743421.tar.gz Hyprland-9e98fb0167f8bc6c5eb4510a65b42aaa3b743421.zip |
dmabuffer: attempt importing failed dmabufs as implicit
don't ask me why, vulkan doesn't like this.
funny note, broken on wlroots :P
fixes #7037
-rw-r--r-- | src/protocols/types/DMABuffer.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/protocols/types/DMABuffer.cpp b/src/protocols/types/DMABuffer.cpp index 63a26c76..a8c7248e 100644 --- a/src/protocols/types/DMABuffer.cpp +++ b/src/protocols/types/DMABuffer.cpp @@ -16,8 +16,15 @@ CDMABuffer::CDMABuffer(uint32_t id, wl_client* client, Aquamarine::SDMABUFAttrs auto eglImage = g_pHyprOpenGL->createEGLImage(attrs); - if (!eglImage) - return; + if (!eglImage) { + Debug::log(ERR, "CDMABuffer: failed to import EGLImage, retrying as implicit"); + attrs.modifier = DRM_FORMAT_MOD_INVALID; + eglImage = g_pHyprOpenGL->createEGLImage(attrs); + if (!eglImage) { + Debug::log(ERR, "CDMABuffer: failed to import EGLImage"); + return; + } + } texture = makeShared<CTexture>(attrs, eglImage); // texture takes ownership of the eglImage opaque = FormatUtils::isFormatOpaque(attrs.format); |