summaryrefslogtreecommitdiffstats
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.h16
-rw-r--r--src/video_core/texture_cache/texture_cache_base.h9
2 files changed, 9 insertions, 16 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 4dbded635..0e70c4db2 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) {
diff --git a/src/video_core/texture_cache/texture_cache_base.h b/src/video_core/texture_cache/texture_cache_base.h
index b6cc09682..8b417b611 100644
--- a/src/video_core/texture_cache/texture_cache_base.h
+++ b/src/video_core/texture_cache/texture_cache_base.h
@@ -21,6 +21,7 @@
#include "video_core/texture_cache/descriptor_table.h"
#include "video_core/texture_cache/image_base.h"
#include "video_core/texture_cache/image_info.h"
+#include "video_core/texture_cache/image_view_base.h"
#include "video_core/texture_cache/image_view_info.h"
#include "video_core/texture_cache/render_targets.h"
#include "video_core/texture_cache/slot_vector.h"
@@ -100,12 +101,6 @@ public:
/// Return a reference to the given image view id
[[nodiscard]] ImageView& GetImageView(ImageViewId id) noexcept;
- /// Return a constant reference to the given image id
- [[nodiscard]] const Image& GetImage(ImageId id) const noexcept;
-
- /// Return a reference to the given image id
- [[nodiscard]] Image& GetImage(ImageId id) noexcept;
-
/// Mark an image as modified from the GPU
void MarkModification(ImageId id) noexcept;
@@ -181,6 +176,8 @@ public:
[[nodiscard]] bool IsRescaling() const noexcept;
+ [[nodiscard]] bool IsRescaling(const ImageViewBase& image_view) const noexcept;
+
[[nodiscard]] bool BlackListImage(ImageId image_id);
std::mutex mutex;