Unverified Commit 51b86c1a by greg-lunarg Committed by GitHub

Merge pull request #2532 from juliusikkala/master

Pass environment through PreprocessDeferred
parents b0f8a0c3 6274ec5c
...@@ -1274,14 +1274,15 @@ bool PreprocessDeferred( ...@@ -1274,14 +1274,15 @@ bool PreprocessDeferred(
EShMessages messages, // warnings/errors/AST; things to print out EShMessages messages, // warnings/errors/AST; things to print out
TShader::Includer& includer, TShader::Includer& includer,
TIntermediate& intermediate, // returned tree, etc. TIntermediate& intermediate, // returned tree, etc.
std::string* outputString) std::string* outputString,
TEnvironment* environment = nullptr)
{ {
DoPreprocessing parser(outputString); DoPreprocessing parser(outputString);
return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames, return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames,
preamble, optLevel, resources, defaultVersion, preamble, optLevel, resources, defaultVersion,
defaultProfile, forceDefaultVersionAndProfile, defaultProfile, forceDefaultVersionAndProfile,
forwardCompatible, messages, intermediate, parser, forwardCompatible, messages, intermediate, parser,
false, includer); false, includer, "", environment);
} }
#endif #endif
...@@ -1918,7 +1919,8 @@ bool TShader::preprocess(const TBuiltInResource* builtInResources, ...@@ -1918,7 +1919,8 @@ bool TShader::preprocess(const TBuiltInResource* builtInResources,
return PreprocessDeferred(compiler, strings, numStrings, lengths, stringNames, preamble, return PreprocessDeferred(compiler, strings, numStrings, lengths, stringNames, preamble,
EShOptNone, builtInResources, defaultVersion, EShOptNone, builtInResources, defaultVersion,
defaultProfile, forceDefaultVersionAndProfile, defaultProfile, forceDefaultVersionAndProfile,
forwardCompatible, message, includer, *intermediate, output_string); forwardCompatible, message, includer, *intermediate, output_string,
&environment);
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment