renderer: fix frame sync (#13061)

* fix commit timing timer

* fix surface state lock/unlock

* debug state sync todos

* debug solitary vrr
This commit is contained in:
UjinT34 2026-01-22 18:16:52 +03:00 committed by GitHub
parent 22fc8136a2
commit 82de66a030
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 106 additions and 67 deletions

View file

@ -506,13 +506,13 @@ void CWLSurfaceResource::scheduleState(WP<SSurfaceState> state) {
}
} else if (state->buffer && state->buffer->isSynchronous()) {
// synchronous (shm) buffers can be read immediately
m_stateQueue.unlock(state);
m_stateQueue.unlock(state, LOCK_REASON_FENCE);
} else if (state->buffer && state->buffer->m_syncFd.isValid()) {
// async buffer and is dmabuf, then we can wait on implicit fences
g_pEventLoopManager->doOnReadable(std::move(state->buffer->m_syncFd), [state, whenReadable]() { whenReadable(state, LOCK_REASON_FENCE); });
} else {
// state commit without a buffer.
m_stateQueue.unlock(state);
m_stateQueue.unlock(state, LOCK_REASON_FENCE);
}
}