diff options
author | Lioncash <mathew1800@gmail.com> | 2019-10-05 14:52:20 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-10-05 15:14:27 +0200 |
commit | 25702b6256e33c3c2383a8674ecd69b5e7425509 (patch) | |
tree | 961871225d93e8799550d58af2d98f5d7a990074 /src/video_core/shader | |
parent | video_core/ast: Unindent most of IsFullyDecompiled() by one level (diff) | |
download | yuzu-25702b6256e33c3c2383a8674ecd69b5e7425509.tar yuzu-25702b6256e33c3c2383a8674ecd69b5e7425509.tar.gz yuzu-25702b6256e33c3c2383a8674ecd69b5e7425509.tar.bz2 yuzu-25702b6256e33c3c2383a8674ecd69b5e7425509.tar.lz yuzu-25702b6256e33c3c2383a8674ecd69b5e7425509.tar.xz yuzu-25702b6256e33c3c2383a8674ecd69b5e7425509.tar.zst yuzu-25702b6256e33c3c2383a8674ecd69b5e7425509.zip |
Diffstat (limited to 'src/video_core/shader')
-rw-r--r-- | src/video_core/shader/control_flow.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/video_core/shader/control_flow.cpp b/src/video_core/shader/control_flow.cpp index 3c3a41ba6..70e1d3239 100644 --- a/src/video_core/shader/control_flow.cpp +++ b/src/video_core/shader/control_flow.cpp @@ -479,7 +479,7 @@ std::unique_ptr<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code, auto result_out = std::make_unique<ShaderCharacteristics>(); if (settings.depth == CompileDepth::BruteForce) { result_out->settings.depth = CompileDepth::BruteForce; - return std::move(result_out); + return result_out; } CFGRebuildState state{program_code, program_size, start_address}; @@ -490,7 +490,7 @@ std::unique_ptr<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code, while (!state.inspect_queries.empty()) { if (!TryInspectAddress(state)) { result_out->settings.depth = CompileDepth::BruteForce; - return std::move(result_out); + return result_out; } } @@ -535,9 +535,10 @@ std::unique_ptr<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code, result_out->settings.depth = settings.depth; result_out->manager = std::move(manager); result_out->end = state.block_info.back().end + 1; - return std::move(result_out); + return result_out; } } + result_out->start = start_address; result_out->settings.depth = use_flow_stack ? CompileDepth::FlowStack : CompileDepth::NoFlowStack; @@ -557,8 +558,9 @@ std::unique_ptr<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code, } if (!use_flow_stack) { result_out->labels = std::move(state.labels); - return std::move(result_out); + return result_out; } + auto back = result_out->blocks.begin(); auto next = std::next(back); while (next != result_out->blocks.end()) { @@ -570,6 +572,7 @@ std::unique_ptr<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code, back = next; ++next; } - return std::move(result_out); + + return result_out; } } // namespace VideoCommon::Shader |