Commit b960cc4a by Jamie Madill

Revert "Allow varying structs to match between stages."

This patch has a bug which breaks the GLSL to GLSL translator. See broken GPU FYI bot builds on the Chromium waterfall: http://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20%28NVIDIA%29/builds/13074 This reverts commit 489ffc4d. Change-Id: I8241c6d658f4f31af91b89af1141d3d778ff7c70 Reviewed-on: https://chromium-review.googlesource.com/249131Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 5274202f
......@@ -2545,12 +2545,7 @@ TPublicType TParseContext::addStructure(const TSourceLoc& structLine, const TSou
TStructure* structure = new TStructure(structName, fieldList);
TType* structureType = new TType(structure);
// Check for global struct, and do not assign an ID if so, to prevent us from
// rewriting the struct name to avoid scoping conflicts.
if (!symbolTable.atGlobalLevel())
{
structure->setUniqueId(TSymbolTable::nextUniqueId());
}
structure->setUniqueId(TSymbolTable::nextUniqueId());
if (!structName->empty())
{
......
......@@ -134,6 +134,7 @@ class TStructure : public TFieldListCollection
int uniqueId() const
{
ASSERT(mUniqueId != 0);
return mUniqueId;
}
......
......@@ -175,13 +175,6 @@ TString StructNameString(const TStructure &structure)
return "";
}
// For structures at global scope (tagged with ID 0) we use a consistent
// translation so that we can link varying structs.
if (structure.uniqueId() == 0)
{
return Decorate(structure.name());
}
return "ss" + str(structure.uniqueId()) + "_" + structure.name();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment