Reject shaders using attribute aliasing.
The current code rejects any shaders that use more than the caps
allow, but a bug would crash us before the check. We don't support
aliasing in shaders that use a lot of uniforms because this
causes problems with the D3D back-end, currently. This changes the
crash in the dEQP aliasing tests to a link error.
See dEQP-GLES2.functional.attribute_location.bind_aliasing.*
BUG=angleproject:901
Change-Id: I6906d3345abe9f89cfa0aa6cec4be26b5b2851d0
Reviewed-on: https://chromium-review.googlesource.com/266928
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
diff --git a/src/libANGLE/renderer/gl/ProgramGL.cpp b/src/libANGLE/renderer/gl/ProgramGL.cpp
index ab16fe5..debbec7 100644
--- a/src/libANGLE/renderer/gl/ProgramGL.cpp
+++ b/src/libANGLE/renderer/gl/ProgramGL.cpp
@@ -183,12 +183,8 @@
std::string attributeName(&attributeNameBuffer[0], attributeNameLength);
- mShaderAttributes[i].type = attributeType;
// TODO: determine attribute precision
- mShaderAttributes[i].precision = GL_NONE;
- mShaderAttributes[i].name = attributeName;
- mShaderAttributes[i].arraySize = attributeSize;
- mShaderAttributes[i].location = i;
+ setShaderAttribute(static_cast<size_t>(i), attributeType, GL_NONE, attributeName, attributeSize, i);
}
return LinkResult(true, gl::Error(GL_NO_ERROR));