aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp15
1 files changed, 15 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 a311dbcfe..e1730821f 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -751,6 +751,11 @@ private:
Expression Visit(const Node& node) {
if (const auto operation = std::get_if<OperationNode>(&*node)) {
+ auto amend_index = operation->GetAmendIndex();
+ if (amend_index) {
+ const Node& amend_node = ir.GetAmendNode(*amend_index);
+ Visit(amend_node).CheckVoid();
+ }
const auto operation_index = static_cast<std::size_t>(operation->GetCode());
if (operation_index >= operation_decompilers.size()) {
UNREACHABLE_MSG("Out of bounds operation: {}", operation_index);
@@ -872,6 +877,11 @@ private:
}
if (const auto conditional = std::get_if<ConditionalNode>(&*node)) {
+ auto amend_index = conditional->GetAmendIndex();
+ if (amend_index) {
+ const Node& amend_node = ir.GetAmendNode(*amend_index);
+ Visit(amend_node).CheckVoid();
+ }
// It's invalid to call conditional on nested nodes, use an operation instead
code.AddLine("if ({}) {{", Visit(conditional->GetCondition()).AsBool());
++code.scope;
@@ -884,6 +894,11 @@ private:
}
if (const auto comment = std::get_if<CommentNode>(&*node)) {
+ auto amend_index = comment->GetAmendIndex();
+ if (amend_index) {
+ const Node& amend_node = ir.GetAmendNode(*amend_index);
+ Visit(amend_node).CheckVoid();
+ }
code.AddLine("// " + comment->GetText());
return {};
}