Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

Commit

Permalink
[Impeller] Remove the unused Vulkan queue submit task runner (#50511)
Browse files Browse the repository at this point in the history
see #50484
  • Loading branch information
jason-simmons authored Feb 9, 2024
1 parent 7ac18f1 commit f969c52
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
11 changes: 0 additions & 11 deletions impeller/renderer/backend/vulkan/context_vk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,6 @@ void ContextVK::Setup(Settings settings) {
return;
}

queue_submit_thread_ = std::make_unique<fml::Thread>("IplrVkQueueSub");
queue_submit_thread_->GetTaskRunner()->PostTask([]() {
// submitKHR is extremely cheap and mostly blocks on an internal fence.
fml::RequestAffinity(fml::CpuAffinity::kEfficiency);
});

raster_message_loop_ = fml::ConcurrentMessageLoop::Create(
std::min(4u, std::thread::hardware_concurrency()));
raster_message_loop_->PostTaskToAllWorkers([]() {
Expand Down Expand Up @@ -507,10 +501,6 @@ const vk::Device& ContextVK::GetDevice() const {
return device_holder_->device.get();
}

const fml::RefPtr<fml::TaskRunner> ContextVK::GetQueueSubmitRunner() const {
return queue_submit_thread_->GetTaskRunner();
}

const std::shared_ptr<fml::ConcurrentTaskRunner>
ContextVK::GetConcurrentWorkerTaskRunner() const {
return raster_message_loop_->GetTaskRunner();
Expand All @@ -525,7 +515,6 @@ void ContextVK::Shutdown() {
fence_waiter_.reset();
resource_manager_.reset();

queue_submit_thread_->Join();
raster_message_loop_->Terminate();
}

Expand Down
13 changes: 0 additions & 13 deletions impeller/renderer/backend/vulkan/context_vk.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,6 @@ class ContextVK final : public Context,
const std::shared_ptr<fml::ConcurrentTaskRunner>
GetConcurrentWorkerTaskRunner() const;

/// @brief A single-threaded task runner that should only be used for
/// submitKHR.
///
/// SubmitKHR will block until all previously submitted command buffers have
/// been scheduled. If there are no platform views in the scene (excluding
/// texture backed platform views). Then it is safe for SwapchainImpl::Present
/// to return before submit has completed. To do so, we offload the submit
/// command to a specialized single threaded task runner. The single thread
/// ensures that we do not queue up too much work and that the submissions
/// proceed in order.
const fml::RefPtr<fml::TaskRunner> GetQueueSubmitRunner() const;

std::shared_ptr<SurfaceContextVK> CreateSurfaceContext();

const std::shared_ptr<QueueVK>& GetGraphicsQueue() const;
Expand Down Expand Up @@ -192,7 +180,6 @@ class ContextVK final : public Context,
std::shared_ptr<CommandPoolRecyclerVK> command_pool_recycler_;
std::string device_name_;
std::shared_ptr<fml::ConcurrentMessageLoop> raster_message_loop_;
std::unique_ptr<fml::Thread> queue_submit_thread_;
std::shared_ptr<GPUTracerVK> gpu_tracer_;
std::shared_ptr<DescriptorPoolRecyclerVK> descriptor_pool_recycler_;
std::shared_ptr<CommandQueue> command_queue_vk_;
Expand Down

0 comments on commit f969c52

Please sign in to comment.