From 6f37cfa289dc85360450bffc48bff74b6a7cfe71 Mon Sep 17 00:00:00 2001 From: assiduous Date: Fri, 17 Jul 2020 19:16:45 -0700 Subject: Updated DiligentFXShaderSourceStreamFactory (API 240064) --- Utilities/src/DiligentFXShaderSourceStreamFactory.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'Utilities/src/DiligentFXShaderSourceStreamFactory.cpp') diff --git a/Utilities/src/DiligentFXShaderSourceStreamFactory.cpp b/Utilities/src/DiligentFXShaderSourceStreamFactory.cpp index ab1eef5..302aa16 100644 --- a/Utilities/src/DiligentFXShaderSourceStreamFactory.cpp +++ b/Utilities/src/DiligentFXShaderSourceStreamFactory.cpp @@ -48,7 +48,15 @@ DiligentFXShaderSourceStreamFactory::DiligentFXShaderSourceStreamFactory() } } -void DiligentFXShaderSourceStreamFactory::CreateInputStream(const Char* Name, IFileStream** ppStream) +void DiligentFXShaderSourceStreamFactory::CreateInputStream(const Char* Name, + IFileStream** ppStream) +{ + CreateInputStream2(Name, CREATE_SHADER_SOURCE_INPUT_STREAM_FLAG_NONE, ppStream); +} + +void DiligentFXShaderSourceStreamFactory::CreateInputStream2(const Char* Name, + CREATE_SHADER_SOURCE_INPUT_STREAM_FLAGS Flags, + IFileStream** ppStream) { auto SourceIt = m_NameToSourceMap.find(Name); if (SourceIt != m_NameToSourceMap.end()) @@ -61,7 +69,10 @@ void DiligentFXShaderSourceStreamFactory::CreateInputStream(const Char* Name, IF else { *ppStream = nullptr; - LOG_ERROR("Failed to create input stream for source file ", Name); + if ((Flags & CREATE_SHADER_SOURCE_INPUT_STREAM_FLAG_SILENT) == 0) + { + LOG_ERROR("Failed to create input stream for source file ", Name); + } } } -- cgit v1.2.3