aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/arrayobj.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/arrayobj.h')
-rw-r--r--mesalib/src/mesa/main/arrayobj.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/arrayobj.h b/mesalib/src/mesa/main/arrayobj.h
index 717c7916e..e5270fa2c 100644
--- a/mesalib/src/mesa/main/arrayobj.h
+++ b/mesalib/src/mesa/main/arrayobj.h
@@ -52,9 +52,19 @@ extern void
_mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj );
extern void
+_mesa_reference_array_object_(struct gl_context *ctx,
+ struct gl_array_object **ptr,
+ struct gl_array_object *arrayObj);
+
+static inline void
_mesa_reference_array_object(struct gl_context *ctx,
struct gl_array_object **ptr,
- struct gl_array_object *arrayObj);
+ struct gl_array_object *arrayObj)
+{
+ if (*ptr != arrayObj)
+ _mesa_reference_array_object_(ctx, ptr, arrayObj);
+}
+
extern void
_mesa_initialize_array_object( struct gl_context *ctx,