Skip to content

Commit

Permalink
renderer: add more logging for fails in beginRender
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Feb 22, 2024
1 parent e83bf4f commit 35e80a6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/render/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 35e80a6

Please sign in to comment.