Mesa (master): nouveau: don't try to use push_data if it's not implemented

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Sun Jan 27 12:47:17 UTC 2013


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

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Fri Jan 25 19:37:40 2013 +0100

nouveau: don't try to use push_data if it's not implemented

---

 src/gallium/drivers/nouveau/nouveau_buffer.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.c b/src/gallium/drivers/nouveau/nouveau_buffer.c
index fdeeee5..0c3d43b 100644
--- a/src/gallium/drivers/nouveau/nouveau_buffer.c
+++ b/src/gallium/drivers/nouveau/nouveau_buffer.c
@@ -124,6 +124,9 @@ nouveau_transfer_staging(struct nouveau_context *nv,
    const unsigned adj = tx->base.box.x & NOUVEAU_MIN_BUFFER_MAP_ALIGN_MASK;
    const unsigned size = align(tx->base.box.width, 4) + adj;
 
+   if (!nv->push_data)
+      permit_pb = FALSE;
+
    if ((size <= NOUVEAU_TRANSFER_PUSHBUF_THRESHOLD) && permit_pb) {
       tx->map = align_malloc(size, NOUVEAU_MIN_BUFFER_MAP_ALIGN);
       if (tx->map)




More information about the mesa-commit mailing list