summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/compiler/translator/ShaderVars.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/ShaderVars.cpp')
-rw-r--r--src/3rdparty/angle/src/compiler/translator/ShaderVars.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/ShaderVars.cpp b/src/3rdparty/angle/src/compiler/translator/ShaderVars.cpp
index 3098a7f0c9..0dbbc9e7f6 100644
--- a/src/3rdparty/angle/src/compiler/translator/ShaderVars.cpp
+++ b/src/3rdparty/angle/src/compiler/translator/ShaderVars.cpp
@@ -14,6 +14,23 @@
namespace sh
{
+namespace
+{
+
+InterpolationType GetNonAuxiliaryInterpolationType(InterpolationType interpolation)
+{
+ return (interpolation == INTERPOLATION_CENTROID ? INTERPOLATION_SMOOTH : interpolation);
+}
+
+}
+// The ES 3.0 spec is not clear on this point, but the ES 3.1 spec, and discussion
+// on Khronos.org, clarifies that a smooth/flat mismatch produces a link error,
+// but auxiliary qualifier mismatch (centroid) does not.
+bool InterpolationTypesMatch(InterpolationType a, InterpolationType b)
+{
+ return (GetNonAuxiliaryInterpolationType(a) == GetNonAuxiliaryInterpolationType(b));
+}
+
ShaderVariable::ShaderVariable()
: type(0),
precision(0),
@@ -86,7 +103,6 @@ bool ShaderVariable::findInfoByMappedName(
// 2) the top variable is an array;
// 3) otherwise.
size_t pos = mappedFullName.find_first_of(".[");
- std::string topName;
if (pos == std::string::npos)
{