diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 179f37526..ae74a6ecf 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -119,6 +119,16 @@ typename P::ImageView& TextureCache
::GetImageView(ImageViewId id) noexcept {
return slot_image_views[id];
}
+template ::GetImage(ImageId id) const noexcept {
+ return slot_images[id];
+}
+
+template ::GetImage(ImageId id) noexcept {
+ return slot_images[id];
+}
+
template ::MarkModification(ImageId id) noexcept {
MarkModification(slot_images[id]);
diff --git a/src/video_core/texture_cache/texture_cache_base.h b/src/video_core/texture_cache/texture_cache_base.h
index deddf0d30..0d2d9ec2e 100644
--- a/src/video_core/texture_cache/texture_cache_base.h
+++ b/src/video_core/texture_cache/texture_cache_base.h
@@ -95,6 +95,12 @@ 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;