diff options
Diffstat (limited to 'src/video_core/rasterizer_interface.h')
| -rw-r--r-- | src/video_core/rasterizer_interface.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h index 49224ca85..8fa4e4d9a 100644 --- a/src/video_core/rasterizer_interface.h +++ b/src/video_core/rasterizer_interface.h | |||
| @@ -86,35 +86,35 @@ public: | |||
| 86 | virtual void FlushAll() = 0; | 86 | virtual void FlushAll() = 0; |
| 87 | 87 | ||
| 88 | /// Notify rasterizer that any caches of the specified region should be flushed to Switch memory | 88 | /// Notify rasterizer that any caches of the specified region should be flushed to Switch memory |
| 89 | virtual void FlushRegion(VAddr addr, u64 size, | 89 | virtual void FlushRegion(DAddr addr, u64 size, |
| 90 | VideoCommon::CacheType which = VideoCommon::CacheType::All) = 0; | 90 | VideoCommon::CacheType which = VideoCommon::CacheType::All) = 0; |
| 91 | 91 | ||
| 92 | /// Check if the the specified memory area requires flushing to CPU Memory. | 92 | /// Check if the the specified memory area requires flushing to CPU Memory. |
| 93 | virtual bool MustFlushRegion(VAddr addr, u64 size, | 93 | virtual bool MustFlushRegion(DAddr addr, u64 size, |
| 94 | VideoCommon::CacheType which = VideoCommon::CacheType::All) = 0; | 94 | VideoCommon::CacheType which = VideoCommon::CacheType::All) = 0; |
| 95 | 95 | ||
| 96 | virtual RasterizerDownloadArea GetFlushArea(VAddr addr, u64 size) = 0; | 96 | virtual RasterizerDownloadArea GetFlushArea(DAddr addr, u64 size) = 0; |
| 97 | 97 | ||
| 98 | /// Notify rasterizer that any caches of the specified region should be invalidated | 98 | /// Notify rasterizer that any caches of the specified region should be invalidated |
| 99 | virtual void InvalidateRegion(VAddr addr, u64 size, | 99 | virtual void InvalidateRegion(DAddr addr, u64 size, |
| 100 | VideoCommon::CacheType which = VideoCommon::CacheType::All) = 0; | 100 | VideoCommon::CacheType which = VideoCommon::CacheType::All) = 0; |
| 101 | 101 | ||
| 102 | virtual void InnerInvalidation(std::span<const std::pair<VAddr, std::size_t>> sequences) { | 102 | virtual void InnerInvalidation(std::span<const std::pair<DAddr, std::size_t>> sequences) { |
| 103 | for (const auto& [cpu_addr, size] : sequences) { | 103 | for (const auto& [cpu_addr, size] : sequences) { |
| 104 | InvalidateRegion(cpu_addr, size); | 104 | InvalidateRegion(cpu_addr, size); |
| 105 | } | 105 | } |
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | /// Notify rasterizer that any caches of the specified region are desync with guest | 108 | /// Notify rasterizer that any caches of the specified region are desync with guest |
| 109 | virtual void OnCacheInvalidation(VAddr addr, u64 size) = 0; | 109 | virtual void OnCacheInvalidation(PAddr addr, u64 size) = 0; |
| 110 | 110 | ||
| 111 | virtual bool OnCPUWrite(VAddr addr, u64 size) = 0; | 111 | virtual bool OnCPUWrite(PAddr addr, u64 size) = 0; |
| 112 | 112 | ||
| 113 | /// Sync memory between guest and host. | 113 | /// Sync memory between guest and host. |
| 114 | virtual void InvalidateGPUCache() = 0; | 114 | virtual void InvalidateGPUCache() = 0; |
| 115 | 115 | ||
| 116 | /// Unmap memory range | 116 | /// Unmap memory range |
| 117 | virtual void UnmapMemory(VAddr addr, u64 size) = 0; | 117 | virtual void UnmapMemory(DAddr addr, u64 size) = 0; |
| 118 | 118 | ||
| 119 | /// Remap GPU memory range. This means underneath backing memory changed | 119 | /// Remap GPU memory range. This means underneath backing memory changed |
| 120 | virtual void ModifyGPUMemory(size_t as_id, GPUVAddr addr, u64 size) = 0; | 120 | virtual void ModifyGPUMemory(size_t as_id, GPUVAddr addr, u64 size) = 0; |
| @@ -122,7 +122,7 @@ public: | |||
| 122 | /// Notify rasterizer that any caches of the specified region should be flushed to Switch memory | 122 | /// Notify rasterizer that any caches of the specified region should be flushed to Switch memory |
| 123 | /// and invalidated | 123 | /// and invalidated |
| 124 | virtual void FlushAndInvalidateRegion( | 124 | virtual void FlushAndInvalidateRegion( |
| 125 | VAddr addr, u64 size, VideoCommon::CacheType which = VideoCommon::CacheType::All) = 0; | 125 | DAddr addr, u64 size, VideoCommon::CacheType which = VideoCommon::CacheType::All) = 0; |
| 126 | 126 | ||
| 127 | /// Notify the host renderer to wait for previous primitive and compute operations. | 127 | /// Notify the host renderer to wait for previous primitive and compute operations. |
| 128 | virtual void WaitForIdle() = 0; | 128 | virtual void WaitForIdle() = 0; |
| @@ -157,13 +157,10 @@ public: | |||
| 157 | 157 | ||
| 158 | /// Attempt to use a faster method to display the framebuffer to screen | 158 | /// Attempt to use a faster method to display the framebuffer to screen |
| 159 | [[nodiscard]] virtual bool AccelerateDisplay(const Tegra::FramebufferConfig& config, | 159 | [[nodiscard]] virtual bool AccelerateDisplay(const Tegra::FramebufferConfig& config, |
| 160 | VAddr framebuffer_addr, u32 pixel_stride) { | 160 | DAddr framebuffer_addr, u32 pixel_stride) { |
| 161 | return false; | 161 | return false; |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | /// Increase/decrease the number of object in pages touching the specified region | ||
| 165 | virtual void UpdatePagesCachedCount(VAddr addr, u64 size, int delta) {} | ||
| 166 | |||
| 167 | /// Initialize disk cached resources for the game being emulated | 164 | /// Initialize disk cached resources for the game being emulated |
| 168 | virtual void LoadDiskResources(u64 title_id, std::stop_token stop_loading, | 165 | virtual void LoadDiskResources(u64 title_id, std::stop_token stop_loading, |
| 169 | const DiskResourceLoadCallback& callback) {} | 166 | const DiskResourceLoadCallback& callback) {} |