diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2018-12-09 22:33:10 +0100 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2018-12-09 22:33:33 +0100 |
commit | d5d77848e68ff9571797dd7df6242f0ab25f6fd3 (patch) | |
tree | e818fbe21b23f97907bde07e491bdbb41f8b7137 /src/video_core/renderer_opengl/gl_shader_gen.cpp | |
parent | Merge pull request #1868 from lioncash/config (diff) | |
download | yuzu-d5d77848e68ff9571797dd7df6242f0ab25f6fd3.tar yuzu-d5d77848e68ff9571797dd7df6242f0ab25f6fd3.tar.gz yuzu-d5d77848e68ff9571797dd7df6242f0ab25f6fd3.tar.bz2 yuzu-d5d77848e68ff9571797dd7df6242f0ab25f6fd3.tar.lz yuzu-d5d77848e68ff9571797dd7df6242f0ab25f6fd3.tar.xz yuzu-d5d77848e68ff9571797dd7df6242f0ab25f6fd3.tar.zst yuzu-d5d77848e68ff9571797dd7df6242f0ab25f6fd3.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_gen.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_gen.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 23ed91e27..5d0819dc5 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <fmt/format.h> #include "common/assert.h" #include "video_core/engines/maxwell_3d.h" #include "video_core/renderer_opengl/gl_shader_decompiler.h" @@ -16,6 +17,8 @@ static constexpr u32 PROGRAM_OFFSET{10}; ProgramResult GenerateVertexShader(const ShaderSetup& setup) { std::string out = "#version 430 core\n"; out += "#extension GL_ARB_separate_shader_objects : enable\n\n"; + const std::string id = fmt::format("{:016x}", setup.program.unique_identifier); + out += "// Shader Unique Id: VS" + id + "\n\n"; out += Decompiler::GetCommonDeclarations(); out += R"( @@ -84,6 +87,8 @@ void main() { ProgramResult GenerateGeometryShader(const ShaderSetup& setup) { // Version is intentionally skipped in shader generation, it's added by the lazy compilation. std::string out = "#extension GL_ARB_separate_shader_objects : enable\n\n"; + const std::string id = fmt::format("{:016x}", setup.program.unique_identifier); + out += "// Shader Unique Id: GS" + id + "\n\n"; out += Decompiler::GetCommonDeclarations(); out += "bool exec_geometry();\n"; @@ -117,6 +122,8 @@ void main() { ProgramResult GenerateFragmentShader(const ShaderSetup& setup) { std::string out = "#version 430 core\n"; out += "#extension GL_ARB_separate_shader_objects : enable\n\n"; + const std::string id = fmt::format("{:016x}", setup.program.unique_identifier); + out += "// Shader Unique Id: FS" + id + "\n\n"; out += Decompiler::GetCommonDeclarations(); out += "bool exec_fragment();\n"; |