diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2018-03-10 08:22:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-10 08:22:28 +0100 |
| commit | a4ef133456a18178f345d3c25195bf74c0e83750 (patch) | |
| tree | 1564aa8e85c3800882466b953984a57be0bf0b0c /Source/Core/VideoCommon/ShaderGenCommon.cpp | |
| parent | 63838c013bde06ed13bfc1b5e24c53594934f641 (diff) | |
| parent | 93ab50c55584c416d32b5bbdf39f37e9c67f4105 (diff) | |
Merge pull request #6399 from stenzek/videocommon-shader-cache
VideoCommon Shader (Pipeline) Cache
Diffstat (limited to 'Source/Core/VideoCommon/ShaderGenCommon.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/ShaderGenCommon.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/Source/Core/VideoCommon/ShaderGenCommon.cpp b/Source/Core/VideoCommon/ShaderGenCommon.cpp index 8cc7e54f5c..b4cf9e9a48 100644 --- a/Source/Core/VideoCommon/ShaderGenCommon.cpp +++ b/Source/Core/VideoCommon/ShaderGenCommon.cpp @@ -37,28 +37,31 @@ ShaderHostConfig ShaderHostConfig::GetCurrent() } std::string GetDiskShaderCacheFileName(APIType api_type, const char* type, bool include_gameid, - bool include_host_config) + bool include_host_config, bool include_api) { if (!File::Exists(File::GetUserPath(D_SHADERCACHE_IDX))) File::CreateDir(File::GetUserPath(D_SHADERCACHE_IDX)); std::string filename = File::GetUserPath(D_SHADERCACHE_IDX); - switch (api_type) + if (include_api) { - case APIType::D3D: - filename += "D3D"; - break; - case APIType::OpenGL: - filename += "OpenGL"; - break; - case APIType::Vulkan: - filename += "Vulkan"; - break; - default: - break; + switch (api_type) + { + case APIType::D3D: + filename += "D3D"; + break; + case APIType::OpenGL: + filename += "OpenGL"; + break; + case APIType::Vulkan: + filename += "Vulkan"; + break; + default: + break; + } + filename += '-'; } - filename += '-'; filename += type; if (include_gameid) |
