mirror of
https://github.com/RPCS3/rpcs3
synced 2024-09-06 00:17:03 +00:00
Write shader log in seperate directory (#1755)
Write shader log in separate directory
This commit is contained in:
parent
caf5894152
commit
ea528a1ced
4
bin/shaderlog/.gitignore
vendored
Normal file
4
bin/shaderlog/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<u32> spir_v;
|
||||
if (!vk::compile_glsl_to_spv(shader, vk::glsl::glsl_fragment_program, spir_v))
|
||||
|
|
|
@ -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<u32> spir_v;
|
||||
if (!vk::compile_glsl_to_spv(shader, vk::glsl::glsl_vertex_program, spir_v))
|
||||
|
|
|
@ -96,7 +96,7 @@ cfg::map_entry<std::function<std::shared_ptr<GSRender>()>> g_cfg_gs_render(cfg::
|
|||
{ "Null", PURE_EXPR(std::make_shared<NullGSRender>()) },
|
||||
{ "OpenGL", PURE_EXPR(std::make_shared<GLGSRender>()) },
|
||||
#ifdef _MSC_VER
|
||||
{ "DX12", PURE_EXPR(std::make_shared<D3D12GSRender>()) },
|
||||
{ "D3D12", PURE_EXPR(std::make_shared<D3D12GSRender>()) },
|
||||
{ "Vulkan", PURE_EXPR(std::make_shared<VKGSRender>()) },
|
||||
#endif
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue