memcpy(nvdev->sa_map + r->start, nvbo->sysmem, bo->size);
- nvbo->base.offset = nvdev->sa.offset + r->start;
- nvbo->base.flags = NOUVEAU_BO_GART;
+ nvbo->offset = nvdev->sa.offset + r->start;
+ nvbo->flags = NOUVEAU_BO_GART;
return 0;
}
nouveau_bo_upload(nvbo);
}
- nvbo->base.offset = nvbo->drm.offset;
+ nvbo->offset = nvbo->drm.offset;
if (nvbo->drm.flags & (NOUVEAU_MEM_AGP | NOUVEAU_MEM_PCI))
- nvbo->base.flags = NOUVEAU_BO_GART;
+ nvbo->flags = NOUVEAU_BO_GART;
else
- nvbo->base.flags = NOUVEAU_BO_VRAM;
+ nvbo->flags = NOUVEAU_BO_VRAM;
return 0;
}
ret = nouveau_bo_validate(chan, bo, fence, pbbo->flags);
assert (ret == 0);
+ if (bo->offset == nouveau_bo(bo)->offset &&
+ bo->flags == nouveau_bo(bo)->flags) {
+ /*XXX: could avoid reloc in this case, except with the
+ * current design we'd confuse the GPU quite a bit
+ * if we did this. Will fix soon.
+ */
+ }
+ bo->offset = nouveau_bo(bo)->offset;
+ bo->flags = nouveau_bo(bo)->flags;
+
while ((r = ptr_to_pbrel(pbbo->relocs))) {
uint32_t push;