Fix issues with ProgramGL.
* Don't re-create the native GL program every link, some program state should
persist between re-linking such as bound attribute locations.
* Forward glBindAttribLocation calls to the ProgramImpl, fixes some chromium
rendering issues because chromium always binds attribute locations,
sometimes with gaps.
* Query the real attrib location before inserting it into the list of attribs.
It was unsafe to rely on the attrib having the same location as its index
into the active attributes.
BUG=angleproject:882
Change-Id: If14b4c4c2f5ebcdaa4f7c5a890b9519d6d4e6e43
Reviewed-on: https://chromium-review.googlesource.com/269991
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/ProgramD3D.cpp b/src/libANGLE/renderer/d3d/ProgramD3D.cpp
index 5bd7a95..3f3e2ba 100644
--- a/src/libANGLE/renderer/d3d/ProgramD3D.cpp
+++ b/src/libANGLE/renderer/d3d/ProgramD3D.cpp
@@ -1086,6 +1086,10 @@
return LinkResult(true, gl::Error(GL_NO_ERROR));
}
+void ProgramD3D::bindAttributeLocation(GLuint index, const std::string &name)
+{
+}
+
void ProgramD3D::getInputLayoutSignature(const gl::VertexFormat inputLayout[], GLenum signature[]) const
{
mDynamicHLSL->getInputLayoutSignature(inputLayout, signature);