DXC Validation Error Difficult to See in AP Window (#4982)

* DXC Validation Error Difficult to See in AP Window

Renamed ReportErrorMessages() as ReportMessages()
All the message will be printed as a single AZ_Error()
or AZ_Warning() instead of mingled AZ_Error/AZ_Warning/AZ_TRacePrintf
which was making the output hard to read.

Signed-off-by: garrieta <garrieta@amazon.com>
This commit is contained in:
galibzon
2021-10-26 12:19:12 -05:00
committed by GitHub
parent a2eca9de3d
commit b541d69efc
3 changed files with 20 additions and 31 deletions
@@ -477,8 +477,8 @@ namespace AZ
preprocessorOptions.m_predefinedMacros.end(), macroDefinitionsToAdd.begin(), macroDefinitionsToAdd.end());
// Run the preprocessor.
PreprocessorData output;
PreprocessFile(prependedAzslFilePath, output, preprocessorOptions, true, true);
RHI::ReportErrorMessages(ShaderAssetBuilderName, output.diagnostics);
const bool preprocessorSuccess = PreprocessFile(prependedAzslFilePath, output, preprocessorOptions, true, true);
RHI::ReportMessages(ShaderAssetBuilderName, output.diagnostics, !preprocessorSuccess);
// Dump the preprocessed string as a flat AZSL file with extension .azslin, which will be given to AZSLc to generate the HLSL file.
AZStd::string superVariantAzslinStemName = shaderFileName;
if (!supervariantInfo.m_name.IsEmpty())