summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_attrib.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_attrib.h b/src/mesa/vbo/vbo_attrib.h
index ba36ab75aa5..fb178e17d67 100644
--- a/src/mesa/vbo/vbo_attrib.h
+++ b/src/mesa/vbo/vbo_attrib.h
@@ -32,6 +32,7 @@
#ifndef VBO_ATTRIB_H
#define VBO_ATTRIB_H
+#include "main/mtypes.h"
/*
* Note: The first 32 attributes match the VERT_ATTRIB_* definitions.
@@ -103,6 +104,20 @@ enum vbo_attrib {
#define VBO_ATTRIB_FIRST_MATERIAL VBO_ATTRIB_MAT_FRONT_AMBIENT
#define VBO_ATTRIB_LAST_MATERIAL VBO_ATTRIB_MAT_BACK_INDEXES
+
+/** VBO_ATTRIB_POS .. VBO_ATTRIB_POINT_SIZE */
+#define VBO_ATTRIBS_LEGACY BITFIELD64_MASK(VBO_ATTRIB_GENERIC0)
+
+/** VBO_ATTRIB_MAT_FRONT_AMBIENT .. VBO_ATTRIB_MAT_BACK_INDEXES */
+#define VBO_ATTRIBS_MATERIALS BITFIELD64_RANGE(VBO_ATTRIB_MAT_FRONT_AMBIENT, \
+ VBO_ATTRIB_LAST_MATERIAL - VBO_ATTRIB_FIRST_MATERIAL + 1)
+
+/** Shift to move legacy material attribs into generic slots */
+#define VBO_MATERIAL_SHIFT (VBO_ATTRIB_FIRST_MATERIAL - VBO_ATTRIB_GENERIC0)
+
+
+
+
#define VBO_MAX_COPIED_VERTS 3
#endif