diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2018-12-24 06:24:38 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-15 21:54:53 +0100 |
commit | e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae (patch) | |
tree | 269b0a3512d9ee97bbe7ef1e0df9ec8697056939 /src/video_core/renderer_opengl/gl_shader_gen.cpp | |
parent | shader_decode: Implement VMAD and VSETP (diff) | |
download | yuzu-e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae.tar yuzu-e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae.tar.gz yuzu-e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae.tar.bz2 yuzu-e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae.tar.lz yuzu-e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae.tar.xz yuzu-e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae.tar.zst yuzu-e1fea1e0c594cc7c5a404e7006a4b4b2f29200ae.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 | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 59f45cde3..743a9c90e 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -80,16 +80,11 @@ ProgramResult GenerateGeometryShader(const ShaderSetup& setup) { // Version is intentionally skipped in shader generation, it's added by the lazy compilation. const std::string id = fmt::format("{:016x}", setup.program.unique_identifier); - std::string out = out += "// Shader Unique Id: GS" + id + '\n'; + std::string out = "// Shader Unique Id: GS" + id + '\n'; out += "#extension GL_ARB_separate_shader_objects : enable\n"; out += GetCommonDeclarations(); - ShaderIR program_ir(setup.program.code, PROGRAM_OFFSET); - ProgramResult program = - Decompile(program_ir, Maxwell3D::Regs::ShaderStage::Geometry, "geometry"); - - out += R"( -out gl_PerVertex { + out += R"(out gl_PerVertex { vec4 gl_Position; }; @@ -103,9 +98,12 @@ layout (std140) uniform gs_config { }; )"; + ShaderIR program_ir(setup.program.code, PROGRAM_OFFSET); + ProgramResult program = + Decompile(program_ir, Maxwell3D::Regs::ShaderStage::Geometry, "geometry"); out += program.first; - out = R"( + out += R"( void main() { execute_geometry(); };)"; |