1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

create the shaderlog dir in Emu.Init()

This commit is contained in:
eladash 2018-06-21 15:41:11 +03:00 committed by Ivan
parent 8f1c36d79f
commit 3e433ef05c
7 changed files with 3 additions and 11 deletions

View File

@ -1,4 +0,0 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

View File

@ -369,7 +369,6 @@ void GLFragmentProgram::Compile()
const char* str = shader.c_str();
const int strlen = ::narrow<int>(shader.length());
fs::create_path(fs::get_config_dir() + "/shaderlog");
fs::file(fs::get_config_dir() + "shaderlog/FragmentProgram" + std::to_string(id) + ".glsl", fs::rewrite).write(str);
glShaderSource(id, 1, &str, &strlen);

View File

@ -2241,7 +2241,6 @@ namespace gl
break;
}
fs::create_path(fs::get_config_dir() + "/shaderlog");
fs::file(fs::get_config_dir() + base_name + std::to_string(m_id) + ".glsl", fs::rewrite).write(str);
}

View File

@ -352,7 +352,6 @@ void GLVertexProgram::Compile()
const char* str = shader.c_str();
const int strlen = ::narrow<int>(shader.length());
fs::create_path(fs::get_config_dir() + "/shaderlog");
fs::file(fs::get_config_dir() + "shaderlog/VertexProgram" + std::to_string(id) + ".glsl", fs::rewrite).write(str);
glShaderSource(id, 1, &str, &strlen);

View File

@ -386,7 +386,6 @@ void VKFragmentProgram::Decompile(const RSXFragmentProgram& prog)
void VKFragmentProgram::Compile()
{
fs::create_path(fs::get_config_dir() + "/shaderlog");
fs::file(fs::get_config_dir() + "shaderlog/FragmentProgram" + std::to_string(id) + ".spirv", fs::rewrite).write(shader.get_source());
handle = shader.compile();
}

View File

@ -345,7 +345,6 @@ void VKVertexProgram::Decompile(const RSXVertexProgram& prog)
void VKVertexProgram::Compile()
{
fs::create_path(fs::get_config_dir() + "/shaderlog");
fs::file(fs::get_config_dir() + "shaderlog/VertexProgram" + std::to_string(id) + ".spirv", fs::rewrite).write(shader.get_source());
handle = shader.compile();
}

View File

@ -281,6 +281,8 @@ void Emulator::Init()
const std::string dev_usb = fmt::replace_all(g_cfg.vfs.dev_usb000, "$(EmulatorDir)", emu_dir);
fs::create_path(dev_hdd0);
fs::create_path(dev_hdd1);
fs::create_path(dev_usb);
fs::create_dir(dev_hdd0 + "game/");
fs::create_dir(dev_hdd0 + "game/TEST12345/");
fs::create_dir(dev_hdd0 + "game/TEST12345/USRDIR/");
@ -294,8 +296,7 @@ void Emulator::Init()
fs::create_dir(dev_hdd0 + "disc/");
fs::create_dir(dev_hdd1 + "cache/");
fs::create_dir(dev_hdd1 + "game/");
fs::create_path(dev_hdd1);
fs::create_path(dev_usb);
fs::create_path(emu_dir + "/shaderlog");
#ifdef WITH_GDB_DEBUGGER
LOG_SUCCESS(GENERAL, "GDB debug server will be started and listening on %d upon emulator boot", (int) g_cfg.misc.gdb_server_port);