diff options
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.h')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h index 72151c9443..bcfa7898fd 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.h +++ b/Source/Core/VideoCommon/TextureCacheBase.h @@ -4,6 +4,7 @@ #pragma once #include <array> +#include <filesystem> #include <fmt/format.h> #include <map> #include <memory> @@ -35,7 +36,8 @@ struct VideoConfig; namespace VideoCommon { class CustomTextureData; -} +class GameTextureAsset; +} // namespace VideoCommon constexpr std::string_view EFB_DUMP_PREFIX = "efb1"; constexpr std::string_view XFB_DUMP_PREFIX = "xfb1"; @@ -113,6 +115,12 @@ struct fmt::formatter<EFBCopyParams> } }; +struct CachedTextureAsset +{ + std::shared_ptr<VideoCommon::GameTextureAsset> m_asset; + std::optional<std::filesystem::file_time_type> m_last_write_time; +}; + struct TCacheEntry { // common members @@ -164,6 +172,8 @@ struct TCacheEntry std::string texture_info_name = ""; + CachedTextureAsset linked_asset; + explicit TCacheEntry(std::unique_ptr<AbstractTexture> tex, std::unique_ptr<AbstractFramebuffer> fb); @@ -337,6 +347,10 @@ private: using TexPool = std::unordered_multimap<TextureConfig, TexPoolEntry>; + static bool DidLinkedAssetsChange(const TCacheEntry& entry); + + TCacheEntry* LoadImpl(const TextureInfo& texture_info, bool force_reload); + bool CreateUtilityTextures(); void SetBackupConfig(const VideoConfig& config); |
