summaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2019-06-24 21:25:38 -0400
committerGravatar FernandoS272019-07-09 08:14:37 -0400
commit8a6fc529a968e007f01464abadd32f9b5eb0a26c (patch)
tree189d2d4189d9e87d933eddab5260b472e6838588 /src/video_core/renderer_vulkan
parentshader_ir: Remove the old scanner. (diff)
downloadyuzu-8a6fc529a968e007f01464abadd32f9b5eb0a26c.tar.gz
yuzu-8a6fc529a968e007f01464abadd32f9b5eb0a26c.tar.xz
yuzu-8a6fc529a968e007f01464abadd32f9b5eb0a26c.zip
shader_ir: Implement BRX & BRA.CC
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_shader_decompiler.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
index 97ce214b1..1bb04607b 100644
--- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
+++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
@@ -949,6 +949,14 @@ private:
949 return {}; 949 return {};
950 } 950 }
951 951
952 Id BranchIndirect(Operation operation) {
953 const Id op_a = VisitOperand<Type::Uint>(operation, 0);
954
955 Emit(OpStore(jmp_to, op_a));
956 BranchingOp([&]() { Emit(OpBranch(continue_label)); });
957 return {};
958 }
959
952 Id PushFlowStack(Operation operation) { 960 Id PushFlowStack(Operation operation) {
953 const auto target = std::get_if<ImmediateNode>(&*operation[0]); 961 const auto target = std::get_if<ImmediateNode>(&*operation[0]);
954 ASSERT(target); 962 ASSERT(target);
@@ -1334,6 +1342,7 @@ private:
1334 &SPIRVDecompiler::ImageStore, 1342 &SPIRVDecompiler::ImageStore,
1335 1343
1336 &SPIRVDecompiler::Branch, 1344 &SPIRVDecompiler::Branch,
1345 &SPIRVDecompiler::BranchIndirect,
1337 &SPIRVDecompiler::PushFlowStack, 1346 &SPIRVDecompiler::PushFlowStack,
1338 &SPIRVDecompiler::PopFlowStack, 1347 &SPIRVDecompiler::PopFlowStack,
1339 &SPIRVDecompiler::Exit, 1348 &SPIRVDecompiler::Exit,