summaryrefslogtreecommitdiff
path: root/src/video_core/rasterizer_interface.h
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-12-30 02:25:23 -0300
committerGravatar ReinUsesLisp2020-12-30 03:38:50 -0300
commit9764c13d6d2977903f407761b27d847c0056e1c4 (patch)
treef6f5d6d6379b0404147969e7d1f548ed3d49ca01 /src/video_core/rasterizer_interface.h
parentvideo_core: Add a delayed destruction ring abstraction (diff)
downloadyuzu-9764c13d6d2977903f407761b27d847c0056e1c4.tar.gz
yuzu-9764c13d6d2977903f407761b27d847c0056e1c4.tar.xz
yuzu-9764c13d6d2977903f407761b27d847c0056e1c4.zip
video_core: Rewrite the texture cache
The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues.
Diffstat (limited to 'src/video_core/rasterizer_interface.h')
-rw-r--r--src/video_core/rasterizer_interface.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h
index 27ef4c69a..0cb0f387d 100644
--- a/src/video_core/rasterizer_interface.h
+++ b/src/video_core/rasterizer_interface.h
@@ -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
@@ -91,8 +100,7 @@ public:
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 [[nodiscard]] virtual bool AccelerateSurfaceCopy( 102 [[nodiscard]] virtual bool AccelerateSurfaceCopy(
94 const Tegra::Engines::Fermi2D::Regs::Surface& src, 103 const Tegra::Engines::Fermi2D::Surface& src, const Tegra::Engines::Fermi2D::Surface& dst,
95 const Tegra::Engines::Fermi2D::Regs::Surface& dst,
96 const Tegra::Engines::Fermi2D::Config& copy_config) { 104 const Tegra::Engines::Fermi2D::Config& copy_config) {
97 return false; 105 return false;
98 } 106 }