[Nouveau] NV50 compute support questions

Hans de Goede hdegoede at redhat.com
Wed Dec 2 07:34:26 PST 2015


On 01-12-15, Samuel Pitoiset wrote:

 >>> Ok, here is a MMT trace of vectorAdd:
 >>>
 >>> https://fedorapeople.org/~jwrdegoede/vectorAdd.log.gz
 >>
 >> Hi Hans,
 >>
 >> Thanks a lot.
 >
 > Well, I didn't know but Martin has a GK208...
 > I just tested the compute support on his card and ... it works without
 > any changes. :-)
 >
 > I'm sorry, I was sure the compute support didn't work on this chipset.

No need to be sorry because, ...

 > Feel free to test on your GK208 and report back if you have problems.

I've done that, and for me it does not work, if I try to enable compute
support like this:

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index 461fcaa..ab4ea85 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -187,7 +187,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
     case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
        return (class_3d >= NVE4_3D_CLASS) ? 1 : 0;
     case PIPE_CAP_COMPUTE:
-      return (class_3d <= NVE4_3D_CLASS) ? 1 : 0;
+      return 1;
     case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
        return nouveau_screen(pscreen)->vram_domain & NOUVEAU_BO_VRAM ? 1 : 0;

@@ -246,8 +246,6 @@ nvc0_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
           return 0;
        break;
     case PIPE_SHADER_COMPUTE:
-      if (class_3d > NVE4_3D_CLASS)
-         return 0;
        break;
     default:
        return 0;
@@ -574,11 +572,10 @@ nvc0_screen_init_compute(struct nvc0_screen *screen)
     case 0xd0:
        return nvc0_screen_compute_setup(screen, screen->base.pushbuf);
     case 0xe0:
-      return nve4_screen_compute_setup(screen, screen->base.pushbuf);
     case 0xf0:
     case 0x100:
     case 0x110:
-      return 0;
+      return nve4_screen_compute_setup(screen, screen->base.pushbuf);
     default:
        return -1;
     }

Then as soon as I do startx (which starts gnome-shell) the machine
freezes. This is with mesa-master with the above changes on top.

X / gnome-shell will happily work of I do not call nve4_screen_compute_setup()
but then test/trivial/compute fails with a null-ptr exception.

Do you perhaps have some extra patches in your tree, or am I just unlucky ?

I've tested this on both a 4.2 and a 4.4-rc3 kernel.

Regards,

Hans


More information about the Nouveau mailing list