Limit shaderlog writing behind log_programs setting

This commit is contained in:
msuih 2019-05-31 17:41:33 +03:00 committed by Ivan
parent f2cac26154
commit ef587d4cdc
5 changed files with 12 additions and 7 deletions

View file

@ -365,7 +365,8 @@ void VKVertexProgram::Decompile(const RSXVertexProgram& prog)
void VKVertexProgram::Compile()
{
fs::file(fs::get_cache_dir() + "shaderlog/VertexProgram" + std::to_string(id) + ".spirv", fs::rewrite).write(shader.get_source());
if (g_cfg.video.log_programs)
fs::file(fs::get_cache_dir() + "shaderlog/VertexProgram" + std::to_string(id) + ".spirv", fs::rewrite).write(shader.get_source());
handle = shader.compile();
}