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
This commit is contained in:
Vaxry 2024-09-20 10:47:34 +01:00
parent 9856378384
commit 9e98fb0167

View file

@ -16,8 +16,15 @@ CDMABuffer::CDMABuffer(uint32_t id, wl_client* client, Aquamarine::SDMABUFAttrs
auto eglImage = g_pHyprOpenGL->createEGLImage(attrs);
if (!eglImage)
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);