Unverified Commit 2fb966aa by John Kessenich Committed by GitHub

Merge pull request #1375 from Igalia/nroberts/aml-arrayio

Skip outermost array when assigning locations to auto-array interfaces
parents ecbd056b 22b71f9a
...@@ -478,7 +478,16 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver ...@@ -478,7 +478,16 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver
// Placeholder. This does not do proper cross-stage lining up, nor // Placeholder. This does not do proper cross-stage lining up, nor
// work with mixed location/no-location declarations. // work with mixed location/no-location declarations.
int location = nextLocation; int location = nextLocation;
nextLocation += TIntermediate::computeTypeLocationSize(type, stage); int typeLocationSize;
// Don’t take into account the outer-most array if the stage’s
// interface is automatically an array.
if (type.getQualifier().isArrayedIo(stage)) {
TType elementType(type, 0);
typeLocationSize = TIntermediate::computeTypeLocationSize(elementType, stage);
} else {
typeLocationSize = TIntermediate::computeTypeLocationSize(type, stage);
}
nextLocation += typeLocationSize;
return location; return location;
} }
......
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