diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-07-26 02:44:13 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-16 22:11:28 +0100 |
commit | 74efa57c1b78b4a07ad0003e847bd5f0aa7c7bb5 (patch) | |
tree | 08650341758dd1f6aaf97c17b95ca2f0f318f446 /src/video_core | |
parent | shader: Add copy constructor to instructions (diff) | |
download | yuzu-74efa57c1b78b4a07ad0003e847bd5f0aa7c7bb5.tar yuzu-74efa57c1b78b4a07ad0003e847bd5f0aa7c7bb5.tar.gz yuzu-74efa57c1b78b4a07ad0003e847bd5f0aa7c7bb5.tar.bz2 yuzu-74efa57c1b78b4a07ad0003e847bd5f0aa7c7bb5.tar.lz yuzu-74efa57c1b78b4a07ad0003e847bd5f0aa7c7bb5.tar.xz yuzu-74efa57c1b78b4a07ad0003e847bd5f0aa7c7bb5.tar.zst yuzu-74efa57c1b78b4a07ad0003e847bd5f0aa7c7bb5.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 10 | ||||
-rw-r--r-- | src/video_core/texture_cache/texture_cache_base.h | 6 |
2 files changed, 16 insertions, 0 deletions
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 @@ -120,6 +120,16 @@ 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]); } 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; |