From 48a6ab472a4759c93cf5c84e6e123704c8240135 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 18 Jan 2018 12:28:11 -0700 Subject: [PATCH] vbo: add new VBO_ATTRIBS_ masks to vbo_attrib.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit These will be used in a later patch. Reviewed-by: Mathias Fröhlich --- src/mesa/vbo/vbo_attrib.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 -- 2.30.2