Support struct varying for transform feedback
Capturing struct members is vague In ES 3.00. But the ES 3.10
explicitly says that base-level members of struct are feasible for
transform feedback capture. This implementation fills the gap.
TEST=angle_end2end_tests:TrasnformFeedbackTest*
BUG=angleproject:2241
Change-Id: Ibdf3ae6c2b8b28952e2f7fef1363545cbccad389
Reviewed-on: https://chromium-review.googlesource.com/768613
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Shader.cpp b/src/libANGLE/Shader.cpp
index 94c4f3c..50d8516 100644
--- a/src/libANGLE/Shader.cpp
+++ b/src/libANGLE/Shader.cpp
@@ -534,6 +534,12 @@
{
return varying.mappedName;
}
+ else if (varying.isStruct())
+ {
+ const auto *field = FindShaderVarField(varying, tfVaryingName);
+ ASSERT(field != nullptr && !field->isStruct() && !field->isArray());
+ return varying.mappedName + "." + field->mappedName;
+ }
}
}
UNREACHABLE();