void radeon_clear_saved_cs(struct radeon_saved_cs *saved)
{
- unsigned i;
-
FREE(saved->ib);
-
- for (i = 0; i < saved->bo_count; i++)
- pb_reference(&saved->bo_list[i].buf, NULL);
FREE(saved->bo_list);
memset(saved, 0, sizeof(*saved));
};
struct radeon_bo_list_item {
- struct pb_buffer *buf;
+ uint64_t bo_size;
uint64_t vm_address;
uint64_t priority_usage; /* mask of (1 << RADEON_PRIO_*) */
};
/* Note: Buffer sizes are expected to be aligned to 4k by the winsys. */
const unsigned page_size = sctx->b.screen->info.gart_page_size;
uint64_t va = saved->bo_list[i].vm_address;
- uint64_t size = saved->bo_list[i].buf->size;
+ uint64_t size = saved->bo_list[i].bo_size;
bool hit = false;
/* If there's unused virtual memory between 2 buffers, print it. */
if (i) {
uint64_t previous_va_end = saved->bo_list[i-1].vm_address +
- saved->bo_list[i-1].buf->size;
+ saved->bo_list[i-1].bo_size;
if (va > previous_va_end) {
fprintf(f, " %10"PRIu64" -- hole --\n",
if (list) {
for (i = 0; i < cs->num_buffers; i++) {
- pb_reference(&list[i].buf, &cs->buffers[i].bo->base);
+ list[i].bo_size = cs->buffers[i].bo->base.size;
list[i].vm_address = cs->buffers[i].bo->va;
list[i].priority_usage = cs->buffers[i].priority_usage;
}
if (list) {
for (i = 0; i < cs->csc->crelocs; i++) {
- pb_reference(&list[i].buf, &cs->csc->relocs_bo[i].bo->base);
+ list[i].bo_size = cs->csc->relocs_bo[i].bo->base.size;
list[i].vm_address = cs->csc->relocs_bo[i].bo->va;
list[i].priority_usage = cs->csc->relocs_bo[i].priority_usage;
}