From 551add7519c5e28f05cfc6dc29f7accd74a9bd4e Mon Sep 17 00:00:00 2001 From: Doris Wu Date: Tue, 24 Feb 2026 06:20:03 +0800 Subject: [PATCH] call execute() under single threaded mode (#9738) --- filament/src/details/Engine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/filament/src/details/Engine.cpp b/filament/src/details/Engine.cpp index 4010eb30db..d1fa557120 100644 --- a/filament/src/details/Engine.cpp +++ b/filament/src/details/Engine.cpp @@ -798,6 +798,12 @@ void FEngine::submitFrame() { void FEngine::flush() { // flush the command buffer flushCommandBuffer(mCommandBufferQueue); + + // In single-threaded mode, we have to call execute() to drain the command + // buffer to really free up space + if constexpr (!UTILS_HAS_THREADING) { + execute(); + } } void FEngine::flushAndWait() {