From ea528a1ced9614852b90735e9b08b635d80728e0 Mon Sep 17 00:00:00 2001 From: raven02 Date: Tue, 14 Jun 2016 00:53:50 +0800 Subject: [PATCH] Write shader log in seperate directory (#1755) Write shader log in separate directory --- bin/shaderlog/.gitignore | 4 ++++ rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h | 4 ++-- rpcs3/Emu/RSX/GL/GLProgramBuffer.h | 4 ++-- rpcs3/Emu/RSX/VK/VKFragmentProgram.cpp | 2 +- rpcs3/Emu/RSX/VK/VKVertexProgram.cpp | 2 +- rpcs3/rpcs3.cpp | 2 +- 6 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 bin/shaderlog/.gitignore diff --git a/bin/shaderlog/.gitignore b/bin/shaderlog/.gitignore new file mode 100644 index 0000000000..5e7d2734cf --- /dev/null +++ b/bin/shaderlog/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h index 2fc7de5364..0ece930e2a 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h +++ b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h @@ -130,7 +130,7 @@ struct D3D12Traits } } - fs::file(fs::get_config_dir() + "FragmentProgram" + std::to_string(ID) + ".hlsl", fs::rewrite).write(shader); + fs::file(fs::get_config_dir() + "shaderlog/FragmentProgram" + std::to_string(ID) + ".hlsl", fs::rewrite).write(shader); fragmentProgramData.id = (u32)ID; } @@ -141,7 +141,7 @@ struct D3D12Traits std::string shaderCode = VS.Decompile(); vertexProgramData.Compile(shaderCode, Shader::SHADER_TYPE::SHADER_TYPE_VERTEX); vertexProgramData.vertex_shader_input_count = RSXVP.rsx_vertex_inputs.size(); - fs::file(fs::get_config_dir() + "VertexProgram" + std::to_string(ID) + ".hlsl", fs::rewrite).write(shaderCode); + fs::file(fs::get_config_dir() + "shaderlog/VertexProgram" + std::to_string(ID) + ".hlsl", fs::rewrite).write(shaderCode); vertexProgramData.id = (u32)ID; } diff --git a/rpcs3/Emu/RSX/GL/GLProgramBuffer.h b/rpcs3/Emu/RSX/GL/GLProgramBuffer.h index b2705d514a..1f7ad871b2 100644 --- a/rpcs3/Emu/RSX/GL/GLProgramBuffer.h +++ b/rpcs3/Emu/RSX/GL/GLProgramBuffer.h @@ -17,7 +17,7 @@ struct GLTraits fragmentProgramData.Compile(); //checkForGlError("m_fragment_prog.Compile"); - fs::file(fs::get_config_dir() + "FragmentProgram.glsl", fs::rewrite).write(fragmentProgramData.shader); + fs::file(fs::get_config_dir() + "shaderlog/FragmentProgram.glsl", fs::rewrite).write(fragmentProgramData.shader); } static @@ -27,7 +27,7 @@ struct GLTraits vertexProgramData.Compile(); //checkForGlError("m_vertex_prog.Compile"); - fs::file(fs::get_config_dir() + "VertexProgram.glsl", fs::rewrite).write(vertexProgramData.shader); + fs::file(fs::get_config_dir() + "shaderlog/VertexProgram.glsl", fs::rewrite).write(vertexProgramData.shader); } static diff --git a/rpcs3/Emu/RSX/VK/VKFragmentProgram.cpp b/rpcs3/Emu/RSX/VK/VKFragmentProgram.cpp index a08d702857..85e60d9582 100644 --- a/rpcs3/Emu/RSX/VK/VKFragmentProgram.cpp +++ b/rpcs3/Emu/RSX/VK/VKFragmentProgram.cpp @@ -306,7 +306,7 @@ void VKFragmentProgram::Decompile(const RSXFragmentProgram& prog) void VKFragmentProgram::Compile() { - fs::file(fs::get_config_dir() + "FragmentProgram.spirv", fs::rewrite).write(shader); + fs::file(fs::get_config_dir() + "shaderlog/FragmentProgram.spirv", fs::rewrite).write(shader); std::vector spir_v; if (!vk::compile_glsl_to_spv(shader, vk::glsl::glsl_fragment_program, spir_v)) diff --git a/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp b/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp index 06e68c15c4..513a99b5ff 100644 --- a/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp +++ b/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp @@ -274,7 +274,7 @@ void VKVertexProgram::Decompile(const RSXVertexProgram& prog) void VKVertexProgram::Compile() { - fs::file(fs::get_config_dir() + "VertexProgram.spirv", fs::rewrite).write(shader); + fs::file(fs::get_config_dir() + "shaderlog/VertexProgram.spirv", fs::rewrite).write(shader); std::vector spir_v; if (!vk::compile_glsl_to_spv(shader, vk::glsl::glsl_vertex_program, spir_v)) diff --git a/rpcs3/rpcs3.cpp b/rpcs3/rpcs3.cpp index 37c83d4561..260f612a2c 100644 --- a/rpcs3/rpcs3.cpp +++ b/rpcs3/rpcs3.cpp @@ -96,7 +96,7 @@ cfg::map_entry()>> g_cfg_gs_render(cfg:: { "Null", PURE_EXPR(std::make_shared()) }, { "OpenGL", PURE_EXPR(std::make_shared()) }, #ifdef _MSC_VER - { "DX12", PURE_EXPR(std::make_shared()) }, + { "D3D12", PURE_EXPR(std::make_shared()) }, { "Vulkan", PURE_EXPR(std::make_shared()) }, #endif });