Lines Matching refs:ve
42 struct pipe_vertex_element ve[PIPE_MAX_ATTRIBS];
108 struct u_vbuf_elements *ve, *ve_saved;
202 struct u_vbuf_elements *ve;
222 ve = cso->data;
224 ve = ((struct cso_velements *)cso_hash_iter_data(iter))->data;
227 assert(ve);
229 if (ve != mgr->ve)
230 pipe->bind_vertex_elements_state(pipe, ve->driver_cso);
231 return ve;
237 mgr->ve = u_vbuf_set_vertex_elements_internal(mgr, count, states);
388 mgr->ve->incompatible_vb_mask_all | mgr->incompatible_vb_mask |
446 for (i = 0; i < mgr->ve->count; i++) {
447 unsigned vb_index = mgr->ve->ve[i].vertex_buffer_index;
450 if (!(mgr->ve->incompatible_elem_mask & (1 << i)) &&
455 } else if (mgr->ve->ve[i].instance_divisor) {
456 if (!(mgr->ve->incompatible_elem_mask & (1 << i)) &&
463 !(mgr->ve->incompatible_elem_mask & (1 << i)) &&
479 for (i = 0; i < mgr->ve->count; i++) {
482 unsigned bit, vb_index = mgr->ve->ve[i].vertex_buffer_index;
485 if (!(mgr->ve->incompatible_elem_mask & (1 << i)) &&
499 assert(translate_is_output_format_supported(mgr->ve->native_format[i]));
510 te->input_format = mgr->ve->ve[i].src_format;
511 te->input_offset = mgr->ve->ve[i].src_offset;
512 te->output_format = mgr->ve->native_format[i];
515 k->output_stride += mgr->ve->native_format_size[i];
539 for (i = 0; i < mgr->ve->count; i++) {
543 mgr->fallback_velems[i].instance_divisor = mgr->ve->ve[i].instance_divisor;
556 memcpy(&mgr->fallback_velems[i], &mgr->ve->ve[i],
561 u_vbuf_set_vertex_elements_internal(mgr, mgr->ve->count,
572 mgr->pipe->bind_vertex_elements_state(mgr->pipe, mgr->ve->driver_cso);
596 struct u_vbuf_elements *ve = CALLOC_STRUCT(u_vbuf_elements);
599 ve->count = count;
601 memcpy(ve->ve, attribs, sizeof(struct pipe_vertex_element) * count);
607 enum pipe_format format = ve->ve[i].src_format;
609 ve->src_format_size[i] = util_format_get_blocksize(format);
611 used_buffers |= 1 << ve->ve[i].vertex_buffer_index;
613 if (!ve->ve[i].instance_divisor) {
614 ve->noninstance_vb_mask_any |= 1 << ve->ve[i].vertex_buffer_index;
675 ve->native_format[i] = format;
676 ve->native_format_size[i] =
677 util_format_get_blocksize(ve->native_format[i]);
679 if (ve->ve[i].src_format != format ||
681 ve->ve[i].src_offset % 4 != 0)) {
682 ve->incompatible_elem_mask |= 1 << i;
683 ve->incompatible_vb_mask_any |= 1 << ve->ve[i].vertex_buffer_index;
685 ve->compatible_vb_mask_any |= 1 << ve->ve[i].vertex_buffer_index;
689 ve->compatible_vb_mask_all = ~ve->incompatible_vb_mask_any & used_buffers;
690 ve->incompatible_vb_mask_all = ~ve->compatible_vb_mask_any & used_buffers;
695 ve->native_format_size[i] = align(ve->native_format_size[i], 4);
699 ve->driver_cso =
701 return ve;
707 struct u_vbuf_elements *ve = cso;
709 pipe->delete_vertex_elements_state(pipe, ve->driver_cso);
710 FREE(ve);
794 unsigned nr_velems = mgr->ve->count;
797 mgr->using_translate ? mgr->fallback_velems : mgr->ve->ve;
824 size = mgr->ve->src_format_size[i];
829 size = vb->stride * (count - 1) + mgr->ve->src_format_size[i];
833 size = vb->stride * (num_vertices - 1) + mgr->ve->src_format_size[i];
882 mgr->ve->incompatible_vb_mask_any) &
883 mgr->ve->noninstance_vb_mask_any & mgr->nonzero_stride_vb_mask) != 0;
893 mgr->ve->compatible_vb_mask_all & mgr->ve->noninstance_vb_mask_any &
1006 !mgr->ve->incompatible_elem_mask &&
1048 mgr->ve->noninstance_vb_mask_any);
1065 mgr->ve->incompatible_elem_mask) {
1075 mgr->ve->incompatible_vb_mask_all);
1135 mgr->ve_saved = mgr->ve;
1140 if (mgr->ve != mgr->ve_saved) {
1143 mgr->ve = mgr->ve_saved;
1145 mgr->ve ? mgr->ve->driver_cso : NULL);