From 704660bbebc9920d0798d8fd31233ff3b3b0f18d Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sun, 8 Jan 2023 19:21:41 +0000 Subject: [PATCH] Store render nodes in a linearly allocated linked list This is much faster in reldebug builds than boost::stable_vector while still providing iterator stability --- .../main/cpp/skyline/gpu/interconnect/command_executor.cpp | 5 ++++- app/src/main/cpp/skyline/gpu/interconnect/command_executor.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp index 01b3f7ec..aef49b66 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp +++ b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp @@ -45,7 +45,8 @@ namespace skyline::gpu::interconnect { commandBuffer{AllocateRaiiCommandBuffer(gpu, commandPool)}, fence{gpu.vkDevice, vk::FenceCreateInfo{ .flags = vk::FenceCreateFlagBits::eSignaled }}, semaphore{gpu.vkDevice, vk::SemaphoreCreateInfo{}}, - cycle{std::make_shared(gpu.vkDevice, *fence, *semaphore, true)} { + cycle{std::make_shared(gpu.vkDevice, *fence, *semaphore, true)}, + nodes{allocator} { Begin(); } @@ -55,6 +56,8 @@ namespace skyline::gpu::interconnect { fence{std::move(other.fence)}, semaphore{std::move(other.semaphore)}, cycle{std::move(other.cycle)}, + allocator{std::move(other.allocator)}, + nodes{std::move(other.nodes)}, ready{other.ready} {} std::shared_ptr CommandRecordThread::Slot::Reset(GPU &gpu) { diff --git a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.h b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.h index d1225b76..cd86fdd7 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.h +++ b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.h @@ -35,8 +35,8 @@ namespace skyline::gpu::interconnect { vk::raii::Fence fence; vk::raii::Semaphore semaphore; std::shared_ptr cycle; - boost::container::stable_vector nodes; LinearAllocatorState<> allocator; + std::list> nodes; std::mutex beginLock; std::condition_variable beginCondition; ContextTag executionTag;