Mesa (master): nvc0: create the SW object

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Fri Feb 7 21:55:26 UTC 2014


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

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Fri Feb  7 22:51:27 2014 +0100

nvc0: create the SW object

It's required for being able to use software methods now.

---

 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c |    9 +++++++++
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.h |    1 +
 2 files changed, 10 insertions(+)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index 752d72b..6bf0a3a 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -361,6 +361,7 @@ nvc0_screen_destroy(struct pipe_screen *pscreen)
    nouveau_object_del(&screen->eng2d);
    nouveau_object_del(&screen->m2mf);
    nouveau_object_del(&screen->compute);
+   nouveau_object_del(&screen->nvsw);
 
    nouveau_screen_fini(&screen->base);
 
@@ -597,6 +598,14 @@ nvc0_screen_create(struct nouveau_device *dev)
    screen->base.fence.emit = nvc0_screen_fence_emit;
    screen->base.fence.update = nvc0_screen_fence_update;
 
+
+   ret = nouveau_object_new(chan,
+                            (dev->chipset < 0xe0) ? 0x1f906e : 0x906e, 0x906e,
+                            NULL, 0, &screen->nvsw);
+   if (ret)
+      FAIL_SCREEN_INIT("Error creating SW object: %d\n", ret);
+
+
    switch (dev->chipset & ~0xf) {
    case 0x100:
    case 0xf0:
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.h b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.h
index 27a0c5f..c58add5 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.h
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.h
@@ -76,6 +76,7 @@ struct nvc0_screen {
    struct nouveau_object *eng2d;
    struct nouveau_object *m2mf;
    struct nouveau_object *compute;
+   struct nouveau_object *nvsw;
 };
 
 static INLINE struct nvc0_screen *




More information about the mesa-commit mailing list