GPU: Implement Flush Requests for Async mode.
This commit is contained in:
parent
b7bc3c2549
commit
1fb516cd97
6 changed files with 70 additions and 8 deletions
|
@ -159,6 +159,14 @@ public:
|
|||
void SyncGuestHost();
|
||||
virtual void OnCommandListEnd();
|
||||
|
||||
u64 RequestFlush(CacheAddr addr, std::size_t size);
|
||||
|
||||
u64 CurrentFlushRequestFence() const {
|
||||
return current_flush_fence.load(std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
void TickWork();
|
||||
|
||||
/// Returns a reference to the Maxwell3D GPU engine.
|
||||
Engines::Maxwell3D& Maxwell3D();
|
||||
|
||||
|
@ -327,6 +335,19 @@ private:
|
|||
|
||||
std::condition_variable sync_cv;
|
||||
|
||||
struct FlushRequest {
|
||||
FlushRequest(u64 fence, CacheAddr addr, std::size_t size)
|
||||
: fence{fence}, addr{addr}, size{size} {}
|
||||
u64 fence;
|
||||
CacheAddr addr;
|
||||
std::size_t size;
|
||||
};
|
||||
|
||||
std::list<FlushRequest> flush_requests;
|
||||
std::atomic<u64> current_flush_fence{};
|
||||
u64 last_flush_fence{};
|
||||
std::mutex flush_request_mutex;
|
||||
|
||||
const bool is_async;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue