aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/bufferobj.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/bufferobj.h')
-rw-r--r--mesalib/src/mesa/main/bufferobj.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/bufferobj.h b/mesalib/src/mesa/main/bufferobj.h
index f673f431f..7581b8e2c 100644
--- a/mesalib/src/mesa/main/bufferobj.h
+++ b/mesalib/src/mesa/main/bufferobj.h
@@ -75,9 +75,19 @@ _mesa_initialize_buffer_object( struct gl_buffer_object *obj,
GLuint name, GLenum target );
extern void
+_mesa_reference_buffer_object_(struct gl_context *ctx,
+ struct gl_buffer_object **ptr,
+ struct gl_buffer_object *bufObj);
+
+static INLINE void
_mesa_reference_buffer_object(struct gl_context *ctx,
struct gl_buffer_object **ptr,
- struct gl_buffer_object *bufObj);
+ struct gl_buffer_object *bufObj)
+{
+ if (*ptr != bufObj)
+ _mesa_reference_buffer_object_(ctx, ptr, bufObj);
+}
+
extern void
_mesa_init_buffer_object_functions(struct dd_function_table *driver);