Shader_IR: allow else derivation to be optional.

This commit is contained in:
Fernando Sahmkow 2019-09-20 21:12:06 -04:00 committed by FernandoS27
parent 8d882ef69a
commit 9e8c57f049
7 changed files with 18 additions and 10 deletions

View file

@ -516,7 +516,8 @@ std::unique_ptr<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code,
std::sort(state.block_info.begin(), state.block_info.end(),
[](const BlockInfo& a, const BlockInfo& b) -> bool { return a.start < b.start; });
if (decompiled && settings.depth != CompileDepth::NoFlowStack) {
ASTManager manager{settings.depth != CompileDepth::DecompileBackwards};
ASTManager manager{settings.depth != CompileDepth::DecompileBackwards,
settings.disable_else_derivation};
state.manager = &manager;
DecompileShader(state);
decompiled = state.manager->IsFullyDecompiled();