aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache/texture_cache.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-07-31 17:42:37 -0300
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-16 22:11:29 +0100
commit0100b5e7009147c1b9fdeba9a37c7e7fe48a5529 (patch)
treede6a0d7767ce12ee65846c53a18c2744ca636ec1 /src/video_core/texture_cache/texture_cache.h
parentdc0a20f7e0d6b5ce7c54a49fd1f537a5492472c8 (diff)
texture_cache: Add getter to query if image view is rescaled
Diffstat (limited to 'src/video_core/texture_cache/texture_cache.h')
-rw-r--r--src/video_core/texture_cache/texture_cache.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 4dbded6355..0e70c4db24 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -120,16 +120,6 @@ typename P::ImageView& TextureCache<P>::GetImageView(ImageViewId id) noexcept {
}
template <class P>
-const typename P::Image& TextureCache<P>::GetImage(ImageId id) const noexcept {
- return slot_images[id];
-}
-
-template <class P>
-typename P::Image& TextureCache<P>::GetImage(ImageId id) noexcept {
- return slot_images[id];
-}
-
-template <class P>
void TextureCache<P>::MarkModification(ImageId id) noexcept {
MarkModification(slot_images[id]);
}
@@ -635,6 +625,12 @@ bool TextureCache<P>::IsRescaling() const noexcept {
}
template <class P>
+bool TextureCache<P>::IsRescaling(const ImageViewBase& image_view) const noexcept {
+ const ImageBase& image = slot_images[image_view.image_id];
+ return True(image.flags & ImageFlagBits::Rescaled);
+}
+
+template <class P>
bool TextureCache<P>::IsRegionGpuModified(VAddr addr, size_t size) {
bool is_modified = false;
ForEachImageInRegion(addr, size, [&is_modified](ImageId, ImageBase& image) {