File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -440,8 +440,8 @@ core::smart_refctd_ptr<ICPUShader> CHLSLCompiler::compileToSPIRV(const char* cod
440440 hlslOptions
441441 );
442442
443- if (arg_storage )
444- delete[] arg_storage ;
443+ if (argsArray )
444+ delete[] argsArray ;
445445
446446 if (!compileResult.objectBlob )
447447 {
Original file line number Diff line number Diff line change @@ -129,7 +129,12 @@ class ShaderCompiler final : public system::IApplicationFramework
129129 m_logger->log (" nsc.exe was compiled with builtin resources disabled. Force enabling -no-nbl-builtins." , ILogger::ELL_WARNING);
130130 }
131131#endif
132-
132+ if (std::find (m_arguments.begin (), m_arguments.end (), " -E" ) == m_arguments.end ())
133+ {
134+ // Insert '-E main' into arguments if no entry point is specified
135+ m_arguments.push_back (" -E" );
136+ m_arguments.push_back (" main" );
137+ }
133138 auto shader = open_shader_file (file_to_compile);
134139 if (shader->getContentType () != IShader::E_CONTENT_TYPE::ECT_HLSL)
135140 {
You can’t perform that action at this time.
0 commit comments