|
@@ -7637,6 +7637,7 @@ struct AccessChainTraverser : public TIntermTraverser {
|
|
|
{}
|
|
|
|
|
|
TString path = "";
|
|
|
+ TStorageQualifier topLevelStorageQualifier = TStorageQualifier::EvqLast;
|
|
|
|
|
|
bool visitBinary(TVisit, TIntermBinary* binary) override {
|
|
|
if (binary->getOp() == EOpIndexDirectStruct)
|
|
@@ -7667,6 +7668,8 @@ struct AccessChainTraverser : public TIntermTraverser {
|
|
|
}
|
|
|
|
|
|
void visitSymbol(TIntermSymbol* symbol) override {
|
|
|
+ if (symbol->getType().isOpaque())
|
|
|
+ topLevelStorageQualifier = symbol->getQualifier().storage;
|
|
|
if (!IsAnonymous(symbol->getName()))
|
|
|
path.append(symbol->getName());
|
|
|
}
|
|
@@ -7677,6 +7680,15 @@ TIntermNode* TParseContext::vkRelaxedRemapFunctionArgument(const TSourceLoc& loc
|
|
|
AccessChainTraverser accessChainTraverser{};
|
|
|
intermTyped->traverse(&accessChainTraverser);
|
|
|
|
|
|
+ if (accessChainTraverser.topLevelStorageQualifier == TStorageQualifier::EvqUniform)
|
|
|
+ {
|
|
|
+ TParameter param = { 0, new TType, {} };
|
|
|
+ param.type->shallowCopy(intermTyped->getType());
|
|
|
+
|
|
|
+ function->addParameter(param);
|
|
|
+ return intermTyped;
|
|
|
+ }
|
|
|
+
|
|
|
TParameter param = { NewPoolTString(accessChainTraverser.path.c_str()), new TType, {} };
|
|
|
param.type->shallowCopy(intermTyped->getType());
|
|
|
|