From 7d3a117a6f96ecbfa724e2437ede60f06e9fe20d Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Thu, 29 Sep 2022 20:36:30 +0100 Subject: [PATCH] Use a spinlock for descriptor set allocator --- app/src/main/cpp/skyline/gpu/descriptor_allocator.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/skyline/gpu/descriptor_allocator.h b/app/src/main/cpp/skyline/gpu/descriptor_allocator.h index 2afe2848..0ce287c6 100644 --- a/app/src/main/cpp/skyline/gpu/descriptor_allocator.h +++ b/app/src/main/cpp/skyline/gpu/descriptor_allocator.h @@ -3,7 +3,8 @@ #pragma once -#include +#include +#include #include namespace skyline::gpu { @@ -13,7 +14,7 @@ namespace skyline::gpu { class DescriptorAllocator { private: GPU &gpu; - std::mutex mutex; //!< Synchronizes the creation and replacement of the pool object + SpinLock mutex; //!< Synchronizes the creation and replacement of the pool object static constexpr u32 DescriptorSetCountIncrement{64}; //!< The amount of descriptor sets that we allocate in increments of u32 descriptorSetCount{DescriptorSetCountIncrement}; //!< The maximum amount of descriptor sets in the pool