From 25e5e5c6f842e643fc9ea791a67389391bd5414a Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Sun, 23 Feb 2025 19:14:59 +0100 Subject: [PATCH] syncobj: drop current buffer when done FIFO presentation modes requires us to drop current buffer when done with it so we send our release points and client will send us new acquire/release points. if waiting for next commit it will never arrive. --- src/protocols/core/Compositor.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp index e3297da8a44..d3fcf6adcb7 100644 --- a/src/protocols/core/Compositor.cpp +++ b/src/protocols/core/Compositor.cpp @@ -467,6 +467,15 @@ void CWLSurfaceResource::commitPendingState() { nullptr); } + // #TODO + // fifo mode requires us to drop the current buffer before next commit + // otherwise release points arent being sent and we dont recieve new acquire + // and release points. + if (current.buffer->buffer->isSynchronous() && syncobj) { + dropCurrentBuffer(); + return; + } + // for async buffers, we can only release the buffer once we are unrefing it from current. // if the backend took it, ref it with the lambda. Otherwise, the end of this scope will release it. if (previousBuffer && previousBuffer->buffer && !previousBuffer->buffer->isSynchronous()) {