Non-functional, infrastructure: Be more explicit about "implicit array sizes", improving the infrastructure for handling them. Also fix some output that was too big for its buffer.
There is more upcoming functionality for link-time sizing of implicitly-sized arrays that will use this. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26176 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
b4ef9e0d56
commit
f2d042a1fe
25 changed files with 237 additions and 237 deletions
|
|
@ -186,7 +186,7 @@ void TIntermediate::mergeBodies(TInfoSink& infoSink, TIntermSequence& globals, c
|
|||
//
|
||||
void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects)
|
||||
{
|
||||
// Error check and merge the linker objects (duplicates should not be merged)
|
||||
// Error check and merge the linker objects (duplicates should not be created)
|
||||
std::size_t initialNumLinkerObjects = linkerObjects.size();
|
||||
for (unsigned int unitLinkObj = 0; unitLinkObj < unitLinkerObjects.size(); ++unitLinkObj) {
|
||||
bool merge = true;
|
||||
|
|
@ -615,8 +615,8 @@ int TIntermediate::computeTypeLocationSize(const TType& type)
|
|||
// consecutive locations..."
|
||||
if (type.isArray()) {
|
||||
TType elementType(type, 0);
|
||||
if (type.getArraySize() == 0) {
|
||||
// TODO: are there valid cases of having an unsized array with a location? If so, running this code too early.
|
||||
if (type.isImplicitlySizedArray()) {
|
||||
// TODO: are there valid cases of having an implicitly-sized array with a location? If so, running this code too early.
|
||||
return computeTypeLocationSize(elementType);
|
||||
} else
|
||||
return type.getArraySize() * computeTypeLocationSize(elementType);
|
||||
|
|
@ -703,7 +703,7 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains
|
|||
// level to get this sequence of components."
|
||||
|
||||
if (type.isArray()) {
|
||||
assert(type.getArraySize() > 0);
|
||||
assert(type.isExplicitlySizedArray());
|
||||
TType elementType(type, 0);
|
||||
return type.getArraySize() * computeTypeXfbSize(elementType, containsDouble);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue