Make the Program's semantic index D3D-only.
This concept isn't strictly necessary for GL-side validation. Instead
we can use a bitset to track active attribs, and determine is a
particular location is active.
BUG=angleproject:1123
Change-Id: If7a920a3071672116bafffb3368671f721723b65
Reviewed-on: https://chromium-review.googlesource.com/294570
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/VertexDataManager.cpp b/src/libANGLE/renderer/d3d/VertexDataManager.cpp
index 4fd4351..4ae1e8d 100644
--- a/src/libANGLE/renderer/d3d/VertexDataManager.cpp
+++ b/src/libANGLE/renderer/d3d/VertexDataManager.cpp
@@ -135,8 +135,8 @@
// Compute active enabled and active disable attributes, for speed.
// TODO(jmadill): don't recompute if there was no state change
const gl::VertexArray *vertexArray = state.getVertexArray();
- const int *semanticIndexes = state.getProgram()->getSemanticIndexes();
- const std::vector<gl::VertexAttribute> &vertexAttributes = vertexArray->getVertexAttributes();
+ const gl::Program *program = state.getProgram();
+ const auto &vertexAttributes = vertexArray->getVertexAttributes();
mActiveEnabledAttributes.clear();
mActiveDisabledAttributes.clear();
@@ -144,7 +144,7 @@
for (size_t attribIndex = 0; attribIndex < vertexAttributes.size(); ++attribIndex)
{
- if (semanticIndexes[attribIndex] != -1)
+ if (program->isAttribLocationActive(attribIndex))
{
// Resize automatically puts in empty attribs
translatedAttribs->resize(attribIndex + 1);