summaryrefslogtreecommitdiff
path: root/src/render/pass/SurfacePassElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/pass/SurfacePassElement.cpp')
-rw-r--r--src/render/pass/SurfacePassElement.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/render/pass/SurfacePassElement.cpp b/src/render/pass/SurfacePassElement.cpp
index c47c76ce..22e61a23 100644
--- a/src/render/pass/SurfacePassElement.cpp
+++ b/src/render/pass/SurfacePassElement.cpp
@@ -129,6 +129,11 @@ void CSurfacePassElement::draw(const CRegion& damage) {
if (!g_pHyprRenderer->m_bBlockSurfaceFeedback)
data.surface->presentFeedback(data.when, data.pMonitor->self.lock());
+ // add async (dmabuf) buffers to usedBuffers so we can handle release later
+ // sync (shm) buffers will be released in commitState, so no need to track them here
+ if (data.surface->current.buffer && !data.surface->current.buffer->isSynchronous())
+ g_pHyprRenderer->usedAsyncBuffers.emplace_back(data.surface->current.buffer);
+
g_pHyprOpenGL->blend(true);
}