From: Brian Paul Date: Thu, 18 Jan 2018 19:28:11 +0000 (-0700) Subject: vbo: add new VBO_ATTRIBS_ masks to vbo_attrib.h X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=48a6ab472a4759c93cf5c84e6e123704c8240135;p=mesa.git vbo: add new VBO_ATTRIBS_ masks to vbo_attrib.h These will be used in a later patch. Reviewed-by: Mathias Fröhlich --- 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