Add flags for outputting absolute paths for messages (#3467)
Uses std::filesystem to create absolute paths. Also adds "shaderFileName" to TSinkBase so it can be used during message outputs.
This commit is contained in:
parent
e7d4ad91a9
commit
d73712b8f6
7 changed files with 73 additions and 40 deletions
|
|
@ -1434,7 +1434,8 @@ int ShCompile(
|
|||
int /*debugOptions*/,
|
||||
int defaultVersion, // use 100 for ES environment, 110 for desktop
|
||||
bool forwardCompatible, // give errors for use of deprecated features
|
||||
EShMessages messages // warnings/errors/AST; things to print out
|
||||
EShMessages messages, // warnings/errors/AST; things to print out,
|
||||
const char *shaderFileName // the filename
|
||||
)
|
||||
{
|
||||
// Map the generic handle to the C++ object
|
||||
|
|
@ -1450,6 +1451,9 @@ int ShCompile(
|
|||
|
||||
compiler->infoSink.info.erase();
|
||||
compiler->infoSink.debug.erase();
|
||||
compiler->infoSink.info.setShaderFileName(shaderFileName);
|
||||
compiler->infoSink.debug.setShaderFileName(shaderFileName);
|
||||
|
||||
|
||||
TIntermediate intermediate(compiler->getLanguage());
|
||||
TShader::ForbidIncluder includer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue