[Nouveau] Tesla branch limits?

Ilia Mirkin imirkin at alum.mit.edu
Sat Nov 1 13:47:59 PDT 2014


Hello,

We're seeing a very odd issue on many (all?) tesla chips (G8x, G9x,
G200, GT21x) related to looping. People will have loops in glsl like

for (i = 0; i < 200; i++) {
  ...
  if (cond) break;
}

And it seems like if it breaks out of the loop early, all's well, but
eventually it peeters out (I haven't figured out exactly when though).

See bug at https://bugs.freedesktop.org/show_bug.cgi?id=78161 -- I've
traced both the nouveau-generated shader code and the nvidia-generated
shader code. Outside of the nvidia-generated code being a lot more
efficient (you guys clearly have better flow analysis), I can't see
any significant differences. I've tried playing with not using
breakaddr/break instructions, not using conditional breaks, etc. I
believe one of those attempts ended up producing slightly different
results (visually), but I suspect it was just due to a change in the
number of branches.

We are aware that there is a call limit (method 0x1290), which we
don't end up setting, but haven't seen anything that controls branch
counts. Setting 0x1290 does not appear to fix things either.

Any ideas you might have on what's going wrong would be very useful.

Thanks,

  -ilia


More information about the Nouveau mailing list