diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 54ebc803719..a23b98610b2 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -812,6 +812,7 @@ bool CMonitor::attemptDirectScanout() { // and comes from the appropriate device. This may implode on multi-gpu!! output->state->setBuffer(PSURFACE->current.buffer); + output->state->setPresentationMode(Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_VSYNC); if (!state.test()) return false; diff --git a/src/protocols/LinuxDMABUF.cpp b/src/protocols/LinuxDMABUF.cpp index 2b80401914a..0f9b67a3b62 100644 --- a/src/protocols/LinuxDMABUF.cpp +++ b/src/protocols/LinuxDMABUF.cpp @@ -441,7 +441,8 @@ CLinuxDMABufV1Protocol::CLinuxDMABufV1Protocol(const wl_interface* iface, const std::vector, SDMABUFTranche>> tches; if (g_pCompositor->m_pAqBackend->hasSession()) { - // this assumes there's 1 device used for scanout and each monitor never changes its primary plane + // this assumes there's only 1 device used for both scanout and rendering + // also that each monitor never changes its primary plane for (auto& mon : g_pCompositor->m_vMonitors) { auto tranche = SDMABUFTranche{ @@ -594,10 +595,6 @@ void CLinuxDMABufV1Protocol::updateScanoutTranche(SP surface LOGM(LOG, "updateScanoutTranche: sending a scanout tranche"); - // send a dedicated scanout tranche that contains formats that: - // - match the format of the output - // - are not linear or implicit - struct wl_array deviceArr = { .size = sizeof(mainDevice), .data = (void*)&mainDevice, @@ -605,7 +602,7 @@ void CLinuxDMABufV1Protocol::updateScanoutTranche(SP surface feedbackResource->resource->sendMainDevice(&deviceArr); // prioritize scnaout tranche but have renderer fallback tranche - // also yes flags can be duped here because different tranche flags (ds and no ds) + // also yes formats can be duped here because different tranche flags (ds and no ds) feedbackResource->sendTranche(monitorTranche); feedbackResource->sendTranche(formatTable->rendererTranche); diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 6bf8d718291..5af525a31b3 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1167,6 +1167,9 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) { g_pLayoutManager->getCurrentLayout()->recalculateMonitor(pMonitor->ID); } + if (!pMonitor->output->needsFrame && pMonitor->forceFullFrames == 0) + return; + // tearing and DS first bool shouldTear = false; if (pMonitor->tearingState.nextRenderTorn) { @@ -1211,9 +1214,7 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) { clock_gettime(CLOCK_MONOTONIC, &now); // check the damage - bool hasChanged = pMonitor->output->needsFrame || pMonitor->damage.hasChanged(); - - if (!hasChanged && *PDAMAGETRACKINGMODE != DAMAGE_TRACKING_NONE && pMonitor->forceFullFrames == 0 && damageBlinkCleanup == 0) + if (!pMonitor->damage.hasChanged() && *PDAMAGETRACKINGMODE != DAMAGE_TRACKING_NONE && damageBlinkCleanup == 0) return; if (*PDAMAGETRACKINGMODE == -1) {