summaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/texture_cache.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 04fe69c11..e251a30c3 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -116,6 +116,21 @@ public:
116 } 116 }
117 } 117 }
118 118
119 bool MustFlushRegion(VAddr addr, std::size_t size) {
120 std::lock_guard lock{mutex};
121
122 auto surfaces = GetSurfacesInRegion(addr, size);
123 if (surfaces.empty()) {
124 return false;
125 }
126 for (const auto& surface : surfaces) {
127 if (surface->IsModified()) {
128 return true;
129 }
130 }
131 return false;
132 }
133
119 TView GetTextureSurface(const Tegra::Texture::TICEntry& tic, 134 TView GetTextureSurface(const Tegra::Texture::TICEntry& tic,
120 const VideoCommon::Shader::Sampler& entry) { 135 const VideoCommon::Shader::Sampler& entry) {
121 std::lock_guard lock{mutex}; 136 std::lock_guard lock{mutex};