From 9d7d2d51428c8c42acea1bdca679c8ee2649698a Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Thu, 29 Feb 2024 10:11:55 -0800 Subject: [PATCH] [Impeller] test removal of submit batching. (flutter/engine#51094) I have a feeling this is related to https://github.com/flutter/flutter/issues/144371 Locally on the Pixel 4 (which is a similarish GPU, the batch submission is actually regressing performance). --- .../impeller/entity/contents/content_context.cc | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/engine/src/flutter/impeller/entity/contents/content_context.cc b/engine/src/flutter/impeller/entity/contents/content_context.cc index f1566c17735..e45d654bb97 100644 --- a/engine/src/flutter/impeller/entity/contents/content_context.cc +++ b/engine/src/flutter/impeller/entity/contents/content_context.cc @@ -5,6 +5,7 @@ #include "impeller/entity/contents/content_context.h" #include +#include #include "fml/trace_event.h" #include "impeller/base/strings.h" @@ -599,17 +600,7 @@ void ContentContext::ClearCachedRuntimeEffectPipeline( void ContentContext::RecordCommandBuffer( std::shared_ptr command_buffer) const { - // Metal systems seem to have a limit on the number of command buffers that - // can be created concurrently, which appears to be in the range of 50 or so - // command buffers. When this limit is hit, creation of further command - // buffers will fail. To work around this, we regularly flush the - // command buffers on the metal backend. - if (GetContext()->GetBackendType() == Context::BackendType::kMetal) { - GetContext()->GetCommandQueue()->Submit({command_buffer}); - } else { - pending_command_buffers_->command_buffers.push_back( - std::move(command_buffer)); - } + GetContext()->GetCommandQueue()->Submit({std::move(command_buffer)}); } void ContentContext::FlushCommandBuffers() const {