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