Implement location overlap error checking.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24376 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-12-05 20:07:56 +00:00
parent 2f15597a7e
commit 0b39137009
13 changed files with 146 additions and 12 deletions

View file

@ -155,6 +155,8 @@ public:
void addIoAccessed(const TString& name) { ioAccessed.insert(name); }
bool inIoAccessed(const TString& name) const { return ioAccessed.find(name) != ioAccessed.end(); }
int addUsedLocation(const TQualifier&, const TType&);
protected:
void error(TInfoSink& infoSink, const char*);
void mergeBodies(TInfoSink&, TIntermSequence& globals, const TIntermSequence& unitGlobals);
@ -164,6 +166,7 @@ protected:
void inOutLocationCheck(TInfoSink&);
TIntermSequence& findLinkerObjects() const;
bool userOutputUsed() const;
int computeTypeLocationSize(const TType&);
protected:
const EShLanguage language;
@ -194,6 +197,12 @@ protected:
std::set<TString> ioAccessed; // set of names of statically read/written I/O that might need extra checking
struct TRange {
int start;
int last;
};
std::vector<TRange> usedLocations[3]; // sets of used locations, one for each of in, out, and uniform
private:
void operator=(TIntermediate&); // prevent assignments
};