{
if (likely(cmd->push_bo != NULL)) {
struct nvk_cmd_push push = {
- .bo = cmd->push_bo,
- .start_dw = cmd->push.start - (uint32_t *)cmd->push_bo->map,
- .dw_count = nv_push_dw_count(&cmd->push),
+ .bo = cmd->push_bo->bo,
+ .map = cmd->push.start,
+ .bo_offset = (char *)cmd->push.start - (char *)cmd->push_bo->map,
+ .range = nv_push_dw_count(&cmd->push) * 4,
};
util_dynarray_append(&cmd->pushes, struct nvk_cmd_push, push);
}
util_dynarray_foreach(&cmd->pushes, struct nvk_cmd_push, p) {
struct nv_push push = {
- .start = (uint32_t *)p->bo->map + p->start_dw,
- .end = (uint32_t *)p->bo->map + p->start_dw + p->dw_count,
+ .start = (uint32_t *)p->map,
+ .end = (uint32_t *)((char *)p->map + p->range),
};
vk_push_print(fp, &push, &dev->pdev->info);
}
push_add_bo(&pb, bo->bo, NOUVEAU_WS_BO_RD);
util_dynarray_foreach(&cmd->pushes, struct nvk_cmd_push, push)
- push_add_push(&pb, push->bo->bo, push->start_dw * 4, push->dw_count * 4);
+ push_add_push(&pb, push->bo, push->bo_offset, push->range);
util_dynarray_foreach(&cmd->bo_refs, struct nvk_cmd_bo_ref, ref)
push_add_bo(&pb, ref->bo, NOUVEAU_WS_BO_RDWR);