summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-06-25 03:25:38 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-07-09 14:14:37 +0200
commit8a6fc529a968e007f01464abadd32f9b5eb0a26c (patch)
tree189d2d4189d9e87d933eddab5260b472e6838588 /src/video_core/renderer_opengl/gl_shader_decompiler.cpp
parentshader_ir: Remove the old scanner. (diff)
downloadyuzu-8a6fc529a968e007f01464abadd32f9b5eb0a26c.tar
yuzu-8a6fc529a968e007f01464abadd32f9b5eb0a26c.tar.gz
yuzu-8a6fc529a968e007f01464abadd32f9b5eb0a26c.tar.bz2
yuzu-8a6fc529a968e007f01464abadd32f9b5eb0a26c.tar.lz
yuzu-8a6fc529a968e007f01464abadd32f9b5eb0a26c.tar.xz
yuzu-8a6fc529a968e007f01464abadd32f9b5eb0a26c.tar.zst
yuzu-8a6fc529a968e007f01464abadd32f9b5eb0a26c.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp9
1 files changed, 9 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 5f2f1510c..cedfe30b1 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -1555,6 +1555,14 @@ private:
return {};
}
+ std::string BranchIndirect(Operation operation) {
+ const std::string op_a = VisitOperand(operation, 0, Type::Uint);
+
+ code.AddLine("jmp_to = {};", op_a);
+ code.AddLine("break;");
+ return {};
+ }
+
std::string PushFlowStack(Operation operation) {
const auto stack = std::get<MetaStackClass>(operation.GetMeta());
const auto target = std::get_if<ImmediateNode>(&*operation[0]);
@@ -1789,6 +1797,7 @@ private:
&GLSLDecompiler::ImageStore,
&GLSLDecompiler::Branch,
+ &GLSLDecompiler::BranchIndirect,
&GLSLDecompiler::PushFlowStack,
&GLSLDecompiler::PopFlowStack,
&GLSLDecompiler::Exit,