Take all attributes into account when checking for aliasing
This makes ANGLE to follow GLSL ES 3.00.6 spec section 12.46. The spec
requires that all attributes are taken into account when checking for
aliasing, regardless of if they are active or not. WebGL 2.0 spec was
also recently changed to reflect GLSL ES 3.00.6 correctly. Aliasing
checks for GLSL ES 1.00 shaders are left as-is.
BUG=chromium:829541
TEST=angle_end2end_tests, WebGL conformance tests
Change-Id: I71c36ac123f18dadf075e81f93af29321c15136b
Reviewed-on: https://chromium-review.googlesource.com/1005077
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/libANGLE/Shader.cpp b/src/libANGLE/Shader.cpp
index 3fc9ff8..a43b147 100644
--- a/src/libANGLE/Shader.cpp
+++ b/src/libANGLE/Shader.cpp
@@ -403,8 +403,8 @@
{
{
mState.mOutputVaryings = GetShaderVariables(sh::GetOutputVaryings(compilerHandle));
- mState.mActiveAttributes =
- GetActiveShaderVariables(sh::GetAttributes(compilerHandle));
+ mState.mAllAttributes = GetShaderVariables(sh::GetAttributes(compilerHandle));
+ mState.mActiveAttributes = GetActiveShaderVariables(&mState.mAllAttributes);
mState.mNumViews = sh::GetVertexShaderNumViews(compilerHandle);
}
break;
@@ -529,6 +529,12 @@
return mState.getActiveAttributes();
}
+const std::vector<sh::Attribute> &Shader::getAllAttributes(const Context *context)
+{
+ resolveCompile(context);
+ return mState.getAllAttributes();
+}
+
const std::vector<sh::OutputVariable> &Shader::getActiveOutputVariables(const Context *context)
{
resolveCompile(context);