summaryrefslogtreecommitdiff
path: root/src/video_core/gpu.h
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-04-16 12:29:53 -0400
committerGravatar Fernando Sahmkow2020-04-22 11:36:24 -0400
commitf616dc0b591b783b3fb75ca89633f1c26cce05a9 (patch)
tree43a9c2052c5ceaad8cf6a69173b0817e54cc8f42 /src/video_core/gpu.h
parentFix GCC error. (diff)
downloadyuzu-f616dc0b591b783b3fb75ca89633f1c26cce05a9.tar.gz
yuzu-f616dc0b591b783b3fb75ca89633f1c26cce05a9.tar.xz
yuzu-f616dc0b591b783b3fb75ca89633f1c26cce05a9.zip
Address Feedback.
Diffstat (limited to 'src/video_core/gpu.h')
-rw-r--r--src/video_core/gpu.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 943a5b110..5e3eb94e9 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -155,16 +155,22 @@ public:
155 /// Calls a GPU method. 155 /// Calls a GPU method.
156 void CallMethod(const MethodCall& method_call); 156 void CallMethod(const MethodCall& method_call);
157 157
158 /// Flush all current written commands into the host GPU for execution.
158 void FlushCommands(); 159 void FlushCommands();
160 /// Synchronizes CPU writes with Host GPU memory.
159 void SyncGuestHost(); 161 void SyncGuestHost();
162 /// Signal the ending of command list.
160 virtual void OnCommandListEnd(); 163 virtual void OnCommandListEnd();
161 164
162 u64 RequestFlush(CacheAddr addr, std::size_t size); 165 /// Request a host GPU memory flush from the CPU.
166 u64 RequestFlush(VAddr addr, std::size_t size);
163 167
168 /// Obtains current flush request fence id.
164 u64 CurrentFlushRequestFence() const { 169 u64 CurrentFlushRequestFence() const {
165 return current_flush_fence.load(std::memory_order_relaxed); 170 return current_flush_fence.load(std::memory_order_relaxed);
166 } 171 }
167 172
173 /// Tick pending requests within the GPU.
168 void TickWork(); 174 void TickWork();
169 175
170 /// Returns a reference to the Maxwell3D GPU engine. 176 /// Returns a reference to the Maxwell3D GPU engine.
@@ -336,10 +342,10 @@ private:
336 std::condition_variable sync_cv; 342 std::condition_variable sync_cv;
337 343
338 struct FlushRequest { 344 struct FlushRequest {
339 FlushRequest(u64 fence, CacheAddr addr, std::size_t size) 345 FlushRequest(u64 fence, VAddr addr, std::size_t size)
340 : fence{fence}, addr{addr}, size{size} {} 346 : fence{fence}, addr{addr}, size{size} {}
341 u64 fence; 347 u64 fence;
342 CacheAddr addr; 348 VAddr addr;
343 std::size_t size; 349 std::size_t size;
344 }; 350 };
345 351