diff options
author | bunnei <bunneidev@gmail.com> | 2018-04-10 06:04:49 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-04-17 21:25:54 +0200 |
commit | 5ba71369acca9c0d58e9cea4c915a921029ddab4 (patch) | |
tree | a13b97a68a5a207c9de432f19be6d7849aa751e2 /src/video_core/renderer_opengl | |
parent | gl_shader_decompiler: Partially implement MUFU. (diff) | |
download | yuzu-5ba71369acca9c0d58e9cea4c915a921029ddab4.tar yuzu-5ba71369acca9c0d58e9cea4c915a921029ddab4.tar.gz yuzu-5ba71369acca9c0d58e9cea4c915a921029ddab4.tar.bz2 yuzu-5ba71369acca9c0d58e9cea4c915a921029ddab4.tar.lz yuzu-5ba71369acca9c0d58e9cea4c915a921029ddab4.tar.xz yuzu-5ba71369acca9c0d58e9cea4c915a921029ddab4.tar.zst yuzu-5ba71369acca9c0d58e9cea4c915a921029ddab4.zip |
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index a439da470..ba3aa7dd1 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -187,6 +187,11 @@ private: /// Generates code representing a temporary (GPR) register. std::string GetRegister(const Register& reg) { + if (stage == Maxwell3D::Regs::ShaderStage::Fragment && reg.GetIndex() < 4) { + // GPRs 0-3 are output color for the fragment shader + return std::string{"color."} + "rgba"[reg.GetIndex()]; + } + return *declr_register.insert("register_" + std::to_string(reg)).first; } |