Mesa (master): nvc0: upload small buffers through the command buffer

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Sat Jan 15 11:19:44 UTC 2011


Module: Mesa
Branch: master
Commit: 5ec66c6e709d8ca95094dc217f51cf0220caa248
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ec66c6e709d8ca95094dc217f51cf0220caa248

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Sat Jan 15 12:17:00 2011 +0100

nvc0: upload small buffers through the command buffer

---

 src/gallium/drivers/nvc0/nvc0_buffer.c |    6 ++++++
 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 f5ac655..dad69e1 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;




More information about the mesa-commit mailing list