summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-09-13 13:45:44 -0700
committerDylan Baker <dylan@pnwbakers.com>2019-07-08 14:27:09 -0700
commitcbdf3fa3432b2a4a217f6d44399f99713f6ae840 (patch)
tree4d34a687d1c6f27ebb11608f0db7623a2f992da6
parent0d54d6ffb2a764b32102b641db61e55e9d003e09 (diff)
downloadmesa-cbdf3fa3432b2a4a217f6d44399f99713f6ae840.tar.gz
mesa: move ADD_POINTERS to macros.h
I'm not really sure where else to put it. Since imports.h only has two things left in it (neither of which are abstractions for smoothing away libc differences) I'd like to get them out of there. macros.h is the only place I can think of to put this macro.
-rw-r--r--src/mesa/main/imports.h9
-rw-r--r--src/mesa/main/macros.h9
-rw-r--r--src/mesa/main/pbo.c2
-rw-r--r--src/mesa/tnl/t_rebase.c2
-rw-r--r--src/mesa/vbo/vbo_private.h1
5 files changed, 12 insertions, 11 deletions
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index f51e9d9b7a6..a357cd84992 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -47,15 +47,6 @@
extern "C" {
#endif
-/*
- * For GL_ARB_vertex_buffer_object we need to treat vertex array pointers
- * as offsets into buffer stores. Since the vertex array pointer and
- * buffer store pointer are both pointers and we need to add them, we use
- * this macro.
- * Both pointers/offsets are expressed in bytes.
- */
-#define ADD_POINTERS(A, B) ( (GLubyte *) (A) + (uintptr_t) (B) )
-
/**
* Sometimes we treat GLfloats as GLints. On x86 systems, moving a float
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index 6547706b6fe..97d48c42df4 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -808,4 +808,13 @@ DIFFERENT_SIGNS(GLfloat x, GLfloat y)
/* Stringify */
#define STRINGIFY(x) #x
+/*
+ * For GL_ARB_vertex_buffer_object we need to treat vertex array pointers
+ * as offsets into buffer stores. Since the vertex array pointer and
+ * buffer store pointer are both pointers and we need to add them, we use
+ * this macro.
+ * Both pointers/offsets are expressed in bytes.
+ */
+#define ADD_POINTERS(A, B) ( (GLubyte *) (A) + (uintptr_t) (B) )
+
#endif
diff --git a/src/mesa/main/pbo.c b/src/mesa/main/pbo.c
index cea55f2a0d2..0f74d326d03 100644
--- a/src/mesa/main/pbo.c
+++ b/src/mesa/main/pbo.c
@@ -36,8 +36,8 @@
#include "bufferobj.h"
#include "glformats.h"
#include "image.h"
-#include "imports.h"
#include "mtypes.h"
+#include "macros.h"
#include "pbo.h"
diff --git a/src/mesa/tnl/t_rebase.c b/src/mesa/tnl/t_rebase.c
index b6950e04fec..242fef2ee1a 100644
--- a/src/mesa/tnl/t_rebase.c
+++ b/src/mesa/tnl/t_rebase.c
@@ -50,7 +50,7 @@
#include "main/bufferobj.h"
#include "main/errors.h"
#include "main/glheader.h"
-#include "main/imports.h"
+#include "main/macros.h"
#include "main/mtypes.h"
#include "vbo/vbo.h"
diff --git a/src/mesa/vbo/vbo_private.h b/src/mesa/vbo/vbo_private.h
index 6110a6cc0e8..f8d1b2b59f4 100644
--- a/src/mesa/vbo/vbo_private.h
+++ b/src/mesa/vbo/vbo_private.h
@@ -36,6 +36,7 @@
#include "vbo/vbo_exec.h"
#include "vbo/vbo_save.h"
#include "main/varray.h"
+#include "main/macros.h"
struct _glapi_table;