[Mesa-dev] [PATCH 1/3] mesa: don't try to re-generate the default buffer

Timothy Arceri tarceri at itsqueeze.com
Tue Jul 25 14:11:05 UTC 2017


It should have been created by this point.
---
 src/mesa/main/bufferobj.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 419972e..e9bb492 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -4139,10 +4139,10 @@ _mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer)
       bufObj = ctx->Shared->NullBufferObj;
    } else {
       bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+      if (!_mesa_handle_bind_buffer_gen(ctx, buffer,
+                                        &bufObj, "glBindBufferBase"))
+         return;
    }
-   if (!_mesa_handle_bind_buffer_gen(ctx, buffer,
-                                     &bufObj, "glBindBufferBase"))
-      return;
 
    if (!bufObj) {
       _mesa_error(ctx, GL_INVALID_OPERATION,
-- 
2.9.4



More information about the mesa-dev mailing list