ProgramGL: Mark all columns of matrix attributes as active
The active attributes are used to determine which of the vertex
attributes to enable. Matrices take up several attributes depending on
the number of column they have; this patch marks all the columns of
active matrix attributes as active.
TEST=dEQP-GLES2.functional.shaders.linkage.varying_type_mat*
BUG=angleproject:1127
Change-Id: I82f548f329f872c4e66aa0e4e71c6061a55b9987
Reviewed-on: https://chromium-review.googlesource.com/294261
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/renderer/gl/ProgramGL.cpp b/src/libANGLE/renderer/gl/ProgramGL.cpp
index a103261..5c22a46 100644
--- a/src/libANGLE/renderer/gl/ProgramGL.cpp
+++ b/src/libANGLE/renderer/gl/ProgramGL.cpp
@@ -200,7 +200,11 @@
// TODO: determine attribute precision
setShaderAttribute(static_cast<size_t>(i), attributeType, GL_NONE, attributeName, attributeSize, location);
- mActiveAttributesMask.set(location);
+ int attributeRegisterCount = gl::VariableRegisterCount(attributeType);
+ for (int offset = 0; offset < attributeRegisterCount; offset++)
+ {
+ mActiveAttributesMask.set(location + offset);
+ }
}
return LinkResult(true, gl::Error(GL_NO_ERROR));