summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/macros.h')
-rw-r--r--src/mesa/main/macros.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index a4c5ec67a4a..3e1227328e1 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -787,4 +787,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