Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(simd.h): fix leaking of Imath.h into public headers (AcademySoftw…
…areFoundation#4062) A recent change (PR 4026) tried to include Imath.h in cases where there was no SSE support (to provide a fallback implementation of matrix invert, because simd.h's native one requires SSE), but it had a mistake -- it used `#if !OIIO_SIMD_SSE` prior to that symbol being defined! This caused the header to always be included, which is not what we wanted, as we desired for that header to not be exposed in the public headers. This patch offers a temporary/partial fix by simply moving that guarded include later in the file to after OIIO_SIMD_SSE is defined. For architectures that support SSE, at least, this achieves our goal of not exposing Imath.h in public headers. I need this patch right away to solve a particular problem I'm running into. Longer term, we note that this isn't a full solution -- on non-SSE architectures (like ARM), it still ends up exposing Imath.h against our desire. For today, so be it. A better fix would be to rewrite our current SSE-requiring invert to change the SSE intrinsics therein to the wrapped kind we use with our simd classes, which will let it work fine with ARM. But I feel like that needs to be done carefully and with more testing than I can afford at this minute when I need this fix. I will return to it shortly, but need this patch now. Signed-off-by: Larry Gritz <[email protected]> Signed-off-by: Peter Kovář <[email protected]>
- Loading branch information