aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgreg-lunarg <greg@lunarg.com>2021-02-15 13:41:48 -0700
committerGitHub <noreply@github.com>2021-02-15 13:41:48 -0700
commit51b86c1a2b77f612293abe0a86425e82353ac3c1 (patch)
tree5808f8b076845f7a3980ba992577ebd543357dc7
parentb0f8a0c3abb943910d0a99df9da5e34d10273a4b (diff)
parent6274ec5c20f219b2a7f5a772137831d2bde2ff8b (diff)
downloadglslang-51b86c1a2b77f612293abe0a86425e82353ac3c1.tar.gz
Merge pull request #2532 from juliusikkala/master
Pass environment through PreprocessDeferred
-rw-r--r--glslang/MachineIndependent/ShaderLang.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/glslang/MachineIndependent/ShaderLang.cpp b/glslang/MachineIndependent/ShaderLang.cpp
index 5a26c098..3f793a74 100644
--- a/glslang/MachineIndependent/ShaderLang.cpp
+++ b/glslang/MachineIndependent/ShaderLang.cpp
@@ -1274,14 +1274,15 @@ bool PreprocessDeferred(
EShMessages messages, // warnings/errors/AST; things to print out
TShader::Includer& includer,
TIntermediate& intermediate, // returned tree, etc.
- std::string* outputString)
+ std::string* outputString,
+ TEnvironment* environment = nullptr)
{
DoPreprocessing parser(outputString);
return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames,
preamble, optLevel, resources, defaultVersion,
defaultProfile, forceDefaultVersionAndProfile,
forwardCompatible, messages, intermediate, parser,
- false, includer);
+ false, includer, "", environment);
}
#endif
@@ -1918,7 +1919,8 @@ bool TShader::preprocess(const TBuiltInResource* builtInResources,
return PreprocessDeferred(compiler, strings, numStrings, lengths, stringNames, preamble,
EShOptNone, builtInResources, defaultVersion,
defaultProfile, forceDefaultVersionAndProfile,
- forwardCompatible, message, includer, *intermediate, output_string);
+ forwardCompatible, message, includer, *intermediate, output_string,
+ &environment);
}
#endif