Skip to content

Commit 2dc3c48

Browse files
committed
Disable GL directives
1 parent 7f0e299 commit 2dc3c48

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/nbl/asset/utils/CGLSLCompiler.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ namespace nbl::asset::impl
103103
{
104104
auto res_str = std::move(result.contents);
105105
//employ encloseWithinExtraInclGuards() in order to prevent infinite loop of (not necesarilly direct) self-inclusions while other # directives (incl guards among them) are disabled
106-
CGLSLCompiler::disableAllDirectivesExceptIncludes(res_str);
107-
disableGlDirectives(res_str);
108-
res_str = CGLSLCompiler::encloseWithinExtraInclGuards(std::move(res_str), m_maxInclCnt, name.string().c_str());
106+
//CGLSLCompiler::disableAllDirectivesExceptIncludes(res_str);
107+
//disableGlDirectives(res_str);
108+
//res_str = CGLSLCompiler::encloseWithinExtraInclGuards(std::move(res_str), m_maxInclCnt, name.string().c_str());
109109

110110
res->content_length = res_str.size();
111111
res->content = new char[res_str.size() + 1u];
@@ -145,8 +145,8 @@ std::string CGLSLCompiler::preprocessShader(std::string&& code, IShader::E_SHADE
145145
insertion << "#define " << define.identifier << " " << define.definition << "\n";
146146
insertIntoStart(code,std::move(insertion));
147147
}
148-
disableAllDirectivesExceptIncludes(code);
149-
disableGlDirectives(code);
148+
//disableAllDirectivesExceptIncludes(code);
149+
//disableGlDirectives(code);
150150
shaderc::Compiler comp;
151151
shaderc::CompileOptions options;
152152
options.SetTargetSpirv(shaderc_spirv_version_1_6);
@@ -164,8 +164,8 @@ std::string CGLSLCompiler::preprocessShader(std::string&& code, IShader::E_SHADE
164164
}
165165

166166
auto resolvedString = std::string(res.cbegin(), std::distance(res.cbegin(), res.cend()));
167-
reenableDirectives(resolvedString);
168-
reenableGlDirectives(resolvedString);
167+
//reenableDirectives(resolvedString);
168+
//reenableGlDirectives(resolvedString);
169169
return resolvedString;
170170
}
171171

0 commit comments

Comments
 (0)