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
This commit is contained in:
parent
bd3bfe411d
commit
25429998e3
2 changed files with 74 additions and 87 deletions
|
@ -98,7 +98,7 @@ struct CommandDataContainer {
|
|||
struct SynchState final {
|
||||
using CommandQueue = Common::MPSCQueue<CommandDataContainer>;
|
||||
std::mutex write_lock;
|
||||
CommandQueue queue{512}; // size must be 2^n
|
||||
CommandQueue queue;
|
||||
u64 last_fence{};
|
||||
std::atomic<u64> signaled_fence{};
|
||||
std::condition_variable_any cv;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue