mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-28 01:52:29 -06:00
Only check for sanitize_mul if theres a shader in the cache
This commit is contained in:
parent
43c9695bf9
commit
e95bc52b3d
2 changed files with 5 additions and 7 deletions
|
@ -203,12 +203,10 @@ ShaderDiskCache::LoadPrecompiledFile(FileUtil::IOFile& file) {
|
||||||
|
|
||||||
ShaderCacheVersionHash file_hash{};
|
ShaderCacheVersionHash file_hash{};
|
||||||
if (!LoadArrayFromPrecompiled(file_hash.data(), file_hash.size())) {
|
if (!LoadArrayFromPrecompiled(file_hash.data(), file_hash.size())) {
|
||||||
decompressed_precompiled_cache_offset = 0;
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
if (GetShaderCacheVersionHash() != file_hash) {
|
if (GetShaderCacheVersionHash() != file_hash) {
|
||||||
LOG_INFO(Render_OpenGL, "Precompiled cache is from another version of the emulator");
|
LOG_INFO(Render_OpenGL, "Precompiled cache is from another version of the emulator");
|
||||||
decompressed_precompiled_cache_offset = 0;
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -491,14 +491,14 @@ void ShaderProgramManager::LoadDiskCache(const std::atomic_bool& stop_loading,
|
||||||
const auto dump{dumps.find(unique_identifier)};
|
const auto dump{dumps.find(unique_identifier)};
|
||||||
const auto decomp{decompiled.find(unique_identifier)};
|
const auto decomp{decompiled.find(unique_identifier)};
|
||||||
|
|
||||||
|
OGLProgram shader;
|
||||||
|
|
||||||
|
if (dump != dumps.end() && decomp != decompiled.end()) {
|
||||||
// Only load this shader if its sanitize_mul setting matches
|
// Only load this shader if its sanitize_mul setting matches
|
||||||
if (decomp->second.sanitize_mul == VideoCore::g_hw_shader_accurate_mul) {
|
if (decomp->second.sanitize_mul == VideoCore::g_hw_shader_accurate_mul) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
OGLProgram shader;
|
|
||||||
|
|
||||||
if (dump != dumps.end() && decomp != decompiled.end()) {
|
|
||||||
// If the shader is dumped, attempt to load it
|
// If the shader is dumped, attempt to load it
|
||||||
shader = GeneratePrecompiledProgram(dump->second, supported_formats);
|
shader = GeneratePrecompiledProgram(dump->second, supported_formats);
|
||||||
if (shader.handle == 0) {
|
if (shader.handle == 0) {
|
||||||
|
|
Loading…
Reference in a new issue