Skip to content

Commit 0ab944b

Browse files
committed
Merge branch 'nsct' of github.com:Devsh-Graphics-Programming/Nabla into nsct
2 parents fd2d804 + a9f1b3d commit 0ab944b

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

tools/nsc/main.cpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
// TODO: Cypi
2-
3-
4-
// nsc input/simple_shader.hlsl -T ps_6_0 -E Main -Fo output/shader.ps
5-
61
#include "nbl/system/IApplicationFramework.h"
7-
82
#include <iostream>
93
#include <cstdlib>
104
#include <string>
@@ -35,9 +29,8 @@ class ShaderCompiler final : public system::IApplicationFramework
3529

3630
auto argc = argv.size();
3731

38-
// expect the first argument to be
39-
// .exe
40-
// second the filename of a shader to compile
32+
// expect the first argument to be nsc.exe
33+
// second argument should be input: filename of a shader to compile
4134
if (argc < 2) {
4235
m_logger->log("Insufficient arguments.", ILogger::ELL_ERROR);
4336
return false;
@@ -110,15 +103,10 @@ class ShaderCompiler final : public system::IApplicationFramework
110103
private:
111104

112105
core::smart_refctd_ptr<ICPUShader> compile_shader(const ICPUShader* shader, std::string_view sourceIdentifier) {
113-
constexpr uint32_t WorkgroupSize = 256;
114-
constexpr uint32_t WorkgroupCount = 2048;
115-
const string WorkgroupSizeAsStr = std::to_string(WorkgroupSize);
116-
117106
smart_refctd_ptr<CHLSLCompiler> hlslcompiler = make_smart_refctd_ptr<CHLSLCompiler>(smart_refctd_ptr(m_system));
118107

119108
CHLSLCompiler::SOptions options = {};
120109
options.stage = shader->getStage();
121-
//options.debugInfoFlags = IShaderCompiler::E_DEBUG_INFO_FLAGS::EDIF_LINE_BIT;
122110
options.preprocessorOptions.sourceIdentifier = sourceIdentifier;
123111
options.preprocessorOptions.logger = m_logger.get();
124112
options.dxcOptions = std::span<std::string>(m_arguments);
@@ -160,4 +148,4 @@ class ShaderCompiler final : public system::IApplicationFramework
160148

161149
};
162150

163-
NBL_MAIN_FUNC(ShaderCompiler)
151+
NBL_MAIN_FUNC(ShaderCompiler)

0 commit comments

Comments
 (0)