Refactor Program into Program and ProgramBinary.
Program manages the state and lifetime of the program object.
ProgramBinary holds the linked program and the code to do the linking.
There should be no functional change. WebGL conformance tests did not regress.
Review URL: https://codereview.appspot.com/6267047
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1143 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/VertexDataManager.cpp b/src/libGLESv2/VertexDataManager.cpp
index 910eabc..566d1e6 100644
--- a/src/libGLESv2/VertexDataManager.cpp
+++ b/src/libGLESv2/VertexDataManager.cpp
@@ -128,10 +128,11 @@
const VertexAttributeArray &attribs = mContext->getVertexAttributes();
Program *program = mContext->getCurrentProgram();
+ ProgramBinary *programBinary = program->getProgramBinary();
for (int attributeIndex = 0; attributeIndex < MAX_VERTEX_ATTRIBS; attributeIndex++)
{
- translated[attributeIndex].active = (program->getSemanticIndex(attributeIndex) != -1);
+ translated[attributeIndex].active = (programBinary->getSemanticIndex(attributeIndex) != -1);
}
// Determine the required storage size per used buffer, and invalidate static buffers that don't contain matching attributes