@@ -57,14 +57,17 @@ class ShaderCompiler final : public system::IApplicationFramework
5757 auto output_flag_pos = std::find (m_arguments.begin (), m_arguments.end (), " -Fo" );
5858 if (output_flag_pos != m_arguments.end ()) {
5959 if (output_flag_pos + 1 != m_arguments.end ()) {
60- output_filepath = *output_flag_pos;
60+ output_filepath = *( output_flag_pos + 1 ) ;
6161 m_logger->log (" Compiled shader code will be saved to " + output_filepath);
6262 m_arguments.erase (output_flag_pos, output_flag_pos+1 );
6363 }
6464 else {
6565 m_logger->log (" Incorrect arguments. Expecting filename after -Fo." , ILogger::ELL_ERROR);
6666 }
6767 }
68+ else {
69+ m_logger->log (" Missing arguments. Expecting -Fo {filename}." , ILogger::ELL_ERROR);
70+ }
6871
6972#ifndef NBL_EMBED_BUILTIN_RESOURCES
7073 if (!no_nbl_builtins) {
@@ -120,7 +123,7 @@ class ShaderCompiler final : public system::IApplicationFramework
120123 const ICPUShader* open_shader_file (std::string& filepath) {
121124
122125 m_assetMgr = make_smart_refctd_ptr<asset::IAssetManager>(smart_refctd_ptr (m_system));
123- auto resourceArchive = make_smart_refctd_ptr<system::CMountDirectoryArchive>(localInputCWD, smart_refctd_ptr (m_logger), m_system.get ());
126+ auto resourceArchive = make_smart_refctd_ptr<system::CMountDirectoryArchive>(path ( localInputCWD), logger_opt_smart_ptr ( smart_refctd_ptr (m_logger) ), m_system.get ());
124127 m_system->mount (std::move (resourceArchive));
125128
126129 IAssetLoader::SAssetLoadParams lp = {};
@@ -130,7 +133,7 @@ class ShaderCompiler final : public system::IApplicationFramework
130133 const auto assets = assetBundle.getContents ();
131134 if (assets.empty ()) {
132135 m_logger->log (" Could not load shader %s" , ILogger::ELL_ERROR, filepath);
133- return false ;
136+ return nullptr ;
134137 }
135138 assert (assets.size () == 1 );
136139 smart_refctd_ptr<ICPUSpecializedShader> source = IAsset::castDown<ICPUSpecializedShader>(assets[0 ]);
0 commit comments