nvc0: upload small buffers through the command buffer

This commit is contained in:
Christoph Bumiller 2011-01-15 12:17:00 +01:00
parent a4a5a9a5ce
commit 5ec66c6e70

View file

@ -116,6 +116,12 @@ nvc0_buffer_upload(struct nvc0_context *nvc0, struct nvc0_resource *buf,
struct nouveau_bo *bounce = NULL;
uint32_t offset;
if (size <= 192) {
nvc0_m2mf_push_linear(nvc0, buf->bo, buf->domain, buf->offset + start,
size, buf->data + start);
return TRUE;
}
mm = nvc0_mm_allocate(nvc0->screen->mm_GART, size, &bounce, &offset);
if (!bounce)
return FALSE;