Lines Matching refs:buffer

35  * The module heavily uses bitmasks to represent per-buffer and
37 * to see if there's a non-zero stride, or user buffer, or unsupported format,
56 * one vertex buffer to another in an unused vertex buffer slot. It does
61 * Each of the 3 categories is translated to a separate buffer.
67 * 2) User buffer uploading (u_vbuf_upload_buffers)
78 * into one vertex buffer, and the indexed draw call is turned into
110 /* If (velem[i].src_format != native_format[i]), the vertex buffer
123 /* Which buffer has at least one vertex element referencing it
126 /* Which buffer has all vertex elements referencing it incompatible. */
128 /* Which buffer has at least one vertex element referencing it
132 /* Which buffer has all vertex elements referencing it compatible. */
135 /* Which buffer has at least one vertex element referencing it
184 /* The vertex buffer slot index where translated vertices have been
189 /* Which buffer is a user buffer. */
190 uint32_t user_vb_mask; /* each bit describes a corresp. buffer */
191 /* Which buffer is incompatible (unaligned). */
192 uint32_t incompatible_vb_mask; /* each bit describes a corresp. buffer */
193 /* Which buffer has a non-zero stride. */
194 uint32_t nonzero_stride_vb_mask; /* each bit describes a corresp. buffer */
487 map = (uint8_t*)vb->buffer.user + offset;
492 if (!vb->buffer.resource) {
499 /* the stride cannot be used to calculate the map size of the buffer,
502 * be too small and conversion will overrun the map buffer
511 if (offset + size > vb->buffer.resource->width0) {
512 /* Don't try to map past end of buffer. This often happens when
517 size = vb->buffer.resource->width0 - offset;
523 * crashing (by reading past the end of a hardware buffer mapping)
529 map = pipe_buffer_map_range(mgr->pipe, vb->buffer.resource, offset, size,
533 /* Subtract min_index so that indexing with the index buffer works. */
547 /* Create and map the output buffer. */
579 /* Create and map the output buffer. */
604 /* Setup the new vertex buffer. */
608 /* Move the buffer reference. */
610 mgr->real_vertex_buffer[out_vb].buffer.resource = out_buffer;
622 /* Set the bit for each buffer which is incompatible, or isn't set. */
657 * buffer */
659 /* When sharing one vertex buffer use per-vertex frequency for everything. */
736 /* Find free vertex buffer slots. */
855 pipe_resource_reference(&mgr->real_vertex_buffer[vb].buffer.resource, NULL);
859 /* This will cause the buffer to be unbound in the driver later. */
1027 if (!vb->buffer.resource) {
1036 orig_vb->buffer_offset == vb->buffer_offset && orig_vb->buffer.resource == vb->buffer.resource) {
1041 orig_vb->buffer.resource = vb->buffer.resource;
1185 const uint8_t *ptr = mgr->vertex_buffer[index].buffer.user;
1190 &real_vb->buffer.resource);
1191 if (!real_vb->buffer.resource)
1245 ptr = mgr->vertex_buffer[i].buffer.user;
1250 ptr + start, &real_vb->buffer_offset, &real_vb->buffer.resource);
1251 if (!real_vb->buffer.resource)
1278 * We could query whether each buffer is busy, but that would
1419 mgr->real_vertex_buffer[start_slot + i].buffer.resource = NULL;
1516 if (indirect && indirect->buffer) {
1537 /* Read the used buffer range only once, because the read can be
1540 pipe_buffer_read(pipe, indirect->buffer, indirect->offset, data_size,
1580 * These values determine the user buffer bounds to upload.
1638 * which will determine the user buffer bounds to upload, but