diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-11-18 22:35:21 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-11-23 01:28:48 +0100 |
commit | c8a48aacc0a2bfe87de74e0aa7842f5d1aec1558 (patch) | |
tree | 472a1edcad13f148cf2dc7c25de0cd7b6206e83f /src/video_core/renderer_opengl/gl_shader_gen.cpp | |
parent | gl_rasterizer: Bind graphics images to draw commands (diff) | |
download | yuzu-c8a48aacc0a2bfe87de74e0aa7842f5d1aec1558.tar yuzu-c8a48aacc0a2bfe87de74e0aa7842f5d1aec1558.tar.gz yuzu-c8a48aacc0a2bfe87de74e0aa7842f5d1aec1558.tar.bz2 yuzu-c8a48aacc0a2bfe87de74e0aa7842f5d1aec1558.tar.lz yuzu-c8a48aacc0a2bfe87de74e0aa7842f5d1aec1558.tar.xz yuzu-c8a48aacc0a2bfe87de74e0aa7842f5d1aec1558.tar.zst yuzu-c8a48aacc0a2bfe87de74e0aa7842f5d1aec1558.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 | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index af17216bd..2f601d550 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -4,6 +4,7 @@ #include <fmt/format.h> #include "video_core/engines/maxwell_3d.h" +#include "video_core/engines/shader_type.h" #include "video_core/renderer_opengl/gl_shader_decompiler.h" #include "video_core/renderer_opengl/gl_shader_gen.h" #include "video_core/shader/shader_ir.h" @@ -11,6 +12,7 @@ namespace OpenGL::GLShader { using Tegra::Engines::Maxwell3D; +using Tegra::Engines::ShaderType; using VideoCommon::Shader::CompileDepth; using VideoCommon::Shader::CompilerSettings; using VideoCommon::Shader::ProgramCode; @@ -24,10 +26,9 @@ layout (std140, binding = EMULATION_UBO_BINDING) uniform vs_config { }; )"; - const auto stage = ir_b ? ProgramType::VertexA : ProgramType::VertexB; - out += Decompile(device, ir, stage, "vertex"); + out += Decompile(device, ir, ShaderType::Vertex, "vertex"); if (ir_b) { - out += Decompile(device, *ir_b, ProgramType::VertexB, "vertex_b"); + out += Decompile(device, *ir_b, ShaderType::Vertex, "vertex_b"); } out += R"( @@ -49,7 +50,7 @@ layout (std140, binding = EMULATION_UBO_BINDING) uniform gs_config { }; )"; - out += Decompile(device, ir, ProgramType::Geometry, "geometry"); + out += Decompile(device, ir, ShaderType::Geometry, "geometry"); out += R"( void main() { @@ -76,7 +77,7 @@ layout (std140, binding = EMULATION_UBO_BINDING) uniform fs_config { }; )"; - out += Decompile(device, ir, ProgramType::Fragment, "fragment"); + out += Decompile(device, ir, ShaderType::Fragment, "fragment"); out += R"( void main() { @@ -88,7 +89,7 @@ void main() { std::string GenerateComputeShader(const Device& device, const ShaderIR& ir) { std::string out = GetCommonDeclarations(); - out += Decompile(device, ir, ProgramType::Compute, "compute"); + out += Decompile(device, ir, ShaderType::Compute, "compute"); out += R"( void main() { execute_compute(); |