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
440
440
hlslOptions
441
441
);
442
442
443
- if (arg_storage )
444
- delete[] arg_storage ;
443
+ if (argsArray )
444
+ delete[] argsArray ;
445
445
446
446
if (!compileResult.objectBlob )
447
447
{
Original file line number Diff line number Diff line change @@ -129,7 +129,12 @@ class ShaderCompiler final : public system::IApplicationFramework
129
129
m_logger->log (" nsc.exe was compiled with builtin resources disabled. Force enabling -no-nbl-builtins." , ILogger::ELL_WARNING);
130
130
}
131
131
#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
+ }
133
138
auto shader = open_shader_file (file_to_compile);
134
139
if (shader->getContentType () != IShader::E_CONTENT_TYPE::ECT_HLSL)
135
140
{
You can’t perform that action at this time.
0 commit comments