Lines Matching refs:grow
457 struct crocus_growing_bo *grow,
462 grow->bo = crocus_bo_alloc(bufmgr, name, size);
463 grow->bo->kflags |= EXEC_OBJECT_CAPTURE;
464 grow->partial_bo = NULL;
465 grow->partial_bo_map = NULL;
466 grow->partial_bytes = 0;
468 grow->map = realloc(grow->map, grow->bo->size);
470 grow->map = crocus_bo_map(NULL, grow->bo, MAP_READ | MAP_WRITE);
471 grow->map_next = grow->map;
605 * after we tried to "grow" the buffer in an earlier operation.
608 finish_growing_bos(struct crocus_growing_bo *grow)
610 struct crocus_bo *old_bo = grow->partial_bo;
614 memcpy(grow->map, grow->partial_bo_map, grow->partial_bytes);
616 grow->partial_bo = NULL;
617 grow->partial_bo_map = NULL;
618 grow->partial_bytes = 0;
630 struct crocus_growing_bo *grow = grow_state ? &batch->state : &batch->command;
631 struct crocus_bo *bo = grow->bo;
633 if (grow->partial_bo) {
635 * Finish our last grow operation so we can start a new one.
638 finish_growing_bos(grow);
644 grow->partial_bo_map = grow->map;
654 grow->map = malloc(new_bo->size);
656 grow->map = crocus_bo_map(NULL, new_bo, MAP_READ | MAP_WRITE);
686 * grow and replace the state buffer. They then try to emit a
714 * To do that, we keep a reference to the old BO in grow->partial_bo,
715 * and store the number of bytes to copy in grow->partial_bytes. We
728 grow->partial_bo = new_bo; /* the one reference of the OLD bo */
729 grow->partial_bytes = used;