Add #pragma settings flag to disable control-flow analysis.

This can be a useful debugging tool when working on skslc issues.

Change-Id: I838122828a704c9b959b0babda2909c182c66b55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376618
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
John Stiles 2021-02-26 09:47:56 -05:00 committed by Skia Commit-Bot
parent 1f57a0f1ae
commit 85e1ecf4da

View File

@ -204,6 +204,9 @@ static bool detect_shader_settings(const SkSL::String& text,
static auto s_version450CoreCaps = Factory::Version450Core();
*caps = s_version450CoreCaps.get();
}
if (settingsText.consumeSuffix(" NoControlFlowAnalysis")) {
settings->fControlFlowAnalysis = false;
}
if (settingsText.consumeSuffix(" NoDeadCodeElimination")) {
settings->fDeadCodeElimination = false;
}