Restore r26192, r26240, r26241: Two missing files from last check in.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26224 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
150b7acd9a
commit
dd09c05e5b
@ -85,6 +85,7 @@ public:
|
|||||||
void checkIndex(TSourceLoc, const TType&, int& index);
|
void checkIndex(TSourceLoc, const TType&, int& index);
|
||||||
void handleIndexLimits(TSourceLoc, TIntermTyped* base, TIntermTyped* index);
|
void handleIndexLimits(TSourceLoc, TIntermTyped* base, TIntermTyped* index);
|
||||||
|
|
||||||
|
void makeEditable(TSymbol*&);
|
||||||
bool isIoResizeArray(const TType&) const;
|
bool isIoResizeArray(const TType&) const;
|
||||||
void fixIoArraySize(TSourceLoc, TType&);
|
void fixIoArraySize(TSourceLoc, TType&);
|
||||||
void ioArrayCheck(TSourceLoc, const TType&, const TString& identifier);
|
void ioArrayCheck(TSourceLoc, const TType&, const TString& identifier);
|
||||||
@ -279,21 +280,17 @@ protected:
|
|||||||
// - built-in block redeclarations interact with this
|
// - built-in block redeclarations interact with this
|
||||||
//
|
//
|
||||||
// Design:
|
// Design:
|
||||||
// - use a per-context "resize-list", a list of entities whose array sizes
|
// - use a per-context "resize-list", a list of symbols whose array sizes
|
||||||
// can be fixed; this is logically one list, but physically two:
|
// can be fixed
|
||||||
// * a list for nodes in the AST
|
|
||||||
// * a list for symbols in the symbol table
|
|
||||||
// this could be done a bit more simply, but this allows better error messages.
|
|
||||||
//
|
//
|
||||||
// - the resize-list starts empty at beginning of user-shader compilation, it does
|
// - the resize-list starts empty at beginning of user-shader compilation, it does
|
||||||
// not have built-ins in it
|
// not have built-ins in it
|
||||||
//
|
//
|
||||||
// - on built-in array use: copy-up symbol and add both the symbol and
|
// - on built-in array use: copyUp() symbol and add it to the resize-list
|
||||||
// its use to resize-list
|
|
||||||
//
|
//
|
||||||
// - on user array declaration: add it to the resize-list
|
// - on user array declaration: add it to the resize-list
|
||||||
//
|
//
|
||||||
// - on block redeclaration: copy-up symbol and add it to the resize-list
|
// - on block redeclaration: copyUp() symbol and add it to the resize-list
|
||||||
// * note, that appropriately gives an error if redeclaring a block that
|
// * note, that appropriately gives an error if redeclaring a block that
|
||||||
// was already used and hence already copied-up
|
// was already used and hence already copied-up
|
||||||
//
|
//
|
||||||
@ -303,7 +300,6 @@ protected:
|
|||||||
// - on seeing an array size declaration, give errors on mismatch between it and previous
|
// - on seeing an array size declaration, give errors on mismatch between it and previous
|
||||||
// array-sizing declarations
|
// array-sizing declarations
|
||||||
//
|
//
|
||||||
TVector<TIntermSymbol*> ioArrayNodeResizeList;
|
|
||||||
TVector<TSymbol*> ioArraySymbolResizeList;
|
TVector<TSymbol*> ioArraySymbolResizeList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ protected:
|
|||||||
const char** extensions; // an array of pointers to existing constant char strings
|
const char** extensions; // an array of pointers to existing constant char strings
|
||||||
|
|
||||||
//
|
//
|
||||||
// N.B.: Non-const functions that will be generally used should assert an this,
|
// N.B.: Non-const functions that will be generally used should assert on this,
|
||||||
// to avoid overwriting shared symbol-table information.
|
// to avoid overwriting shared symbol-table information.
|
||||||
//
|
//
|
||||||
bool writable;
|
bool writable;
|
||||||
@ -254,14 +254,14 @@ public:
|
|||||||
|
|
||||||
virtual const TType& getType() const
|
virtual const TType& getType() const
|
||||||
{
|
{
|
||||||
TTypeList& types = *anonContainer.getType().getStruct();
|
const TTypeList& types = *anonContainer.getType().getStruct();
|
||||||
return *types[memberNumber].type;
|
return *types[memberNumber].type;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual TType& getWritableType()
|
virtual TType& getWritableType()
|
||||||
{
|
{
|
||||||
assert(writable);
|
assert(writable);
|
||||||
TTypeList& types = *anonContainer.getType().getStruct();
|
const TTypeList& types = *anonContainer.getType().getStruct();
|
||||||
return *types[memberNumber].type;
|
return *types[memberNumber].type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ public:
|
|||||||
// An empty name means an anonymous container, exposing its members to the external scope.
|
// An empty name means an anonymous container, exposing its members to the external scope.
|
||||||
// Give it a name and insert its members in the symbol table, pointing to the container.
|
// Give it a name and insert its members in the symbol table, pointing to the container.
|
||||||
char buf[20];
|
char buf[20];
|
||||||
snprintf(buf, 20, "__anon__%d", anonId);
|
snprintf(buf, 20, "%s%d", AnonymousPrefix, anonId);
|
||||||
symbol.changeName(NewPoolTString(buf));
|
symbol.changeName(NewPoolTString(buf));
|
||||||
|
|
||||||
bool isOkay = true;
|
bool isOkay = true;
|
||||||
@ -541,9 +541,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Copy a variable or anonymous member's structure from a shared level up
|
// Copy a variable or anonymous member's structure from a shared level so that
|
||||||
// to the current level, so it can be modified without impacting other users
|
// it can be added (soon after return) to the symbol table where it can be
|
||||||
// of the shared table.
|
// modified without impacting other users of the shared table.
|
||||||
//
|
//
|
||||||
TSymbol* copyUpDeferredInsert(TSymbol* shared)
|
TSymbol* copyUpDeferredInsert(TSymbol* shared)
|
||||||
{
|
{
|
||||||
@ -568,10 +568,8 @@ public:
|
|||||||
if (shared->getAsVariable())
|
if (shared->getAsVariable())
|
||||||
return copy;
|
return copy;
|
||||||
else {
|
else {
|
||||||
// get copy of an anonymous member's container
|
|
||||||
table[currentLevel()]->insert(*copy, separateNameSpaces);
|
|
||||||
// return the copy of the anonymous member
|
// return the copy of the anonymous member
|
||||||
return table[currentLevel()]->find(shared->getName());
|
return table[globalLevel]->find(shared->getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user