From 25429998e373c12287ae8da2a1c9c1bbe7bd7047 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Tue, 14 Jun 2022 08:57:19 -0400 Subject: bounded_threadsafe_queue: Use constexpr capacity and mask While this is the primary change, we also: - Remove the mpsc namespace and rename Queue to MPSCQueue - Make Slot a private struct within MPSCQueue - Remove the AlignedAllocator template argument, as we use std::allocator - Replace instances of mask + 1 with capacity, and mask + 2 with capacity + 1 --- src/video_core/gpu_thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core') diff --git a/src/video_core/gpu_thread.h b/src/video_core/gpu_thread.h index ad9fd5eff..be0ac2214 100644 --- a/src/video_core/gpu_thread.h +++ b/src/video_core/gpu_thread.h @@ -98,7 +98,7 @@ struct CommandDataContainer { struct SynchState final { using CommandQueue = Common::MPSCQueue; std::mutex write_lock; - CommandQueue queue{512}; // size must be 2^n + CommandQueue queue; u64 last_fence{}; std::atomic signaled_fence{}; std::condition_variable_any cv; -- cgit v1.2.3