diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-06-29 04:59:43 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-10-05 00:52:49 +0200 |
commit | 6fdd501113d5094f9148046c3b17cf2239e99aa5 (patch) | |
tree | 5a328292210ac4f07696bad5ea237277a7cb9113 /src/video_core/shader/decode.cpp | |
parent | shader_ir: Corrections to outward movements and misc stuffs (diff) | |
download | yuzu-6fdd501113d5094f9148046c3b17cf2239e99aa5.tar yuzu-6fdd501113d5094f9148046c3b17cf2239e99aa5.tar.gz yuzu-6fdd501113d5094f9148046c3b17cf2239e99aa5.tar.bz2 yuzu-6fdd501113d5094f9148046c3b17cf2239e99aa5.tar.lz yuzu-6fdd501113d5094f9148046c3b17cf2239e99aa5.tar.xz yuzu-6fdd501113d5094f9148046c3b17cf2239e99aa5.tar.zst yuzu-6fdd501113d5094f9148046c3b17cf2239e99aa5.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/shader/decode.cpp | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/src/video_core/shader/decode.cpp b/src/video_core/shader/decode.cpp index 47a9fd961..381e87415 100644 --- a/src/video_core/shader/decode.cpp +++ b/src/video_core/shader/decode.cpp @@ -39,36 +39,14 @@ void ShaderIR::Decode() { std::memcpy(&header, program_code.data(), sizeof(Tegra::Shader::Header)); disable_flow_stack = false; - const auto info = ScanFlow(program_code, program_size, main_offset); + const auto info = + ScanFlow(program_code, program_size, main_offset, program_manager); if (info) { const auto& shader_info = *info; coverage_begin = shader_info.start; coverage_end = shader_info.end; - if (shader_info.decompilable) { + if (shader_info.decompiled) { disable_flow_stack = true; - const auto insert_block = [this](NodeBlock& nodes, u32 label) { - if (label == static_cast<u32>(exit_branch)) { - return; - } - basic_blocks.insert({label, nodes}); - }; - const auto& blocks = shader_info.blocks; - NodeBlock current_block; - u32 current_label = static_cast<u32>(exit_branch); - for (auto& block : blocks) { - if (shader_info.labels.count(block.start) != 0) { - insert_block(current_block, current_label); - current_block.clear(); - current_label = block.start; - } - if (!block.ignore_branch) { - DecodeRangeInner(current_block, block.start, block.end); - InsertControlFlow(current_block, block); - } else { - DecodeRangeInner(current_block, block.start, block.end + 1); - } - } - insert_block(current_block, current_label); return; } LOG_WARNING(HW_GPU, "Flow Stack Removing Failed! Falling back to old method"); |