imageworks/OpenShadingLanguage — pull request #428 by Nazg-Gul (2014-11-02 13:04:28+00:00)
Title: Blender fixes

Root of the issue which this change tries to solve is that closure class might use structures which are expected to be aligned in memory. For example, in Blender closure has float3 structures which uses SSE registers and intrinsics for some operations.

When such classes are allocated with genuine allocation, the alignment is preserved. But since ClosureRegister uses pool the alignment assumptions are broken and there were no way to force class to be aligned in memory.

I've tried to make changes as much straightforward as possible and beneficial for everyone, but maybe there are ways to make them even more clear. There might be also different solution which i'm not seeing yet?