mesa: create bind_buffer_range() helper
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 22 May 2017 05:47:01 +0000 (15:47 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 29 May 2017 22:03:32 +0000 (08:03 +1000)
This will help us add KHR_no_error support.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/mesa/main/bufferobj.c

index 2d3e0f2602cfaf152856394aee87b1cf948d8127..5aae579eaf4046c15f8c79ee282588441ba07b92 100644 (file)
@@ -3991,9 +3991,9 @@ bind_atomic_buffers(struct gl_context *ctx,
    _mesa_HashUnlockMutex(ctx->Shared->BufferObjects);
 }
 
-void GLAPIENTRY
-_mesa_BindBufferRange(GLenum target, GLuint index,
-                      GLuint buffer, GLintptr offset, GLsizeiptr size)
+static ALWAYS_INLINE void
+bind_buffer_range(GLenum target, GLuint index, GLuint buffer, GLintptr offset,
+                  GLsizeiptr size)
 {
    GET_CURRENT_CONTEXT(ctx);
    struct gl_buffer_object *bufObj;
@@ -4055,6 +4055,13 @@ _mesa_BindBufferRange(GLenum target, GLuint index,
    }
 }
 
+void GLAPIENTRY
+_mesa_BindBufferRange(GLenum target, GLuint index,
+                      GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+   bind_buffer_range(target, index, buffer, offset, size);
+}
+
 void GLAPIENTRY
 _mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer)
 {