Don't allocate VertexArray or TransformFeedback objects until binding.
Follow the spec more closely and only reserve IDs of vertex arrays and
transform feedback objects before binding. This saves memory and allows
the glIs* calls to succeed.
BUG=angleproject:1218
BUG=angleproject:1101
Change-Id: I0039680c39c66c1c5506f6a1a9121a71791b77e9
Reviewed-on: https://chromium-review.googlesource.com/316591
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index 4af2ac0..d5e7fba 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -2191,9 +2191,7 @@
bool ValidateBindVertexArrayBase(Context *context, GLuint array)
{
- VertexArray *vao = context->getVertexArray(array);
-
- if (!vao)
+ if (!context->isVertexArrayGenerated(array))
{
// The default VAO should always exist
ASSERT(array != 0);