Mesa (master): mesa: create bind_buffer_range() helper

Timothy Arceri tarceri at kemper.freedesktop.org
Mon May 29 23:35:00 UTC 2017


Module: Mesa
Branch: master
Commit: b8174a837f785087861d1f83a684bad1d8e281fa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8174a837f785087861d1f83a684bad1d8e281fa

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Mon May 22 15:47:01 2017 +1000

mesa: create bind_buffer_range() helper

This will help us add KHR_no_error support.

Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>

---

 src/mesa/main/bufferobj.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 2d3e0f2602..5aae579eaf 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -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;
@@ -4056,6 +4056,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)
 {
    GET_CURRENT_CONTEXT(ctx);




More information about the mesa-commit mailing list