diff options
author | Oliver Wolff <oliver.wolff@theqtcompany.com> | 2016-03-24 12:38:18 +0100 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2016-04-25 05:57:38 +0000 |
commit | e12ba07322cd61c5cf50c25ed8d1f08f6b1ff879 (patch) | |
tree | d31a44c9f123ed764a00eff7b4fff656a07d54ab /src/3rdparty/angle/src/compiler/translator/ShaderVars.cpp | |
parent | d3dcc6f610b97be7cbfbb0a65988e5940568c825 (diff) |
Update ANGLE to chromium/2651
Change-Id: I1cd32b780b1a0b913fab870e155ae1f4f9ac40d7
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/ShaderVars.cpp')
-rw-r--r-- | src/3rdparty/angle/src/compiler/translator/ShaderVars.cpp | 74 |
1 files changed, 64 insertions, 10 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/ShaderVars.cpp b/src/3rdparty/angle/src/compiler/translator/ShaderVars.cpp index 0dbbc9e7f6..8f931b9bdd 100644 --- a/src/3rdparty/angle/src/compiler/translator/ShaderVars.cpp +++ b/src/3rdparty/angle/src/compiler/translator/ShaderVars.cpp @@ -9,7 +9,7 @@ #include <GLSLANG/ShaderLang.h> -#include "compiler/translator/compilerdebug.h" +#include "common/debug.h" namespace sh { @@ -217,31 +217,75 @@ bool Uniform::isSameUniformAtLinkTime(const Uniform &other) const 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) {} @@ -305,9 +349,14 @@ bool Varying::operator==(const Varying &other) const bool Varying::isSameVaryingAtLinkTime(const Varying &other) const { + return isSameVaryingAtLinkTime(other, 100); +} + +bool Varying::isSameVaryingAtLinkTime(const Varying &other, int shaderVersion) const +{ return (ShaderVariable::isSameVariableAtLinkTime(other, false) && interpolation == other.interpolation && - isInvariant == other.isInvariant); + (shaderVersion >= 300 || isInvariant == other.isInvariant)); } InterfaceBlock::InterfaceBlock() @@ -344,4 +393,9 @@ InterfaceBlock &InterfaceBlock::operator=(const InterfaceBlock &other) return *this; } +std::string InterfaceBlock::fieldPrefix() const +{ + return instanceName.empty() ? "" : name; } + +} // namespace sh |