diff options
author | Mathias Fröhlich <[email protected]> | 2018-01-27 16:07:22 +0100 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2018-02-01 22:39:07 +0100 |
commit | 3d4fb879ddbce1c5da7199ae74bc2e7ae98d1b70 (patch) | |
tree | 886e65a3a68bfd422e067e92caff2b4351d20134 /src/mesa/vbo/vbo_private.h | |
parent | b4fd63015ac7fd73e0147ff078caec47be729e87 (diff) |
vbo: Use static const VERT_ATTRIB->VBO_ATTRIB maps.
Instead of each context having its own map instance for
this purpose, use a global static const map.
v2: s,unsigned char,GLubyte,g
s,_VP_MODE_MAX,VP_MODE_MAX,g
Change comment style.
Signed-off-by: Mathias Fröhlich <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_private.h')
-rw-r--r-- | src/mesa/vbo/vbo_private.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/mesa/vbo/vbo_private.h b/src/mesa/vbo/vbo_private.h index 7c1e3c481f1..e44a521b117 100644 --- a/src/mesa/vbo/vbo_private.h +++ b/src/mesa/vbo/vbo_private.h @@ -45,10 +45,6 @@ struct _mesa_prim; struct vbo_context { struct gl_vertex_array currval[VBO_ATTRIB_MAX]; - /** Map VERT_ATTRIB_x to VBO_ATTRIB_y */ - GLubyte map_vp_none[VERT_ATTRIB_MAX]; - GLubyte map_vp_arb[VERT_ATTRIB_MAX]; - struct vbo_exec_context exec; struct vbo_save_context save; @@ -79,7 +75,8 @@ vbo_context(struct gl_context *ctx) */ enum vp_mode { VP_FF, /**< legacy / fixed function */ - VP_SHADER /**< ARB vertex program or GLSL vertex shader */ + VP_SHADER, /**< ARB vertex program or GLSL vertex shader */ + VP_MODE_MAX /**< for sizing arrays */ }; @@ -99,6 +96,15 @@ get_vp_mode( struct gl_context *ctx ) /** + * Array to apply the fixed function material aliasing map to + * an attribute value used in vbo processing inputs to an attribute + * as they appear in the vao. + */ +extern const GLubyte +_vbo_attribute_alias_map[VP_MODE_MAX][VERT_ATTRIB_MAX]; + + +/** * Return if format is integer. The immediate mode commands only emit floats * for non-integer types, thus everything else is integer. */ |