From 3e433ef05c12a9b3917d9e6d68d79b21fc3c6386 Mon Sep 17 00:00:00 2001 From: eladash Date: Thu, 21 Jun 2018 15:41:11 +0300 Subject: [PATCH] create the shaderlog dir in Emu.Init() --- bin/shaderlog/.gitignore | 4 ---- rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp | 1 - rpcs3/Emu/RSX/GL/GLHelpers.h | 1 - rpcs3/Emu/RSX/GL/GLVertexProgram.cpp | 1 - rpcs3/Emu/RSX/VK/VKFragmentProgram.cpp | 1 - rpcs3/Emu/RSX/VK/VKVertexProgram.cpp | 1 - rpcs3/Emu/System.cpp | 5 +++-- 7 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 bin/shaderlog/.gitignore diff --git a/bin/shaderlog/.gitignore b/bin/shaderlog/.gitignore deleted file mode 100644 index 5e7d2734cf..0000000000 --- a/bin/shaderlog/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp b/rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp index 9e140fa100..5545eaeb16 100644 --- a/rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp +++ b/rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp @@ -369,7 +369,6 @@ void GLFragmentProgram::Compile() const char* str = shader.c_str(); const int strlen = ::narrow(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); diff --git a/rpcs3/Emu/RSX/GL/GLHelpers.h b/rpcs3/Emu/RSX/GL/GLHelpers.h index 79d774d661..50c3a8cc56 100644 --- a/rpcs3/Emu/RSX/GL/GLHelpers.h +++ b/rpcs3/Emu/RSX/GL/GLHelpers.h @@ -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); } diff --git a/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp b/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp index a808fa0d18..9f2459e6bb 100644 --- a/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp +++ b/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp @@ -352,7 +352,6 @@ void GLVertexProgram::Compile() const char* str = shader.c_str(); const int strlen = ::narrow(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); diff --git a/rpcs3/Emu/RSX/VK/VKFragmentProgram.cpp b/rpcs3/Emu/RSX/VK/VKFragmentProgram.cpp index 854eeab0eb..c254961476 100644 --- a/rpcs3/Emu/RSX/VK/VKFragmentProgram.cpp +++ b/rpcs3/Emu/RSX/VK/VKFragmentProgram.cpp @@ -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(); } diff --git a/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp b/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp index 26b3fef57a..a9c7a43812 100644 --- a/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp +++ b/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp @@ -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(); } diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 86598f2f85..c1146c92ee 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -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);