diff options
| author | Lioncash <mai.iam2048@gmail.com> | 2023-04-19 09:14:36 -0400 |
|---|---|---|
| committer | Lioncash <mai.iam2048@gmail.com> | 2023-04-19 09:14:39 -0400 |
| commit | 07ed932a09c43ed02cece0b6e345c38ddb520aa7 (patch) | |
| tree | 7853712b27bffb60ca0f29a7053853e399ee864b /Source/Core/VideoCommon | |
| parent | 2a0b90807d47285af427852e59d5af381923b2b6 (diff) | |
Common/LinearDiskCache: Move interface into Common namespace
Gets the interface out of the global namespace.
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/ShaderCache.cpp | 10 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/ShaderCache.h | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/Source/Core/VideoCommon/ShaderCache.cpp b/Source/Core/VideoCommon/ShaderCache.cpp index 150f38b307..d1deef8424 100644 --- a/Source/Core/VideoCommon/ShaderCache.cpp +++ b/Source/Core/VideoCommon/ShaderCache.cpp @@ -228,11 +228,11 @@ static void UnserializePipelineUid(const SerializedUidType& uid, UidType& real_u template <ShaderStage stage, typename K, typename T> void ShaderCache::LoadShaderCache(T& cache, APIType api_type, const char* type, bool include_gameid) { - class CacheReader : public LinearDiskCacheReader<K, u8> + class CacheReader : public Common::LinearDiskCacheReader<K, u8> { public: CacheReader(T& cache_) : cache(cache_) {} - void Read(const K& key, const u8* value, u32 value_size) + void Read(const K& key, const u8* value, u32 value_size) override { auto shader = g_gfx->CreateShaderFromBinary(stage, value, value_size); if (shader) @@ -276,15 +276,15 @@ void ShaderCache::ClearShaderCache(T& cache) } template <typename KeyType, typename DiskKeyType, typename T> -void ShaderCache::LoadPipelineCache(T& cache, LinearDiskCache<DiskKeyType, u8>& disk_cache, +void ShaderCache::LoadPipelineCache(T& cache, Common::LinearDiskCache<DiskKeyType, u8>& disk_cache, APIType api_type, const char* type, bool include_gameid) { - class CacheReader : public LinearDiskCacheReader<DiskKeyType, u8> + class CacheReader : public Common::LinearDiskCacheReader<DiskKeyType, u8> { public: CacheReader(ShaderCache* this_ptr_, T& cache_) : this_ptr(this_ptr_), cache(cache_) {} bool AnyFailed() const { return failed; } - void Read(const DiskKeyType& key, const u8* value, u32 value_size) + void Read(const DiskKeyType& key, const u8* value, u32 value_size) override { KeyType real_uid; UnserializePipelineUid(key, real_uid); diff --git a/Source/Core/VideoCommon/ShaderCache.h b/Source/Core/VideoCommon/ShaderCache.h index 809ebb23eb..c76f7dac16 100644 --- a/Source/Core/VideoCommon/ShaderCache.h +++ b/Source/Core/VideoCommon/ShaderCache.h @@ -176,8 +176,8 @@ private: template <typename T> void ClearShaderCache(T& cache); template <typename KeyType, typename DiskKeyType, typename T> - void LoadPipelineCache(T& cache, LinearDiskCache<DiskKeyType, u8>& disk_cache, APIType api_type, - const char* type, bool include_gameid); + void LoadPipelineCache(T& cache, Common::LinearDiskCache<DiskKeyType, u8>& disk_cache, + APIType api_type, const char* type, bool include_gameid); template <typename T, typename Y> void ClearPipelineCache(T& cache, Y& disk_cache); @@ -216,7 +216,7 @@ private: bool pending = false; }; std::map<Uid, Shader> shader_map; - LinearDiskCache<Uid, u8> disk_cache; + Common::LinearDiskCache<Uid, u8> disk_cache; }; ShaderModuleCache<VertexShaderUid> m_vs_cache; ShaderModuleCache<GeometryShaderUid> m_gs_cache; @@ -229,8 +229,8 @@ private: std::map<GXUberPipelineUid, std::pair<std::unique_ptr<AbstractPipeline>, bool>> m_gx_uber_pipeline_cache; File::IOFile m_gx_pipeline_uid_cache_file; - LinearDiskCache<SerializedGXPipelineUid, u8> m_gx_pipeline_disk_cache; - LinearDiskCache<SerializedGXUberPipelineUid, u8> m_gx_uber_pipeline_disk_cache; + Common::LinearDiskCache<SerializedGXPipelineUid, u8> m_gx_pipeline_disk_cache; + Common::LinearDiskCache<SerializedGXUberPipelineUid, u8> m_gx_uber_pipeline_disk_cache; // EFB copy to VRAM/RAM pipelines std::map<TextureConversionShaderGen::TCShaderUid, std::unique_ptr<AbstractPipeline>> |
