mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 21:25:58 +01:00
renderer: add more logging for fails in beginRender
This commit is contained in:
parent
e83bf4f7b7
commit
35e80a64a6
1 changed files with 8 additions and 4 deletions
|
@ -2476,19 +2476,23 @@ bool CHyprRenderer::beginRender(CMonitor* pMonitor, CRegion& damage, eRenderMode
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!buffer) {
|
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;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
m_pCurrentWlrBuffer = wlr_swapchain_acquire(pMonitor->output->swapchain, nullptr);
|
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;
|
return false;
|
||||||
} else {
|
|
||||||
m_pCurrentWlrBuffer = wlr_buffer_lock(buffer);
|
|
||||||
}
|
}
|
||||||
|
} else
|
||||||
|
m_pCurrentWlrBuffer = wlr_buffer_lock(buffer);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
m_pCurrentRenderbuffer = getOrCreateRenderbuffer(m_pCurrentWlrBuffer, pMonitor->drmFormat);
|
m_pCurrentRenderbuffer = getOrCreateRenderbuffer(m_pCurrentWlrBuffer, pMonitor->drmFormat);
|
||||||
} catch (std::exception& e) {
|
} catch (std::exception& e) {
|
||||||
|
Debug::log(ERR, "getOrCreateRenderbuffer failed for {}", pMonitor);
|
||||||
wlr_buffer_unlock(m_pCurrentWlrBuffer);
|
wlr_buffer_unlock(m_pCurrentWlrBuffer);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue