Page MenuHome

MNEE: Better handling of passes and bounce limits
ClosedPublic

Authored by Christophe Hery (chery) on Apr 23 2022, 6:36 PM.

Details

Summary

Following diff D14623 and Brecht's recommendations by email, this is the proposed fix for passes and bounce limits in regards to MNEE.

Diff Detail

Repository
rB Blender

Event Timeline

Christophe Hery (chery) requested review of this revision.Apr 23 2022, 6:36 PM
Christophe Hery (chery) created this revision.

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.

Brecht Van Lommel (brecht) requested changes to this revision.Apr 25 2022, 4:53 PM

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.

This revision now requires changes to proceed.Apr 25 2022, 4:53 PM

Updating diff with just a single int variable returned.

This revision is now accepted and ready to land.Apr 28 2022, 5:57 PM