mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-22 20:39:20 +01:00
Use a spinlock for GPU waiter thread
This commit is contained in:
parent
f1aed86177
commit
d8a4a2b08d
@ -8,6 +8,7 @@
|
|||||||
#include <common/linear_allocator.h>
|
#include <common/linear_allocator.h>
|
||||||
#include <gpu/megabuffer.h>
|
#include <gpu/megabuffer.h>
|
||||||
#include "command_nodes.h"
|
#include "command_nodes.h"
|
||||||
|
#include "common/spin_lock.h"
|
||||||
|
|
||||||
namespace skyline::gpu::interconnect {
|
namespace skyline::gpu::interconnect {
|
||||||
/*
|
/*
|
||||||
@ -99,8 +100,8 @@ namespace skyline::gpu::interconnect {
|
|||||||
private:
|
private:
|
||||||
const DeviceState &state;
|
const DeviceState &state;
|
||||||
std::thread thread;
|
std::thread thread;
|
||||||
std::mutex mutex;
|
SpinLock mutex;
|
||||||
std::condition_variable condition;
|
std::condition_variable_any condition;
|
||||||
std::queue<std::pair<std::shared_ptr<FenceCycle>, std::function<void()>>> pendingSignalQueue; //!< Queue of callbacks to be executed when their coressponding fence is signalled
|
std::queue<std::pair<std::shared_ptr<FenceCycle>, std::function<void()>>> pendingSignalQueue; //!< Queue of callbacks to be executed when their coressponding fence is signalled
|
||||||
std::atomic<bool> idle{};
|
std::atomic<bool> idle{};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user