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
This commit is contained in:
Billy Laws 2023-01-08 19:21:41 +00:00
parent 326c05a5de
commit 704660bbeb
2 changed files with 5 additions and 2 deletions

View File

@ -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<FenceCycle>(gpu.vkDevice, *fence, *semaphore, true)} {
cycle{std::make_shared<FenceCycle>(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<FenceCycle> CommandRecordThread::Slot::Reset(GPU &gpu) {

View File

@ -35,8 +35,8 @@ namespace skyline::gpu::interconnect {
vk::raii::Fence fence;
vk::raii::Semaphore semaphore;
std::shared_ptr<FenceCycle> cycle;
boost::container::stable_vector<node::NodeVariant> nodes;
LinearAllocatorState<> allocator;
std::list<node::NodeVariant, LinearAllocator<node::NodeVariant>> nodes;
std::mutex beginLock;
std::condition_variable beginCondition;
ContextTag executionTag;