diff options
| author | 2019-12-30 13:03:20 +0100 | |
|---|---|---|
| committer | 2019-12-30 13:04:53 +0100 | |
| commit | cb9dd01ffd3f54f5592330e3a37e2b26975bf209 (patch) | |
| tree | dc41e5bea7e4844fceebbbb2d7481eb026bfcfd9 /src/video_core/gpu.h | |
| parent | Merge pull request #3250 from ReinUsesLisp/empty-fragment (diff) | |
| download | yuzu-cb9dd01ffd3f54f5592330e3a37e2b26975bf209.tar.gz yuzu-cb9dd01ffd3f54f5592330e3a37e2b26975bf209.tar.xz yuzu-cb9dd01ffd3f54f5592330e3a37e2b26975bf209.zip | |
video_core: Block in WaitFence.
This function is called rarely and blocks quite often for a long time.
So don't waste power and let the CPU sleep.
This might also increase the performance as the other cores might be allowed to clock higher.
Diffstat (limited to 'src/video_core/gpu.h')
| -rw-r--r-- | src/video_core/gpu.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index ecc338ae9..b648317bb 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <array> | 7 | #include <array> |
| 8 | #include <atomic> | 8 | #include <atomic> |
| 9 | #include <condition_variable> | ||
| 9 | #include <list> | 10 | #include <list> |
| 10 | #include <memory> | 11 | #include <memory> |
| 11 | #include <mutex> | 12 | #include <mutex> |
| @@ -181,7 +182,7 @@ public: | |||
| 181 | virtual void WaitIdle() const = 0; | 182 | virtual void WaitIdle() const = 0; |
| 182 | 183 | ||
| 183 | /// Allows the CPU/NvFlinger to wait on the GPU before presenting a frame. | 184 | /// Allows the CPU/NvFlinger to wait on the GPU before presenting a frame. |
| 184 | void WaitFence(u32 syncpoint_id, u32 value) const; | 185 | void WaitFence(u32 syncpoint_id, u32 value); |
| 185 | 186 | ||
| 186 | void IncrementSyncPoint(u32 syncpoint_id); | 187 | void IncrementSyncPoint(u32 syncpoint_id); |
| 187 | 188 | ||
| @@ -312,6 +313,8 @@ private: | |||
| 312 | 313 | ||
| 313 | std::mutex sync_mutex; | 314 | std::mutex sync_mutex; |
| 314 | 315 | ||
| 316 | std::condition_variable sync_cv; | ||
| 317 | |||
| 315 | const bool is_async; | 318 | const bool is_async; |
| 316 | }; | 319 | }; |
| 317 | 320 | ||