Fix non statically used fragment input structs on HLSL
Add static use information to struct fields that mirrors the static
use information on the struct itself. This way dynamically generated
HLSL doesn't need special handling for initializing fragment inputs
if they are structs.
This fixes a problem with the previous code where dynamically
generated HLSL ended up trying to initialize structs that are not
declared in the HLSL output because they were not being referenced.
BUG=angleproject:2104
TEST=angle_end2end_tests
Change-Id: I21283ce4fe26515d62d95e61f8155dc9a9b44cf1
diff --git a/src/libANGLE/Program.cpp b/src/libANGLE/Program.cpp
index 52b8720..d6541d2 100644
--- a/src/libANGLE/Program.cpp
+++ b/src/libANGLE/Program.cpp
@@ -2388,7 +2388,8 @@
// Will get the vertex shader interpolation by default.
auto interpolation = ref.second.get()->interpolation;
- // Interpolation qualifiers must match.
+ // Note that we lose the vertex shader static use information here. The data for the
+ // variable is taken from the fragment shader.
if (output->isStruct())
{
ASSERT(!output->isArray());