summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-01-15 12:17:00 +0100
committerChristoph Bumiller <[email protected]>2011-01-15 12:17:00 +0100
commit5ec66c6e709d8ca95094dc217f51cf0220caa248 (patch)
tree2cf2a26e7b9d6e89f2e73f43e667caf630b66ec9 /src/gallium/drivers
parenta4a5a9a5ce255e34ba92396dacd997f7c6f96462 (diff)
nvc0: upload small buffers through the command buffer
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_buffer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_buffer.c b/src/gallium/drivers/nvc0/nvc0_buffer.c
index f5ac6557fe9..dad69e17ef7 100644
--- a/src/gallium/drivers/nvc0/nvc0_buffer.c
+++ b/src/gallium/drivers/nvc0/nvc0_buffer.c
@@ -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;