Only print legalization warning if optimizer disabled

This commit is contained in:
GregF
2018-03-29 11:49:14 -06:00
parent 7be36647fc
commit fb03a55e0f
16 changed files with 21 additions and 21 deletions

View File

@@ -9924,7 +9924,7 @@ void HlslParseContext::finish()
// Communicate out (esp. for command line) that we formed AST that will make
// illegal AST SPIR-V and it needs transforms to legalize it.
if (intermediate.needsLegalization())
if (intermediate.needsLegalization() && (messages & EShMsgHlslLegalization))
infoSink.info << "WARNING: AST will form illegal SPIR-V; need to transform to legalize";
TParseContextBase::finish();