mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
st/mesa: move a piece of _mesa_draw_array_attrib out of the loop in setup_arrays
This inlines _mesa_draw_array_attrib and moves attribute_map out of the loop. The compiler doesn't do this automatically. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27198>
This commit is contained in:
parent
3363d41a20
commit
7dd66244af
1 changed files with 4 additions and 1 deletions
|
|
@ -89,10 +89,13 @@ setup_arrays(struct st_context *st,
|
|||
|
||||
/* Process attribute array data. */
|
||||
if (vao->IsDynamic) {
|
||||
const GLubyte *attribute_map =
|
||||
_mesa_vao_attribute_map[vao->_AttributeMapMode];
|
||||
|
||||
while (mask) {
|
||||
const gl_vert_attrib attr = (gl_vert_attrib)u_bit_scan(&mask);
|
||||
const struct gl_array_attributes *const attrib =
|
||||
_mesa_draw_array_attrib(vao, attr);
|
||||
&vao->VertexAttrib[attribute_map[attr]];
|
||||
const struct gl_vertex_buffer_binding *const binding =
|
||||
&vao->BufferBinding[attrib->BufferBindingIndex];
|
||||
const unsigned bufidx = (*num_vbuffers)++;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue