diff options
author | Mathias Fröhlich <[email protected]> | 2018-02-03 20:25:39 +0100 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2018-02-06 21:20:14 +0100 |
commit | e8a9473d32149ed0f8b9b188652a7ef951324f72 (patch) | |
tree | 97eac570b05d85744e75e90254b8a51879931a5b /src/mesa/main/arrayobj.h | |
parent | 236657842b56e08055a4a9be8def8e440de78b58 (diff) |
mesa: Factor out _mesa_disable_vertex_array_attrib.
And use it in the enable code path.
Move _mesa_update_attribute_map_mode into its only remaining file.
Signed-off-by: Mathias Fröhlich <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/arrayobj.h')
-rw-r--r-- | src/mesa/main/arrayobj.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h index 411ed65c50b..5de74505bb8 100644 --- a/src/mesa/main/arrayobj.h +++ b/src/mesa/main/arrayobj.h @@ -100,32 +100,6 @@ _mesa_vao_attribute_map[ATTRIBUTE_MAP_MODE_MAX][VERT_ATTRIB_MAX]; /** - * Depending on the position and generic0 attributes enable flags select - * the one that is used for both attributes. - * The generic0 attribute takes precedence. - */ -static inline void -_mesa_update_attribute_map_mode(const struct gl_context *ctx, - struct gl_vertex_array_object *vao) -{ - /* - * There is no need to change the mapping away from the - * identity mapping if we are not in compat mode. - */ - if (ctx->API != API_OPENGL_COMPAT) - return; - /* The generic0 attribute superseeds the position attribute */ - const GLbitfield enabled = vao->_Enabled; - if (enabled & VERT_BIT_GENERIC0) - vao->_AttributeMapMode = ATTRIBUTE_MAP_MODE_GENERIC0; - else if (enabled & VERT_BIT_POS) - vao->_AttributeMapMode = ATTRIBUTE_MAP_MODE_POSITION; - else - vao->_AttributeMapMode = ATTRIBUTE_MAP_MODE_IDENTITY; -} - - -/** * Apply the position/generic0 aliasing map to a bitfield from the vao. * Use for example to convert gl_vertex_array_object::_Enabled * or gl_vertex_buffer_binding::_VertexBinding from the vao numbering to |