Following diff D14623 and Brecht's recommendations by email, this is the proposed fix for passes and bounce limits in regards to MNEE.
Details
Diff Detail
Event Timeline
Thanks Christophe, something we could do is return the number of valid manifold vertices instead of a success bool flag: This would allow us to compute everything we need while not having to change the signature that much? What do you think?
I do not think it would be that much better: for one, we do have to test for success and maximum recursion depths within mnee.h (so we already compute them internally); and for second, the function is only used once, from shade_surface.h, so its signature (slightly expended here) does not matter much.
This being said, if for some obscure reason it is preferable here, in a mega-kernel, to have less return variables, then I obviously would be fine with changing this code.
In general it's preferable to return fewer variables to reduce register pressure. I think it would be slightly better to return a single variable.