diff options
author | Brian Paul <[email protected]> | 2011-07-14 08:09:21 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-07-14 08:09:38 -0600 |
commit | 6214963c00769a724da8c599c3aee6920f7f6c31 (patch) | |
tree | da23dccecb60a395c061de8855275143f2067321 /src/mesa/main/bufferobj.h | |
parent | 323e4bff799a657632c5777c8be6e306202953af (diff) |
main: use inline function wrapper for _mesa_reference_buffer_object()
Diffstat (limited to 'src/mesa/main/bufferobj.h')
-rw-r--r-- | src/mesa/main/bufferobj.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h index 91fa073b649..f82e41411b7 100644 --- a/src/mesa/main/bufferobj.h +++ b/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); |