mesa: Remove unused _mesa_all_varyings_in_vbos

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14545>
This commit is contained in:
Adam Jackson 2022-01-04 15:23:17 -05:00 committed by Marge Bot
parent 6e3cd05870
commit c1fa6bbecf
2 changed files with 0 additions and 37 deletions

View File

@ -818,39 +818,6 @@ _mesa_set_vao_immutable(struct gl_context *ctx,
}
bool
_mesa_all_varyings_in_vbos(const struct gl_vertex_array_object *vao)
{
/* Walk those enabled arrays that have the default vbo attached */
GLbitfield mask = vao->Enabled & ~vao->VertexAttribBufferMask;
while (mask) {
/* Do not use u_bit_scan64 as we can walk multiple
* attrib arrays at once
*/
const int i = ffs(mask) - 1;
const struct gl_array_attributes *attrib_array =
&vao->VertexAttrib[i];
const struct gl_vertex_buffer_binding *buffer_binding =
&vao->BufferBinding[attrib_array->BufferBindingIndex];
/* We have already masked out vao->VertexAttribBufferMask */
assert(!buffer_binding->BufferObj);
/* Bail out once we find the first non vbo with a non zero stride */
if (buffer_binding->Stride != 0)
return false;
/* Note that we cannot use the xor variant since the _BoundArray mask
* may contain array attributes that are bound but not enabled.
*/
mask &= ~buffer_binding->_BoundArrays;
}
return true;
}
/**
* Map buffer objects used in attribute arrays.
*/

View File

@ -100,10 +100,6 @@ _mesa_set_vao_immutable(struct gl_context *ctx,
struct gl_vertex_array_object *vao);
/* Returns true if all varying arrays reside in vbos */
extern bool
_mesa_all_varyings_in_vbos(const struct gl_vertex_array_object *vao);
extern void
_mesa_vao_map_arrays(struct gl_context *ctx, struct gl_vertex_array_object *vao,
GLbitfield access);