mesa: Add _mesa_swap2_copy and _mesa_swap4_copy
[mesa.git] / src / mesa / main / image.h
index abd84bf2f8702583c74ca464716e56dda0a830eb..44863cc5927f16a399eef7b47fc98cc56aff847d 100644 (file)
 
 
 #include "glheader.h"
+#include "compiler.h"
 
 struct gl_context;
 struct gl_pixelstore_attrib;
 
 extern void
-_mesa_swap2( GLushort *p, GLuint n );
+_mesa_swap2_copy(GLushort *dst, GLushort *src, GLuint n);
 
 extern void
-_mesa_swap4( GLuint *p, GLuint n );
+_mesa_swap4_copy(GLuint *dst, GLuint *src, GLuint n);
+
+static inline void
+_mesa_swap2(GLushort *p, GLuint n)
+{
+   _mesa_swap2_copy(p, p, n);
+}
+
+static inline void
+_mesa_swap4(GLuint *p, GLuint n)
+{
+   _mesa_swap4_copy(p, p, n);
+}
 
 extern GLintptr
 _mesa_image_offset( GLuint dimensions,