Track what ins/outs/uniforms are used, so that errors like "declare after use" or "can't use both XXX and YYY" can be issued. So far, used this for invariant, gl_FragColor et. al., and gl_FragCoord use before redeclaration.
Also made all tests in testlist include linker tests. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24156 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
23bcc02a20
commit
5134b9cf57
114 changed files with 835 additions and 24 deletions
|
|
@ -40,6 +40,7 @@
|
|||
#include "Versions.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
|
||||
class TInfoSink;
|
||||
|
||||
|
|
@ -143,6 +144,9 @@ public:
|
|||
void merge(TInfoSink&, TIntermediate&);
|
||||
void errorCheck(TInfoSink&);
|
||||
|
||||
void addIoAccessed(const TString& name) { ioAccessed.insert(name); }
|
||||
bool inIoAccessed(const TString& name) const { return ioAccessed.find(name) != ioAccessed.end(); }
|
||||
|
||||
void outputTree(TInfoSink&);
|
||||
void removeTree();
|
||||
|
||||
|
|
@ -153,7 +157,8 @@ protected:
|
|||
void mergeErrorCheck(TInfoSink&, const TIntermSymbol&, const TIntermSymbol&, bool crossStage);
|
||||
void checkCallGraphCycles(TInfoSink&);
|
||||
void inOutLocationCheck(TInfoSink&);
|
||||
TIntermSequence& findLinkerObjects();
|
||||
TIntermSequence& findLinkerObjects() const;
|
||||
bool userOutputUsed() const;
|
||||
|
||||
protected:
|
||||
const EShLanguage language;
|
||||
|
|
@ -179,9 +184,11 @@ protected:
|
|||
bool currentPath;
|
||||
bool errorGiven;
|
||||
};
|
||||
typedef std::list<TCall> TGraph;
|
||||
typedef TList<TCall> TGraph;
|
||||
TGraph callGraph;
|
||||
|
||||
std::set<TString> ioAccessed; // set of names of statically read/written I/O that might need extra checking
|
||||
|
||||
private:
|
||||
void operator=(TIntermediate&); // prevent assignments
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue