diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-06-26 02:40:38 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-07-09 14:14:40 +0200 |
commit | d45fed303055fa699377bedcc3a7973bd03b7870 (patch) | |
tree | 1a21fe83b7ad852021f886cb2494ad5467ad5c66 /src/video_core/shader/control_flow.h | |
parent | shader_ir: Corrections, documenting and asserting control_flow (diff) | |
download | yuzu-d45fed303055fa699377bedcc3a7973bd03b7870.tar yuzu-d45fed303055fa699377bedcc3a7973bd03b7870.tar.gz yuzu-d45fed303055fa699377bedcc3a7973bd03b7870.tar.bz2 yuzu-d45fed303055fa699377bedcc3a7973bd03b7870.tar.lz yuzu-d45fed303055fa699377bedcc3a7973bd03b7870.tar.xz yuzu-d45fed303055fa699377bedcc3a7973bd03b7870.tar.zst yuzu-d45fed303055fa699377bedcc3a7973bd03b7870.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/shader/control_flow.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/video_core/shader/control_flow.h b/src/video_core/shader/control_flow.h index 4689b0c10..5e8ea3271 100644 --- a/src/video_core/shader/control_flow.h +++ b/src/video_core/shader/control_flow.h @@ -32,8 +32,6 @@ struct Condition { }; struct ShaderBlock { - ShaderBlock() = default; - ShaderBlock(const ShaderBlock& sb) = default; u32 start{}; u32 end{}; bool ignore_branch{}; @@ -44,7 +42,7 @@ struct ShaderBlock { bool operator==(const Branch& b) const { return std::tie(cond, kills, address) == std::tie(b.cond, b.kills, b.address); } - } branch; + } branch{}; bool operator==(const ShaderBlock& sb) const { return std::tie(start, end, ignore_branch, branch) == std::tie(sb.start, sb.end, sb.ignore_branch, sb.branch); @@ -52,14 +50,14 @@ struct ShaderBlock { }; struct ShaderCharacteristics { - std::list<ShaderBlock> blocks; + std::list<ShaderBlock> blocks{}; bool decompilable{}; - u32 start; - u32 end; + u32 start{}; + u32 end{}; std::unordered_set<u32> labels{}; }; -bool ScanFlow(const ProgramCode& program_code, u32 program_size, u32 start_address, - ShaderCharacteristics& result_out); +std::optional<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code, u32 program_size, + u32 start_address); } // namespace VideoCommon::Shader |