We could also remove that useless assert in _mesa_handle_bind_buffer_gen() because NewBufferObj() is called when the shared state is allocated. I don't think it can be NULL here. :-)

The same change can be applied to bind_buffer_range() though.

With that fixed, series is:

Reviewed-by: Samuel Pitoiset <[email protected]>

On 07/25/2017 04:11 PM, Timothy Arceri wrote:
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,

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to