diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-05-15 02:26:37 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-05-22 04:16:03 +0200 |
commit | ed4e3249917c5991fd515ff846ae4b52b99153fb (patch) | |
tree | 5dc5a4240c1be246f8b68b830ab33cd0e29d9c94 /src/video_core | |
parent | vk_shader_decompiler: Don't assert for void returns (diff) | |
download | yuzu-ed4e3249917c5991fd515ff846ae4b52b99153fb.tar yuzu-ed4e3249917c5991fd515ff846ae4b52b99153fb.tar.gz yuzu-ed4e3249917c5991fd515ff846ae4b52b99153fb.tar.bz2 yuzu-ed4e3249917c5991fd515ff846ae4b52b99153fb.tar.lz yuzu-ed4e3249917c5991fd515ff846ae4b52b99153fb.tar.xz yuzu-ed4e3249917c5991fd515ff846ae4b52b99153fb.tar.zst yuzu-ed4e3249917c5991fd515ff846ae4b52b99153fb.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 4 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 960ebf1a1..f695ee1db 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -1538,7 +1538,9 @@ private: Expression target; if (const auto gpr = std::get_if<GprNode>(&*dest)) { if (gpr->GetIndex() == Register::ZeroIndex) { - // Writing to Register::ZeroIndex is a no op + // Writing to Register::ZeroIndex is a no op but we still have to visit the source + // as it might have side effects. + code.AddLine("{};", Visit(src).GetCode()); return {}; } target = {GetRegister(gpr->GetIndex()), Type::Float}; diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp index 808a265e5..1749e068e 100644 --- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp @@ -1361,7 +1361,9 @@ private: Expression target{}; if (const auto gpr = std::get_if<GprNode>(&*dest)) { if (gpr->GetIndex() == Register::ZeroIndex) { - // Writing to Register::ZeroIndex is a no op + // Writing to Register::ZeroIndex is a no op but we still have to visit its source + // because it might have side effects. + Visit(src); return {}; } target = {registers.at(gpr->GetIndex()), Type::Float}; |