mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
Revert r7421 and r7422.
Should fix issue 4413. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7592 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
e5210de9d5
commit
8244efcc02
42 changed files with 1647 additions and 1420 deletions
|
@ -66,16 +66,12 @@ static LPDIRECT3DPIXELSHADER9 s_ClearProgram = NULL;
|
|||
static LPDIRECT3DPIXELSHADER9 s_rgba6_to_rgb8 = NULL;
|
||||
static LPDIRECT3DPIXELSHADER9 s_rgb8_to_rgba6 = NULL;
|
||||
|
||||
class PixelShaderCacheInserter
|
||||
class PixelShaderCacheInserter : public LinearDiskCacheReader<PIXELSHADERUID, u8>
|
||||
{
|
||||
public:
|
||||
template <typename F>
|
||||
void operator()(const PIXELSHADERUID& key, u32 value_size, F get_data) const
|
||||
void Read(const PIXELSHADERUID &key, const u8 *value, u32 value_size)
|
||||
{
|
||||
std::unique_ptr<u8[]> value(new u8[value_size]);
|
||||
get_data(value.get());
|
||||
|
||||
PixelShaderCache::InsertByteCode(key, value.get(), value_size, false);
|
||||
PixelShaderCache::InsertByteCode(key, value, value_size, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -285,8 +281,8 @@ void PixelShaderCache::Init()
|
|||
char cache_filename[MAX_PATH];
|
||||
sprintf(cache_filename, "%sdx9-%s-ps.cache", File::GetUserPath(D_SHADERCACHE_IDX).c_str(),
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str());
|
||||
|
||||
g_ps_disk_cache.OpenAndRead(cache_filename, PixelShaderCacheInserter());
|
||||
PixelShaderCacheInserter inserter;
|
||||
g_ps_disk_cache.OpenAndRead(cache_filename, inserter);
|
||||
}
|
||||
|
||||
// ONLY to be used during shutdown.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue