hlsl: Fix struct specifiers in uniforms.
We would miss the definition for structs specfied in uniforms. Fix
this by always checking to add the constructor. Fixes the WebGL
test 'glsl/misc/struct-specifiers-in-uniforms'.
BUG=angleproject:818
BUG=433412
Change-Id: I411e4a4477f7ef34fceb9faa77489f77d8efdce8
Reviewed-on: https://chromium-review.googlesource.com/267797
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/OutputHLSL.h b/src/compiler/translator/OutputHLSL.h
index 461ca8b..77186b0 100644
--- a/src/compiler/translator/OutputHLSL.h
+++ b/src/compiler/translator/OutputHLSL.h
@@ -93,6 +93,9 @@
TString addArrayAssignmentFunction(const TType &type);
TString addArrayConstructIntoFunction(const TType &type);
+ // Ensures if the type is a struct, the struct is defined
+ void ensureStructDefined(const TType &type);
+
sh::GLenum mShaderType;
int mShaderVersion;
const TExtensionBehavior &mExtensionBehavior;