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: I7bf99870a7c93f5545325785cbecd891c6b77f8a
Reviewed-on: https://chromium-review.googlesource.com/316402
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@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);