Lines Matching defs:vao

214       struct gl_vertex_array_object *vao;
218 vao = ctx->Array.LastLookedUpVAO;
220 vao = (struct gl_vertex_array_object *)
223 _mesa_reference_vao(ctx, &ctx->Array.LastLookedUpVAO, vao);
226 return vao;
263 struct gl_vertex_array_object *vao;
267 vao = ctx->Array.LastLookedUpVAO;
269 vao = (struct gl_vertex_array_object *)
278 if (!vao || (!is_ext_dsa && !vao->EverBound)) {
292 if (vao && is_ext_dsa && !vao->EverBound)
293 vao->EverBound = true;
295 _mesa_reference_vao(ctx, &ctx->Array.LastLookedUpVAO, vao);
298 return vao;
346 * Set ptr to vao w/ reference counting.
353 struct gl_vertex_array_object *vao)
355 assert(*ptr != vao);
377 if (vao) {
379 if (vao->SharedAndImmutable) {
380 p_atomic_inc(&vao->RefCount);
382 assert(vao->RefCount > 0);
383 vao->RefCount++;
386 *ptr = vao;
396 struct gl_vertex_array_object *vao,
399 memcpy(vao, &ctx->Array.DefaultVAOState, sizeof(*vao));
400 vao->Name = name;
410 compute_vbo_offset_range(const struct gl_vertex_array_object *vao,
422 GLbitfield mask = vao->Enabled & binding->_BoundArrays;
427 const GLuint off = vao->VertexAttrib[i].RelativeOffset;
438 * Update the unique binding and pos/generic0 map tracking in the vao.
440 * The idea is to build up information in the vao so that a consuming
452 * = _mesa_draw_buffer_binding(vao, i);
463 * = _mesa_draw_array_attrib(vao, attr);
476 * = _mesa_draw_buffer_binding(vao, i);
487 * = _mesa_draw_array_attrib(vao, attr);
518 struct gl_vertex_array_object *vao)
521 assert(!vao->SharedAndImmutable || (!vao->NewVertexBuffers && !vao->NewVertexElements));
539 const gl_attribute_map_mode mode = vao->_AttributeMapMode;
541 const GLbitfield enabled = vao->Enabled;
543 const GLbitfield vbos = vao->VertexAttribBufferMask;
544 const GLbitfield divisor_is_nonzero = vao->NonZeroDivisorMask;
547 vao->_EffEnabledVBO = _mesa_vao_enable_to_vp_inputs(mode, enabled & vbos);
548 vao->_EffEnabledNonZeroDivisor =
552 if (vao->IsDynamic)
556 if (ctx->Const.AllowDynamicVAOFastPath && ++vao->NumUpdates > 4) {
557 vao->IsDynamic = true;
559 vao->NewVertexElements = true;
569 const GLuint bindex = vao->VertexAttrib[i].BufferBindingIndex;
570 struct gl_vertex_buffer_binding *binding = &vao->BufferBinding[bindex];
596 struct gl_array_attributes *attrib2 = &vao->VertexAttrib[j];
621 compute_vbo_offset_range(vao, binding, &min_offset, &max_offset);
631 &vao->VertexAttrib[j];
633 &vao->BufferBinding[attrib2->BufferBindingIndex];
650 compute_vbo_offset_range(vao, binding2,
668 struct gl_array_attributes *attrib2 = &vao->VertexAttrib[j];
670 &vao->BufferBinding[attrib2->BufferBindingIndex];
692 const struct gl_array_attributes *attrib = &vao->VertexAttrib[i];
710 assert(util_bitcount(binding->_BoundArrays & vao->Enabled) == 1
711 || (vao->Enabled & ~binding->_BoundArrays) == 0);
725 const struct gl_array_attributes *attrib2 = &vao->VertexAttrib[j];
727 &vao->BufferBinding[attrib2->BufferBindingIndex];
730 assert(util_bitcount(binding2->_BoundArrays & vao->Enabled) == 1
731 || (vao->Enabled & ~binding->_BoundArrays) == 0);
761 struct gl_array_attributes *attrib2 = &vao->VertexAttrib[j];
784 if (vao->Enabled & VERT_BIT(map[attr])) {
786 &vao->VertexAttrib[map[attr]];
788 &vao->BufferBinding[attrib->BufferBindingIndex];
791 &vao->BufferBinding[attrib->_EffBufferBindingIndex];
812 struct gl_vertex_array_object *vao)
814 _mesa_update_vao_derived_arrays(ctx, vao);
815 vao->NewVertexBuffers = false;
816 vao->NewVertexElements = false;
817 vao->SharedAndImmutable = true;
825 _mesa_vao_map_arrays(struct gl_context *ctx, struct gl_vertex_array_object *vao,
828 GLbitfield mask = vao->Enabled & vao->VertexAttribBufferMask;
832 const GLubyte bindex = vao->VertexAttrib[attr].BufferBindingIndex;
833 struct gl_vertex_buffer_binding *binding = &vao->BufferBinding[bindex];
847 * Map buffer objects used in the vao, attribute arrays and index buffer.
850 _mesa_vao_map(struct gl_context *ctx, struct gl_vertex_array_object *vao,
853 struct gl_buffer_object *bo = vao->IndexBufferObj;
859 _mesa_vao_map_arrays(ctx, vao, access);
868 struct gl_vertex_array_object *vao)
870 GLbitfield mask = vao->Enabled & vao->VertexAttribBufferMask;
874 const GLubyte bindex = vao->VertexAttrib[attr].BufferBindingIndex;
875 struct gl_vertex_buffer_binding *binding = &vao->BufferBinding[bindex];
889 * Unmap buffer objects used in the vao, attribute arrays and index buffer.
892 _mesa_vao_unmap(struct gl_context *ctx, struct gl_vertex_array_object *vao)
894 struct gl_buffer_object *bo = vao->IndexBufferObj;
900 _mesa_vao_unmap_arrays(ctx, vao);
1172 struct gl_vertex_array_object *vao;
1184 vao =_mesa_lookup_vao_err(ctx, vaobj, false, "glVertexArrayElementBuffer");
1185 if (!vao)
1188 vao = _mesa_lookup_vao(ctx, vaobj);
1210 _mesa_reference_buffer_object(ctx, &vao->IndexBufferObj, bufObj);
1234 struct gl_vertex_array_object *vao;
1244 vao = _mesa_lookup_vao_err(ctx, vaobj, false, "glGetVertexArrayiv");
1245 if (!vao)
1260 param[0] = vao->IndexBufferObj ? vao->IndexBufferObj->Name : 0;