Commit 6aca71d7 by Tim Van Patten Committed by Commit Bot

Vulkan: Full support for program interface queries

When an interface block's field is determined to be active, it's possible that the field is a struct so each of that field's fields need to be marked active as well. Bug: angleproject:3596 Test: dEQP-GLES31.functional.program_interface_query.* Test: end2end ProgramInterfaceTestES31 Change-Id: I0bf550046a7a1d3c92cc08773138a40400e5e73b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1749332Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
parent ca8ea0a4
......@@ -68,8 +68,6 @@ VarT *FindVariable(const ImmutableString &name, std::vector<VarT> *infoList)
return nullptr;
}
// Note that this shouldn't be called for interface blocks - active information is collected for
// individual fields in case of interface blocks.
void MarkActive(ShaderVariable *variable)
{
if (!variable->active)
......@@ -82,7 +80,7 @@ void MarkActive(ShaderVariable *variable)
MarkActive(&field);
}
}
ASSERT(variable->staticUse);
variable->staticUse = true;
variable->active = true;
}
}
......@@ -931,8 +929,8 @@ bool CollectVariablesTraverser::visitBinary(Visit, TIntermBinary *binaryNode)
// TODO(oetuaho): Would be nicer to record static use of fields of named interface blocks
// more accurately at parse time - now we only mark the fields statically used if they are
// active. http://anglebug.com/2440
namedBlock->fields[fieldIndex].staticUse = true;
namedBlock->fields[fieldIndex].active = true;
// We need to mark this field and all of its sub-fields, as static/active
MarkActive(&namedBlock->fields[fieldIndex]);
if (traverseIndexExpression)
{
......
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