GL/Vulkan: write shader program log as .glsl and .spirv (#1720)

* GL: write shader program log as .glsl

* VK: write shader program log as .spirv
This commit is contained in:
raven02 2016-05-27 02:47:37 +08:00 committed by Ivan
parent edc92843a7
commit 214d3d0f1a
3 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ struct GLTraits
fragmentProgramData.Compile();
//checkForGlError("m_fragment_prog.Compile");
fs::file(fs::get_config_dir() + "FragmentProgram.txt", fs::rewrite).write(fragmentProgramData.shader);
fs::file(fs::get_config_dir() + "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.txt", fs::rewrite).write(vertexProgramData.shader);
fs::file(fs::get_config_dir() + "VertexProgram.glsl", fs::rewrite).write(vertexProgramData.shader);
}
static

View File

@ -276,7 +276,7 @@ void VKFragmentProgram::Decompile(const RSXFragmentProgram& prog)
void VKFragmentProgram::Compile()
{
fs::file(fs::get_config_dir() + "FragmentProgram.frag", fs::rewrite).write(shader);
fs::file(fs::get_config_dir() + "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))

View File

@ -253,7 +253,7 @@ void VKVertexProgram::Decompile(const RSXVertexProgram& prog)
void VKVertexProgram::Compile()
{
fs::file(fs::get_config_dir() + "VertexProgram.vert", fs::rewrite).write(shader);
fs::file(fs::get_config_dir() + "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))