diff options
author | Subv <subv2112@gmail.com> | 2018-04-20 16:04:54 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-04-20 21:57:40 +0200 |
commit | d03fc774756306aa8fd89abd5522c928b46336c7 (patch) | |
tree | 89b74e72ec1dafe6889a34826e383e45c1f80def /src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |
parent | ShaderGen: Ignore the 'sched' instruction when generating shaders. (diff) | |
download | yuzu-d03fc774756306aa8fd89abd5522c928b46336c7.tar yuzu-d03fc774756306aa8fd89abd5522c928b46336c7.tar.gz yuzu-d03fc774756306aa8fd89abd5522c928b46336c7.tar.bz2 yuzu-d03fc774756306aa8fd89abd5522c928b46336c7.tar.lz yuzu-d03fc774756306aa8fd89abd5522c928b46336c7.tar.xz yuzu-d03fc774756306aa8fd89abd5522c928b46336c7.tar.zst yuzu-d03fc774756306aa8fd89abd5522c928b46336c7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 2 |
1 files changed, 2 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 c23f590cd..6db0b7d39 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -220,6 +220,8 @@ private: /// Generates code representing a temporary (GPR) register. std::string GetRegister(const Register& reg, unsigned elem = 0) { + if (reg == Register::ZeroIndex) + return "0"; if (stage == Maxwell3D::Regs::ShaderStage::Fragment && reg < 4) { // GPRs 0-3 are output color for the fragment shader return std::string{"color."} + "rgba"[(reg + elem) & 3]; |