From 35e80a64a6a0e4765949bb6a6038b8a66db46209 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 22 Feb 2024 23:50:56 +0000 Subject: [PATCH] renderer: add more logging for fails in beginRender --- src/render/Renderer.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 2aa84a56..dcfed4f9 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -2476,19 +2476,23 @@ bool CHyprRenderer::beginRender(CMonitor* pMonitor, CRegion& damage, eRenderMode } if (!buffer) { - if (!wlr_output_configure_primary_swapchain(pMonitor->output, pMonitor->state.wlr(), &pMonitor->output->swapchain)) + if (!wlr_output_configure_primary_swapchain(pMonitor->output, pMonitor->state.wlr(), &pMonitor->output->swapchain)) { + Debug::log(ERR, "Failed to configure primary swapchain for {}", pMonitor); return false; + } m_pCurrentWlrBuffer = wlr_swapchain_acquire(pMonitor->output->swapchain, nullptr); - if (!m_pCurrentWlrBuffer) + if (!m_pCurrentWlrBuffer) { + Debug::log(ERR, "Failed to acquire swapchain buffer for {}", pMonitor); return false; - } else { + } + } else m_pCurrentWlrBuffer = wlr_buffer_lock(buffer); - } try { m_pCurrentRenderbuffer = getOrCreateRenderbuffer(m_pCurrentWlrBuffer, pMonitor->drmFormat); } catch (std::exception& e) { + Debug::log(ERR, "getOrCreateRenderbuffer failed for {}", pMonitor); wlr_buffer_unlock(m_pCurrentWlrBuffer); return false; }