diff options
Diffstat (limited to 'src/video_core/rasterizer_interface.h')
| -rw-r--r-- | src/video_core/rasterizer_interface.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h index b3e0919f8..0cb0f387d 100644 --- a/src/video_core/rasterizer_interface.h +++ b/src/video_core/rasterizer_interface.h | |||
| @@ -32,7 +32,7 @@ using DiskResourceLoadCallback = std::function<void(LoadCallbackStage, std::size | |||
| 32 | 32 | ||
| 33 | class RasterizerInterface { | 33 | class RasterizerInterface { |
| 34 | public: | 34 | public: |
| 35 | virtual ~RasterizerInterface() {} | 35 | virtual ~RasterizerInterface() = default; |
| 36 | 36 | ||
| 37 | /// Dispatches a draw invocation | 37 | /// Dispatches a draw invocation |
| 38 | virtual void Draw(bool is_indexed, bool is_instanced) = 0; | 38 | virtual void Draw(bool is_indexed, bool is_instanced) = 0; |
| @@ -76,6 +76,9 @@ public: | |||
| 76 | /// Sync memory between guest and host. | 76 | /// Sync memory between guest and host. |
| 77 | virtual void SyncGuestHost() = 0; | 77 | virtual void SyncGuestHost() = 0; |
| 78 | 78 | ||
| 79 | /// Unmap memory range | ||
| 80 | virtual void UnmapMemory(VAddr addr, u64 size) = 0; | ||
| 81 | |||
| 79 | /// Notify rasterizer that any caches of the specified region should be flushed to Switch memory | 82 | /// Notify rasterizer that any caches of the specified region should be flushed to Switch memory |
| 80 | /// and invalidated | 83 | /// and invalidated |
| 81 | virtual void FlushAndInvalidateRegion(VAddr addr, u64 size) = 0; | 84 | virtual void FlushAndInvalidateRegion(VAddr addr, u64 size) = 0; |
| @@ -83,6 +86,12 @@ public: | |||
| 83 | /// Notify the host renderer to wait for previous primitive and compute operations. | 86 | /// Notify the host renderer to wait for previous primitive and compute operations. |
| 84 | virtual void WaitForIdle() = 0; | 87 | virtual void WaitForIdle() = 0; |
| 85 | 88 | ||
| 89 | /// Notify the host renderer to wait for reads and writes to render targets and flush caches. | ||
| 90 | virtual void FragmentBarrier() = 0; | ||
| 91 | |||
| 92 | /// Notify the host renderer to make available previous render target writes. | ||
| 93 | virtual void TiledCacheBarrier() = 0; | ||
| 94 | |||
| 86 | /// Notify the rasterizer to send all written commands to the host GPU. | 95 | /// Notify the rasterizer to send all written commands to the host GPU. |
| 87 | virtual void FlushCommands() = 0; | 96 | virtual void FlushCommands() = 0; |
| 88 | 97 | ||
| @@ -90,15 +99,15 @@ public: | |||
| 90 | virtual void TickFrame() = 0; | 99 | virtual void TickFrame() = 0; |
| 91 | 100 | ||
| 92 | /// Attempt to use a faster method to perform a surface copy | 101 | /// Attempt to use a faster method to perform a surface copy |
| 93 | virtual bool AccelerateSurfaceCopy(const Tegra::Engines::Fermi2D::Regs::Surface& src, | 102 | [[nodiscard]] virtual bool AccelerateSurfaceCopy( |
| 94 | const Tegra::Engines::Fermi2D::Regs::Surface& dst, | 103 | const Tegra::Engines::Fermi2D::Surface& src, const Tegra::Engines::Fermi2D::Surface& dst, |
| 95 | const Tegra::Engines::Fermi2D::Config& copy_config) { | 104 | const Tegra::Engines::Fermi2D::Config& copy_config) { |
| 96 | return false; | 105 | return false; |
| 97 | } | 106 | } |
| 98 | 107 | ||
| 99 | /// Attempt to use a faster method to display the framebuffer to screen | 108 | /// Attempt to use a faster method to display the framebuffer to screen |
| 100 | virtual bool AccelerateDisplay(const Tegra::FramebufferConfig& config, VAddr framebuffer_addr, | 109 | [[nodiscard]] virtual bool AccelerateDisplay(const Tegra::FramebufferConfig& config, |
| 101 | u32 pixel_stride) { | 110 | VAddr framebuffer_addr, u32 pixel_stride) { |
| 102 | return false; | 111 | return false; |
| 103 | } | 112 | } |
| 104 | 113 | ||
| @@ -110,12 +119,12 @@ public: | |||
| 110 | const DiskResourceLoadCallback& callback) {} | 119 | const DiskResourceLoadCallback& callback) {} |
| 111 | 120 | ||
| 112 | /// Grant access to the Guest Driver Profile for recording/obtaining info on the guest driver. | 121 | /// Grant access to the Guest Driver Profile for recording/obtaining info on the guest driver. |
| 113 | GuestDriverProfile& AccessGuestDriverProfile() { | 122 | [[nodiscard]] GuestDriverProfile& AccessGuestDriverProfile() { |
| 114 | return guest_driver_profile; | 123 | return guest_driver_profile; |
| 115 | } | 124 | } |
| 116 | 125 | ||
| 117 | /// Grant access to the Guest Driver Profile for recording/obtaining info on the guest driver. | 126 | /// Grant access to the Guest Driver Profile for recording/obtaining info on the guest driver. |
| 118 | const GuestDriverProfile& AccessGuestDriverProfile() const { | 127 | [[nodiscard]] const GuestDriverProfile& AccessGuestDriverProfile() const { |
| 119 | return guest_driver_profile; | 128 | return guest_driver_profile; |
| 120 | } | 129 | } |
| 121 | 130 | ||