translator: Add sh::OutputVariable type.
This replaces the dual-use of sh::Attribute, which can be a bit
confusing to people expecting a literal output variable.
Currently not used in Chromium, so should be safe to land.
BUG=angleproject:1146
Change-Id: I436f2bc9dc4ddc3709369cb2baa344c6b13a21a2
Reviewed-on: https://chromium-review.googlesource.com/296683
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/ShaderVars.cpp b/src/compiler/translator/ShaderVars.cpp
index a3fe633..7a86af6 100644
--- a/src/compiler/translator/ShaderVars.cpp
+++ b/src/compiler/translator/ShaderVars.cpp
@@ -217,31 +217,75 @@
return ShaderVariable::isSameVariableAtLinkTime(other, true);
}
-Attribute::Attribute()
- : location(-1)
+InterfaceVariable::InterfaceVariable() : location(-1)
{}
-Attribute::~Attribute()
+InterfaceVariable::~InterfaceVariable()
{}
-Attribute::Attribute(const Attribute &other)
- : ShaderVariable(other),
- location(other.location)
+InterfaceVariable::InterfaceVariable(const InterfaceVariable &other)
+ : ShaderVariable(other), location(other.location)
{}
-Attribute &Attribute::operator=(const Attribute &other)
+InterfaceVariable &InterfaceVariable::operator=(const InterfaceVariable &other)
{
ShaderVariable::operator=(other);
location = other.location;
return *this;
}
-bool Attribute::operator==(const Attribute &other) const
+bool InterfaceVariable::operator==(const InterfaceVariable &other) const
{
return (ShaderVariable::operator==(other) &&
location == other.location);
}
+Attribute::Attribute()
+{
+}
+
+Attribute::~Attribute()
+{
+}
+
+Attribute::Attribute(const Attribute &other) : InterfaceVariable(other)
+{
+}
+
+Attribute &Attribute::operator=(const Attribute &other)
+{
+ InterfaceVariable::operator=(other);
+ return *this;
+}
+
+bool Attribute::operator==(const Attribute &other) const
+{
+ return InterfaceVariable::operator==(other);
+}
+
+OutputVariable::OutputVariable()
+{
+}
+
+OutputVariable::~OutputVariable()
+{
+}
+
+OutputVariable::OutputVariable(const OutputVariable &other) : InterfaceVariable(other)
+{
+}
+
+OutputVariable &OutputVariable::operator=(const OutputVariable &other)
+{
+ InterfaceVariable::operator=(other);
+ return *this;
+}
+
+bool OutputVariable::operator==(const OutputVariable &other) const
+{
+ return InterfaceVariable::operator==(other);
+}
+
InterfaceBlockField::InterfaceBlockField()
: isRowMajorLayout(false)
{}