From b42a74ff2cd621649edd2c21243547efa736271a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 15 Oct 2019 19:38:47 -0400 Subject: gl_shader_decompiler: Resolve fallthrough within ExprDecompiler's ExprCondCode operator() This would previously result in NeverExecute and UnusedIndex being treated as regular predicates. --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 6a610a3bc..bb972bf37 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -2316,10 +2316,13 @@ public: switch (index) { case Tegra::Shader::Pred::NeverExecute: target = "false"; + break; case Tegra::Shader::Pred::UnusedIndex: target = "true"; + break; default: target = decomp.GetPredicate(index); + break; } } else if (const auto flag = std::get_if(&*cc)) { target = decomp.GetInternalFlag(flag->GetFlag()); -- cgit v1.2.3 From 6947bf8e44409babf6c551f00c8135edd74ca19d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 15 Oct 2019 19:40:42 -0400 Subject: vk_shader_decompiler: Resolve fallthrough within ExprDecompiler's ExprCondCode operator() This would previously result in NeverExecute and UnusedIndex being treated as regular predicates. --- src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp index 8bcd04221..4fb1ca372 100644 --- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp @@ -1682,10 +1682,13 @@ public: switch (index) { case Tegra::Shader::Pred::NeverExecute: target = decomp.v_false; + break; case Tegra::Shader::Pred::UnusedIndex: target = decomp.v_true; + break; default: target = decomp.predicates.at(index); + break; } } else if (const auto flag = std::get_if(&*cc)) { target = decomp.internal_flags.at(static_cast(flag->GetFlag())); -- cgit v1.2.3