mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
Common/LinearDiskCache: Move interface into Common namespace
Gets the interface out of the global namespace.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user