Implement relaxed rule for opaque struct members
This commit is contained in:
parent
a3069e1df4
commit
c59b876ca0
9 changed files with 2787 additions and 2187 deletions
|
|
@ -722,6 +722,24 @@ void TParseContextBase::finish()
|
|||
if (parsingBuiltins)
|
||||
return;
|
||||
|
||||
for (const TString& relaxedSymbol : relaxedSymbols)
|
||||
{
|
||||
TSymbol* symbol = symbolTable.find(relaxedSymbol);
|
||||
TType& type = symbol->getWritableType();
|
||||
for (const TTypeLoc& typeLoc : *type.getStruct())
|
||||
{
|
||||
if (typeLoc.type->isOpaque())
|
||||
{
|
||||
typeLoc.type->getSampler() = TSampler{};
|
||||
typeLoc.type->setBasicType(EbtInt);
|
||||
TString fieldName("/*");
|
||||
fieldName.append(typeLoc.type->getFieldName());
|
||||
fieldName.append("*/");
|
||||
typeLoc.type->setFieldName(fieldName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Transfer the linkage symbols to AST nodes, preserving order.
|
||||
TIntermAggregate* linkage = new TIntermAggregate;
|
||||
for (auto i = linkageSymbols.begin(); i != linkageSymbols.end(); ++i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue