summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFernandoS27 <fsahmkow27@gmail.com>2018-10-16 03:09:38 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2018-10-18 00:52:10 +0200
commitdbc34db6ce21dfb119bb8756bde41c9e45f8515f (patch)
tree7180eb225d5c32cadf92f1a49a556060b307faf5 /src
parentImplement 3D Textures (diff)
downloadyuzu-dbc34db6ce21dfb119bb8756bde41c9e45f8515f.tar
yuzu-dbc34db6ce21dfb119bb8756bde41c9e45f8515f.tar.gz
yuzu-dbc34db6ce21dfb119bb8756bde41c9e45f8515f.tar.bz2
yuzu-dbc34db6ce21dfb119bb8756bde41c9e45f8515f.tar.lz
yuzu-dbc34db6ce21dfb119bb8756bde41c9e45f8515f.tar.xz
yuzu-dbc34db6ce21dfb119bb8756bde41c9e45f8515f.tar.zst
yuzu-dbc34db6ce21dfb119bb8756bde41c9e45f8515f.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/rasterizer_cache.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/video_core/rasterizer_cache.h b/src/video_core/rasterizer_cache.h
index 0a3b3951e..294b7c6ef 100644
--- a/src/video_core/rasterizer_cache.h
+++ b/src/video_core/rasterizer_cache.h
@@ -105,6 +105,22 @@ protected:
return nullptr;
}
+ std::vector<T> GetInRange(Tegra::GPUVAddr addr, size_t size) {
+ std::vector<T> objects;
+ if (size == 0)
+ return objects;
+
+ const ObjectInterval interval{addr, addr + size};
+ for (auto& pair : boost::make_iterator_range(object_cache.equal_range(interval))) {
+ for (auto& cached_object : pair.second) {
+ if (!cached_object)
+ continue;
+ objects.push_back(cached_object);
+ }
+ }
+ return objects;
+ }
+
/// Register an object into the cache
void Register(const T& object) {
object->SetIsRegistered(true);