summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texobj.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-07-14 08:09:21 -0600
committerBrian Paul <[email protected]>2011-07-14 08:14:13 -0600
commitdb0f2b363750d57652140c68c9436f1d2d540a87 (patch)
treeb8d400db6f85fba95450a6a3f84f9c3f8b5e1b3d /src/mesa/main/texobj.h
parent74142f1bf2a50fb929b593ebf7fda88da9da17f9 (diff)
mesa: use inline function wrapper for _mesa_reference_texobj()
Diffstat (limited to 'src/mesa/main/texobj.h')
-rw-r--r--src/mesa/main/texobj.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h
index 476a17537a3..1faae6f7e30 100644
--- a/src/mesa/main/texobj.h
+++ b/src/mesa/main/texobj.h
@@ -32,6 +32,7 @@
#define TEXTOBJ_H
+#include "compiler.h"
#include "glheader.h"
struct gl_context;
@@ -64,8 +65,17 @@ _mesa_clear_texture_object(struct gl_context *ctx,
struct gl_texture_object *obj);
extern void
+_mesa_reference_texobj_(struct gl_texture_object **ptr,
+ struct gl_texture_object *tex);
+
+static INLINE void
_mesa_reference_texobj(struct gl_texture_object **ptr,
- struct gl_texture_object *tex);
+ struct gl_texture_object *tex)
+{
+ if (*ptr != tex)
+ _mesa_reference_texobj_(ptr, tex);
+}
+
extern void
_mesa_test_texobj_completeness( const struct gl_context *ctx,