diff options
| author | Scott Mansell <phiren@gmail.com> | 2023-01-31 00:46:10 +1300 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2023-01-31 19:41:24 +1300 |
| commit | 0da69055d9f41d838bdf94b66805540c746eaa7d (patch) | |
| tree | 74363fda70c41594e6a24d64d8e62bc78d26685f /Source/Core/VideoCommon/TextureCacheBase.h | |
| parent | 2a18b34a73f4f1bc798dab0a5eec46c222ec7429 (diff) | |
Split out everying remaining from Swap
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.h')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h index 8b9010a50e..c38f2578b9 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.h +++ b/Source/Core/VideoCommon/TextureCacheBase.h @@ -18,12 +18,15 @@ #include "Common/BitSet.h" #include "Common/CommonTypes.h" +#include "Common/Flag.h" #include "Common/MathUtil.h" + #include "VideoCommon/AbstractTexture.h" #include "VideoCommon/BPMemory.h" #include "VideoCommon/TextureConfig.h" #include "VideoCommon/TextureDecoder.h" #include "VideoCommon/TextureInfo.h" +#include "VideoCommon/VideoEvents.h" class AbstractFramebuffer; class AbstractStagingTexture; @@ -288,6 +291,9 @@ public: static bool AllCopyFilterCoefsNeeded(const std::array<u32, 3>& coefficients); static bool CopyFilterCanOverflow(const std::array<u32, 3>& coefficients); + // Will forcibly reload all textures when the frame next ends + void ForceReloadTextures() { m_force_reload_textures.Set(); } + protected: // Decodes the specified data to the GPU texture specified by entry. // Returns false if the configuration is not supported. @@ -428,6 +434,11 @@ private: // We store this in the class so that the same staging texture can be used for multiple // readbacks, saving the overhead of allocating a new buffer every time. std::unique_ptr<AbstractStagingTexture> m_readback_texture; + + void OnFrameEnd(); + + Common::Flag m_force_reload_textures; + EventHook m_frame_event = AfterFrameEvent::Register([this] { OnFrameEnd(); }, "TextureCache"); }; extern std::unique_ptr<TextureCacheBase> g_texture_cache; |
