For even more info, use /path/to/blender --debug-cycles -- --cycles-print-stats
(yes, the extra -- is intentional).
The problem is that -fassociative-math
turns (1.0f - cos_NH2) + alpha2 * cos_NH2
into cos_NH2 * (alpha2 - 1.0f) + 1.0f
, which is equivalent in exact arithmetic but not in float32 since…
Update: I can reproduce this with a constant world background, a plane and a Refraction BSDF with GGX, Roughness 0.01 and any IOR != 1.0. Switching to Beckmann or another roughness fixes it, so it…
If I remember correctly, this also needs to be done in the OSL version.
current_group
is a shared_ptr
member variable of the OSL compiler here, my intention was to steal its reference and clear it in a single line.
Quite possible that I got it wrong though, I'll…
This seems like a good improvement/cleanup, even if it doesn't address the specific crash in the linked ticket.
I think the groupdata allocation is fine as-is for now, we can always change it…