diff options
Diffstat (limited to 'src/video_core/fence_manager.h')
| -rw-r--r-- | src/video_core/fence_manager.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/video_core/fence_manager.h b/src/video_core/fence_manager.h index d658e038d..03a70e5e0 100644 --- a/src/video_core/fence_manager.h +++ b/src/video_core/fence_manager.h | |||
| @@ -11,6 +11,8 @@ | |||
| 11 | #include "common/common_types.h" | 11 | #include "common/common_types.h" |
| 12 | #include "video_core/delayed_destruction_ring.h" | 12 | #include "video_core/delayed_destruction_ring.h" |
| 13 | #include "video_core/gpu.h" | 13 | #include "video_core/gpu.h" |
| 14 | #include "video_core/host1x/host1x.h" | ||
| 15 | #include "video_core/host1x/syncpoint_manager.h" | ||
| 14 | #include "video_core/rasterizer_interface.h" | 16 | #include "video_core/rasterizer_interface.h" |
| 15 | 17 | ||
| 16 | namespace VideoCommon { | 18 | namespace VideoCommon { |
| @@ -72,6 +74,7 @@ public: | |||
| 72 | } | 74 | } |
| 73 | 75 | ||
| 74 | void SignalSyncPoint(u32 value) { | 76 | void SignalSyncPoint(u32 value) { |
| 77 | syncpoint_manager.IncrementGuest(value); | ||
| 75 | TryReleasePendingFences(); | 78 | TryReleasePendingFences(); |
| 76 | const bool should_flush = ShouldFlush(); | 79 | const bool should_flush = ShouldFlush(); |
| 77 | CommitAsyncFlushes(); | 80 | CommitAsyncFlushes(); |
| @@ -96,7 +99,7 @@ public: | |||
| 96 | auto payload = current_fence->GetPayload(); | 99 | auto payload = current_fence->GetPayload(); |
| 97 | std::memcpy(address, &payload, sizeof(payload)); | 100 | std::memcpy(address, &payload, sizeof(payload)); |
| 98 | } else { | 101 | } else { |
| 99 | gpu.IncrementSyncPoint(current_fence->GetPayload()); | 102 | syncpoint_manager.IncrementHost(current_fence->GetPayload()); |
| 100 | } | 103 | } |
| 101 | PopFence(); | 104 | PopFence(); |
| 102 | } | 105 | } |
| @@ -106,8 +109,8 @@ protected: | |||
| 106 | explicit FenceManager(VideoCore::RasterizerInterface& rasterizer_, Tegra::GPU& gpu_, | 109 | explicit FenceManager(VideoCore::RasterizerInterface& rasterizer_, Tegra::GPU& gpu_, |
| 107 | TTextureCache& texture_cache_, TTBufferCache& buffer_cache_, | 110 | TTextureCache& texture_cache_, TTBufferCache& buffer_cache_, |
| 108 | TQueryCache& query_cache_) | 111 | TQueryCache& query_cache_) |
| 109 | : rasterizer{rasterizer_}, gpu{gpu_}, texture_cache{texture_cache_}, | 112 | : rasterizer{rasterizer_}, gpu{gpu_}, syncpoint_manager{gpu.Host1x().GetSyncpointManager()}, |
| 110 | buffer_cache{buffer_cache_}, query_cache{query_cache_} {} | 113 | texture_cache{texture_cache_}, buffer_cache{buffer_cache_}, query_cache{query_cache_} {} |
| 111 | 114 | ||
| 112 | virtual ~FenceManager() = default; | 115 | virtual ~FenceManager() = default; |
| 113 | 116 | ||
| @@ -125,6 +128,7 @@ protected: | |||
| 125 | 128 | ||
| 126 | VideoCore::RasterizerInterface& rasterizer; | 129 | VideoCore::RasterizerInterface& rasterizer; |
| 127 | Tegra::GPU& gpu; | 130 | Tegra::GPU& gpu; |
| 131 | Tegra::Host1x::SyncpointManager& syncpoint_manager; | ||
| 128 | TTextureCache& texture_cache; | 132 | TTextureCache& texture_cache; |
| 129 | TTBufferCache& buffer_cache; | 133 | TTBufferCache& buffer_cache; |
| 130 | TQueryCache& query_cache; | 134 | TQueryCache& query_cache; |
| @@ -142,7 +146,7 @@ private: | |||
| 142 | const auto payload = current_fence->GetPayload(); | 146 | const auto payload = current_fence->GetPayload(); |
| 143 | std::memcpy(address, &payload, sizeof(payload)); | 147 | std::memcpy(address, &payload, sizeof(payload)); |
| 144 | } else { | 148 | } else { |
| 145 | gpu.IncrementSyncPoint(current_fence->GetPayload()); | 149 | syncpoint_manager.IncrementHost(current_fence->GetPayload()); |
| 146 | } | 150 | } |
| 147 | PopFence(); | 151 | PopFence(); |
| 148 | } | 152 | } |