Complete hook up all the compile/link errors to the command-line exit status. (Also, an updated test left from the last check-in.)

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23961 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-11-07 23:33:24 +00:00
parent b0a7eb599b
commit c999ba2816
5 changed files with 43 additions and 26 deletions

View file

@ -947,6 +947,8 @@ TShader::~TShader()
//
// Turn the shader strings into a parse tree in the TIntermediate.
//
// Returns true for success.
//
bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion, bool forwardCompatible, EShMessages messages)
{
if (! InitThread())
@ -993,6 +995,8 @@ TProgram::~TProgram()
// Merge the compilation units within each stage into a single TIntermediate.
// All starting compilation units need to be the result of calling TShader::parse().
//
// Return true for success.
//
bool TProgram::link(EShMessages messages)
{
if (linked)
@ -1011,9 +1015,14 @@ bool TProgram::link(EShMessages messages)
// TODO: Link: cross-stage error checking
return error;
return ! error;
}
//
// Merge the compilation units within the given stage into a single TIntermediate.
//
// Return true for success.
//
bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
{
if (stages[stage].size() == 0)
@ -1043,7 +1052,7 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
intermediate[stage]->errorCheck(*infoSink);
return intermediate[stage]->getNumErrors() > 0;
return intermediate[stage]->getNumErrors() == 0;
}
const char* TProgram::getInfoLog()