nvc0: create the SW object
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Fri, 7 Feb 2014 21:51:27 +0000 (22:51 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Fri, 7 Feb 2014 21:53:37 +0000 (22:53 +0100)
It's required for being able to use software methods now.

src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.h

index 752d72b5944bc3fcbe918c661a2162bf21076a11..6bf0a3a3093a37204ac2c670c650a18b1b4bdb90 100644 (file)
@@ -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:
index 27a0c5f784d8e93cb9b0e188e80d6eb22d2e2615..c58add537880a6893a417ac04fb3c2330715b1bb 100644 (file)
@@ -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 *