Merge branch 'gallium-polygon-stipple'
[mesa.git] / src / mesa / main / bufferobj.h
index 09ccab31742bf845773477250f29535b6f4d2b60..f82e41411b7b1f033361ebc5d9e06b9a4029feea 100644 (file)
@@ -75,49 +75,18 @@ _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);
-
-extern GLboolean
-_mesa_validate_pbo_access(GLuint dimensions,
-                          const struct gl_pixelstore_attrib *pack,
-                          GLsizei width, GLsizei height, GLsizei depth,
-                          GLenum format, GLenum type, const GLvoid *ptr);
-
-extern const GLvoid *
-_mesa_map_pbo_source(struct gl_context *ctx,
-                     const struct gl_pixelstore_attrib *unpack,
-                     const GLvoid *src);
-
-extern const GLvoid *
-_mesa_map_validate_pbo_source(struct gl_context *ctx,
-                              GLuint dimensions,
-                              const struct gl_pixelstore_attrib *unpack,
-                              GLsizei width, GLsizei height, GLsizei depth,
-                              GLenum format, GLenum type, const GLvoid *ptr,
-                              const char *where);
-
-extern void
-_mesa_unmap_pbo_source(struct gl_context *ctx,
-                       const struct gl_pixelstore_attrib *unpack);
-
-extern void *
-_mesa_map_pbo_dest(struct gl_context *ctx,
-                   const struct gl_pixelstore_attrib *pack,
-                   GLvoid *dest);
-
-extern GLvoid *
-_mesa_map_validate_pbo_dest(struct gl_context *ctx,
-                            GLuint dimensions,
-                            const struct gl_pixelstore_attrib *unpack,
-                            GLsizei width, GLsizei height, GLsizei depth,
-                            GLenum format, GLenum type, GLvoid *ptr,
-                            const char *where);
-
-extern void
-_mesa_unmap_pbo_dest(struct gl_context *ctx,
-                     const struct gl_pixelstore_attrib *pack);
+                              struct gl_buffer_object *bufObj)
+{
+   if (*ptr != bufObj)
+      _mesa_reference_buffer_object_(ctx, ptr, bufObj);
+}
 
 
 extern void