summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2018-01-18 12:28:11 -0700
committerBrian Paul <[email protected]>2018-01-29 08:35:14 -0700
commit48a6ab472a4759c93cf5c84e6e123704c8240135 (patch)
treebe6d04611c005395a775e8f32363343efa322590 /src/mesa/vbo
parent41cd3ee5a2bcb8b542c58e886442eb752b013ec7 (diff)
vbo: add new VBO_ATTRIBS_ masks to vbo_attrib.h
These will be used in a later patch. Reviewed-by: Mathias Fröhlich <[email protected]>
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